πŸ” Pentest Skill

May 29, 2026 Β· View on GitHub

δΈ­ζ–‡ | EN

License: MIT Python 3.8+ Platform Version

A black-box web penetration testing framework callable by any AI Agent (Claude Code, Codex, Cursor, WorkBuddy, etc.). Supports the full pentest pipeline from reconnaissance to reporting via standardized CLI interfaces.


This tool is for authorized security testing and research only.

  • You must obtain explicit written authorization from the target system owner before testing.
  • Unauthorized penetration testing is illegal in most jurisdictions.
  • The author assumes no liability for any misuse or damages.
  • Using this tool constitutes acceptance of this disclaimer and a commitment to use it lawfully and with authorization only.

πŸ“‹ Feature Overview

PhaseModuleDescription
0FingerprintingTech stack / WAF / Security headers / Cookie security detection
1Subdomain Enumerationsubfinder / crt.sh / DNS brute-force + liveness check
2DNS ResolutionCNAME chains / IP attribution / Cloud provider identification
3Port ScanningOpen ports / Service identification / Banner grabbing
4Deep RenderingPlaywright JS rendering / API discovery / Form extraction
4BSession CaptureLogin detection / Cookie / JWT / Multi-role
5Directory EnumerationPath discovery / Response clustering / SPA filtering
6JS Analysis14-dimension analysis / Endpoint verification / Key detection
7Vulnerability Scanningnuclei scan + Python fallback auto-scan
7AAuto VerificationFalse positive elimination / Baseline comparison / Vulnerability confirmation
7BAuth VulnerabilitiesIDOR / Unauthorized access / Privilege escalation / JWT analysis
7CManual Verificationcurl + Burp-format verification assistance
7DSQLi Verificationsqlmap automated injection verification
7EEvidence SummaryBurp-style packets + HTML report
7FFramework VulnsSpring / Django / ThinkPHP specific vulnerabilities
7GCommand InjectionOS command / pipeline / redirect injection
7HSSRF DetectionInternal network probe / Cloud metadata / Protocol abuse
7ISSTI DetectionTemplate engine sandbox escape detection
7JXXE DetectionExternal entity / OOB data exfiltration
7KDeserializationJava / PHP / Python deserialization detection
7LFile UploadExtension bypass / Webshell upload detection
7MParameter FuzzingXSS / SQLi / SSTI / SSRF multi-type injection
7NBusiness LogicPrice / Quantity / Race condition / Workflow bypass
7OJWT Vulnerabilitiesalg=none / Weak algorithms / Sensitive claims
7PGraphQLIntrospection / Batch queries / Hidden fields
7QHTTP SmugglingCL.TE / TE.CL differential detection
8Report GenerationHTML report (CVSS + MITRE + NIST + D3FEND)

πŸš€ Quick Start

# 1. Clone repository
git clone https://github.com/wudidike/pentest_skill.git
cd pentest_skill

# 2. One-click install (auto-downloads Go tools + Python deps + Payload sync)
bash setup.sh

# 3. Environment check
python scripts/health_check.py

# 4. Start pentesting
python scripts/phase0_fingerprint.py --target https://example.com --output-dir ./output

Optional Installation

bash setup.sh --with-playwright   # Install Playwright (Phase 4 deep rendering)
bash setup.sh --with-sqlmap       # Install sqlmap (Phase 7D SQLi verification)
bash setup.sh --update            # Update all tools to latest version

πŸ“– Usage

  1. Load SKILL.md into your AI Agent (Claude Code / Cursor / WorkBuddy)
  2. Tell the Agent: "Perform penetration test on https://target.com"
  3. The Agent will execute the full pipeline automatically

CLI Usage

# Full pipeline
python scripts/cli.py --target https://example.com --mode url

# Run individual Phase
python scripts/phase0_fingerprint.py --target https://example.com --output-dir ./output

# Recon only
python scripts/phase0_fingerprint.py --target URL --output-dir ./output
python scripts/phase4_render.py --target URL --output-dir ./output --deep
python scripts/phase5_dir_enum.py --target URL --output-dir ./output

πŸ“ Project Structure

pentest-skill/
β”œβ”€β”€ README.md
β”œβ”€β”€ LICENSE
β”œβ”€β”€ config.yaml            # Global config (tool paths / proxy / timeout / report language, etc.)
β”œβ”€β”€ setup.sh               # One-click install script
β”œβ”€β”€ SKILL.md               # AI Agent invocation guide (v2.6)
β”œβ”€β”€ MIGRATION.md           # Migration guide
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ cli.py             # Unified CLI entry (--target/--mode/--phases)
β”‚   β”œβ”€β”€ core/              # Core infrastructure package (NEW in v2.3)
β”‚   β”‚   β”œβ”€β”€ __init__.py    # Unified exports (backward compatible)
β”‚   β”‚   β”œβ”€β”€ config.py      # Configuration management
β”‚   β”‚   β”œβ”€β”€ logger.py      # Logging system
β”‚   β”‚   β”œβ”€β”€ constants.py   # Constants definition
β”‚   β”‚   β”œβ”€β”€ cli_utils.py   # CLI utilities
β”‚   β”‚   β”œβ”€β”€ result_writer.py # Result writing
β”‚   β”‚   β”œβ”€β”€ utils.py       # General utilities
β”‚   β”‚   β”œβ”€β”€ http_client.py # HTTP client
β”‚   β”‚   β”œβ”€β”€ finding_manager.py # Vulnerability management
β”‚   β”‚   └── evidence.py    # Evidence management
β”‚   β”œβ”€β”€ vuln/              # Modular vulnerability framework (NEW in v2.3)
β”‚   β”‚   β”œβ”€β”€ base.py        # VulnModule base class + HttpMixin
β”‚   β”‚   β”œβ”€β”€ registry.py    # VulnRegistry registration center
β”‚   β”‚   β”œβ”€β”€ orchestrator.py # VulnOrchestrator orchestration
β”‚   β”‚   β”œβ”€β”€ adapter.py     # Compatibility layer adapter
β”‚   β”‚   β”œβ”€β”€ phase7_bridge.py # Phase7 integration bridge
β”‚   β”‚   β”œβ”€β”€ coverage.py    # Coverage tracking
β”‚   β”‚   β”œβ”€β”€ sqli/          # SQL injection module
β”‚   β”‚   β”œβ”€β”€ xss/           # XSS module
β”‚   β”‚   β”œβ”€β”€ ssrf/          # SSRF module
β”‚   β”‚   β”œβ”€β”€ ssti/          # SSTI module
β”‚   β”‚   β”œβ”€β”€ xxe/           # XXE module
β”‚   β”‚   β”œβ”€β”€ cmdi/          # Command injection module
β”‚   β”‚   β”œβ”€β”€ auth/          # Auth vulnerability module
β”‚   β”‚   β”œβ”€β”€ logic/         # Business logic vulnerability module
β”‚   β”‚   β”œβ”€β”€ upload/        # File upload module
β”‚   β”‚   β”œβ”€β”€ deserialization/ # Deserialization module
β”‚   β”‚   β”œβ”€β”€ path/          # Path traversal module
β”‚   β”‚   β”œβ”€β”€ nosql/         # NoSQL injection module
β”‚   β”‚   β”œβ”€β”€ framework/     # Framework vulnerability module
β”‚   β”‚   └── tests/         # Vulnerability module test suite
β”‚   β”œβ”€β”€ tool_manager.py    # Tool management + fallback strategy
β”‚   β”œβ”€β”€ renderer.py        # Playwright deep rendering
β”‚   β”œβ”€β”€ fuzz_engine.py     # Directory fuzzing engine
β”‚   β”œβ”€β”€ js_analyzer.py     # JS 14-dimension analysis
β”‚   β”œβ”€β”€ param_fuzzer.py    # Parameter fuzzer
β”‚   β”œβ”€β”€ phase0_fingerprint.py
β”‚   β”œβ”€β”€ phase1_subdomain.py
β”‚   └── ...                # More Phase scripts
β”œβ”€β”€ wordlists/             # Wordlist files
β”œβ”€β”€ templates/             # Report templates
β”œβ”€β”€ references/            # Reference materials
└── hack-skills/           # Sub-skill modules (knowledge layer integration)

βš™οΈ Unified CLI Interface

All Phase scripts follow the same argument format:

python scripts/phase_X.py --target URL --output-dir DIR [OPTIONS]
ArgumentRequiredDescription
--targetβœ…Target URL or domain
--output-dirNoOutput directory (default ./recon-output)
--configNoConfig file path (auto-detected by default)
--proxyNoHTTP proxy (e.g. http://127.0.0.1:8080)
--timeoutNoTimeout in seconds (default 15)
--verboseNoVerbose output

πŸ› οΈ Tool Fallback Strategy

Core scripts automatically fall back when external tools are unavailable:

Go ToolFallback
nucleiPython requests auto-scan
ffufPython directory enumeration engine
subfindercrt.sh + DNS brute-force
httpxPython fingerprinting
nmapPython socket port scanning

πŸ§ͺ Testing

# Regression tests
make test
# or
python tests/test_core.py

# Benchmark
make benchmark
# or
python scripts/run_benchmark.py

# Environment check
python scripts/health_check.py

βš™οΈ Configuration

Edit config.yaml to customize behavior:

validation:
  report_language: "en"    # Report language (zh-CN / en)
network:
  proxy: ""                # HTTP proxy
  timeout: 15              # Timeout in seconds
tools:
  nuclei:
    path: ""               # Leave empty for auto-detect

πŸ†• Changelog

v2.6.0

  • 7 new standalone Phase entry scripts: All 13 vuln modules now have independent CLI scripts
    • 7G Command Injection, 7H SSRF, 7I SSTI, 7J XXE, 7K Deserialization, 7L File Upload, 7N Business Logic
  • constants.py / config.yaml / SKILL.md synchronized with new phases and data flows

v2.4.0

  • XSS module enhancement: discover.py 434β†’1138 lines (+162%), added DOM XSS / CSP bypass / PostMessage / WAF bypass detection
  • NoSQL module enhancement: Redis payloads 3β†’21, new Cassandra CQL injection payloads
  • Phase7 VulnOrchestrator enabled by default with --no-orchestrator fallback option
  • Knowledge layer linkage table completed with 4 missing hack-skill references
  • Version unified to 2.4.0, removed 5 dead code files, 24 new unit tests

v2.3.1

  • Removed hardcoded target domain from CLI example, replaced with generic example domain
  • Fixed known issues and security detail optimizations

v2.3.0

  • 7 Mandatory Enforcement Rules + startup checklist to prevent AI Agents from skipping steps or missing config
  • core/ Package Refactor: core.py split into 10 independent modules with backward-compatible wrappers
  • vuln/ Modular Vulnerability Framework: 12 vulnerability types with unified base class + registry + orchestrator
  • cli.py Unified Entry: --target/--mode/--phases/--list-phases/--dry-run
  • P0 Fix: VulnOrchestrator multiple inheritance header injection (MRO init chain)
  • SPA Application Note: IDOR findings must be verified via Phase 7A
  • Report Output Spec: Phase 7E/8 must use config.yaml report_language

🀝 Contributing

Issues and Pull Requests are welcome!

  1. Fork this repository
  2. Create a feature branch: git checkout -b feature/new-module
  3. Commit your changes: git commit -m 'Add new module'
  4. Push the branch: git push origin feature/new-module
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License.


🌟 Acknowledgements

Thanks to all contributors in the penetration testing open-source community for their tools and research.