Description
RaspberryMatic / OCCU contains a unauthenticated remote code execution (RCE) vulnerability, caused by multiple issues within the Java based HMIPServer.jar component. The webui allows for Firmware uploads which can be reached through the URL `/pages/jpages/system/DeviceFirmware/addFirmware`. This allows an unauthenticated attacker to upload a malicious .tgz archive to the server, which will be automatically extracted without any further checks. As this entry can contain ../sequences, it is possible to break out of the predefined temp directory and write files to other locations outside this path.
This vulnerability is commonly known as the Zip Slip vulnerability and can be used to overwrite arbitrary files on the main filesystem. It is therefore possible to overwrite the watchdog script with a malicious payload in `/usr/local/addons/mediola/bin/`, which will be executed every five minutes through a cron job where attackers can gain remote code execution as root user, allowing a full system compromise.
RaspberryMatic versions <= `3.73.9.20240130` are vulnerable.
Module options
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/linux/http/raspberrymatic/unauth_rce_cve_2024_24578msf undefined(unauth_rce_cve_2024_24578) > show actions ...actions...msf undefined(unauth_rce_cve_2024_24578) > set ACTION < action-name >msf undefined(unauth_rce_cve_2024_24578) > show options ...show and set options...msf undefined(unauth_rce_cve_2024_24578) > runPrioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub