HTB — CCTV (Easy Linux)
Easy Linux machine featuring ZoneMinder SQL injection (CVE-2024-51482), bcrypt hash cracking, SSH access and MotionEye RCE (CVE-2025-60787) for privilege escalation.
Overview
CCTV is an Easy-difficulty Linux machine featuring ZoneMinder surveillance software exploitation and MotionEye privilege escalation. This machine teaches:
- CCTV/surveillance system security
- SQL injection in specialized applications
- Password hash cracking
- SSH key-based authentication
- MotionEye RCE exploitation
- Service-based privilege escalation
Enumeration
Port Scanning
Standard web and SSH ports are exposed.
Key Services:
- SSH (22/tcp)
- HTTP (80/tcp) - ZoneMinder application
Web Application
The target hosts ZoneMinder 1.37.63, an open-source video surveillance software management system.
Initial Foothold
CVE Chain Overview
CVE-2024-51482 (SQL Injection)
↓
Database Credential Extraction
↓
Bcrypt Hash Cracking
↓
SSH Access
SQL Injection in ZoneMinder
ZoneMinder 1.37.63 contains an authenticated SQL injection vulnerability that can be exploited to extract sensitive information.
Exploitation Path:
- Identify vulnerable parameter
- Exploit SQL injection to dump database
- Extract user credentials (bcrypt hashes)
- Crack password hashes
- SSH access with recovered credentials
Privilege Escalation
MotionEye Discovery
Once on the system, discover:
- MotionEye service running as root
- Version vulnerable to CVE-2025-60787
- Web interface accessible on localhost
RCE via MotionEye
The privilege escalation involves:
- Port forwarding to access local MotionEye instance
- Exploiting CVE-2025-60787 for command injection
- Executing commands as root via vulnerable service
- Gaining root shell access
Key Concepts
- Understanding surveillance software architecture
- SQL injection exploitation techniques
- Bcrypt hash cracking strategies
- Port forwarding for internal service access
- Command injection in configuration interfaces
Root Flag Location: /root/root.txt
Key Takeaways
- Specialized applications often have unique vulnerabilities
- SQL injection remains a critical threat
- Bcrypt provides strong password protection but isn't unbreakable
- Internal services running as root are high-value targets
- Configuration interfaces need input validation
Tools Used
nmap- Port scanninggobuster- Web enumerationsqlmap- SQL injection automationjohn/hashcat- Password crackingssh- Remote accesschisel- Port forwarding- Custom exploit scripts
Continue the investigation
The complete field notes.
Every command, the full exploitation chain, and all scripts used in this investigation are available to members on Buy Me a Coffee.
Get the full writeup €5 one-off · or monthly membership