Skip to content

Leegreen305/AI-Penetration-Testing-Assistant-

Repository files navigation

AI Penetration Testing Assistant

A professional AI-powered assistant designed to help security professionals plan, document, and report penetration testing engagements. This tool provides methodology guidance and documentation support, not attack automation.

Purpose

This repository demonstrates:

  • Professional penetration testing methodology knowledge
  • AI integration for security assessment planning
  • Structured documentation and reporting practices
  • Industry-standard framework implementation (PTES, OWASP, NIST)
  • Professional security consulting workflows

Important Notice

This is a methodology guidance and documentation tool. It helps security professionals structure their work professionally but does NOT:

  • Automate exploitation or attacks
  • Provide specific exploit code
  • Replace skilled penetration testers
  • Perform actual vulnerability scanning

Repository Structure

AI-Penetration-Testing-Assistant/
├── agent-core/              # AI assistant core functionality
│   ├── pentest_assistant.py # Main AI assistant implementation
│   └── requirements.txt     # Python dependencies
├── methodology/             # Penetration testing methodology guides
│   ├── 01-pre-engagement-scoping.md
│   ├── 02-reconnaissance-information-gathering.md
│   ├── 03-vulnerability-identification.md
│   ├── 04-exploitation-planning.md
│   ├── 05-post-exploitation.md
│   └── 06-reporting.md
├── reconnaissance/          # Reconnaissance documentation tools
│   ├── reconnaissance-checklist.md
│   └── recon_organizer.py
├── reporting/              # Report generation tools
│   └── report_generator.py
├── templates/              # Professional document templates
│   ├── scope-of-work-template.md
│   ├── rules-of-engagement-template.md
│   ├── finding-template.md
│   └── report-template.md
├── scripts/                # Utility scripts
│   ├── cve_mapper.py      # CVE/CWE mapping
│   ├── prioritize_remediation.py
│   └── executive_summary.py
└── sample-outputs/         # Example outputs
    ├── sample-engagement-plan.md
    ├── sample-recon-summary.md
    └── sample-pentest-report.md

Features

AI-Powered Planning Assistant

  • Generate structured penetration testing plans
  • Suggest relevant testing techniques based on target type
  • Ask clarifying questions to refine engagement scope
  • Provide methodology guidance
  • Generate phase-specific documentation

Methodology Documentation

Comprehensive guides covering:

  • Pre-engagement and scoping
  • Reconnaissance and information gathering
  • Vulnerability identification
  • Exploitation planning
  • Post-exploitation considerations
  • Professional reporting

Reconnaissance Tools

  • Structured reconnaissance checklist
  • Finding documentation organizer
  • Attack surface mapping support
  • Service inventory management

Reporting Tools

  • Professional report generation
  • CVE/CWE mapping for findings
  • CVSS score integration
  • Remediation prioritization
  • Executive summary generation

Professional Templates

  • Scope of Work documents
  • Rules of Engagement
  • Finding documentation
  • Final report structure

Installation

Prerequisites

  • Python 3.8 or higher
  • OpenAI API key

Setup

  1. Clone this repository:
git clone https://github.com/Leegreen305/AI-Penetration-Testing-Assistant.git
cd AI-Penetration-Testing-Assistant
  1. Install dependencies:
pip install -r agent-core/requirements.txt
  1. Set up your OpenAI API key:
# Linux/Mac
export OPENAI_API_KEY='your-api-key-here'

# Windows Command Prompt
set OPENAI_API_KEY=your-api-key-here

# Windows PowerShell
$env:OPENAI_API_KEY="your-api-key-here"

Alternatively, create a .env file in the project root:

OPENAI_API_KEY=your-api-key-here

Usage

Running the AI Assistant

cd agent-core
python pentest_assistant.py

The assistant will:

  1. Define engagement scope
  2. Generate testing plan
  3. Suggest relevant techniques
  4. Provide methodology guidance

Example Usage

from pentest_assistant import PenTestAssistant

# Initialize assistant
assistant = PenTestAssistant()

# Define scope
target_info = {
    'target_name': 'Example Corp Web App',
    'target_type': 'web_application',
    'domains': ['example.com'],
    'ip_ranges': ['192.168.1.0/24'],
    'objectives': ['Identify security vulnerabilities']
}

scope = assistant.define_scope(target_info)

# Generate testing plan
plan = assistant.generate_testing_plan(scope)
print(f"Plan ID: {plan.plan_id}")
print(f"Methodology: {plan.methodology}")

# Get technique suggestions
techniques = assistant.suggest_techniques('web_application')
for technique in techniques:
    print(f"- {technique}")

Generating Reports

cd reporting
python report_generator.py

Using Utility Scripts

Map findings to CVE/CWE identifiers:

cd scripts
python cve_mapper.py

Prioritize remediation:

python prioritize_remediation.py

Generate executive summary:

python executive_summary.py

Methodology Frameworks

This tool implements guidance from:

PTES (Penetration Testing Execution Standard)

  • Pre-engagement interactions
  • Intelligence gathering
  • Threat modeling
  • Vulnerability analysis
  • Exploitation
  • Post-exploitation
  • Reporting

OWASP Testing Guide

  • Information gathering
  • Configuration and deployment management
  • Identity management
  • Authentication testing
  • Authorization testing
  • Session management
  • Input validation
  • Error handling
  • Cryptography
  • Business logic
  • Client-side testing

NIST SP 800-115

  • Planning phase
  • Discovery phase
  • Attack phase
  • Reporting phase

Target Types Supported

The assistant provides specialized guidance for:

  • Web Applications: OWASP Top 10, API security, authentication testing
  • Network Infrastructure: Port scanning, service enumeration, network segmentation
  • APIs: Authentication, authorization, rate limiting, data exposure
  • Mobile Applications: Static/dynamic analysis, storage security, cryptography
  • Cloud Infrastructure: IAM, storage security, network controls, container security

Professional Documentation

All generated documents follow professional standards:

  • Executive summaries for business stakeholders
  • Technical details for security teams
  • CVSS v3.1 scoring
  • CVE/CWE references
  • Remediation recommendations with timelines
  • Risk matrices and visual aids

Ethical Use

This tool is designed for:

  • Authorized security testing only
  • Professional penetration testers and security consultants
  • Educational purposes in controlled environments
  • Security assessment planning and documentation

Do NOT use this tool for:

  • Unauthorized access or testing
  • Malicious purposes
  • Attacking systems without permission
  • Bypassing security controls illegally

Always obtain written authorization before conducting any security testing.

Project Demonstrates

This repository showcases understanding of:

  • Penetration testing methodologies and frameworks
  • Security assessment planning and scoping
  • Vulnerability classification and risk assessment
  • Professional security documentation and reporting
  • AI integration for security workflows
  • Python development for security tools
  • Industry compliance standards (PCI DSS, HIPAA, SOC 2)
  • CVSS scoring and CVE/CWE mapping
  • Executive communication and technical writing

Learning Resources

To learn more about penetration testing:

License

This project is for educational and professional use. Always follow ethical guidelines and legal requirements when conducting security testing.

Contributing

This is a demonstration project. For professional penetration testing services, consult with certified security professionals.

Contact

For questions about professional penetration testing methodology, consult:

Disclaimer

This tool provides guidance and documentation support for authorized security testing. The creators are not responsible for misuse. Always obtain proper authorization and follow all applicable laws and regulations.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages