shuvonsec/claude-bug-bounty
GitHub: shuvonsec/claude-bug-bounty
一个 Claude Code 技能框架,将 Claude 变成 AI 驱动的漏洞赏金副驾驶,覆盖从侦察、漏洞扫描到报告生成的完整狩猎流程。
Stars: 44 | Forks: 11
## 功能介绍
```
Target → Recon → Intel → Hunt → Validate → Report → Submit
```
每一步都由 Claude 辅助。进入 Claude Code,指向一个目标,它将:
- 枚举子域名、存活主机并抓取端点
- 提取检测到的技术栈对应的 CVE 和已披露的 H1 报告
- 生成优先级排序的攻击思维导图
- 运行针对 IDOR、SSRF、XSS、SQLi、OAuth、GraphQL、LLM 注入的扫描器
- 引导你完成 4 重验证清单
- 撰写可直接提交的 HackerOne 或 Bugcrowd 报告
## 快速开始
**步骤 1 — 克隆并安装工具**
```
git clone https://github.com/shuvonsec/claude-bug-bounty.git
cd claude-bug-bounty
chmod +x install_tools.sh && ./install_tools.sh
```
**步骤 2 — 安装 Claude Code 技能**
```
mkdir -p ~/.claude/skills/bug-bounty
cp SKILL.md ~/.claude/skills/bug-bounty/SKILL.md
```
**步骤 3 — 开始狩猎**
```
claude
```
然后只需与 Claude 对话:
```
"Run recon on target.com and tell me what to hunt"
"I found a potential IDOR on /api/invoices — validate it"
"Write a HackerOne report for this SSRF finding"
"What GraphQL bugs should I look for on this target?"
```
Claude 读取你的侦察文件,分析攻击面,并驱动工具运行。
**或者直接运行流水线(无需 Claude Code):**
```
# 全自动狩猎
python3 hunt.py --target hackerone.com
# 分步指南
./recon_engine.sh target.com
python3 learn.py --tech "nextjs,graphql,jwt" --target target.com
python3 hunt.py --target target.com --scan-only
python3 validate.py
python3 report_generator.py findings/
```
## 工具参考
### 核心流水线
| 工具 | 功能 |
|------|-------------|
| `hunt.py` | 主编排器 — 链接 侦察 → 扫描 → 报告 |
| `recon_engine.sh` | 子域名枚举、DNS 解析、存活主机检测、URL 抓取 |
| `learn.py` | 从 GitHub Advisory + NVD 提取技术栈相关的 CVE + 已披露报告 |
| `mindmap.py` | 生成带有优先级测试清单的 Mermaid 攻击思维导图 |
| `validate.py` | 交互式 4 重验证器 — 范围、影响、重复检查、CVSS 评分 |
| `report_generator.py` | 输出格式化的 HackerOne/Bugcrowd markdown 报告 |
### 漏洞扫描器
| 工具 | 目标 |
|------|---------|
| `h1_idor_scanner.py` | 通过参数交换进行对象级 + 字段级 IDOR |
| `h1_mutation_idor.py` | GraphQL mutation IDOR — 跨账户对象访问 |
| `h1_oauth_tester.py` | OAuth 流程 — PKCE 强制执行、state 绕过、redirect_uri 滥用 |
| `h1_race.py` | 竞争条件 — 并行请求计时、TOCTOU |
| `zero_day_fuzzer.py` | 针对扫描器遗漏的新型漏洞(逻辑、边缘情况、访问控制)的智能 Fuzzer |
| `cve_hunter.py` | 指纹识别技术栈并匹配已知 CVE |
| `vuln_scanner.sh` | 编排 nuclei + dalfox + sqlmap |
### AI / LLM 测试
| 工具 | 目标 |
|------|---------|
| `hai_probe.py` | 探测 AI 聊天机器人功能的 IDOR、提示词注入、数据窃取 |
| `hai_payload_builder.py` | 生成提示词注入 Payload(直接、间接、ASCII 走私) |
| `hai_browser_recon.js` | 浏览器端的 AI 功能端点侦察 |
### 实用工具
| 工具 | 功能 |
|------|-------------|
| `sneaky_bits.py` | JS 秘密查找器 + 从 JS 包中提取端点 |
| `target_selector.py` | 按 ROI 对漏洞赏金项目进行评分和排名 |
| `scripts/dork_runner.py` | 用于被动侦察的 Google dork 自动化 |
| `scripts/full_hunt.sh` | 完整流水线的 Shell 封装脚本 |
## 完整狩猎流水线
```
# 1. Recon — 枚举子域名、解析 DNS、发现存活主机、爬取 URL
./recon_engine.sh target.com
# → recon/target.com/{subs.txt, live-hosts.txt, urls.txt}
# 2. Intel — 拉取技术栈的 CVE 和历史披露
python3 learn.py --tech "nextjs,graphql,jwt" --target target.com
# → recon/target.com/intel.md
# 3. Attack map — 生成优先级狩猎清单
python3 mindmap.py --target target.com --type api --tech "graphql,jwt"
# 4. Hunt — 运行所有扫描器
python3 hunt.py --target target.com --scan-only
# 5. Validate — 编写报告前的 4 步检查
python3 validate.py --output findings/target-finding.md
# 6. Report — 生成可提交的 markdown
python3 report_generator.py findings/
```
## 覆盖的漏洞类别
### Web 应用程序
| 类别 | 技术 |
|-------|-----------|
| **IDOR** | 对象级、字段级、GraphQL mutation、UUID 枚举 |
| **SSRF** | 重定向链绕过、DNS 重绑定、云元数据 (169.254.x)、协议滥用 |
| **XSS** | 反射型、存储型、DOM 型、postMessage、CSP 绕过、mXSS |
| **SQLi** | 报错型、盲注、时间盲注、ORM 绕过、二阶注入 |
| **OAuth** | 缺失 PKCE、state 参数绕过、redirect_uri 滥用、隐式流程降级 |
| **竞争条件** | 并行请求、TOCTOU、限制绕过、优惠券重用 |
| **缓存投毒** | 未键入标头、参数隐藏、fat GET |
| **业务逻辑** | 价格篡改、工作流跳过、负数数量、角色升级 |
| **文件上传** | 扩展名绕过、MIME 混淆、多语言文件、文件名中的路径遍历 |
| **XXE** | 经典实体注入、通过 DNS/HTTP 的盲注 OOB |
| **HTTP 走私** | CL.TE、TE.CL、TE.TE、H2.CL 请求隧道 |
### AI / LLM 功能
| 类别 | 技术 |
|-------|-----------|
| **提示词注入** | 直接覆盖、通过文档/URL 间接注入、越狱链 |
| **聊天机器人 IDOR** | 跨账户历史记录访问、会话 ID 枚举 |
| **系统提示词泄露** | 通过角色扮演提取、编码绕过、Token 边界探测 |
| **LLM RCE** | 通过 AI 工具使用执行代码、沙箱环境逃逸 |
| **ASCII 走私** | 作为隐蔽数据窃取通道的不可见 Unicode 字符 |
### Web3 / DeFi
| 类别 | 技术 |
|-------|-----------|
| **重入攻击** | 单函数、跨函数、跨合约、只读 |
| **闪电贷攻击** | 价格预言机操纵、抵押品膨胀 |
| **访问控制** | 缺失 `onlyOwner`、配置错误的角色、函数可见性 |
| **整数问题** | 溢出、下溢、精度丢失、乘法前除法 |
| **签名重放** | 缺失 nonce、未包含 chain ID、抢跑签名 |
## Claude 提示词
在运行侦察后,将这些复制粘贴到 Claude Code 中:
```
# 映射攻击面
"I've run recon on [target]. Here's live-hosts.txt and urls.txt.
What are the highest-priority endpoints to test for IDOR and why?"
# 技术栈引导狩猎
"Target uses NextJS + GraphQL + JWT auth. Rank the top 5 bug classes
I should hunt, ordered by payout likelihood on HackerOne."
# 验证发现
"I found [vuln]. Here's the request and response. Walk me through
the 4 validation gates. What's the CVSS 3.1 score and business impact?"
# 撰写报告
"Write a HackerOne report for this [vuln type].
PoC steps: [1, 2, 3]. Target: [URL]. Impact: [what attacker can do]."
# 关联低危发现
"I have an open redirect at [URL]. How can I chain this into
an OAuth code theft or ATO? What conditions do I need?"
```
## 安装
**前置条件**
```
# macOS
brew install go python3 node jq
# Linux (Debian/Ubuntu)
sudo apt install golang python3 nodejs jq
```
**一键安装**
```
chmod +x install_tools.sh && ./install_tools.sh
```
安装:`subfinder` `httpx` `dnsx` `nuclei` `katana` `waybackurls` `gau` `dalfox` `ffuf` `anew` `qsreplace` `assetfinder` `gf` `interactsh-client` `sqlmap` `XSStrike` `SecretFinder` `LinkFinder` + nuclei-templates
**配置**
```
cp config.example.json config.json
# 添加你的 ProjectDiscovery Chaos API key 和 HackerOne token
```
## 输出结构
```
claude-bug-bounty/
├── recon/
│ └── target.com/
│ ├── subs.txt # All subdomains
│ ├── live-hosts.txt # Live HTTP(S) hosts with status codes
│ ├── urls.txt # Crawled URLs
│ └── intel.md # CVE + disclosed report intel
├── findings/
│ └── target-vuln-type.md # Validated finding notes
└── reports/
└── h1-report-YYYYMMDD.md # Submission-ready report
```
## 资源
- [HackerOne Hacktivity](https://hackerone.com/hacktivity) — 已披露的报告
- [Bugcrowd Crowdstream](https://bugcrowd.com/crowdstream) — 公开发现
- [ProjectDiscovery Chaos](https://chaos.projectdiscovery.io) — 免费子域名数据集
- [PayloadsAllTheThings](https://github.com/swisskyrepo/PayloadsAllTheThings) — Payload 参考
- [HackTricks](https://book.hacktricks.xyz) — 攻击技术宝典
- [PortSwigger Web Academy](https://portswigger.net/web-security) — 免费漏洞实验室
## 法律声明
**仅用于授权的安全测试。**
仅测试经批准的漏洞赏金范围内的目标。切勿在未经明确许可的情况下测试系统。遵循负责任的披露原则 —— 向供应商报告,而非公开披露。在狩猎前阅读每个项目的交战规则。
标签:AI 安全, Anthropic, Bug Bounty, Bugcrowd, CISA项目, CIS基准, Claude Code, Cutter, GraphQL 注入, HackerOne, IDOR 测试, Intigriti, LLM 注入, MITM代理, OAuth 安全, PE 加载器, PoC 自动化, Python, Recon, SSRF 攻击, TShark, Web3 安全, Web 安全, XSS 检测, 人工智能辅助攻击, 区块链安全, 可自定义解析器, 大模型安全, 密码管理, 攻击面映射, 数据展示, 无后门, 日志审计, 红队, 网络安全, 自动化漏洞挖掘, 逆向工具, 隐私保护