Skip to content

Zen-AI-Pentest

AI-powered penetration testing framework that orchestrates 20+ security tools via LLMs for automated reconnaissance, vulnerability scanning, exploitation, and reporting.

# Clone the repository
git clone https://github.com/SHAdd0WTAka/zen-ai-pentest.git
cd zen-ai-pentest

# Install dependencies
pip install -r requirements.txt

# Copy and configure environment
cp .env.example .env

# Edit .env with your API keys and settings
nano .env
# One-command deployment with all security tools pre-installed
docker-compose up -d

# Verify containers are running
docker-compose ps

# View logs
docker-compose logs -f
# Load all k-* command aliases
source tools/setup_aliases.sh

# Verify installation
k-recon --help
k-exploit --help
CommandDescription
k-recon "Target: example.com"Run AI-guided reconnaissance on a target
k-exploit "Target: 192.168.1.1"Launch exploitation agent against target
k-reportGenerate penetration test report
k-auditRun security audit operations
source tools/setup_aliases.shLoad all CLI tool aliases
docker-compose up -dStart framework with Docker
docker-compose logs -fFollow container logs
docker-compose downStop all containers
AgentPurpose
k-reconReconnaissance — information gathering, subdomain enumeration, port scanning
k-exploitExploitation — vulnerability validation, payload delivery
k-reportReporting — compile findings into structured penetration test reports
k-auditAuditing — compliance checks, configuration review
k-socialSocial engineering — phishing simulation, pretexting assessment
k-networkNetwork analysis — traffic inspection, protocol analysis
k-mobileMobile security — Android/iOS application testing
k-redteamRed team operations — adversary simulation, lateral movement
k-icsICS/SCADA — industrial control system security assessment
k-cloudCloud security — AWS, Azure, GCP misconfiguration scanning
k-cryptoCryptographic analysis — cipher suite evaluation, certificate checks
CommandDescription
k-recon "Target: example.com"Full reconnaissance scan
k-recon "Subdomain enumeration: example.com"Enumerate subdomains
k-recon "Port scan: 192.168.1.0/24"Scan network range for open ports
k-recon "DNS enumeration: example.com"DNS record discovery
k-recon "Technology fingerprint: example.com"Identify web technologies
k-recon "OSINT gather: target_org"Open-source intelligence gathering
k-recon "SSL analysis: example.com"Analyze SSL/TLS configuration
CommandDescription
k-exploit "Vuln scan: example.com"Automated vulnerability scanning
k-exploit "Web app test: https://example.com"Web application security testing
k-exploit "SQL injection: https://example.com/login"Test for SQL injection
k-exploit "XSS scan: https://example.com"Cross-site scripting detection
k-exploit "API test: https://api.example.com"API security assessment
k-exploit "Auth bypass: https://example.com/admin"Authentication bypass testing
ToolCategoryUsed By
NmapNetwork scanningk-recon, k-network
SQLMapSQL injectionk-exploit
MetasploitExploitation frameworkk-exploit, k-redteam
Burp SuiteWeb app testingk-exploit
GobusterDirectory brute-forcingk-recon
NucleiTemplate-based scanningk-exploit
BloodHoundActive Directoryk-redteam
NiktoWeb server scanningk-recon
HydraPassword crackingk-exploit
John the RipperHash crackingk-exploit
AmassSubdomain enumerationk-recon
SubfinderSubdomain discoveryk-recon
ffufWeb fuzzerk-exploit
ResponderNetwork poisoningk-network
ImpacketNetwork protocolsk-network, k-redteam
CommandDescription
k-reportGenerate full penetration test report
k-report --format jsonExport findings as JSON
k-report --format junitExport as JUnit XML (CI/CD integration)
k-report --format sarifExport as SARIF (GitHub/GitLab integration)
k-report --compliance pciGenerate PCI-DSS compliance report
k-report --compliance hipaaGenerate HIPAA compliance report
k-report --compliance gdprGenerate GDPR compliance report
# .github/workflows/pentest.yml
name: Security Scan
on: [push]
jobs:
  pentest:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: SHAdd0WTAka/zen-ai-pentest@v2
        with:
          target: ${{ secrets.SCAN_TARGET }}
          mode: recon
          output: sarif
# .gitlab-ci.yml
security_scan:
  image: shadd0wtaka/zen-ai-pentest:latest
  script:
    - k-recon "Target: $SCAN_TARGET"
    - k-report --format junit
  artifacts:
    reports:
      junit: report.xml
VariableDescriptionExample
OPENAI_API_KEYOpenAI API key for LLM reasoningsk-...
ANTHROPIC_API_KEYAnthropic API key (alternative LLM)sk-ant-...
SCAN_TARGETDefault target for scansexample.com
REPORT_FORMATDefault report formatjson, sarif, junit
MAX_THREADSMaximum concurrent scan threads10
TIMEOUTScan timeout in seconds3600
PROXYProxy for scan traffichttp://127.0.0.1:8080
ModeDescription
InteractiveContinuous engagement with AI-guided decisions
One-shotSingle execution with predefined parameters
PipelineCI/CD integration with exit codes and status reporting
AutonomousFull AI-driven scan with minimal human interaction
  • Always obtain proper authorization before scanning any target
  • Start with reconnaissance before exploitation
  • Use the --proxy flag to route traffic through Burp Suite for manual review
  • Review AI decisions in interactive mode before allowing autonomous exploitation
  • Generate compliance reports for regulatory requirements
  • Use Docker deployment for consistent tool versions across team members
  • Configure rate limiting to avoid overwhelming target systems
  • Store scan results in version control for audit trails