Chronus is an easy/medium Vulnhub machine. It features significant bugs such as Remote Command Execution (RCE) and a privilege escalation path via Node.js.
First, we find the target IP on the network:
Target IP identified: 192.168.1.174
/etc/hosts file:
192.168.1.174 chronos.local
The site on port 8000 passes a Base58 encoded string to a "format" parameter. Decoding the string 4ugYDuAkScCG5gMcZjEN3mALyG1dD5ZYsiCfWvQ2w9anYGyL reveals it calls the system date command.
We can inject a Netcat reverse shell payload. Encode the following command into Base58 and send it via the "format" parameter:
Start your listener:
Inside /opt/chronos-v2/backend, the package.json reveals a vulnerable version of express-fileupload (1.1.7). This is vulnerable to Prototype Pollution.
We use a Python exploit (poc.py) to trigger RCE. Once we have a shell as user imera, we check sudo permissions:
Imera can run node and npm as root. We use the GTFOBins method to spawn a root shell: