wudidike/pentest_skill

GitHub: wudidike/pentest_skill

面向AI Agent的黑盒Web渗透测试自动化框架,覆盖从信息收集到报告生成的完整流程,支持外部工具自动降级为纯Python方案。

Stars: 4 | Forks: 0

# 🔍 Pentest Skill — 黑盒Web渗透测试自动化框架 [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/) [![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey)](https://github.com) ## ⚠️ 免责声明 / Legal Disclaimer **本工具仅供授权的安全测试和研究使用。** - 使用本工具对任何系统进行测试前,**必须获得目标系统所有者的明确书面授权**。 - 未经授权对系统进行渗透测试在大多数国家和地区属于**违法行为**。 - 作者对任何滥用、非法使用或由此造成的损失**不承担任何责任**。 - 使用本工具即表示您已阅读并同意本免责声明,并承诺仅在**合法、授权**的环境中使用。 **This tool is for authorized security testing and research only.** Unauthorized use against systems you do not own or have explicit permission to test may be illegal. The author assumes no liability for misuse. ## 📋 功能概览 | Phase | 功能模块 | 描述 | |-------|---------|------| | 0 | 指纹识别 | 技术栈/WAF/安全头/Cookie安全检测 | | 1 | 子域名枚举 | subfinder/crt.sh/DNS爆破+存活检测 | | 2 | DNS解析 | CNAME链/IP归属/云厂商识别 | | 3 | 端口扫描 | 开放端口/服务识别/Banner获取 | | 4 | 深度渲染 | Playwright JS渲染/API发现/表单提取 | | 4B | Session捕获 | 登录检测/Cookie/JWT/多角色 | | 5 | 目录枚举 | 路径发现/响应聚类/SPA过滤 | | 6 | JS分析 | 14维度分析/端点验证/密钥检测 | | 7 | 漏洞扫描 | nuclei扫描+Python降级自动扫描 | | 7A | 自动验证 | 误报排除/基线对比/漏洞确认 | | 7B | 认证漏洞 | IDOR/未授权访问/越权/JWT分析 | | 7F | 框架漏洞 | Spring/Django/ThinkPHP等特定漏洞 | | 7M | 参数Fuzz | XSS/SQLi/SSTI/SSRF多类型注入 | | 7D | SQLi验证 | sqlmap自动化注入验证 | | 7E | 证据汇总 | Burp风格数据包+HTML报告 | | 8 | 报告生成 | HTML/Markdown专业渗透报告 | ## 🚀 快速开始 ### 安装依赖 pip install requests beautifulsoup4 pyyaml dnspython pip install playwright && python -m playwright install # Phase 4 需要 ### 检查工具状态 python scripts/tool_manager.py status ### URL 模式(单目标) for phase in phase0 phase4 phase4b phase5 phase6 phase7 phase7a phase7b phase7m phase7d phase7e phase8; do python scripts/${phase}_*.py --target https://example.com --output-dir ./output --verbose done ### 域名模式(从子域名开始) for phase in phase0 phase1 phase2 phase3 phase4 phase4b phase5 phase6 phase7 phase7a phase7b phase7f phase7m phase7d phase7e phase8; do python scripts/${phase}_*.py --target example.com --output-dir ./output --verbose done ## 📁 项目结构 pentest-skill/ ├── README.md ├── LICENSE ├── config.yaml # 全局配置(工具路径/代理/超时等) ├── setup.sh # 一键安装脚本 ├── SKILL.md # AI Agent 调用说明 ├── scripts/ # 各 Phase 脚本 │ ├── core.py # 基础设施 │ ├── http_client.py # 统一HTTP客户端 │ ├── finding_manager.py # 漏洞管理 │ ├── tool_manager.py # 工具管理+降级策略 │ ├── evidence.py # 证据捕获 │ ├── phase0_fingerprint.py │ ├── phase1_subdomain.py │ └── ... # 更多 Phase 脚本 ├── wordlists/ # 字典文件 ├── templates/ # 报告模板 ├── references/ # 参考资料 └── hack-skills/ # 子技能模块 ## ⚙️ 统一 CLI 接口 所有 Phase 脚本遵循相同参数格式: python scripts/phase_X.py --target URL --output-dir DIR [OPTIONS] | 参数 | 必填 | 说明 | |------|------|------| | `--target` | ✅ | 目标URL或域名 | | `--output-dir` | 否 | 输出目录(默认 `./recon-output`) | | `--proxy` | 否 | HTTP代理(如 `http://127.0.0.1:8080`) | | `--timeout` | 否 | 超时秒数(默认15) | | `--verbose` | 否 | 详细输出 | ## 🛠️ 工具降级策略 核心脚本均支持在缺少外部工具时自动降级: | Go工具 | 降级方案 | |--------|---------| | nuclei | Python requests 自动扫描 | | ffuf | Python 目录枚举引擎 | | subfinder | crt.sh + DNS爆破 | | nmap | Python socket 端口扫描 | ## 📄 License 本项目基于 [MIT License](LICENSE) 开源。 ## 🌟 致谢 感谢所有渗透测试社区的开源工具和研究成果的贡献者。
标签:AI智能体, API安全, C2日志可视化, CISA项目, DOE合作, Fuzz, GitHub, Google, IDOR, JSON输出, JS分析, JWT, Nuclei, Playwright, Python, TGT, Web安全, XSS, 人工智能, 反取证, 多语言支持, 子域名枚举, 安全测试框架, 安全评估, 密码管理, 指纹识别, 插件系统, 攻防演练, 数据统计, 无后门, 漏洞情报, 特征检测, 用户模式Hook绕过, 目录枚举, 移动安全, 端口扫描, 系统安全, 网络安全, 自动化渗透测试, 自动化漏洞验证, 蓝队分析, 越权漏洞, 逆向工具, 隐私保护, 黑盒测试