
Unauthenticated Remote Code Execution in motionEye <= 0.43.1b4
This repository contains detection rules for CVE-2025-60787, an unauthenticated RCE vulnerability in motionEye.
Payload injected into:
Example PoC payload:
$(touch /tmp/test).%Y-%m-%d-%H-%M-%S
When motion restarts, the shell command executes and creates /tmp/test.
Scan motionEye configuration directory:
yara -r rules/yara/motioneye_rce_cve_2025_60787.yar /etc/motioneye/
Queries included:
Start vulnerable container:
docker run -d --name motioneye -p 9999:8765 ghcr.io/motioneye-project/motioneye:edge
Verify version:
docker logs motioneye | grep "motionEye server"
Access Web UI:
http://127.0.0.1:9999
Login:
admin (blank password)
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
| Role | Author |
|---|---|
| Vulnerability Discovery & PoC | prabhatverma47 |
| Detection Engineering | Security Research Community |
MIT License - See LICENSE file.
| ID | Detection Name | Description |
|---|
| 01 | Web Request Detection | Identifies JS bypass attempts and shell payloads |
| 02 | Process Execution | Detects motion spawning shell processes |
| 03 | File Creation | Detects suspicious files in /tmp |
| 04 | Docker/Syslog | Monitors container activity |
| 05 | Threat Hunting | Detects configuration tampering |