用于CVE-2025-60787的检测规则和YARA/KQL签名,这是motionEye中通过配置注入实现未经身份验证的远程代码执行漏洞,包含进程执行和文件创建监控。
motionEye <= 0.43.1b4 中的未认证远程代码执行
此仓库包含针对 CVE-2025-60787(motionEye 中未认证 RCE 漏洞)的检测规则。
注入点:
PoC 载荷示例:
$(touch /tmp/test).%Y-%m-%d-%H-%M-%S
当 motion 重启时,Shell 命令将执行并创建 /tmp/test。
扫描 motionEye 配置目录:
yara -r rules/yara/motioneye_rce_cve_2025_60787.yar /etc/motioneye/
包含的查询:
启动易受攻击的容器:
docker run -d --name motioneye -p 9999:8765 ghcr.io/motioneye-project/motioneye:edge
验证版本:
docker logs motioneye | grep "motionEye server"
访问 Web 界面:
http://127.0.0.1:9999
登录:
admin(空密码)
cve-2025-60787-detection/
├── README.md
├── LICENSE
├── .gitignore
├── rules/
│ ├── yara/
│ │ └── motioneye_rce_cve_2025_60787.yar
│ └── kql/
│ ├── 01_web_request_js_bypass_and_shell_payload.kql
│ ├── 02_process_execution_shell_spawned_by_motion.kql
│ ├── 03_file_creation_tmp_by_motion_process.kql
│ ├── 04_docker_exec_and_syslog_motioneye.kql
│ └── 05_threat_hunting_motioneye_config_file_changes.kql
└── docs/
└── iocs.md
| 角色 | 作者 |
|---|---|
| 漏洞发现与 PoC | prabhatverma47 |
| 检测工程 | 安全研究社区 |
MIT 许可证 - 请参阅 LICENSE 文件。
| ID | 检测名称 | 描述 |
|---|
| 01 | Web 请求检测 | 识别 JavaScript 绕过尝试和 Shell 载荷 |
| 02 | 进程执行 | 检测 motion 生成 Shell 进程 |
| 03 | 文件创建 | 检测 /tmp 中的可疑文件 |
| 04 | Docker/Syslog | 监控容器活动 |
| 05 | 威胁狩猎 | 检测配置篡改 |