Token导航 LogoToken导航TokenDH.com
Hackbrowser MCP logo
安全风控未说明官方级别未说明来源级核验

Hackbrowser MCP

MCP Server

hackbrowser-mcp是一个专为安全测试设计的浏览器MCP工具,提供多容器隔离、流量捕获和主动安全测试功能,适用于漏洞评估和授权测试。

工具数

39

提示词数

0

GitHub Stars

6

资源数

0
安全TypeScriptClaude浏览器自动化Claude DesktopClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

badchars

提供方

badchars

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

The first browser MCP built for security testing.

Other browser MCPs let your AI fill forms and take screenshots.

This one lets it find vulnerabilities.

What It Does • How It's Different • Quick Start • Examples • Tools • Architecture

______________________________________________________________________

它的作用

Hackbrowserv mcp 为您的AI代理提供一个真正的Firefox浏览器和39个安全测试工具 模型上下文协议代理可以启动浏览器、浏览目标、捕获所有流量并测试漏洞——所有这些都可以通过自然语言完成。

You: "Log in as admin and as a regular user. Find endpoints the user shouldn't access."

Agent: → launches Firefox
       → creates two isolated containers (admin + user)
       → logs in both accounts
       → browses the app, captures traffic
       → compares responses across roles
       → "User can access GET /api/admin/users — should return 403, returns 200"

AI处理整个工作流程:启动浏览器、管理会话、发现端点、测试参数和生成安全报告。你描述要测试什么。它做剩下的。

______________________________________________________________________

这有什么不同

有几十个浏览器MCP。它们都做同样的事情:让LLM浏览页面、单击按钮和提取文本。它们是为 自动化 --填写表单、抓取数据、运行UI测试。

它们都不能测试漏洞。 这就是hackbrowser mcp填补的空白。

Other Browser MCPs hackbrowser-mcp

Purpose Web automation, scraping, form filling Security testing, vulnerability assessment

Sessions Single session 2-4 isolated containers with separate cookies, storage, and auth

Traffic Read-only network tab (if any) Full HAR capture + replay with modifications

Security tools None 14 tools: injection testing, CSRF, IDOR, access matrix, report generation

Injection testing Not possible 7 types, 60+ payloads, technique-labeled results

Access control Not possible Cross-role comparison, endpoint access matrix, IDOR detection

Browser Chromium (CDP) Firefox (WebDriver BiDi) — different engine catches different bugs

Anti-detection Varies Stealth mode built-in (fingerprint, UA, WebGL spoofing)

Specific comparisons with popular projects

项目明星它能做什么它不能做什么
剧作家mcp29k通过可访问性树导航、点击、键入、截图无多会话、无流量捕获、无安全测试
浏览器使用81kAI完成网络任务(购物、表单、研究)单代理操作,无HAR,无注入测试
舞台工作人员22k用于浏览器自动化的动作/提取/观察SDK没有安全工具,没有容器隔离
chrome开发工具mcp29kDevTools调试、性能分析、网络监控只读网络,无重放,无主动测试
浏览器工具mcp7k控制台、网络、编码代理的审计监控专注于IDE,没有攻击性测试能力
mcp剧作家5k多浏览器测试自动化+抓取无安全意识,无访问控制分析

所有这些都是达到预期目的的优秀工具。hackbrowser mcp并没有取代它们,它提供了一个完全不同的用例。

______________________________________________________________________

核心能力

多容器隔离

同时运行2-4个浏览器会话,每个会话 完全孤立 国家。这是访问控制测试的基础。

┌────────────────────────────────────────────────────────┐
│                     Firefox Instance                    │
├───────────────┬───────────────┬────────────────────────-┤
│  Container 1  │  Container 2  │  Container 3            │
│  role: admin  │  role: user   │  role: guest             │
│               │               │                         │
│  cookies: A   │  cookies: B   │  cookies: none          │
│  storage: A   │  storage: B   │  storage: none          │
│  session: ✓   │  session: ✓   │  session: ✗             │
└───────────────┴───────────────┴─────────────────────────┘

compare_access → "GET /api/admin/users returns 200 for user (expected 403)"
access_matrix  → role × endpoint grid showing every authorization gap

交通情报

每个HTTP请求和响应都被捕获、存储和查询。重新播放任何修改后的请求。

Browser → Network Interceptor → In-Memory Store (10K max, FIFO)
                                       │
                             ┌─────────┴──────────┐
                             │                     │
                       Auto-save (60s)       Replay / modify
                             │                     │
                             ▼                     ▼
                       HAR file (disk)      replay_request
                             │              (change method,
                       Resume on restart     headers, body)

主动安全测试

从捕获的流量中发现注入点,然后使用7种漏洞类型的60多个有效载荷对其进行测试。

类型有效载荷技术
SQLi9基于错误、联合、基于时间的盲(MSSQL/MySQL/Postgres)、布尔盲
XSS8反射脚本、事件处理程序、SVG、JS上下文、HTML5事件、iframe
皮肤软组织感染8Jinja2、Freemarker、ERB、Angular沙盒、Spring EL、Vue
服务器端请求伪造8本地主机变体(IPv4/v6/hex/八进制)、AWS/GCP/Azure元数据、DNS重新绑定
CMDi8分号、管道、回溯、子shell、换行符、引号打断
LFI8路径遍历,双点,/proc/environment,PHP过滤器,双编码
HTML 注入6标签注入、表单注入、样式叠加、元重定向

当内置有效载荷被阻止时,AI代理会分析WAF响应,并使用 replay_request.

______________________________________________________________________

快速开始

安装

git clone https://github.com/user/hackbrowser-mcp.git
cd hackbrowser-mcp
bun install

连接到您的AI代理

Claude Desktop / Claude Code

添加到MCP配置(~/.claude/claude_desktop_config.json):

{
  "mcpServers": {
    "hackbrowser": {
      "command": "bun",
      "args": ["run", "/path/to/hackbrowser-mcp/src/index.ts", "--mcp"]
    }
  }
}

Cursor / Continue / other MCP clients

配置格式相同。将命令指向您的安装路径。

Standalone (no AI agent)

bun run src/index.ts --launch              # GUI mode
bun run src/index.ts --launch --headless   # headless
bun run src/index.ts --mcp                 # MCP server (stdio)

开始测试

You: "Launch the browser and scan https://target.com for vulnerabilities"

就这样,剩下的就交给特工了。

______________________________________________________________________

工作流示例

全面安全扫描

You: "Crawl https://app.com, find injection points, test them, generate a report."

Agent: browser_launch → navigate → crawl (100 pages)
       → find_injection_points → test_injection (SQLi, XSS)
       → test_csrf → test_rate_limit
       → generate_report
       → "Found 3 XSS, 1 SQLi, 2 missing CSRF tokens"

IDOR/访问控制审计

You: "Login as admin and regular user. Find what the user shouldn't access."

Agent: container_setup (admin + user) → container_login (both)
       → navigate admin pages → compare_access
       → access_matrix
       → "User can reach GET /api/admin/users (200 instead of 403)"

WAF旁路

You: "Test the search param for XSS. Bypass any WAF."

Agent: test_injection {types: ["xss"]} → all blocked
       → analyzes response:  stripped, events filtered
       → replay_request with  → REFLECTED
       → "Confirmed XSS via HTML5 ontoggle event bypass"

离线HAR分析

You: "Import this HAR file and find injection candidates."

Agent: import_har → get_endpoints (87 found)
       → find_injection_points (23 candidates)
       → test_injection → "2 reflected XSS confirmed"

______________________________________________________________________

工具参考(39个工具)

Browser Control (3)

工具说明
browser_launch使用托管配置文件启动Firefox
browser_close关闭浏览器,自动导出HAR
browser_status协议、容器、标签计数、捕获的请求

Containers (3)

工具说明
container_setup使用角色和凭据创建1-4个容器
container_login容器登录(程序化或手动)
container_list列出具有身份验证状态的容器

Navigation (4)

工具说明
navigate转到容器选项卡中的URL
go_back / go_forward浏览器历史导航
wait_for等待选择器、URL、网络空闲或JS条件

Interaction (7)

工具说明
click按CSS选择器或文本内容单击
type_text在输入字段中键入
select_option选择下拉值
submit_form提交表格
scroll滚动页面或元素
hover将鼠标悬停在元素上
press_key键盘按键(Enter、Tab、Escape等)

Page Inspection (4)

工具说明
screenshot捕获PNG屏幕截图
get_page_source完整HTML源代码
get_dom_tree简化DOM树(LLM友好)
evaluate_js执行JavaScript并返回结果

Traffic Capture (5)

工具说明
get_requests使用过滤器(URL、方法、状态、MIME)列出捕获的请求
get_response按ID列出的完整请求/响应详细信息
get_endpoints使用参数模板自动查找API终结点
export_har将流量另存为HAR 1.2文件
import_har从上一个会话加载HAR

Security Analysis (4)

工具说明
compare_access跨容器IDOR/授权中断检测
access_matrix角色x端点访问网格
find_injection_points识别10种类型的可注射参数
replay_request使用修改后的方法、标头、正文和URL进行回放

Active Testing (3)

工具说明
test_injection7种类型,60多种有效载荷,技术标记结果
test_csrf无CSRF令牌的回放
test_rate_limit快速射击请求,查看429

Auth Detection (3)

工具说明
detect_auth检查会话有效性
detect_login_form查找登录表单字段和CSRF令牌
auto_login自动填写并提交登录信息

Discovery (2)

工具说明
crawl具有表单发现和API提取功能的BFS蜘蛛
get_sitemap返回爬网结果

Reporting (1)

工具说明
generate_report带有调查结果和证据的安全报告(markdown/HTML)

______________________________________________________________________

图书馆使用情况

使用hackbrowser mcp作为自定义工具的TypeScript库:

import {
  launchFirefox, closeFirefox,
  NetworkInterceptor, BrowserInteraction, Crawler,
  extractEndpoints, findInjectionPoints, testInjection,
  compareAccess, generateReport,
  buildHar, saveHar, loadHar,
} from "hackbrowser-mcp";
// Offline HAR analysis
const har = await loadHar("./capture.har");
const requests = harEntriesToRequests(har.log.entries);
const endpoints = extractEndpoints(requests);
const points = findInjectionPoints(requests);

console.log(`${endpoints.length} endpoints, ${points.length} injection candidates`);

______________________________________________________________________

建筑

src/
├── browser/                 Firefox control
│   ├── bidi-client.ts       WebDriver BiDi protocol
│   ├── cdp-client.ts        CDP fallback
│   ├── launcher.ts          Binary detection + profile setup
│   ├── container-manager.ts Container isolation + extension WS
│   ├── interaction.ts       Click, type, scroll, hover
│   ├── crawler.ts           BFS spider
│   └── auth-detector.ts     Session detection
├── capture/                 Traffic
│   ├── network-interceptor.ts  Capture + auto-save (10K cap)
│   ├── har-builder.ts          HAR 1.2 builder
│   └── har-storage.ts          HAR I/O + merge
├── analysis/                Security engines
│   ├── active-tester.ts     60+ injection payloads
│   ├── injection-mapper.ts  Param → vuln type mapping
│   ├── endpoint-extractor.ts  API endpoint discovery
│   ├── container-differ.ts  Cross-role comparison
│   ├── access-matrix.ts     Role x endpoint matrix
│   └── report-generator.ts  Report formatting
├── protocol/
│   ├── tools.ts             39 tool definitions (Zod schemas)
│   └── mcp-server.ts        MCP stdio transport
└── types/                   TypeScript types

设计决策:

  • 火狐+BiDi先行 --本机Firefox协议。不同的渲染引擎会捕获Chrome工具错过的错误。CDP可作为后备方案。
  • 容器隔离 --Firefox多帐户容器,实现真正的会话分离。没有单独的浏览器实例。
  • 服务器端获取以进行测试 --主动测试使用 fetch() 在浏览器外部,以避免污染浏览器状态。
  • HAR 1.2标准 --导入/导出会话连续性。每60秒自动保存一次,重启后恢复。
  • 内存受限 --10K入场上限,FIFO驱逐。30秒获取超时。
  • 默认情况下隐藏navigator.webdriverUA、插件、WebGL指纹都被欺骗了。

______________________________________________________________________

局限性

  • 仅限Firefox(容器隔离需要Firefox多帐户容器)
  • macOS/Linux(未测试Windows)
  • 每个端口一个Firefox实例
  • 未捕获WebSocket帧(仅升级请求)

______________________________________________________________________

For authorized security testing only.

Always obtain proper permission before testing any application.

MIT License • Built with Bun + TypeScript

目录标签

目录标签

安全TypeScriptClaude浏览器自动化安全测试本地部署漏洞评估多容器隔离流量捕获

支持客户端

Claude DesktopClaudeCursor

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

session

工具数量(toolCount,工具数)

39

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明session部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP