使用说明
最重要的mcp
用于Claude桌面的统一渗透测试MCP服务器
概述
使用模型上下文协议(MCP)的全面渗透测试工具包。作为一个 单一统一MCP服务器 可以直接从Claude Desktop使用。
特性
- Claude桌面集成:所有工具均可通过单个MCP连接获得
- 34安全工具:侦察、网络扫描、SAST、SCA、污染分析、0天发现、AI安全测试、身份验证测试
- 纯MCP架构:无LangChain,简单轻便
- Docker就绪:使用Docker轻松部署
快速开始
Docker安装程序(推荐)
-
塑造形象:
docker build -t pentest-mcp . -
配置Claude桌面:
编辑您的Claude Desktop配置文件:
- 窗户:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
{ "mcpServers": { "pentest-mcp": { "command": "docker", "args": ["run", "--rm", "-i", "pentest-mcp"] } } } - 窗户:
-
重新启动克劳德桌面
本地设置
# Install dependencies
pip install -r requirements.txt
# Run server
python pentest_mcp_server_stdio.py
可用工具(共34个)
网络扫描(4)
| 工具 | 说明 |
|---|---|
scan_network |
Nmap网络扫描(基本/完整/快速) |
resolve_dns |
DNS解析 |
scan_port |
单端口扫描 |
scan_http_headers |
HTTP标头安全分析 |
SSH/访问(5)
| 工具 | 说明 |
|---|---|
ssh_connect |
SSH连接测试 |
ssh_execute_command |
通过SSH执行远程命令 |
ssh_explore_system |
系统枚举(用户、网络、SUID等) |
find_flags |
CTF标志文件搜索 |
ftp_connect |
FTP连接和目录列表 |
Web漏洞扫描(4)
| 工具 | 说明 |
|---|---|
detect_technology |
CMS/框架检测 |
enumerate_directories |
目录/文件暴力破解 |
test_sql_injection |
SQL注入测试 |
test_xss |
XSS漏洞测试 |
利用/情报(3)
| 工具 | 说明 |
|---|---|
search_cve |
CVE漏洞搜索 |
get_vulnerability_info |
产品漏洞查找 |
generate_exploit_payload |
反向炮弹有效载荷生成 |
代码安全(5)
| 工具 | 说明 |
|---|---|
check_security_tools |
检查已安装的安全工具的可用性 |
semgrep_scan |
SAST-漏洞的静态代码分析 |
trivy_scan |
SCA-依赖关系/容器漏洞扫描 |
trufflehog_scan |
Git存储库/文件系统中的秘密检测 |
ffuf_fuzz |
高速web应用模糊测试 |
代码分析/0天发现(5)
| 工具 | 说明 |
|---|---|
repo_map |
地图存储库结构-入口点、关键文件 |
extract_definitions |
提取函数/类定义 |
analyze_call_graph |
分析函数调用,识别危险的接收器 |
find_attack_surface |
查找输入源→ 危险水槽 |
code_summary |
生成以安全为重点的代码摘要 |
毒物分析(1)
| 工具 | 说明 |
|---|---|
taint_analysis |
跟踪从源到汇的数据流,确定可利用性 |
人工智能安全测试(3)
| 工具 | 说明 |
|---|---|
test_prompt_injection |
测试AI API的快速注入漏洞 |
test_system_prompt_extraction |
尝试从AI服务中提取系统提示 |
test_content_filter_bypass |
测试内容过滤器绕过技术(leetspeak、homographs等) |
认证测试(4)
| 工具 | 说明 |
|---|---|
authenticated_request |
使用OAuth/API密钥发出经过身份验证的HTTP请求 |
test_idor |
不安全直接对象引用漏洞测试 |
test_auth_bypass |
测试身份验证/授权绕过(令牌操作、头注入) |
test_rate_limiting |
测试速率限制实施 |
0天发现工作流程
1. repo_map → Understand project structure
2. find_attack_surface → Identify inputs and dangerous operations
3. taint_analysis → Track actual data flow (source → sink)
4. semgrep_scan → Pattern-based vulnerability detection
5. [AI analysis] → Verify exploitability
用法示例
在Claude Desktop中使用自然语言:
Scan 192.168.1.1 for open ports
Check security headers for https://example.com
Search for CVE-2021-44228 details
Analyze /path/to/repo for 0-day vulnerabilities
Run taint analysis on /path/to/python/project
渗透测试阶段
| 阶段 | 状态 | 工具 |
|---|---|---|
| 侦察 | ✅ | nmap、DNS、端口扫描 |
| Web应用程序测试 | ✅ | 标头、SQLi、XSS、目录枚举 |
| 漏洞评估 | ✅ | CVE搜索,产品漏洞 |
| 代码分析(SAST/SCA) | ✅ | Semgrep、Trivy、TruffleLog |
| 0天探索 | ✅ | 台风分析、攻击面测绘 |
| 剥削 | ✅ | 有效载荷生成 |
| 访问权 | ✅ | SSH、FTP连接 |
| 实施漏洞利用 | ✅ | 系统探索、旗帜搜索 |
| AI安全测试 | ✅ | 快速注射,系统快速提取,过滤器旁通 |
| 认证测试 | ✅ | IDOR、认证旁路、速率限制 |
安全警告
此工具用于 仅限授权安全测试.
许可用途
- 您拥有或管理的系统
- 具有明确书面许可的系统
- CTF竞争环境
- 研究/教育实验室环境
禁止使用
- 未经许可扫描系统
- 恶意目的
- 未经授权的访问尝试
负责任地使用。我们不对非法活动负责。
项目结构
.
├── pentest_mcp_server_stdio.py # Main MCP server
├── tools/ # Tool implementations
│ ├── __init__.py # Package exports
│ ├── network.py # Network scanning (4 tools)
│ ├── ssh_access.py # SSH/access (4 tools)
│ ├── ftp_access.py # FTP (1 tool)
│ ├── web_scanner.py # Web vulnerability (4 tools)
│ ├── exploit.py # Exploit/intelligence (3 tools)
│ ├── code_security.py # SAST/SCA/Secret/Fuzzing (5 tools)
│ ├── code_analysis.py # 0-day discovery (5 tools)
│ ├── taint_analysis.py # Taint analysis (1 tool)
│ ├── ai_security.py # AI security testing (3 tools)
│ └── auth_testing.py # Authenticated testing (4 tools)
├── wordlists/ # Bundled wordlists (Docker)
├── requirements.txt # Python dependencies
├── Dockerfile # Docker build
└── README.md # This file
技术栈
- 协议:模型上下文协议(MCP)
- 语言:Python 3.10+
- 图书馆:mcp、nmap、asyncssh、httpx、ast(污染分析)
- 外部工具:Semgrep、Trivy、TruffleLog、ffuf(可选)
故障排除
无法识别MCP服务器
- 完全退出Claude Desktop(检查任务管理器)
- 重新启动克劳德桌面
- 验证MCP服务器是否出现在设置中
依赖性错误
使用虚拟环境:
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
未找到Nmap
# Ubuntu/Debian
sudo apt-get install nmap
# macOS
brew install nmap
# Windows: Download from https://nmap.org/download.html
许可证
MIT许可证
贡献
欢迎拉取请求。对于重大更改,请先打开一个问题进行讨论。
支持
在GitHub问题部分报告问题。
作者:d01ki 仓库: https://github.com/d01ki/Pentest-mcp 许可证:MIT