h1脑
将您的AI助手连接到HackerOne的MCP服务器。它将你的bug赏金历史、程序范围和报告详细信息拉入本地SQLite数据库,然后公开工具,让任何兼容MCP的客户端(Claude Desktop、Claude Code等)搜索、分析和构建你过去的工作。
它还附带了 3600多份公开披露的悬赏报告的预建数据库 来自HackerOne社区的完整漏洞报告、漏洞类型和赏金金额。AI使用您的个人数据和公共知识来生成攻击简报。
主要工具, hack(handle),在一次通话中生成完整的黑客会话简报:API的新范围、您过去的发现、该程序的公开披露、弱点模式、未动资产和建议的攻击向量-所有这些都被格式化为可操作的指令,使人工智能进入攻击模式。
运作原理
有关完整的演练,请查看三个部分 Bug Bounty金鱼 系列:
- 教克劳德你破解的一切 --我为什么构建h1大脑以及如何设置它
- h1大脑到底在做什么 --从搜索到
hack()简报 - 运行h1大脑对抗真实目标 --关于实际程序的从头到尾的演练
graph LR
A["Claude Desktop / Code"] -->|MCP Protocol| B["h1-brain server"]
B -->|API calls| C["HackerOne API"]
B -->|reads / writes| D["Your Reports DB"]
B -->|reads| E["Public Reports DB"]
C -->|reports, programs, scopes| B
D -->|your history + analysis| A
E -->|community knowledge| A
style A fill:#ff5c5c,stroke:#ff5c5c,color:#fff
style B fill:#1a1d27,stroke:#ff5c5c,color:#fff
style C fill:#1a1d27,stroke:#555,color:#fff
style D fill:#1a1d27,stroke:#555,color:#fff
style E fill:#1a1d27,stroke:#555,color:#fffflowchart TD
A["hack(handle)"] --> B["Fetch fresh scope from HackerOne API"]
B --> C["Pull your reports on this program from SQLite"]
C --> D["Analyze weakness patterns across ALL programs"]
D --> E["Identify untouched bounty-eligible assets"]
E --> F["Cross-reference public disclosed reports for this program"]
F --> G["Generate attack briefing with agent instructions"]
style A fill:#ff5c5c,stroke:#ff5c5c,color:#fff
style G fill:#ff5c5c,stroke:#ff5c5c,color:#fff
style B fill:#1a1d27,stroke:#555,color:#fff
style C fill:#1a1d27,stroke:#555,color:#fff
style D fill:#1a1d27,stroke:#555,color:#fff
style E fill:#1a1d27,stroke:#555,color:#fff
style F fill:#1a1d27,stroke:#555,color:#fff需求
- Python 3.10+
- HackerOne API令牌(在此处生成一个)
设置
git clone https://github.com/PatrikFehrenbach/h1-brain.git
cd h1-brain
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt公开披露报告数据库(disclosed_reports.db)包含在repo中,无需额外设置。
连接到克劳德
克劳德桌面版
添加 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"h1-brain": {
"command": "/path/to/h1-brain/venv/bin/python",
"args": ["/path/to/h1-brain/server.py"],
"env": {
"H1_USERNAME": "your_hackerone_username",
"H1_API_TOKEN": "your_api_token"
}
}
}
}保存后重新启动Claude Desktop。
克劳德代码
claude mcp add h1-brain \
-e H1_USERNAME=your_hackerone_username \
-e H1_API_TOKEN=your_api_token \
-- /path/to/h1-brain/venv/bin/python /path/to/h1-brain/server.py首映
连接后,填充您的个人数据库:
fetch_rewarded_reports--提取所有奖励报告,并附上完整的漏洞报告。这是最重要的一步。fetch_programs--提取您有权访问的所有程序。
这些只需要运行一次。定期重新运行以同步新报告。
公开披露的报告可以立即查询,无需设置。
工具
hack(handle)
主要入口点。一个电话可以完成一切:
- 从HackerOne API获取新的程序范围
- 提取您过去对该计划的奖励报告
- 交叉引用您的完整报告历史记录以了解弱点模式
- 识别未触及的符合赏金条件的资产
- 为该项目提取公开披露的报告——其他研究人员发现并获得报酬的内容
- 根据在其他地方发现但在这里没有发现的弱点提出攻击向量
- 返回一个攻击简报,将AI置于攻击模式
简报结构:
- 范围 --有严重性上限的赏金合格和非赏金资产
- 你过去的发现 --用严重程度、弱点类型和赏金金额奖励报告
- 有效的弱点类型 --这里以前有什么奖励
- 未接触范围 --奖励符合条件的资产,您没有发现任何结果
- 建议的攻击媒介 --其他项目上奖励的弱点,但此处尚未发现
- 公开披露报告 --其他研究人员在这个项目中发现了公开披露的弱点模式
- 说明 --使用特定指令将AI置于攻击模式
您的报告
这些查询您的个人数据(h1_data.db).没有API调用,即时结果。
| 工具 | 说明 |
|---|---|
search_reports(query, program, weakness, severity, limit) | 按标题、计划、弱点类型或严重程度搜索您的奖励报告 |
get_report(report_id) | 完整的报告详细信息,包括漏洞报告和附件 |
get_report_summary() | 按程序分组的报告,包括总计 |
search_programs(query, bounty_only, limit) | 搜索您存储的程序 |
search_scopes(program, asset, bounty_only, limit) | 跨项目搜索范围内的资产 |
fetch_attachment(report_id, attachment_id?) | 报告附件的新下载URL(约1小时后过期) |
公开披露报告
这些查询预先构建的3600多个悬赏公开披露数据库(disclosed_reports.db).
| 工具 | 说明 |
|---|---|
search_disclosed_reports(query, program, weakness, limit) | 在公开报告中进行全文搜索——标题和漏洞报告 |
get_disclosed_report(report_id) | 公开披露报告的全部细节 |
数据同步
| 工具 | 说明 |
|---|---|
fetch_rewarded_reports | 从API同步您的奖金奖励报告 |
fetch_programs | 同步您可访问的程序 |
fetch_program_scopes(handle) | 程序的同步作用域(由自动调用 hack()) |
建筑
server.py MCP server
hack_instructions.md Attack briefing instructions (loaded by hack())
h1_data.db Your personal reports, programs, scopes (auto-created, gitignored)
disclosed_reports.db 3,600+ public disclosed bounty reports (ships with repo)
requirements.txt Python dependencies (mcp, httpx)两个数据库
| 数据库 | 包含 | 源 |
|---|---|---|
h1_data.db | 您的个人报告、程序、范围、附件 | HackerOne API(您的帐户) |
disclosed_reports.db | 公开披露的支付赏金的报告 | 预制,带回购的船只 |
AI知道其中的区别。您的个人工具(search_reports, get_report)查询您的数据。公共工具(search_disclosed_reports, get_disclosed_report)查询社区数据。 hack() 两者都使用。
公共报告数据库
这 disclosed_reports.db 包含公开披露的HackerOne报告:
- 支付了赏金
- 有实际的漏洞报告(编辑/空报告除外)
每份报告包括:标题、漏洞详细信息、漏洞类型、程序、资产、CVE和赏金金额(如果可用)。
作者
许可证
麻省理工学院
