一个全面分析Web应用的工具,重点关注业务逻辑安全漏洞。此主控程序(MCP)系统地爬取、分析并识别出标准扫描器无法检测到的安全问题。
Web 应用渗透测试 MCP 帮助您通过构建完整的应用程序结构图来理解Web应用的业务背景,并识别潜在的安全弱点,特别是在业务逻辑实现方面。
# 克隆仓库
git clone https://github.com/yourusername/web-app-penetration-testing-mcp.git
# 进入目录
cd web-app-penetration-testing-m
# 安装依赖项 - 使用uv
pip install -r requirements.txt
目前other.py是继续使用的工具版本
# 基本使用
python web_app_mcp.py https://example.com
# 带有身份验证
python web_app_mcp.py https://example.com --username user@example.com --password mysecretpassword
# 创建可视化站点地图
python web_app_mcp.py https://example.com --visual
# 控制爬取速度和深度
python web_app_mcp.py https://example.com --delay 1.0 --max-pages 200
| 参数 | 描述 |
|---|---|
url | 目标Web应用的URL(必需) |
--username | 已认证扫描的用户名 |
--password | 已认证扫描的密码 |
--visual | 生成DOT格式的可视化站点地图 |
--delay | 请求之间的延迟时间(秒,默认:0.5) |
--max-pages | 最大扫描页数(默认:100) |
--output | 输出文件名(默认:mcp_results.json) |
--cookies | 已认证扫描的Cookie字符串 |
--headers | JSON格式的附加头部信息 |
该工具生成一个 mcp_results.json 文件,包含:
mcp_results.json 文件以了解应用程序结构{
"application_map": {
"https://example.com/": {
"type": "page",
"links": ["https://example.com/login", "https://example.com/about"],
"forms": []
},
"https://example.com/login": {
"type": "authentication",
"links": [],
"forms": [
{
"action": "/process-login",
"method": "POST",
"inputs": [
{"name": "username", "type": "email"},
{"name": "password", "type": "password"}
]
}
]
}
},
"potential_edge_cases": [
{
"url": "https://example.com/user/profile",
"type": "IDOR",
"description": "用户ID参数可能导致访问其他个人资料"
}
]
}
使用 --visual 标志时,工具会生成一个 sitemap.dot 文件,可以使用Graphviz将其转换为图像:
dot -Tpng sitemap.dot -o sitemap.png
python web_app_mcp.py https://example.com --headers '{"X-API-Key": "your-api-key"}'
python web_app_mcp.py https://example.com --delay 2.0 --max-pages 50
python web_app_mcp.py https://example.com/admin --max-depth 3
欢迎贡献!请随时提交Pull Request。
本项目采用MIT许可证 - 详情见LICENSE文件。