Feroxbuster MCP服务器
一种模型上下文协议(MCP)服务器 feroxbuster -一个用Rust编写的快速、简单、递归的内容发现工具。
概述
此MCP服务器使AI助手能够通过SSH控制远程Kali Linux系统上的feroxbuster扫描。它为web内容发现提供了一个完整的界面,支持:
- 使用可定制的单词表进行目录和文件暴力破解
- 可配置深度的递归扫描
- 灵活的过滤(状态代码、响应大小、字数、行数)
- 速率限制、自动调谐和自动吊环功能
- 后台扫描,实时进度监控
- 从状态文件恢复功能
- 多种输出格式(文本、JSON、URL)
先决条件
- Node.js 18+
- SSH访问 Kali Linux系统(或任何安装了feroxbuster的系统)
- SSH密钥认证 配置为无密码访问(推荐)
- feroxbuster 安装在远程系统上
安装
git clone https://github.com/schwarztim/sec-feroxbuster-mcp.git
cd sec-feroxbuster-mcp
npm install
npm run build配置
克劳德桌面/克劳德代码
将服务器添加到MCP配置中:
克劳德桌面 (~/Library/Application Support/Claude/claude_desktop_config.json 在macOS上):
{
"mcpServers": {
"feroxbuster": {
"command": "node",
"args": ["/path/to/sec-feroxbuster-mcp/dist/index.js"],
"env": {
"KALI_HOST": "kali"
}
}
}
}克劳德代码 (~/.claude/user-mcps.json):
{
"feroxbuster": {
"command": "node",
"args": ["/path/to/sec-feroxbuster-mcp/dist/index.js"],
"env": {
"KALI_HOST": "kali"
}
}
}环境变量
| 变量 | 描述 | 默认值 |
|---|---|---|
KALI_HOST | 带有feroxbuster的远程系统的SSH主机名 | kali |
SSH设置
确保配置了SSH密钥身份验证:
# Generate key if needed
ssh-keygen -t ed25519 -C "feroxbuster-mcp"
# Copy to remote host
ssh-copy-id kali
# Test connection
ssh kali "feroxbuster --version"可用工具
feroxbuster_scan
针对目标URL启动目录/文件发现扫描。
参数:
| 参数 | 类型 | 说明 |
|---|---|---|
url | 字符串 | (必填) 要扫描的目标URL |
wordlist | string | 远程系统上单词表的路径 |
extensions | string\[\] | 要检查的文件扩展名(例如。, ["php", "html", "js"]) |
recursion_depth | number | 最大递归深度(0=无限,默认值:4) |
threads | number | 并发线程(默认值:50) |
timeout | number | 请求超时(秒)(默认值:7) |
rate_limit | number | 每个目录每秒的最大请求数 |
filter_status | number\[\] | 要从结果中排除的状态代码 |
status_codes | number\[\] | 要包含的状态代码 |
filter_size | number\[\] | 要排除的响应大小 |
filter_words | number\[\] | 要排除的字数 |
filter_lines | number\[\] | 要排除的行数 |
headers | object | 自定义标题(例如。, {"Authorization": "Bearer token"}) |
proxy | string | 代理URL(HTTP或SOCKS5) |
insecure | boolean | 禁用TLS证书验证 |
no_recursion | boolean | 禁用递归扫描 |
force_recursion | boolean | 对所有发现的路径强制递归 |
auto_tune | boolean | 自动降低错误率 |
auto_bail | boolean | 错误过多时自动停止 |
silent | boolean | 仅输出URL(用于管道) |
json | boolean | 以JSON格式输出结果 |
background | boolean | 在后台运行扫描 |
dont_scan | string\[\] | 要从递归中排除的URL |
time_limit | string | 最大扫描时间(例如。, "10m", "1h") |
scan_limit | number | 最大并发目录扫描数 |
user_agent | string | 自定义用户代理字符串 |
cookies | string | 要包含的Cookie字符串 |
data | string | POST请求正文 |
methods | string\[\] | 要使用的HTTP方法(默认值:GET) |
query | string | 查询要追加的参数 |
feroxbuster_config
配置后续扫描的默认设置。接受与相同的过滤和连接参数 feroxbuster_scan.
feroxbuster_status
检查正在运行或已完成的扫描的状态。
| 参数 | 类型 | 说明 |
|---|---|---|
tail_lines | number | 要显示的输出行数(默认值:50) |
feroxbuster_stop
优雅地停止正在运行的扫描。保留状态文件以供潜在简历使用。
feroxbuster_resume
从状态文件中恢复之前中断的扫描。
| 参数 | 类型 | 说明 |
|---|---|---|
state_file | string | 状态文件的路径(可选,使用上次扫描) |
background | boolean | 在后台运行恢复的扫描 |
feroxbuster_单词列表
列出远程系统上可用的单词表。
| 参数 | 类型 | 说明 |
|---|---|---|
search | string | 按搜索词筛选单词表 |
category | string | 类别: "common", "directory", "web", "api", "all" |
feroxbuster_结果
检索并格式化上次完成的扫描结果。
| 参数 | 类型 | 说明 |
|---|---|---|
format | string | 输出格式: "text", "json", "urls" |
filter_status | number\[\] | 按状态代码筛选结果 |
feroxbuster_version
从远程系统获取feroxbuster版本信息。
使用示例
基本扫描
Scan http://target.com for directories and files使用扩展和筛选进行扫描
Scan http://target.com looking for php, html, and txt files.
Exclude 404 and 500 responses. Limit recursion to 3 levels.带速率限制的背景扫描
Start a background scan of http://target.com with rate limiting
at 100 requests/second and auto-tune enabled.检查扫描进度
What's the status of my feroxbuster scan?恢复中断的扫描
Resume the last feroxbuster scan in the background列出可用单词列表
Show me API-related wordlists on the Kali system状态管理
扫描状态将持久化 ~/.feroxbuster-mcp/state.json:
- 活动扫描信息(PID、URL、输出文件、状态文件)
- 用于检索的上次扫描结果
- 默认配置设置
这允许跨会话恢复扫描和检索结果。
安全注意事项
- 此工具仅用于授权的安全测试
- 在扫描任何系统之前,始终获得适当的授权
- 使用速率限制以避免目标服务器不堪重负
- 考虑使用
auto_bail错误时停止的选项 - 代理支持通过Burp Suite或其他工具进行路由
许可证
MIT许可证-请参阅 许可证 了解详情。
致谢
- feroxbuster 通过epi052
- 模型上下文协议 通过Anthropic
