Skip to content

Unified penetration testing framework with interactive console. OWASP Top 10, cloud security, web app testing, JWT exploitation, and automated vulnerability scanning. 8 integrated modules for comprehensive security assessments.

License

Notifications You must be signed in to change notification settings

madnessbrainsbl/pentest-scripts

Repository files navigation

Pentest Scripts - Unified Security Testing Framework

🎯 Quick Start - Interactive Console

The framework provides an interactive console interface for easy testing:

# Start interactive framework
python start.py

Interactive Console Commands:

Once started, you'll see an interactive menu:

pentest> set https://target.example.com    # Set target URL
pentest> help                               # Show all modules help
pentest> help cloud-crypto                  # Show specific module help
pentest> 1                                  # Run cloud-crypto test
pentest> owasp-test                         # Run OWASP testing
pentest> exit                               # Exit framework

Available Tests (Interactive Menu):

  1. cloud-crypto - Infrastructure & Cloud Security Testing
  2. owasp-test - OWASP Top 10 Complete Testing
  3. owasp-exploit - OWASP Exploitation Attempts
  4. aggressive - Aggressive Penetration Testing
  5. web-scan - Advanced Web Application Testing
  6. exploit-found - Exploit Found Vulnerabilities
  7. owasp-suite - Combined OWASP Suite (All Tests)

Alternative: Direct Command Line

You can also run tests directly without interactive mode:

python pentest.py cloud-crypto --url https://target.example.com
python pentest.py owasp-test
python pentest.py aggressive

πŸ“‹ Available Test Modules

🌐 Infrastructure & Cloud Security (cloud-crypto)

  • DNS reconnaissance - Subdomain discovery, DNS records
  • TLS/HTTPS analysis - Certificate validation, cipher suites
  • Port scanning - Open ports, service enumeration
  • HTTP security headers - CSP, HSTS, X-Frame-Options
  • External tool integration - Nikto, Nmap (optional with --extra)

πŸ›‘οΈ OWASP Top 10 Testing (owasp-test)

  • A01: Broken Access Control - IDOR, privilege escalation
  • A02: Cryptographic Failures - Weak encryption, sensitive data
  • A03: Injection - SQLi, XSS, command injection
  • A04: Insecure Design - Business logic flaws
  • A05: Security Misconfiguration - Debug endpoints, default credentials
  • A06: Vulnerable Components - Outdated libraries
  • A07: Authentication Failures - Weak auth mechanisms
  • A08: Software Integrity - Insecure deserialization
  • A09: Logging Failures - Insufficient monitoring
  • A10: Server-Side Request Forgery - SSRF vulnerabilities

⚑ OWASP Exploitation (owasp-exploit)

  • Active exploitation attempts of discovered vulnerabilities
  • SQL injection payloads with automated testing
  • Cross-site scripting proof-of-concepts
  • Authentication bypass techniques
  • Privilege escalation attempts

πŸ”₯ Aggressive Pentesting (aggressive)

  • OTP brute force with intelligent patterns
  • Account enumeration via timing attacks
  • Session hijacking analysis
  • Clickjacking vulnerability checks
  • CSRF protection testing
  • Race condition exploitation
  • Information disclosure discovery
  • JWT token security analysis

πŸ•΅οΈ Advanced Web Testing (web-scan)

  • Content analysis and information gathering
  • Cookie security assessment
  • CORS misconfiguration detection
  • XSS vulnerability scanning
  • SQL injection testing
  • Directory enumeration
  • Rate limiting analysis
  • Open redirect detection

πŸ”“ Vulnerability Exploitation (exploit-found)

  • Refresh token theft attempts
  • Session fixation attacks
  • Token replay vulnerabilities
  • CSRF exploitation with generated PoCs

πŸŽͺ JWT Security Testing

  • Algorithm confusion attacks
  • None algorithm exploitation
  • Weak secret brute force
  • Claim manipulation attempts

πŸ‘¨β€πŸ’Ό Professional Multi-Tool Pentesting

  • Nmap integration for port scanning
  • Nikto web scanning
  • SQLMap injection testing
  • Directory enumeration tools
  • Fuzzing attacks
  • SSL/TLS configuration analysis

βš™οΈ Configuration

Environment Variables

# Set target URLs (optional, defaults to example.com)
export PENTEST_BASE_URL="https://target.example.com"
export PENTEST_BACKEND_API="https://api.example.com"

Authentication

Place authentication tokens in:

  • saved_cookies.json - Session cookies for authenticated testing
  • saved_storage.json - Local storage data

πŸ“Š Reporting

All modules generate detailed JSON reports with:

  • Timestamped findings with severity levels
  • Vulnerability details and proof-of-concepts
  • Remediation recommendations
  • PoC files for exploits (saved to /tmp/)

Example report location: cloud_crypto_results.json

πŸš€ Usage Examples

Interactive Console Workflow (Recommended)

# Start interactive framework
python start.py

# In the interactive console:
pentest> set https://your-target.com        # Set target
pentest> help                                # View all available tests
pentest> help cloud-crypto                   # Get detailed info about specific test
pentest> 1                                   # Run infrastructure testing (cloud-crypto)
pentest> 2                                   # Run OWASP Top 10 testing
pentest> 7                                   # Run complete OWASP suite
pentest> exit                                # Exit when done

Full Pentest Session Example

$ python start.py

   πŸ”’ INTERACTIVE PENETRATION TESTING FRAMEWORK πŸ”’
══════════════════════════════════════════════════════════════════════

Available Commands:

   1. cloud-crypto     - Infrastructure & Cloud Security Testing
   2. owasp-test       - OWASP Top 10 Complete Testing
   3. owasp-exploit    - OWASP Exploitation Attempts
   4. aggressive       - Aggressive Penetration Testing
   5. web-scan         - Advanced Web Application Testing
   6. exploit-found    - Exploit Found Vulnerabilities
   7. owasp-suite      - Combined OWASP Suite (All Tests)

   set <url>           - Set target URL
   help                - Show detailed help for all modules
   help <module>       - Show help for specific module
   clear               - Clear screen
   exit                - Exit framework

══════════════════════════════════════════════════════════════════════

pentest> set https://target.example.com
βœ… Target URL set to: https://target.example.com

pentest> help cloud-crypto
══════════════════════════════════════════════════════════════════════
   πŸ“– Infrastructure & Cloud Security Testing
══════════════════════════════════════════════════════════════════════
[Detailed module information displayed here]

pentest> 1
πŸš€ Starting cloud-crypto against https://target.example.com...
[Test execution...]
βœ… Cloud/Crypto pentest finished. Report: cloud_crypto_results.json

pentest> owasp-test
πŸš€ Starting owasp-test against https://target.example.com...
[Test execution...]
βœ… OWASP testing completed

pentest> exit
πŸ‘‹ Exiting framework. Stay safe!

Direct Command Line (Alternative)

# Quick single-test execution
python pentest.py cloud-crypto --url https://target.example.com
python pentest.py owasp-test
python pentest.py aggressive

πŸ› οΈ Requirements

Install dependencies:

pip install -r requirements.txt

Optional external tools (for enhanced scanning):

# Install on Ubuntu/Debian
sudo apt-get install nmap nikto

# Install on macOS
brew install nmap nikto

⚠️ Important: Legal and Safety

All personal data has been sanitized:

  • βœ… Tokens replaced with [REDACTED_TOKEN]
  • βœ… IP addresses replaced with [REDACTED_IP]
  • βœ… Domains replaced with example.com
  • βœ… Phones replaced with [REDACTED_PHONE]
  • βœ… Emails replaced with [REDACTED_EMAIL]

Usage requirements:

  • ⚠️ Only for legal testing of systems you own
  • ⚠️ Requires explicit permission from system owner
  • ⚠️ Unauthorized use is illegal and prosecutable

πŸ“ Project Structure

pentest/
β”œβ”€β”€ start.py                # πŸš€ Interactive console (MAIN ENTRY POINT)
β”œβ”€β”€ pentest.py              # Direct CLI (alternative interface)
β”œβ”€β”€ pentestkit/             # Configuration utilities
β”‚   β”œβ”€β”€ config.py          # URL and token management
β”‚   └── __init__.py        # Package exports
β”œβ”€β”€ pentest_cloud_crypto.py # Infrastructure security
β”œβ”€β”€ pentest_advanced.py     # Advanced web testing
β”œβ”€β”€ pentest_aggressive.py   # Aggressive pentesting
β”œβ”€β”€ owasp_suite.py          # Consolidated OWASP testing
β”œβ”€β”€ test_owasp_top10_complete.py # OWASP Top 10 tests
β”œβ”€β”€ exploit_all_owasp.py    # OWASP exploitation
β”œβ”€β”€ exploit_found_vulns.py  # Found vulnerability exploits
β”œβ”€β”€ jwt_exploitation_real.py # JWT security testing
└── professional_pentest_v2.py # Multi-tool pentesting

Key Files:

  • start.py - 🎯 Interactive console interface (recommended for users)

    • User-friendly menu-driven interface
    • Built-in help system for all modules
    • Interactive target URL configuration
    • Command shortcuts (1-7 for quick access)
  • pentest.py - Direct command-line interface (for automation/scripts)

    • Accepts command-line arguments
    • Suitable for CI/CD integration
  • pentestkit/config.py - Centralized configuration

    • Shared by all modules
    • Manages URLs and authentication tokens

🎯 Testing Workflow

Recommended: Interactive Console Approach

# Step 1: Start interactive framework
python start.py

# Step 2: Set target URL
pentest> set https://target.example.com

# Step 3: Get help on available tests
pentest> help

# Step 4: Run infrastructure reconnaissance
pentest> cloud-crypto
# or
pentest> 1

# Step 5: Run web application testing
pentest> web-scan
# or
pentest> 5

# Step 6: Run comprehensive OWASP assessment
pentest> owasp-suite
# or
pentest> 7

# Step 7: Review results and exit
pentest> exit

Alternative: Direct CLI for Automation

# Run tests via direct command line
python pentest.py cloud-crypto --url https://target.example.com
python pentest.py web-scan --url https://target.example.com
python pentest.py owasp-suite --url https://target.example.com

πŸ“ˆ Module Integration

All modules share:

  • Centralized configuration via pentestkit.config
  • Unified authentication handling
  • Consistent reporting format
  • Modular architecture for easy extension

About

Unified penetration testing framework with interactive console. OWASP Top 10, cloud security, web app testing, JWT exploitation, and automated vulnerability scanning. 8 integrated modules for comprehensive security assessments.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages