whoismemas/burpsuite-for-ai-agent
GitHub: whoismemas/burpsuite-for-ai-agent
双向 MCP 桥接工具,使 AI agent 能够捕获并分析 Burp Suite 中的流量,同时将安全发现回写为 Scanner issue 或 Repeater 标签。
Stars: 0 | Forks: 0
双向 Burp Suite MCP 桥接 —— AI agent 捕获流量、分析 endpoint、排队扫描,并将发现的结果发送回 Burp。
## 📁 结构
```
burpsuite-for-ai-agent/
├── src/
│ └── index.js ← MCP server (HTTP bridge + 11 MCP tools)
├── plugin/
│ └── burpAI.py ← Jython 2.7 Burp plugin (context menu, auto-forward, outbound polling)
├── package.json ← Node.js manifest (dependencies: @modelcontextprotocol/sdk, zod)
├── .gitignore
└── README.md
```
## 架构
```
Burp Suite (Linux / Windows)
└─ plugin/burpAI.py (Jython plugin)
│ POST /ingest (127.0.0.1:9999)
│ GET /burp/outbound (poll every 2s)
▼
src/index.js ← MCP server (HTTP bridge + 11 MCP tools)
│
▼
AI Agent ←→ MCP tools
```
**Linux**: Burp + server + agent —— 全部在同一台机器上。
**Windows + WSL**: Burp 在 Windows 上运行,server + agent 在 WSL 中通过 localhost 运行。
## 快速安装(一条命令)
```
bash install.sh
```
此操作会运行 `npm install`,打印 Burp 插件说明,并生成用于 AI agent 自动注册的 `.mcp.json`。
## 快速开始
### 1. MCP server
```
node src/index.js
```
### 2. 加载 Burp 插件
1. Burp Suite → **Extensions** → **Installed** → **Add**
2. Extension type: `Python`(需要 Jython 2.7 standalone JAR)
3. File: `plugin/burpAI.py`
### 3. 验证
在 Burp 的 **burpAI** 标签页中,点击 **Check Status**。连接成功:
```
{ "ok": true, "requests": 0, "endpoints": 0 }
```
## MCP 工具(11 个工具)
| Tool | Description |
|------|-------------|
| `burp_status` | 桥接连接状态 + 存储统计信息 |
| `burp_requests` | 列出捕获的 HTTP 请求(按 url/method 过滤) |
| `burp_request_detail` | 完整的请求/响应(headers、body) |
| `burp_endpoints` | 带有参数名称和命中次数的唯一 endpoint |
| `burp_tasks` | 从 Burp 上下文菜单排队的 scan/plan/scope 任务 |
| `burp_issues` | 排队等待导入 Burp 的安全发现 |
| `burp_import_issue` | 提交一个发现(title、url、severity、detail) |
| `burp_snapshot` | 最新会话快照(cookies、storage) |
| `burp_send_to_burp` | 队列操作:send_to_repeater、add_scan_issue、console_log |
| `burp_outbound_status` | 待处理的出站操作 |
| `burp_clear` | 清除所有捕获的数据 |
## 工作流程
### 捕获 → 分析
在 Burp(Proxy/Repeater)中右键点击一个请求 → `burpAI: send request(s)`
Agent:
- `burp_requests` —— 列出捕获的请求
- `burp_endpoints` —— 枚举 endpoint
- `burp_request_detail` —— 完整的请求/响应
### 排队扫描 → 执行
右键点击 → `burpAI: send + queue scan`
Agent 通过 `burp_tasks` 获取任务。
### 发现 → Burp Scanner
Agent 调用 `burp_import_issue` → Burp 标签页 → **Import Issues**
### Agent → Burp Repeater
Agent 调用 `burp_send_to_burp` 并指定 type 为 `send_to_repeater` → Burp 打开 Repeater 标签页。
## 自动转发
| Feature | Description |
|---------|-------------|
| 自动发送 Proxy 响应 | 将所有 Proxy 流量发送至 MCP server |
| 自动发送 Repeater 响应 | 自动转发 Repeater 流量 |
| 转发 Burp Scanner 问题 | 将 Scanner 的发现推送给 agent |
| 自动导入问题 | 通过上下文菜单拉取 agent 的发现 |
## 选项
```
node src/index.js --port 9999 # Custom port (default: 9999)
node src/index.js --db /path/to/data.json # Persistence file (default: burpai-data.json)
node src/index.js --port 9001 --db custom.json
```
当设置了 `--db`(或默认情况下),数据在重启后依然有效。server 会在每次 mutation 时自动保存,并在启动时加载数据。
Burp 插件 URL 可以在 Burp 的 burpAI 设置标签页中进行配置。
## 环境要求
- **Node.js 18+**
- **Burp Suite**(Community 或 Professional 版)
- **Jython 2.7** standalone JAR(在 Burp Extensions → Environment 中配置)
专为 AI 辅助渗透测试而构建。
#burpsuite #mcp #pentest #bugbounty
标签:Burp Suite, CISA项目, GNU通用公共许可证, Gradle, Jython, MCP, MITM代理, Node.js, 漏洞测试, 自定义脚本