pentest_skill

agent
Guvenlik Denetimi
Basarisiz
Health Gecti
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 12 GitHub stars
Code Basarisiz
  • exec() — Shell command execution in references/payloads.json
  • network request — Outbound network request in references/payloads.json
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

Black-box web penetration testing automation framework for AI Agents

README.md

🔍 Pentest Skill — 黑盒Web渗透测试自动化框架

License: MIT
Python 3.8+
Platform
Version

一套可被任何 AI Agent(Claude Code、Codex、Cursor、WorkBuddy 等)直接调用的黑盒 Web 渗透测试框架。通过标准化的 CLI 接口,支持从侦察到报告的完整渗透测试流程。


⚠️ 免责声明 / 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分析
7C 人工验证 curl+Burp格式验证辅助
7F 框架漏洞 Spring/Django/ThinkPHP等特定漏洞
7M 参数Fuzz XSS/SQLi/SSTI/SSRF多类型注入
7D SQLi验证 sqlmap自动化注入验证
7E 证据汇总 Burp风格数据包+HTML报告
8 报告生成 HTML/Markdown专业渗透报告

🚀 快速开始

开工前必读

# 开工前必须读配置(不要跳过!)
cat config.yaml  # 确认 report_language, proxy, wordlist 等参数

安装依赖

pip install requests beautifulsoup4 pyyaml dnspython
pip install playwright && python -m playwright install   # Phase 4 需要

检查工具状态

python scripts/tool_manager.py status

统一 CLI 入口(推荐)

# 运行所有阶段(URL模式)
python scripts/cli.py --target https://example.com --mode url

# 运行所有阶段(域名模式)
python scripts/cli.py --target example.com --mode domain

# 运行指定阶段
python scripts/cli.py --target https://example.com --phases phase0,phase4,phase5

# 列出所有可用阶段
python scripts/cli.py --list-phases

# 干运行(不执行实际操作)
python scripts/cli.py --target https://example.com --dry-run

单 Phase 运行

# 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 调用说明(v2.3)
├── MIGRATION.md           # 迁移指南
├── scripts/
│   ├── cli.py             # 统一 CLI 入口(--target/--mode/--phases)
│   ├── core/              # 核心基础设施包(v2.3 新增)
│   │   ├── __init__.py    # 统一导出(向后兼容)
│   │   ├── config.py      # 配置管理
│   │   ├── logger.py      # 日志系统
│   │   ├── constants.py   # 常量定义
│   │   ├── cli_utils.py   # CLI工具
│   │   ├── result_writer.py # 结果写入
│   │   ├── utils.py       # 通用工具
│   │   ├── http_client.py # HTTP客户端
│   │   ├── finding_manager.py # 漏洞管理
│   │   └── evidence.py    # 证据管理
│   ├── vuln/              # 漏洞模块化体系(v2.3 新增)
│   │   ├── base.py        # VulnModule 基类 + HttpMixin
│   │   ├── registry.py    # VulnRegistry 注册中心
│   │   ├── orchestrator.py # VulnOrchestrator 编排器
│   │   ├── adapter.py     # 兼容层适配器
│   │   ├── phase7_bridge.py # Phase7集成桥接
│   │   ├── coverage.py    # 覆盖追踪
│   │   ├── sqli/          # SQL注入模块
│   │   ├── xss/           # XSS模块
│   │   ├── ssrf/          # SSRF模块
│   │   ├── ssti/          # SSTI模块
│   │   ├── xxe/           # XXE模块
│   │   ├── cmdi/          # 命令注入模块
│   │   ├── auth/          # 认证漏洞模块
│   │   ├── logic/         # 业务逻辑漏洞模块
│   │   ├── upload/        # 文件上传模块
│   │   ├── deserialization/ # 反序列化模块
│   │   ├── path/          # 路径穿越模块
│   │   ├── nosql/         # NoSQL注入模块
│   │   ├── framework/     # 框架漏洞模块
│   │   └── tests/         # 漏洞模块测试套件
│   ├── tool_manager.py    # 工具管理+降级策略
│   ├── renderer.py        # Playwright深度渲染
│   ├── fuzz_engine.py     # 目录Fuzz引擎
│   ├── js_analyzer.py     # JS 14维度分析
│   ├── param_fuzzer.py    # 参数Fuzzer
│   ├── 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
--config 配置文件路径(默认自动查找)
--proxy HTTP代理(如 http://127.0.0.1:8080
--timeout 超时秒数(默认15)
--verbose 详细输出

🛠️ 工具降级策略

核心脚本均支持在缺少外部工具时自动降级:

Go工具 降级方案
nuclei Python requests 自动扫描
ffuf Python 目录枚举引擎
subfinder crt.sh + DNS爆破
httpx Python 指纹识别
nmap Python socket 端口扫描

🆕 v2.3.0 更新内容

  • 7 条强制规则 + 开工检查清单,防止 AI Agent 跳步/漏读配置
  • core/ 包重构core.py 拆分为 10 个独立模块,保留向后兼容包装器
  • vuln/ 漏洞模块化体系:12 种漏洞类型,统一基类 + 注册中心 + 编排器
  • cli.py 统一入口--target/--mode/--phases/--list-phases/--dry-run
  • P0 修复:VulnOrchestrator 多重继承 headers 注入问题(MRO 初始化链)
  • SPA 应用注意事项:IDOR 发现必须经 Phase 7A 验证
  • 报告输出规范:Phase 7E/8 必须按 config.yaml 的 report_language 生成

🤝 贡献

欢迎提交 Issue 和 Pull Request!

  1. Fork 本仓库
  2. 创建特性分支:git checkout -b feature/new-module
  3. 提交更改:git commit -m 'Add new module'
  4. 推送分支:git push origin feature/new-module
  5. 发起 Pull Request

📄 License

本项目基于 MIT License 开源。


🌟 致谢

感谢所有渗透测试社区的开源工具和研究成果的贡献者。

Yorumlar (0)

Sonuc bulunamadi