nullc0d30/HunterX

GitHub: nullc0d30/HunterX

HunterX 是一款结合 LLM 推理能力的 Web 与 API 漏洞评估框架,旨在填补传统特征匹配扫描器与人工渗透测试之间的空白。

Stars: 7 | Forks: 3

HunterX Official Logo # ⚔️ HunterX **AI 辅助攻击安全框架 — 观察 · 假设 · 探测 · 验证** HunterX 是一个 AI 辅助的攻击安全框架,它将智能侦察、自适应漏洞发现、payload 编排和可解释的安全推理结合到一个单一的模块化平台中。 [![GitHub Release](https://img.shields.io/github/v/release/nullc0d30/HunterX?style=flat-square&logo=github)](https://github.com/nullc0d30/HunterX/releases) [![PyPI Version](https://img.shields.io/pypi/v/hunterx?style=flat-square&logo=pypi)](https://pypi.org/project/hunterx/) [![Python Version](https://img.shields.io/pypi/pyversions/hunterx?style=flat-square&logo=python)](https://python.org) [![License](https://img.shields.io/badge/license-Apache%202.0-green?style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0) [![Tests](https://img.shields.io/github/actions/workflow/status/nullc0d30/HunterX/test.yml?style=flat-square&label=tests)](https://github.com/nullc0d30/HunterX/actions) [![Ruff](https://img.shields.io/badge/ruff-0%20errors-brightgreen?style=flat-square)](https://github.com/astral-sh/ruff) [![Docker](https://img.shields.io/badge/docker-multi--stage-2496ED?style=flat-square&logo=docker)](https://hub.docker.com/r/nullc0d30/hunterx) [![Platform](https://img.shields.io/badge/platform-linux%20%7C%20macOS%20%7C%20windows-lightgrey?style=flat-square)](https://github.com/nullc0d30/HunterX) [![Downloads](https://img.shields.io/pypi/dm/hunterx?style=flat-square&logo=pypi)](https://pypi.org/project/hunterx/) [![OWASP Community](https://img.shields.io/badge/OWASP%20Community-listed-green?style=flat-square)](https://owasp.org/www-community/Vulnerability_Scanning_Tools) ``` # One-shot 扫描 hunterx target.com # AI 辅助全面扫描 hunterx scan https://target.com --ai --ai-model llama3.2 # 列出 modules、运行 diagnostics、查看 reports hunterx module list hunterx doctor hunterx report # 启动 REST API 服务器 hunterx api --port 8443 ``` [安装](#installation) · [为什么选择 HunterX?](#why-hunterx) · [快速开始](#quick-start) · [CLI 参考](#cli-reference) · [对比](#comparison) · [文档](https://nullc0d30.github.io/HunterX) · [贡献](#contributing)
## 为什么选择 HunterX? 传统的漏洞扫描器依赖于对已知特征进行暴力的 payload 匹配。HunterX 采用了不同的安全评估方法——它会在探测之前推理*可能*存在的漏洞,然后通过证据进行验证。 **谁应该使用 HunterX?** 红队操作员、渗透测试人员、Bug 赏金猎人、安全研究人员以及 DevOps 工程师,他们需要一个自动化、具有上下文感知能力且内置安全保障的安全评估平台。 **工作原理:** ``` flowchart LR CLI[CLI / API] --> RE[Recon Engine] RE --> AE[AI Engine] RE --> SK[41 Security Skills] AE --> PL[Payload Engine] SK --> PL PL --> PK[Payload Knowledge Base] PL --> RZ[Reasoning Engine] PK --> PATT["PayloadsAllTheThings (community-maintained)"] RZ --> RP[Reporting] RP --> OUT[JSON / SARIF / HTML / Graph] ``` **核心优势:** - **推理驱动的 pipeline** — 观察、假设、探测、验证。HunterX 构建目标基线,形成假设,执行针对性测试,并通过置信度评分验证发现。 - **AI 原生集成** — 推理引擎、技能规划器、报告生成器和检测 pipeline 都会消费结构化的 AI 输出。LLM 分析是可选的,但已被深度集成。 - **41 个内置安全技能** — 涵盖 Web、API、云、网络、认证和基础设施安全。每个技能都包含 MITRE ATT&CK、OWASP、CWE 和 CAPEC 元数据。 - **Multi-agent 平台** — 10 个专业 agent 通过事件驱动通信进行协作,具有基于 DAG 的 workflow、检查点/恢复以及隔离的内存。 - **Payload 智能平台** — SQLite + FTS5 索引的 payload 仓库,来源于社区维护的 [PayloadsAllTheThings](https://github.com/swisskyrepo/PayloadsAllTheThings) 知识库,具备 5 级安全策略、10 组变异引擎、来源追踪和上下文感知选择。 - **企业级报告** — JSON、Markdown、SARIF 2.1 (VS Code / GitHub CodeQL)、HTML、攻击图、紫队检测规则和 ZIP 证据包。 - **REST API** — FastAPI 服务器,包含 40 多个 endpoint,涵盖扫描、payload 管理、agent 协调、推理、技能和系统健康监控。 - **安全优先设计** — 不可绕过的破坏性 payload 黑名单、WAF 检测并自动中止、可配置的速率限制和基于策略的执行控制。 - **单一代码库,零依赖外部扫描器** — 纯 Python monorepo。无需在单独的工具之间切换或在它们之间传递输出。 ## 对比 HunterX 是对现有安全工具的补充,而不是取代它们。它填补了基于签名的扫描器和手动渗透测试之间的空白。 | 工具 | 主要功能 | AI/推理 | Multi-agent | Payload 智能 | 报告 | |---|---|---|---|---|---| | **HunterX** | AI 辅助漏洞评估 | LLM 原生(多提供商) | 10 个 agent,DAG workflow | FTS5 索引,5 级策略 | SARIF, HTML, 图表, 紫队 | | **Nmap** | 端口扫描 + 服务识别 | — | — | — | XML | | **Nuclei** | YAML 模板匹配 | — | — | — | JSON | | **Metasploit** | Exploit 交付 + 后渗透 | — | — | — | 控制台 | | **Amass** | 子域名 + ASN 枚举 | — | — | — | JSON | | **ffuf** | 模糊测试 / 字典暴力破解 | — | — | — | JSON | **何时使用 HunterX:** 当你需要深度导向的评估,涉及推理、上下文感知的 payload 选择和可解释的发现时——而不仅仅是一份匹配签名的列表。 ## Payload 知识库 HunterX 利用社区维护的 [PayloadsAllTheThings](https://github.com/swisskyrepo/PayloadsAllTheThings) 知识库作为其 payload 数据的主要来源。这是一个社区项目,不代表合作关系或背书——HunterX 只是集成了它并给予了完全的致谢。 - **同步** — `hunterx payload sync`(或 `hunterx update --payloads`)通过浅层 git clone 或最新的 GitHub release 归档来获取最新的 PayloadsAllTheThings 内容。 - **索引** — `hunterx payload index` 在同步的 payload 文件上构建本地 SQLite + FTS5 全文索引,以实现快速、上下文感知的搜索。 - **来源** — 每个被索引的 payload 都记录了其来源:源代码仓库、commit hash、release tag 和 checksum,因此 payload 历史是可审计的。 - **选择** — payload 会根据目标技术、框架、语言和 WAF 的存在进行排名,而不是盲目应用。 ``` hunterx payload sync # Sync the PayloadsAllTheThings knowledge base hunterx payload index # Build the local search index hunterx payload search sqli # Search indexed payloads ``` ## 安装 ### Linux(所有发行版) ``` # System-wide(需要 root) curl -sSL https://raw.githubusercontent.com/nullc0d30/HunterX/main/install.sh | sudo bash # User-local(无需 root) curl -sSL https://raw.githubusercontent.com/nullc0d30/HunterX/main/install.sh | bash -s -- --user ``` 安装程序会自动检测您的发行版,安装系统依赖项,创建 Python 虚拟环境,并通过大小写变体的符号链接使 `hunterx` 命令全局可用。
各发行版软件包详情 | 发行版 | 系统软件包 | 安装命令 | |---|---|---| | **Ubuntu / Debian** | `python3 python3-pip python3-venv` | `sudo apt-get install -y python3 python3-pip python3-venv` | | **Fedora / RHEL** | `python3 python3-pip python3-venv` | `sudo dnf install -y python3 python3-pip python3-venv` | | **Arch** | `python python-pip` | `sudo pacman -S --noconfirm python python-pip` | | **Alpine** | `python3 py3-pip` | `sudo apk add python3 py3-pip` | | **openSUSE** | `python3 python3-pip python3-venv` | `sudo zypper install -y python3 python3-pip python3-venv` |
### pip / pipx ``` pip install hunterx pipx install hunterx # Isolated environment pip install hunterx[all] # With all optional extras ``` ### Docker ``` docker pull nullc0d30/hunterx:latest docker run --rm nullc0d30/hunterx:latest scan target.com docker run --rm -p 8443:8443 nullc0d30/hunterx:latest api --port 8443 ``` ### 从源码构建 ``` git clone https://github.com/nullc0d30/HunterX.git cd HunterX pip install . ``` ## 快速开始 ``` # 使用默认设置扫描 target hunterx example.com # 使用选项进行 Explicit 扫描 hunterx scan https://target.com --profile bounty --preset full # 列出扫描 modules hunterx module list # 运行 diagnostics hunterx doctor # 查看 reports hunterx report # 启动 API 服务器 hunterx api --port 8443 # 显示版本 hunterx --version ```
配置与预设 ``` hunterx scan target.com --profile internal # Comprehensive hunterx scan target.com --profile bounty # Bug-bounty balanced hunterx scan target.com --profile gov # Strict compliance hunterx scan target.com --preset quick # Common vectors hunterx scan target.com --preset full # All skills hunterx scan target.com --preset stealth # Low noise ```
认证扫描 ``` hunterx scan target.com --auth basic --username admin --password secret hunterx scan target.com --auth bearer --token eyJhbGciOiJIUzI1NiIs... hunterx scan target.com --auth cookie --cookie-file cookies.json hunterx scan target.com --auth form --username admin --login-url https://target.com/login ```
AI 辅助扫描 ``` hunterx scan target.com --ai --ai-model llama3.2 # Local Ollama hunterx scan target.com --ai --ai-model gpt-4 # OpenAI ```
## CLI 参考 ### 全局用法 ``` hunterx [--help] [--version] [-v] [-q] [options] ``` | 参数 | 描述 | |---|---| | `--help` | 显示帮助并退出 | | `--version` | 显示版本并退出 | | `-v`, `--verbose` | 详细输出 (`-v`: INFO, `-vv`: DEBUG) | | `-q`, `--quiet` | 仅显示错误 | ### 命令 | 命令 | 描述 | |---|---| | `scan` | 针对目标进行漏洞扫描 | | `module` | 列出和搜索扫描模块 | | `report` | 查看扫描报告和系统概述 | | `doctor` | 运行系统诊断 | | `config` | 查看配置 | | `update` | 更新 payload 和模块 | | `api` | 启动 REST API 服务器 | | `payload` | Payload 智能平台 | | `agents` | Multi-agent 平台管理 | | `workflow` | Workflow 管理 | | `reasoning` | 推理引擎交互 | | `skills` | 安全技能框架 | | `ai` | AI 提供商管理 | ### 扫描选项
目标与执行 | 参数 | 描述 | 默认值 | |---|---|---| | `target` | 目标 URL 或域名 | 必填 | | `-p`, `--payload-dir` | Payload 目录 | `payloads/` | | `-o`, `--output-dir` | 输出目录 | `reports/` | | `-c`, `--config` | YAML 配置文件 | `hunterx.yaml` | | `--profile` | 操作员配置: `internal`, `bounty`, `gov` | `bounty` | | `--preset` | 扫描预设: `quick`, `full`, `stealth` | — | | `--stealth` | 隐蔽级别: `low`, `medium`, `high` | `medium` | | `--threads` | 并发线程 | `5` | | `--category` | 逗号分隔的技能类别 | all | | `--dry-run` | 验证逻辑,不发送请求 | — | | `--passive-only` | 仅侦察阶段 | — | | `--insecure` | 禁用 TLS 验证 | — |
认证 | 参数 | 描述 | |---|---| | `--auth` | 认证类型: `none`, `basic`, `bearer`, `cookie`, `form` | | `--username` | 用于 basic/form 认证的用户名 | | `--password` | 用于 basic/form 认证的密码 | | `--token` | Bearer 或会话 token | | `--cookie-file` | JSON cookie 文件路径 | | `--login-url` | 基于表单的登录 URL | | `--login-data` | 表单字段,格式为 `key=value,key2=value2` |
AI、OOB 与高级选项 | 参数 | 描述 | |---|---| | `--ai` | 启用 AI/LLM 分析 | | `--ai-model` | AI 模型名称(默认: `llama3.2`) | | `--ai-endpoint` | AI 提供商 API endpoint | | `--oob` | 启用带外(OOB)检测 | | `--collaborator` | OOB 协作器回调 URL | | `--no-cluster` | 禁用 AI 发现聚类 | | `--visual` | 可视化: `cli`, `web`, `off` | | `--evidence-level` | 证据细节: `low`, `medium`, `high` | | `--min-confidence` | 置信度阈值 (0.0–1.0) | | `--sarif` | 生成 SARIF 2.1 报告 | | `--graph` | 构建知识图谱 | | `--attack-graph` | 生成攻击图 | | `--threat-model` | 生成威胁模型 | | `--risk` | 运行风险分析 | | `--purple` | 生成紫队规则 | | `--explain` | 生成 AI 解释 | | `--browser` | 启用浏览器智能 | | `--risk-profile` | 风险评分配置 | | `--memory-db` | SQLite 自适应记忆 | | `--plugin-dirs` | 插件目录 |
### 子命令参考
module — 列出和搜索扫描模块 ``` hunterx module list # All modules hunterx module info # Module details hunterx module search # Search modules ```
report — 查看扫描报告 ``` hunterx report # Overview hunterx report -o # Custom directory hunterx report --json # Raw JSON ```
config — 查看配置 ``` hunterx config --show # Current config ```
update — 更新 payload 和模块 ``` hunterx update # Everything hunterx update --force # Re-download hunterx update --release # Release archive hunterx update --payloads # Payloads only ```
payload — Payload 智能平台 ``` hunterx payload sync # Download payloads hunterx payload index # Build search index hunterx payload search # Search payloads hunterx payload info # Payload reasoning hunterx payload stats # Index statistics hunterx payload top # Top performers hunterx payload feedback # Feedback stats hunterx payload policy # Safety policy hunterx payload provenance # Provenance history ``` agents — Multi-agent 平台 ``` hunterx agents list # All agents hunterx agents status # Agent health hunterx agents enable # Enable agent hunterx agents disable # Disable agent ```
workflow — Workflow 管理 ``` hunterx workflow run # Execute workflow hunterx workflow inspect # Inspect workflow hunterx workflow graph # Dependency graph ```
reasoning — 推理引擎 ``` hunterx reasoning inspect # Inspect result hunterx reasoning validate # Validate output ```
skills — 安全技能框架 ``` hunterx skills list # All skills hunterx skills info # Skill details hunterx skills search # Search skills hunterx skills install # Install skill hunterx skills uninstall # Remove skill hunterx skills enable # Enable skill hunterx skills disable # Disable skill hunterx skills verify # Verify integrity hunterx skills doctor # Diagnostics hunterx skills export # Export package hunterx skills stats # Telemetry ```
ai — AI 提供商管理 ``` hunterx ai providers # List providers hunterx ai health # Check health hunterx ai config # View config hunterx ai cache # Cache stats hunterx ai metrics # Usage metrics hunterx ai test # Test provider hunterx ai models # List models ```
api — 启动 REST API 服务器 ``` hunterx api --port 8443 # Port 8443 hunterx api --host 0.0.0.0 --port 8080 # Custom ```
## 示例 ### 基础侦察 ``` hunterx scan target.com --passive-only # Recon only hunterx scan target.com --stealth high --threads 2 # Stealth hunterx scan target.com --dry-run # Logic check ``` ### 高级扫描 ``` hunterx scan https://target.com --profile internal --preset full \ --auth bearer --token $TOKEN --oob hunterx scan target.com --profile bounty --preset quick \ --category injection,authentication hunterx scan api.target.com --category api,cloud --evidence-level high --sarif ``` ### AI 辅助分析 ``` hunterx scan target.com --ai --ai-model llama3.2 hunterx scan target.com --ai --ai-model gpt-4 --ai-endpoint https://my-proxy.example.com hunterx scan target.com --ai --explain ``` ### 报告 ``` hunterx scan target.com --sarif # SARIF for CodeQL hunterx scan target.com --attack-graph # Attack graph hunterx scan target.com --threat-model # Threat model hunterx scan target.com --purple # Purple team rules hunterx scan target.com --graph # Knowledge graph ``` ## 配置 HunterX 默认从当前目录读取 `hunterx.yaml` 文件。 | 部分 | 用途 | |---|---| | `profile` | 操作员配置(internal, bounty, gov) | | `stealth` | 规避时机和延迟 | | `auth` | 认证设置 | | `ai` | AI 提供商、模型、endpoint | | `oob` | 带外(OOB)检测 | | `presets` | 扫描预设(quick, full, stealth) | 覆盖方式:`hunterx scan target.com -c /path/to/config.yaml` ## 更新 ``` hunterx update # Payloads + modules hunterx update --force # Full re-download pip install --upgrade hunterx # Package itself ``` ## 卸载 ``` # pip / pipx pip uninstall hunterx pipx uninstall hunterx # install.sh(system) curl -sSL https://raw.githubusercontent.com/nullc0d30/HunterX/main/install.sh | sudo bash -s -- --uninstall ``` ## 项目结构 ``` hunterx/ ├── cli.py # CLI entry point (13 command groups) ├── api/ # FastAPI REST server ├── engines/ # Scan orchestration engine ├── core/ # Core subsystems │ ├── agents/ # 10-agent platform │ ├── ai/ # AI provider abstraction │ ├── reasoning/ # Reasoning engine (18 goal types) │ ├── skills/ # 41 security skills framework │ ├── auth/ # Authentication providers │ └── protocols/ # WebSocket, GraphQL testers ├── modules/ # Pluggable modules │ ├── intelligence/ # Knowledge graph, threat modeling │ └── payloads/ # Payload Intelligence Platform ├── reporting/ # Report generation ├── plugins/ # User-extensible plugins ├── utils/ # Logging, plugin loader └── config/ # Configuration ``` ## 故障排除
找不到命令 确保安装目录在 PATH 中: ``` export PATH="$PATH:/usr/local/bin" # system install export PATH="$PATH:$HOME/.local/bin" # user install ```
pip 安装失败 ``` python3 -m pip install --upgrade pip python3 -m venv venv && source venv/bin/activate && pip install hunterx ```
AI 提供商错误 ``` hunterx ai health # Check connectivity hunterx ai providers # List configured providers hunterx ai test # Send test prompt ```
## 常见问题
HunterX 与其他扫描器有何不同? HunterX 使用推理驱动的 pipeline(观察 → 假设 → 探测 → 验证),而不是盲目地投递 payload。它将 AI 辅助分析、multi-agent 平台、技能框架、知识图谱和企业级报告集成到了一个单一的平台中。
HunterX 会维护自己的 payload 数据库吗? 不会。HunterX 利用社区维护的 [PayloadsAllTheThings](https://github.com/swisskyrepo/PayloadsAllTheThings) 知识库作为其 payload 来源。内容通过 `hunterx payload sync` 同步,使用 `hunterx payload index` 在本地进行索引,每个 payload 都会记录其来源(源代码仓库、commit、release tag、checksum)。`payloads/` 目录中也内置了一组社区维护的 payload 文件。
我需要 AI 提供商吗? 不需要。AI 分析是可选的。所有 41 个技能无需 AI 即可运行。当需要 LLM 辅助分析时,可以通过 `--ai` 启用。
HunterX 是免费的吗? 是的。基于 Apache 2.0 开源。可免费使用、修改和分发。
我可以添加自定义技能吗? 可以。请查看 `docs/SKILL_SDK.md` 和 `docs/PLUGIN_DEVELOPMENT.md` 了解插件系统。
如何报告安全漏洞? 使用 GitHub 私密漏洞报告:https://github.com/nullc0d30/HunterX/security/advisories/new
## 路线图 查看 [ROADMAP.md](ROADMAP.md) 获取完整的开发路线图。 - **v6.x** — 社区技能仓库,Anthropic/Gemini/Bedrock 提供商,提供商故障转移 - **v7.x** — CI/CD 集成(GitHub Actions, GitLab CI, Jenkins),SIEM 连接器,协作扫描 - **长期** — 技能市场,企业级功能(RBAC,SSO),软件包管理器(Homebrew, apt) ## 更新日志 查看 [CHANGELOG.md](CHANGELOG.md) 获取完整的发布历史。 ## 贡献 HunterX 基于 Apache 2.0 许可,欢迎各种贡献。 ``` git clone https://github.com/YOUR_USERNAME/HunterX.git cd HunterX python -m venv venv && source venv/bin/activate pip install -e ".[all]" git checkout -b feat/your-feature pytest tests/ -v # Run tests ruff check . # Check style git commit -s -m "feat(area): description" git push origin feat/your-feature ``` 查看 [CONTRIBUTING.md](CONTRIBUTING.md) 获取完整指南。 ## 社区资源 HunterX 是社区驱动的,并采用 Apache 2.0 许可。加入该项目,关注开发进展,并探索它所依赖的开源资源。 - [GitHub](https://github.com/nullc0d30/HunterX) — 源代码、问题和讨论 - [文档站点](https://nullc0d30.github.io/HunterX) — 完整文档、教程和 API 参考 - [PayloadsAllTheThings](https://github.com/swisskyrepo/PayloadsAllTheThings) — 由 HunterX Payload 智能平台使用的、社区维护的 payload 知识库 ### 鸣谢 HunterX 站在安全社区的肩膀上。Payload 数据来源于公共安全研究仓库,包括 [PayloadsAllTheThings](https://github.com/swisskyrepo/PayloadsAllTheThings) 及类似的社区项目,并根据其各自的许可使用。请查看 [NOTICE](NOTICE) 和 [RELEASE_NOTES_v6.0.0.md](RELEASE_NOTES_v6.0.0.md) 获取完整的归属说明。 ## 支持 - [文档站点](https://nullc0d30.github.io/HunterX) — 完整文档、教程和 API 参考 - [GitHub Issues](https://github.com/nullc0d30/HunterX/issues) — Bug 报告和功能请求 - [GitHub Discussions](https://github.com/nullc0d30/HunterX/discussions) — 问题、想法和社区支持 - [安全政策](SECURITY.md) — 负责任的披露和报告流程 ## 社区认可 HunterX 已被列入以下由社区维护的安全资源中: - **OWASP 社区 – 漏洞扫描工具** HunterX 已被包含在 OWASP 社区漏洞扫描工具目录中。 https://owasp.org/www-community/Vulnerability_Scanning_Tools ## 许可证 ``` Copyright 2026 Ahmed Awad (NullC0d3) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ``` ## ⭐ 支持 HunterX 如果 HunterX 对您的安全评估有所帮助,请考虑给项目点一个 GitHub Star。 这有助于提高项目的知名度并支持持续开发。
**HunterX** — *观察。假设。探测。验证。* [GitHub](https://github.com/nullc0d30/HunterX) · [Docker Hub](https://hub.docker.com/r/nullc0d30/hunterx) · [Issues](https://github.com/nullc0d30/HunterX/issues) · [讨论](https://github.com/nullc0d30/HunterX/discussions)
标签:CISA项目, Python, Web安全, 人工智能, 加密, 无后门, 漏洞扫描器, 用户模式Hook绕过, 蓝队分析, 请求拦截, 逆向工具