Triotion/WP-Scanner
GitHub: Triotion/WP-Scanner
一款覆盖 70 个 CVE 的高级 WordPress 漏洞扫描与自动化利用框架,支持从指纹识别到漏洞利用的完整流程。
Stars: 22 | Forks: 5
# WP-Scanner v3.0.0

**高级 WordPress 漏洞扫描与利用框架**
## 功能
- 跨越 WordPress 核心、28 个插件和 15 个主题的 **70 个 CVE**
- 全面的指纹识别(版本、主题、插件、用户,24 种检测方法)
- 包含 31 个 exploit handler 的主动漏洞利用(RCE、SQLi、文件上传、SSRF、路径遍历)
- 最新 2024-2026 年 CVE,包括 **wp2shell RCE chain** (CVE-2026-63030 + CVE-2026-60137)
- 支持线程安全并行执行的大规模扫描
- 生成带有 XSS 防护的 HTML 和 Markdown 报告
- 自动更新工具和漏洞数据库
## 环境要求
- **Python 3.10+** (使用 `from __future__ import annotations`)
- 仅需 6 个依赖项:`requests`、`beautifulsoup4`、`colorama`、`urllib3`、`packaging`、`tqdm`
## 安装说明
```
git clone https://github.com/Triotion/wp-scanner.git
cd wp-scanner
pip install -r requirements.txt
```
## 快速开始
### 基本扫描
```
python wp_scanner.py -t example.com
```
### 扫描并利用漏洞
```
python wp_scanner.py -t example.com --exploit
```
### 扫描并生成 HTML 报告
```
python wp_scanner.py -t example.com --report-format html
```
### 从文件批量扫描
```
python wp_scanner.py -l targets.txt --mass-output-dir mass_results
```
### 更新工具和数据库
```
python wp_scanner.py --update
```
### 扫描前自动更新
```
python wp_scanner.py -t example.com --auto-update
```
## 目标列表构建器
生成并验证用于大规模扫描的目标列表:
```
python create_targets_list.py -i raw_urls.txt -o targets.txt --check-wordpress
```
### 选项
```
python create_targets_list.py [-h] [-o OUTPUT] [-i INPUT_FILE]
[-u URLS [URLS ...]] [--subdomains SUBDOMAINS]
[--append] [--check-wordpress]
```
| 标志 | 描述 |
|------|-------------|
| `-i`, `--input` | 包含目标的输入文件(每行一个) |
| `-o`, `--output` | 目标列表的输出文件 |
| `-u`, `--urls` | 要直接添加的 URL |
| `--subdomains` | 子域名枚举结果文件 |
| `--append` | 追加到输出文件而不是覆盖 |
| `--check-wordpress` | 验证目标是否运行 WordPress(较慢) |
## CLI 选项
```
python wp_scanner.py [-h] [-t TARGET] [-l TARGETS_FILE] [-o OUTPUT]
[--threads THREADS] [--timeout TIMEOUT]
[--user-agent USER_AGENT] [--proxy PROXY]
[--exploit] [-v] [--mass-output-dir MASS_OUTPUT_DIR]
[--update] [--auto-update]
[--report-format {console,html,md}]
```
| 标志 | 描述 | 默认值 |
|------|-------------|---------|
| `-t`, `--target` | 目标 WordPress 网站 URL | - |
| `-l`, `--targets-file` | 包含目标 URL 的文件 | - |
| `-o`, `--output` | 输出目录 | `results__` |
| `--threads` | 扫描线程数 | 5 |
| `--timeout` | 请求超时时间(秒) | 30 |
| `--user-agent` | 自定义 User-Agent | `WPS-Scanner/3.0` |
| `--proxy` | HTTP 代理 URL | - |
| `--exploit` | 运行漏洞利用模块 | off |
| `-v`, `--verbose` | 详细输出 | off |
| `--mass-output-dir` | 大规模扫描结果根目录 | `mass_scan_results` |
| `--update` | 更新工具 + 数据库 | - |
| `--auto-update` | 扫描前自动更新 | off |
| `--report-format` | 输出格式 | `console` |
## 输出结构
```
results_example.com_20260728_143022/
├── scan_results.log
├── wp_info.json
├── vulnerabilities.json
├── report.html (if --report-format html)
├── report.md (if --report-format md)
└── exploits/
└──
```
## 漏洞数据库
涵盖最新 WordPress 攻击面的 **70 个 CVE**:
| 类别 | 数量 | 知名 CVE |
|----------|-------|--------------|
| WordPress Core | 20 | CVE-2026-63030 (wp2shell RCE), CVE-2026-60137 (WP_Query SQLi), CVE-2024-2802 (HTML API DoS) |
| Plugins | 35 | CVE-2024-11613 (文件上传 RCE), CVE-2025-25833 (LayerSlider RCE), CVE-2024-27956 (wp-automatic SQLi) |
| Themes | 15 | 多个存储型 XSS 和开放重定向漏洞 |
### 插件覆盖范围(28 个插件)
Elementor、WooCommerce、Wordfence、Contact Form 7、WP File Manager、LayerSlider、Yoast SEO、Classic Editor、Akismet、Jetpack、wpAutomatic、Fancy Product Designer、WP Activity Log、Custom CSS-JS-PHP、Chatbot with ChatGPT、The Events Calendar 等。
### 漏洞利用方法(31 个 handler)
| 方法 | 目标 | CVE |
|--------|--------|-----|
| `wp2shell_rce` | WP Core 6.9-7.0 | CVE-2026-63030 + CVE-2026-60137 |
| `wp_query_sqli` | WP Core <6.8.6 | CVE-2026-60137 |
| `elementor_rce` | Elementor Pro | CVE-2024-28019 |
| `layerslider_rce` | LayerSlider | CVE-2025-25833 |
| `file_upload_rce` | WP File Upload | CVE-2024-11613 |
| `fpd_file_upload` | Fancy Product Designer | CVE-2024-51919 |
| `wp_automatic_sqli_rce` | wpAutomatic | CVE-2024-27956 |
| `custom_css_js_php_rce` | Custom CSS-JS-PHP | CVE-2026-6433 |
| `woocommerce_file_download` | WooCommerce | CVE-2024-28023 |
| `woocommerce_sqli` | WooCommerce | CVE-2024-28024 |
| `wp_core_path_traversal` | WP Core | CVE-2024-28025 |
| `wp_file_manager_rce` | WP File Manager | CVE-2024-28021 |
| `wpdatatables_sqli` | WPDataTables | CVE-2024-28022 |
| `wp_super_cache_rce` | WP Super Cache | CVE-2024-28020 |
| `yuzo_related_posts` | Yuzo Related Posts | CVE-2024-28026 |
| `nextgen_gallery_sqli` | NextGEN Gallery | CVE-2024-28027 |
| `rest_api_content_injection` | WP Core 4.7.x | CVE-2017-1001000 |
| `wp_mail_content_injection` | WP Core <4.6.2 | CVE-2016-10033 |
| 另外 13 个 | 各种 | - |
## 项目结构
```
wp-scanner/
├── wp_scanner.py # Main entry point, CLI, WPScanner, MassScanner
├── create_targets_list.py # Target list builder with WP detection
├── modules/
│ ├── __init__.py
│ ├── utils.py # Banner, logging, colored output
│ ├── fingerprinter.py # WP detection (24 checks, cached homepage)
│ ├── vuln_scanner.py # DB loader, version matching
│ ├── exploiter.py # 31 exploit handlers
│ ├── reporter.py # HTML/Markdown report generation
│ └── updater.py # Self-update with SHA-256 verification
├── data/
│ └── vulnerability_db.json # Master vulnerability database (70 CVEs)
├── requirements.txt # 6 dependencies
├── pyproject.toml # Build config, ruff, mypy, pytest
├── version.json # v3.0.0
└── .gitignore
```
## 开发说明
### 代码检查
```
ruff check .
```
### 类型检查
```
mypy wp_scanner.py modules/
```
### 测试
```
pytest tests/ -v
```
## 安全说明
- 所有用户输入均经过净化处理;HTML 报告使用 `html.escape()` 来防止 XSS
- exploit 模块仅供授权测试使用
- 大规模扫描器使用 `copy.deepcopy()` 来防止线程参数突变
- 通过 `threading.Lock` 实现线程安全的共享状态
- 自更新时进行 SHA-256 哈希验证
## 免责声明
此工具仅供授权安全测试使用。在扫描或利用任何系统之前,请务必获得适当的书面授权。作者不对任何滥用或损坏负责。
## 作者
由 [@Triotion](https://github.com/Triotion/) 创建 - [Telegram](https://t.me/Triotion)
## 开源许可
MIT License - 详见 [LICENSE](LICENSE)。
标签:CISA项目, Python, WordPress, 加密, 域名侦查, 密码管理, 无后门, 无服务器架构, 漏洞扫描器, 逆向工具, 配置审计