Burp MCP服务器

一个为Burp Suite Professional设计的MCP服务器和独立CLI工具,提供AI助手全面访问Burp功能的能力,包括发送请求、读取代理历史、获取扫描结果等。

  • by c0tton-fluff
  • Go
  • 本地部署
  • 9 星标
  • 更新于
在 GitHub 查看 c0tton-fluff/burp-mcp-server

使用说明

burp-mcp服务器

  • MCP服务器和独立CLI Burp套房专业.
  • 为Claude Code等人工智能助手提供对Burp的完全访问权限——发送请求、读取代理历史、提取扫描结果、在Repeater/Intruder中暂存请求,以及运行竞争条件攻击。
  • 所有这些都有结构化的JSON输出、正文限制和智能标头过滤。

为什么存在

  • Burp内置的MCP扩展返回详细信息 HttpRequestResponse{...} 没有主体限制的blob,独立的HTTP/1.1和HTTP/2工具,以及14多种燃烧上下文令牌的工具。
  • 这个项目取代了所有这些:
问题 解决方案
873KB响应blob 10KB正文限制(可根据请求配置)
14+重叠工具 10个干净、重复数据消除的工具
独立的HTTP/1.1和HTTP/2工具 具有自动协议检测和缓存的统一发送
转储所有标头 智能筛选-默认情况下仅与安全相关的标头
无批处理或竞争支持 并行批处理发送(10个请求)和单包竞争攻击(50个请求)
Java toString输出 结构化JSON: {statusCode, headers, body, bodySize, truncated}

两种使用方法

MCP Server (for AI assistants)
  Claude Code  -->  stdio  -->  burp-mcp-server (Go)  -->  SSE  -->  Burp Extension (port 9876)

Standalone CLI (for terminal)
  Terminal  -->  burp-cli (Python)  -->  Burp Proxy Listener (port 8080)  -->  Proxy History

MCP服务器

安装

一个衬垫:

curl -fsSL https://raw.githubusercontent.com/c0tton-fluff/burp-mcp-server/main/install.sh | bash

或 下载自 发布.

Build from source
git clone https://github.com/c0tton-fluff/burp-mcp-server.git
cd burp-mcp-server
go build -o burp-mcp-server .

快速开始

1.在Burp Suite中启用MCP

波普套房> 主控程序 选项卡>切换 启用 (默认值 127.0.0.1:9876).

取消选中渗透测试/CTF使用的“历史访问需要批准”。

2.添加到MCP配置中

~/.mcp.json:

{
  "mcpServers": {
    "burp": {
      "command": "burp-mcp-server",
      "args": ["serve"],
      "env": {
        "BURP_MCP_URL": "http://127.0.0.1:9876/sse"
      }
    }
  }
}

3.与克劳德代码交谈

"Send a GET request to https://example.com"
"Check proxy history for requests to /api"
"Show scanner findings"
"Create a Repeater tab for this login request"
"Batch send these 5 IDOR requests"
"Race the transfer endpoint with 20 requests"

工具

超文本传输协议

工具 说明
burp_send_request 发送带有自动协议检测、智能标头和正文限制的HTTP请求
burp_batch_send 并行发送多达10个请求(IDOR/BAC测试)
burp_race_request 具有重复数据消除输出的单数据包竞争条件攻击

代理和扫描程序

工具 说明
burp_get_proxy_history 使用可选的正则表达式过滤器列出代理历史记录
burp_get_request 按索引从代理历史中获取完整的请求+响应
burp_get_scanner_issues 获取结构化扫描结果

暂存

工具 说明
burp_create_repeater_tab 创建带有请求的命名中继器选项卡
burp_send_to_intruder 向入侵者发送请求

编码(本地,无Burp往返)

工具 说明
burp_encode URL或Base64编码
burp_decode URL或Base64解码

响应格式

默认值(仅限安全标头):

{
  "statusCode": 200,
  "headers": {
    "Content-Type": "application/json; charset=utf-8",
    "Set-Cookie": "session=abc123; HttpOnly; Secure"
  },
  "body": "{\"id\":1,\"username\":\"admin\",\"role\":\"superuser\"}",
  "bodySize": 52,
  "truncated": false
}

仅标题模式 (headersOnly: true)--可用于侦察和指纹识别:

{
  "statusCode": 200,
  "headers": {
    "Content-Type": "text/html",
    "Server": "nginx/1.24.0",
    "X-Powered-By": "Express"
  },
  "bodySize": 87342
}

比赛状态攻击

burp_race_request 实现 单包攻击 詹姆斯·凯特尔研究中的技术。为了精确计时,它完全绕过了Burp的代理。

它是如何工作的:

  1. 打开与目标的N个并行TLS/TCP连接
  2. 在每个连接上发送HTTP请求的除最后一个字节外的所有字节
  3. 同时发送所有连接上的最后一个字节(最后一字节同步)
  4. 并行读取和解析所有响应

与Turbo Intruder相同的技术,但可以直接从Claude Code调用。

特征:

  • 自动计算 Content-Length 从实际身体
  • 通过TLS ALPN强制HTTP/1.1(避免HTTP/2升级)
  • 默认情况下,重复相同的响应(保存令牌)
  • 返回具有每个响应正文限制的结构化结果

重复输出(默认):

{
  "groups": [
    {
      "statusCode": 200,
      "body": "{\"message\":\"Currency converted successfully\"}",
      "count": 18,
      "indices": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
    },
    {
      "statusCode": 400,
      "body": "{\"error\":\"Insufficient balance\"}",
      "count": 2,
      "indices": [18, 19]
    }
  ],
  "summary": "20 requests sent, responses: 18x 200, 2x 400"
}

使用 showAll: true 以获得个人而不是团体的回应。

批量请求

burp_batch_send 并行发送多达10个请求。标记每个请求以在结果中标识它:

{
  "requests": [
    {"raw": "GET /api/users/1 HTTP/1.1\r\nHost: target.com\r\nAuthorization: Bearer user_token", "tag": "own-profile"},
    {"raw": "GET /api/users/2 HTTP/1.1\r\nHost: target.com\r\nAuthorization: Bearer user_token", "tag": "other-profile"},
    {"raw": "GET /api/users/1 HTTP/1.1\r\nHost: target.com", "tag": "no-auth"}
  ]
}
{
  "responses": [
    {"tag": "own-profile", "statusCode": 200, "body": "{\"id\":1,...}"},
    {"tag": "other-profile", "statusCode": 200, "body": "{\"id\":2,...}"},
    {"tag": "no-auth", "statusCode": 401, "body": "{\"error\":\"unauthorized\"}"}
  ],
  "summary": "3 requests, responses: 2x 200, 1x 401"
}
Full parameter reference

burp_send_request

参数 类型 默认值 说明
raw string required 原始HTTP请求,包括标头和正文
host string 来自主机标头 目标主机(覆盖主机标头)
port int 443/80 目标端口
tls bool true 使用HTTPS
bodyLimit int 10000 响应体字节限制
bodyOffset int 0 响应体字节偏移量
allHeaders bool false 返回所有标头(默认值:仅与安全相关)
headersOnly bool false 仅返回状态+标头,跳过正文

burp_batch_send

参数 类型 默认值 说明
requests array 必填 数组 {raw, host, port, tls, tag} 对象(最多10个)
bodyLimit int 10000 每个响应的响应体限制
allHeaders bool false 返回所有标头

数组中的每个请求:

字段 类型 描述
raw string 原始HTTP请求
host string 目标主机
port int 目标端口
tls bool 使用HTTPS
tag string 在结果中标识此请求的标签

burp_race_request

参数 类型 默认值 说明
raw string required 原始HTTP请求,包括标头和正文
host string 来自主机头 目标主机
port int 443/80 目标端口
tls bool true 使用HTTPS
count int 10 并发请求数(最多50个)
bodyLimit int 500 每个响应的响应体字节限制
showAll bool false 返回所有单独的响应,而不是重复数据消除的组

burp_get_xy_历史

参数 类型 默认值 说明
count int 10 条目数(最多50个)
offset int 0 分页偏移量
regex string URL/内容的正则表达式筛选器

burp_get_request

参数 类型 默认值 说明
index int required 代理历史索引(基于1,来自burp_get_Proxy_history)
bodyLimit int 10000 响应体字节限制
bodyOffset int 0 响应体字节偏移量
allHeaders bool false 返回所有标头

burp_get_scanner问题

参数 类型 默认值 说明
count int 10 问题数量(最多50个)
offset int 0 分页偏移量
detailLimit int 500 每个问题详细信息的最大字符数(-1=无限制)

burp_ce_repeater_tab/burp_send_to_入侵者

参数 类型 默认值 说明
raw string 必需 原始HTTP请求
host string 必填 目标主机名
port int 443/80 目标端口
tls bool true 使用HTTPS
tabName string 选项卡名称

burp_encode/burp_decode

参数 类型 说明
content string 要编码/解码的内容
type 字符串 url 或 base64

独立CLI

Burp Suite的命令行客户端。无需MCP——通过Burp的代理侦听器发送请求,使其显示在代理>HTTP历史中。Python stdlib之外的零依赖。

安装

curl -fsSL https://raw.githubusercontent.com/c0tton-fluff/burp-mcp-server/main/install.sh | TOOL=cli bash

或 下载自 发布.

用法

要求Burp Suite在代理侦听器上运行 127.0.0.1:8080 (默认)。

# Structured requests (proxied through Burp)
burp send GET https://target.com/api/users
burp send POST https://target.com/api/login -j '{"user":"admin","pass":"test"}'
burp send PUT https://target.com/api/profile -H "Authorization: Bearer tok" -j '{"role":"admin"}'

# Raw HTTP requests
burp raw -f request.txt target.com
echo -e 'GET / HTTP/1.1\r\nHost: example.com\r\n\r\n' | burp raw

# Race condition attack (last-byte sync, direct -- bypasses proxy)
burp race target.com -f transfer.txt -n 20

# Direct mode (skip proxy)
burp send GET https://target.com/api/health --direct

# Encode / decode
burp encode base64 "hello world"
burp decode url "%3Cscript%3E"
burp encode hex "test"

命令

命令 描述
send METHOD URL 通过Burp代理发送结构化HTTP请求
raw [HOST] 从文件或stdin发送原始HTTP请求
race [HOST] 单数据包最后字节同步竞争条件攻击(直接)
encode TYPE VALUE 编码值(url, base64, hex)
decode TYPE VALUE 解码值(url, base64, hex)

旗帜

标志 描述
--proxy Burp代理地址(默认 127.0.0.1:8080,或 BURP_PROXY ) 。
--direct 跳过代理,直接连接到目标
--all-headers 返回所有响应标头(默认:仅与安全相关)
-b, --body-limit 响应体字节限制(默认10000)
-t, --timeout 请求超时(秒)(默认值30)

故障排除

症状 修复
工具未出现在Claude代码中 验证中的二进制路径 ~/.mcp.json,重新启动Claude Code
端口9876上的连接被拒绝 确保Burp在启用MCP的情况下运行
端口8080上的连接被拒绝 确保Burp代理侦听器处于活动状态
请求在第一次发送时挂起 HTTP/2超时+回退处理此问题(第一次15秒,之后缓存)
空代理历史记录 仅显示浏览器代理的流量,不显示MCP send_request 电话
孤立服务器进程 当Claude代码退出时,内置父PID监视器会自动终止
Jython扩展未加载 在Burp>设置>扩展>Python环境中设置Jython JAR路径

MCP日志: ~/.cache/claude-cli-nodejs/*/mcp-logs-burp/

先决条件

  • Burp套房专业 (社区版对MCP的支持有限)
  • 从BApp商店中插入MCP服务器扩展(用于MCP服务器功能)
  • 在启动Claude Code或使用CLI之前运行Burp

许可证

麻省理工学院