kdo2064/wp-hijack

GitHub: kdo2064/wp-hijack

针对WordPress站点的自动化安全审计与渗透测试工具,支持AI驱动的漏洞利用代码生成和多格式报告输出。

Stars: 2 | Forks: 0

高级 WordPress 漏洞扫描器 & AI 驱动利用框架

Python MIT AI Platform

## 什么是 WP-Hijack? **WP-Hijack** 是一个功能齐全、开源的 WordPress 安全扫描器,专为渗透测试人员、漏洞赏金猎人和红队设计。它运行一个 **10 阶段异步管道**——从被动侦察到 AI 生成的利用代码——**无需任何 API 密钥**(通过 Ollama 可 100% 离线工作)。 ## 亮点 | 领域 | 功能 | |---|---| | **CMS 检测** | 7 信号 WordPress 指纹识别,包括 `/wp-json/` REST API 和 `Link: api.w.org` 头 | | **枚举** | 53 个插件词表 + 23 个主题词表 —— 适用于加固站点和 CDN 保护的站点 | | **用户发现** | 4 种方法:REST API、作者存档(URL + 正文)、登录 oracle、XML-RPC 多调用 | | **主动测试** | XML-RPC 滥用 · REST API 检查 · 登录 oracle · 70+ 敏感文件路径 · 安全 SQLi/XSS | | **VulnDB** | 捆绑的 SQLite 数据库(离线)+ 实时 WPVulnerability.net API —— 无需 API 密钥 | | **AI 工作流** | Ollama(本地/免费)、OpenAI、Anthropic、Gemini —— 摘要、利用编写、误报过滤、聊天 | | **报告** | 深色模式 HTML · PDF · JSON · Markdown —— 一次扫描全部生成 | | **弹性** | 指数退避 HTTP 重试 · URL 拼写错误检测 · WAF 规避提示 | ## 安装 ``` git clone https://github.com/kdo2064/wp-Hijack cd wp-Hijack python -m venv .venv ``` ``` # Windows .venv\Scripts\activate # Linux / macOS source .venv/bin/activate ``` ``` pip install -e . wp-hijack --version ``` ### 使用本地 AI —— 无需 API 密钥 ``` # 从 https://ollama.com 安装 Ollama,然后: ollama pull llama3 ollama serve wp-hijack scan https://target.tld --yes-ai ``` ## 快速开始

scan in action

``` # 基本扫描 wp-hijack scan https://target.tld # 扫描 + 自动 AI 分析(无提示词) wp-hijack scan https://target.tld --yes-ai # 深度扫描 — 谨慎检查 + 详细终端输出 wp-hijack scan https://target.tld --cautious --verbose # 从文件批量扫描(每行一个 URL) wp-hijack scan --file targets.txt --output reports # 扫描后交互式 AI 聊天 wp-hijack scan https://target.tld --chat # 更新漏洞数据库 wp-hijack update-db ``` ## 命令与参数 ### 命令 | 命令 | 用途 | |---|---| | `wp-hijack scan ` | 扫描单个目标 | | `wp-hijack scan --file targets.txt` | 从文件批量扫描 | | `wp-hijack update-db` | 从 NVD 源刷新本地漏洞数据库 | | `wp-hijack model-list` | 列出可用的 Ollama 模型 | | `wp-hijack model-select` | 选择并保存活动的 Ollama 模型 | | `wp-hijack show-config` | 打印解析后的配置(密钥已掩码) | | `wp-hijack chat-report report.json` | 针对现有报告进行 AI 聊天 | ### 扫描参数 ``` --file Bulk mode from a text file --config Use a custom config file --output Change the report output directory --no-ai Disable AI for this run --no-confirm Skip active confirmation checks --cautious Slower, more thorough confirmations --markdown Also write a Markdown report --chat Start interactive AI chat after the scan --model Override AI model for one run --provider Override AI provider for one run --verbose Show detailed finding cards in the terminal --yes-ai Auto-run AI analysis (skip prompt) --no-ai-prompt Do not ask for AI analysis after scan ``` ## 配置 默认行为通过 [`config.json`](config.json) 控制: ``` { "ai": { "enabled": true, "provider": "ollama", "model": "llama3", "base_url": "http://localhost:11434/v1" }, "scanner": { "threads": 10, "timeout": 15, "verify_ssl": false }, "confirmation": { "run_confirmations": true, "allow_cautious_tests": false }, "reporting": { "pdf_enabled": true, "html_enabled": true, "json_enabled": true, "markdown_enabled": false } } ``` | 提供商 | `"provider"` 值 | API 密钥 | |---|---|:---:| | Ollama(本地) | `"ollama"` | 否(免费) | | OpenAI | `"openai"` | 是 | | Anthropic | `"anthropic"` | 是 | | Google Gemini | `"gemini"` | 是 | 运行 `wp-hijack show-config` 检查有效的运行时配置。 ## 输出与报告 报告默认保存到 `./reports`: | 格式 | 文件 | 描述 | |---|---|---| | **JSON** | `wp_hijack_.json` | 完整的机器可读扫描数据 | | **HTML** | `wp_hijack_.html` | 深色模式样式化浏览器报告 | | **PDF** | `wp_hijack_.pdf` | 可打印的客户报告 *(需要 WeasyPrint)* | | **Markdown** | `wp_hijack_.md` | 纯文本 —— 添加 `--markdown` 参数 | ## 项目结构 ``` wp_hijack/ ├── cli.py CLI entry point (Typer) ├── scanner.py 10-phase pipeline orchestrator ├── recon.py Passive recon — IP, SSL, headers, title ├── http_client.py Async HTTP — UA rotation, retry, proxy ├── config.py Config loading & validation ├── ai/ AI providers, exploit gen, chat, scoring ├── cms/ CMS detection (WordPress, Joomla, Drupal) ├── enumerators/ Plugin / theme / user enumeration ├── active_tests/ XML-RPC, REST API, SQLi/XSS, file exposure ├── pipeline/ DETECT → CONFIRM data models ├── vulndb/ SQLite DB + WPVulnerability.net client ├── waf/ WAF fingerprinting & evasion ├── reporting/ JSON / HTML / PDF / Markdown writers └── templates/ Jinja2 HTML report template ``` ## 路线图 | 状态 | 功能 | |:---:|---| | 已完成 | 10 阶段异步管道 | | 已完成 | 多 AI(Ollama / OpenAI / Anthropic / Gemini) | | 已完成 | DETECT → CONFIRM → AI EXPLOIT 链 | | 已完成 | 53 插件 + 23 主题词表探测 | | 已完成 | 指数退避 HTTP 重试和 URL 拼写错误检测 | | 已完成 | 深色模式 HTML + PDF + JSON + Markdown 报告 | | 进行中 | WooCommerce 特定漏洞检查 | | 进行中 | Nuclei 模板导出 | | 计划中 | Docker 镜像 | | 计划中 | Web 仪表板(Flask) | | 计划中 | Shodan 侦察集成 | | 计划中 | 自动利用链(多 CVE) | ## 贡献 ``` git clone https://github.com//wp-Hijack git checkout -b feature/my-feature # 做出您的更改 git commit -m "feat: describe your change" git push origin feature/my-feature # 在 GitHub 上打开 Pull Request ``` | 领域 | 位置 | |---|---| | 错误报告 | [提交 issue](https://github.com/kdo2064/wp-Hijack/issues) | | 新主动测试模块 | `wp_hijack/active_tests/` | | 漏洞数据库条目 | `wp_hijack/vulndb/vulns.json` | | 更好的 AI 提示词 | `wp_hijack/ai/exploit_prompts.py` | | 新 CMS 支持 | `wp_hijack/cms/` | ## 法律声明 ## 作者

kdo2064
KDO || Xpert Exploit


GitHub  ·  Issues  ·  Project

WP-Hijack

Stars    Forks

If WP-Hijack helped you, consider starring the repo — it means a lot.
Made for the security community · use it to protect, not to harm.

标签:AI安全, AI风险缓解, Anthropic, Bug Bounty, Chat Copilot, CISA项目, CIS基准, Gemini, LLM评估, Ollama, OpenAI, Python, REST API, WAF规避, WordPress, XML-RPC, XSS, XXE攻击, 主题漏洞, 代码生成, 内存规避, 可自定义解析器, 密码爆破, 密码管理, 插件漏洞, 无后门, 无线安全, 渗透框架, 渗透测试工具, 漏洞情报, 用户枚举, 网络安全, 网络安全审计, 聊天机器人, 隐私保护