将 Claude Code 转变为你的攻击性安全研究助手。专门的 AI 子代理可用于:规划经授权的渗透测试任务、分析侦察结果、研究漏洞利用、构建检测规则、审计 STIG 以及编写报告。
pentest-ai-agents 是一个包含 50 个 Claude Code 子代理的集合,可将 Claude 转变为进攻性安全研究助手。每个代理都拥有特定领域的深厚知识:侦察、Web、Active Directory、云、移动端、无线、社会工程学、载荷构建、逆向工程、漏洞利用链、检测工程、取证等。
安装代理文件。打开 Claude Code。描述你的任务。Claude 会自动将任务路由给正确的专家代理。
无需服务器,无需 Python 依赖,除复制文件外无需任何配置。
/plugin marketplace add 0xSteph/pentest-ai-agents 然后 /plugin install pentest-ai-agents@pentest-ai-agents。install.sh 的 curl 安装路径仍然原样可用。ai-recon(AI 攻击面测绘)、code-auditor、crypto-analyzer、password-auditor、database-attacker、network-attacker、traffic-analyzer、compliance-mapper、risk-scorer,以及后渗透系列——evasion-specialist、persistence-planner、data-exfiltrator、scada-attacker、iot-pentester、lateral-movement。每个进攻性代理都会将其技术与所演练的检测手段配对呈现。cicd-redteam 具备 Bash 能力,但缺少强制的范围强制代码块——现已修复(新的 CI 检查本可发现此问题)。curl | bash 在 set -u 下不再崩溃,单行克隆 URL 已修正,斜杠命令现在与代理一起安装,--uninstall 可彻底清除所有内容。c2-operator(Sliver/Mythic/Havoc/Cobalt Strike 配置文件调优、beacon 卫生、重定向器设计)、container-breakout(Docker/K8s 逃逸、runc/cri-o CVE、kubelet 利用、RBAC 滥用)、opsec-anonymizer(操作者侧身份卫生、源 IP 设计、一次性基础设施、指纹卫生)、llm-redteam(OWASP LLM Top 10 测试、提示注入、RAG 投毒、MCP 服务器滥用、代理工具滥用)。_scope-guard.md 中的明确硬拒绝列表涵盖 DoS、大规模扫描、无人值守蠕虫、假旗行动、生命安全系统。vulns.tool_used 列,可按产生发现的工具进行筛选;在 cve 和 tool_used 上新增索引。现有项目可通过 db/migrate.sh 向前迁移。flowchart LR classDef plan fill:#1a2a4a,stroke:#5a7ab8,color:#eaf0ff classDef recon fill:#1a3a2a,stroke:#5ab87a,color:#eaffea classDef exploit fill:#3a1a1a,stroke:#b85a5a,color:#ffeaea classDef post fill:#3a2a1a,stroke:#b8895a,color:#fff0ea classDef defense fill:#1a3a3a,stroke:#5ab8b8,color:#eaffff classDef report fill:#2a1a3a,stroke:#895ab8,color:#f0eaff
EP[engagement-planner]:::plan
OA[opsec-anonymizer]:::plan
TM[threat-modeler]:::plan
OS[osint-collector]:::recon
RA[recon-advisor]:::recon
VS[vuln-scanner]:::recon
WH[web-hunter]:::exploit
AS[api-security]:::exploit
BL[bizlogic-hunter]:::exploit
BB[bug-bounty]:::exploit
AD[ad-attacker]:::exploit
CS[cloud-security]:::exploit
MP[mobile-pentester]:::exploit
WP[wireless-pentester]:::exploit
LR[llm-redteam]:::exploit
SE[social-engineer]:::exploit
PO[phishing-operator]:::exploit
CT[ctf-solver]:::exploit
CR[credential-tester]:::exploit
PV[poc-validator]:::exploit
EG[exploit-guide]:::exploit
EC[exploit-chainer]:::exploit
AP[attack-planner]:::exploit
PC[payload-crafter]:::exploit
RE[reverse-engineer]:::exploit
PE[privesc-advisor]:::post
CB[container-breakout]:::post
C2[c2-operator]:::post
CI[cicd-redteam]:::post
SO[swarm-orchestrator]:::post
DE[detection-engineer]:::defense
FA[forensics-analyst]:::defense
MA[malware-analyst]:::defense
SA[stig-analyst]:::defense
RG[report-generator]:::report
EP --> OA --> OS
EP --> TM
OS --> RA --> VS
VS --> WH & AS & BL & BB & AD & CS & MP & WP & LR
SE --> PO
BB --> WH
PO --> PC --> C2
AD --> CR
AD --> PE
CS --> CB
CB --> PE
WH --> PV
AS --> PV
PV --> EC --> AP
EC --> EG
PC --> RE
RE --> MA
AP --> SO
C2 --> DE
SO --> RG
DE --> FA
MA --> RG
SA --> RG
CT -.solo.-> RG
CI -.pipeline.-> SO
Tier 1(咨询)代理可从任何任务路由。Tier 2(具备执行能力)代理需要声明范围,并位于攻击操作集群中。
## v3.1 中的新内容
- **3 个新代理**:`payload-crafter`(msfvenom、Donut、自定义加载器)、`reverse-engineer`(Ghidra、JadX、Radare2、Binwalk)、`phishing-operator`(Evilginx、GoPhish、dnstwist)
- **斜杠命令**:`/recommend "freeform task"` 将你引导到合适的代理并给出具体命令。`/agents-for <tag>` 按领域筛选目录。
- **`db/doctor.sh`**:审计你机器上安装了哪些底层 CLI 工具,按代理分组显示。每个工具显示 `✔` 和 `✘`,并提供安装提示。
- **`install.sh --tools`**:可选安装程序,通过 apt/brew/pacman + pipx/go/cargo 安装底层工具。
- **扩展代理**:Commix 已添加到 web-hunter,RouterSploit 已添加到 vuln-scanner,定向字典生成(cupp、CeWL、Mentalist、Crunch、hashid、haiti)已添加到 credential-tester,完整隐写工具包已添加到 ctf-solver。
## 快速开始
一条命令:```bash
curl -fsSL https://raw.githubusercontent.com/0xSteph/pentest-ai-agents/main/install.sh | bash
就这样。脚本将仓库克隆到临时目录,将 agents 复制到 ~/.claude/agents/,然后退出。幂等:可安全地重新运行以获取更新。
或者作为 Claude Code 插件安装(无需克隆;通过市场更新):``` /plugin marketplace add 0xSteph/pentest-ai-agents /plugin install pentest-ai-agents@pentest-ai-agents
这会通过 Claude Code 的插件系统注册全部 52 个代理和斜杠命令。选择插件**或**安装器即可——两者无需同时使用。
然后打开 Claude Code:```
"Plan an internal network pentest for a 500-endpoint AD environment with a 2-week window."
Claude 路由到交战规划代理,并生成带有 MITRE ATT&CK 映射的分阶段计划。
更倾向于先克隆?```bash git clone https://github.com/0xSteph/pentest-ai-agents.git cd pentest-ai-agents && ./install.sh --global
**其他安装选项:**```bash
./install.sh --project # Install for current project only
./install.sh --global --lite # Use Haiku for advisory agents (lower cost)
./install.sh --tools # Install underlying CLI tools (nmap, nuclei, ffuf, etc.)
./install.sh --help # All options
See INSTALL.md for step-by-step instructions, including first-time Claude Code setup.
安装后即可快速交互:
| 命令 | 作用 |
|---|---|
/recommend "phish a small SaaS team's IT department" | 选择正确的 agent 并给出具体的后续命令 |
/agents-for web | 列出与 Web 测试相关的所有 agent(web-hunter、api-security、bug-bounty、bizlogic-hunter) |
/agents-for cloud | 云环境专属 agent(cloud-security、cicd-redteam) |
db/doctor.sh | 按 agent 分组审计你已安装的底层 CLI 工具。显示 ✔/✘ 和安装提示。 |
db/doctor.sh --agent ad-attacker | 仅审计 AD 工具链 |
db/doctor.sh --json | 机器可读输出,便于管道传输到脚本 |
install.sh --tools | 通过你的包管理器 + pipx/go/cargo 安装底层工具 |
findings.sh init <id> | 开始新的测试项目(持久化 SQLite 发现数据库) |
findings.sh stats | 项目进度 |
findings.sh export | 完整 JSON 导出 |
bash handoff.sh | 会话之间的 Markdown 交接报告 |
在 Claude Code 中,只需描述你的任务即可自动路由:``` "Plan an internal pentest for a 500-endpoint AD environment, 2-week window." "I have a domain user, where do I look first in BloodHound?" "Convert this SharpHound EXE into shellcode for an EDR test, with detection content." "Reverse this firmware image and tell me what the cryptographic protocol looks like." "Run a phishing simulation against acme-corp.com, set up GoPhish + Evilginx infrastructure."
---
## 覆盖范围
智能体所驱动的领域。这些类别与真实对手实际作战的攻击面一一对应: