plastma65/HunterSecV1

GitHub: plastma65/HunterSecV1

一款多 LLM 驱动的自主 AI 攻防 agent,在隔离沙箱中自动解决渗透靶机和 CTF 挑战,内置严格的安全合规与审计机制。

Stars: 2 | Forks: 0

# HunterSecV1 [![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/4ef27a95f2000230.svg)](https://github.com/plastma65/HunterSecV1/actions/workflows/ci.yml) [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE) [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) HunterSecV1 是一款能够自动解决 pentest 实验室、CTF 挑战,并辅助合法 bug bounty 工作流的 AI agent。它汲取了 PentestGPT 和 HexStrike-AI 的灵感,但将**安全与伦理作为核心**,而不是事后补丁。 ## 功能 - 🤖 **Multi-LLM router** — Claude, OpenAI, Gemini, Ollama。自动选择成本/质量最优的 model。 - 🐳 **Docker Kali sandbox** — 所有命令均在 isolated container 中运行,绝不触碰 host。 - 🛡️ **Safety-first** — Scope guard,破坏性动作 blocklist,JSONL audit log hash-chained。 - 🎯 **Specialized solvers** — HTB machine,THM room,CTF challenge(Web/Crypto/Reverse/Pwn/Forensics)。 - 📊 **Markdown reports** — 附带 timeline 的可复现 PoC。 - 🔌 **Extensible** — 适用于 tools,LLM providers,solvers 的 Plugin system。 ## 快速开始 ``` # 要求:Python 3.11+、Docker、uv (https://github.com/astral-sh/uv) git clone https://github.com/plastma65/HunterSecV1.git cd HunterSecV1 make setup # cài deps + pre-commit hooks make sandbox # build Kali Docker image (lần đầu ~ 5 phút) # 配置 LLM provider(至少选择 1 个): export HUNTERSEC_ANTHROPIC_API_KEY="sk-ant-..." # 或 export HUNTERSEC_OPENAI_API_KEY="sk-..." # 或使用 local Ollama ollama pull qwen2.5:14b # 为有效目标创建 scope file(例如 HTB lab subnet): cp configs/scope.example.yaml configs/scope.yaml # 运行 hunter --help hunter htb solve --target 10.10.11.42 hunter ctf solve --category web --challenge ./chal.tar.gz ``` ### 在 Windows 上运行并使用 HTB VPN Windows 上的 Docker Desktop 不支持 `--network host`,因此 sandbox container **无法通过默认的 bridge 访问 HTB VPN**。目前支持两种方案: 1. **从 WSL2 运行**(推荐):在 WSL2 中连接 OpenVPN,使用 `hunter htb solve ... --network host --execute`。 2. **在 Linux host 或 Linux VM 上运行**。 详情:[`docs/htb-windows.md`](docs/htb-windows.md)。 ## 架构(一段话概述) User → CLI/Web → Safety pre-filter(scope,blocklist,rate-limit)→ LangGraph orchestrator(Planner → Executor → Validator → Reporter 节点)→ Tool registry → Docker sandbox(Kali)。所有操作均记录在 hash-chained 的 JSONL audit log 中。后端是 Multi-provider 的 LLM Router。Memory layer 使用 SQLite + sqlite-vec 进行检索(HackTricks,GTFOBins)。 详情:[`docs/architecture.md`](docs/architecture.md)。 ## 路线图 | 阶段 | 目标 | 状态 | |---|---|---| | 0 — 基础架构 | Repo, CI, audit log, CLI skeleton | 🚧 进行中 | | 1 — Core Agent | LLM router, LangGraph loop, 5 个 recon tools | ⏳ 计划中 | | 2 — HTB/THM Solver | 自动解决 ≥ 3 台 easy machines | ⏳ 计划中 | | 3 — CTF Solver | 解决 ≥ 60% 的 easy CTF challenges | ⏳ 计划中 | | 4 — Web UI | FastAPI + Next.js dashboard | ⏳ 计划中 | | 5 — Bug Bounty 模式 | Scope-aware recon 自动化 | ⏳ 计划中 | 详细路线图:[`docs/plan.md`](docs/plan.md)。 ## 安全 发现 HunterSecV1 的漏洞?请参阅 [`SECURITY.md`](SECURITY.md) 了解 responsible disclosure 流程。 **请勿**针对 security vulnerability 提交公开 issue。 ## 许可证 [Apache License 2.0](LICENSE) — 详情请参阅该文件。 本软件按“原样”提供,不提供任何担保。作者及贡献者不对任何滥用行为承担责任。有关可接受的用途,请参阅 `docs/ethics.md`。 ## 鸣谢 - [PentestGPT](https://github.com/GreyDGL/PentestGPT) — 灵感来源及相关论文 - [LangGraph](https://github.com/langchain-ai/langgraph) — agent 状态机 - [HackTricks](https://book.hacktricks.xyz/),[GTFOBins](https://gtfobins.github.io/) — 知识库 - [HackTheBox](https://www.hackthebox.com/),[TryHackMe](https://tryhackme.com/) — 实验室平台 **维护者:**[@plastma65](https://github.com/plastma65) · trantuananh.businessman@gmail.com
标签:DLL 劫持, Docker, Python, XXE攻击, 人工智能, 大语言模型, 安全Agent, 安全攻防, 安全防御评估, 无后门, 用户模式Hook绕过, 自动化渗透测试, 请求拦截, 逆向工具