Skip to content

AI-powered penetration testing framework with hot-reloadable plugins, intelligent WAF bypass, and GitHub Copilot Models integration.

License

Notifications You must be signed in to change notification settings

Htunn/simple-exploit

Repository files navigation

Simple-Exploit Pentest Agent

Go Reference Go Report Card License: MIT Version

AI-powered penetration testing framework with intelligent analysis powered by GitHub Models API (GPT-4o/GPT-5).

⚠️ Legal Disclaimer

THIS TOOL IS FOR AUTHORIZED SECURITY TESTING ONLY

By using this tool, you acknowledge that:

  • You have EXPLICIT WRITTEN PERMISSION to test target systems
  • Unauthorized access to computer systems is ILLEGAL (CFAA, Computer Misuse Act, etc.)
  • You assume ALL LEGAL RESPONSIBILITY for your actions
  • The authors are NOT LIABLE for misuse of this tool

Violation of computer fraud laws may result in criminal prosecution, civil liability, and imprisonment.

Features

  • 🎯 Interactive REPL Mode: Terminal interface with persistent context, command history, and AI chat
  • πŸ€– AI-Driven Analysis: Powered by GitHub Models API (GPT-4o/GPT-5) for intelligent vulnerability analysis
  • πŸ’‘ Context-Aware AI: Analyzes actual scan/attack results instead of generic templates
  • πŸ”„ Smart Retry Logic: Automatic exponential backoff for rate limiting (2s, 4s, 8s)
  • 🎨 Configurable Models: Switch between AI models on the fly (gpt-4o, openai/gpt-5, etc.)
  • πŸ” Pattern Recognition: Automatically categorizes endpoints (auth, API, admin, file operations)
  • πŸ›‘οΈ WAF Bypass Engine: Active fingerprinting and adaptive bypass strategies
  • βœ… Interactive Approval: Human-in-the-loop confirmation for attack execution
  • πŸ“Š Structured Analysis: Evidence-based recommendations using full scan/attack data
  • ⚑ Adaptive Rate Limiting: Token bucket algorithm with circuit breaker pattern
  • πŸ”’ Security Safeguards: Scope validation and audit logging

Supported Targets

  • Web Applications: SQL injection, XSS, CSRF, XXE, SSRF, LFI/RFI, template injection
  • REST APIs: GraphQL introspection, JWT manipulation, OAuth flow testing, mass assignment
  • Active Directory: Kerberos attacks, NTLM relay, golden/silver tickets, DCSync
  • ADFS: Token manipulation, endpoint enumeration, federation vulnerabilities
  • Authentication: Brute force, password spray, session hijacking, MFA bypass
  • Authorization: IDOR, privilege escalation, horizontal/vertical bypass

Installation

From Source

# Clone repository
git clone https://github.com/htunn/simple-exploit.git
cd simple-exploit

# Build
go build -o exploit cmd/exploit/main.go

# Install globally (optional)
sudo mv exploit /usr/local/bin/

Using Go Install

go install github.com/htunn/simple-exploit/cmd/exploit@latest

From Releases

Download pre-compiled binaries from GitHub Releases.

Quick Start

Prerequisites

  1. GitHub Token: Get a GitHub personal access token from https://github.com/settings/tokens
  2. GitHub Models Access: Ensure you have access to GitHub Models (requires GitHub Copilot subscription or free tier)

Interactive REPL Mode (Recommended)

The tool runs in REPL-only mode with integrated AI assistance:

# Set your GitHub token
export GITHUB_TOKEN="github_pat_xxxxxxxxxxxxx"
# or
export COPILOT_GITHUB_TOKEN="github_pat_xxxxxxxxxxxxx"

# Run the tool (automatically starts REPL)
./exploit

# Inside REPL:
πŸ”₯ exploit> target https://example.com
βœ… Target set to: https://example.com

πŸ”₯ exploit> model gpt-4o
βœ… Model set to: gpt-4o

πŸ”₯ exploit> scan
πŸ”§ Initializing orchestrator...
🎯 Starting scan on: https://example.com
...
πŸ€– Analyzing results with AI...
πŸ“‹ AI Security Analysis:
[Detailed analysis based on actual scan results]

πŸ”₯ exploit> ask how to bypass cloudflare waf?
πŸ’¬ AI Response:
[Specific WAF bypass techniques]

πŸ”₯ exploit> attack sqli
βš”οΈ  Execute sqli attack on https://example.com? [y/N]: y
...

πŸ”₯ exploit> show scan
[Display last scan results]

πŸ”₯ exploit> help
[Show all available commands]

πŸ”₯ exploit> exit

Available Commands

Target Management:

  • target <url> - Set the target URL
  • show target - Display current target

AI Model Configuration:

  • model <name> - Set AI model (gpt-4o, openai/gpt-5, etc.)
  • show model - Display current model

Scanning & Attacks:

  • scan [url] - Scan target for vulnerabilities
  • attack [type] - Execute attack with confirmation
  • analyze scan|attack - Get AI analysis of results
  • show scan|attack - Display raw results

AI Assistance:

  • ask <question> - Ask AI security questions
  • bypass <waf-type> - Get WAF bypass techniques
  • ? <question> - Quick ask (alias)

Utilities:

  • history - Show command history
  • clear - Clear screen
  • help - Show help
  • exit|quit - Exit REPL

Configuration

Configuration files are located in ~/.exploit/configs/:

  • trusted-authors.yaml - Plugin author allowlist
  • pre-approval.yaml - Target β†’ exploit category mappings
  • limits.yaml - Rate limits and concurrency settings
  • scope.yaml - Authorized target ranges

Plugin Development

Create custom exploit modules using the plugin interface:

package main

import (
    "context"
    "github.com/htunn/simple-exploit/pkg/pluginkit"
    "github.com/hashicorp/go-plugin"
)

type MyExploit struct{}

func (e *MyExploit) Name() string {
    return "my-exploit"
}

func (e *MyExploit) Metadata() pluginkit.ExploitMetadata {
    return pluginkit.ExploitMetadata{
        Name:      "My Exploit",
        Category:  pluginkit.CategoryWeb,
        RiskLevel: pluginkit.RiskLevelMedium,
    }
}

func (e *MyExploit) Validate(target pluginkit.Target) error {
    return nil
}

func (e *MyExploit) Execute(ctx context.Context, target pluginkit.Target) (pluginkit.Result, error) {
    // Exploit implementation
    return pluginkit.Result{Success: true}, nil
}

func main() {
    plugin.Serve(&plugin.ServeConfig{
        HandshakeConfig: pluginkit.HandshakeConfig,
        Plugins: map[string]plugin.Plugin{
            "exploit": &pluginkit.ExploitPlugin{Impl: &MyExploit{}},
        },
    })
}

Architecture

cmd/exploit/          # REPL entry point
internal/
  β”œβ”€β”€ agent/          # Vulnerability scanner orchestration
  β”œβ”€β”€ approval/       # Interactive approval workflow
  β”œβ”€β”€ bypass/         # WAF detection & bypass strategies
  β”œβ”€β”€ cmd/            # REPL command handlers
  β”œβ”€β”€ copilot/        # GitHub Models API integration
  β”œβ”€β”€ ratelimit/      # Rate limiting & concurrency control
  └── reporter/       # Structured reporting
pkg/
  └── pluginkit/      # Plugin interface
configs/              # Configuration files

AI Analysis Features

Intelligent Scan Analysis

The AI receives complete scan data and provides:

  1. Attack Surface Analysis: Identifies specific vulnerabilities from actual endpoints
  2. Technology-Specific Risks: Known CVEs and attack vectors for detected tech stack
  3. Endpoint Pattern Recognition: Auto-categorizes endpoints:
    • πŸ” Authentication (login, oauth, token, session)
    • πŸ”Œ API endpoints (rest, graphql, api/)
    • βš™οΈ Admin/Management (admin, console, config)
    • πŸ“ File operations (upload, download)
  4. Recommended Attack Vectors: Prioritized based on actual findings
  5. Exploitation Roadmap: Step-by-step recommendations with specific endpoints

Attack Result Analysis

For Failed Attacks:

  • Why it failed (WAF, hardening, wrong vector)
  • Alternative approaches and modified payloads
  • Bypass techniques for detected security controls
  • Prerequisite reconnaissance steps needed

For Successful Attacks:

  • Impact assessment and compromised resources
  • Evidence extraction and proof of exploitation
  • Privilege escalation and lateral movement paths
  • Remediation guidance and root cause analysis

GitHub Models API

This tool uses the GitHub Models API for AI-powered security analysis.

Supported Models

  • gpt-4o (default) - Fast, balanced performance
  • openai/gpt-5 - Latest GPT model with enhanced reasoning
  • Custom models supported via the model command

Authentication

Get a GitHub Personal Access Token:

  1. Go to https://github.com/settings/tokens
  2. Generate new token (classic or fine-grained)
  3. Ensure GitHub Models access (requires Copilot subscription or free tier)
  4. Set environment variable:
export GITHUB_TOKEN="github_pat_xxxxxxxxxxxxx"

API Features

  • Direct HTTP Integration: No SDK dependencies, pure REST API
  • Automatic Retry: Exponential backoff for rate limiting (2s, 4s, 8s)
  • Error Handling: Clear error messages with status codes
  • Configurable: Switch models on-the-fly in REPL

Development

Build from Source

go build -o exploit cmd/exploit/main.go

Run Tests

go test ./...

Changelog

v1.0.1 (2026-02-06)

  • ✨ Migrated from Copilot SDK to direct GitHub Models API integration
  • πŸ”„ Added automatic retry logic with exponential backoff for rate limits
  • 🎨 Added configurable AI model selection (model command)
  • 🧠 Improved AI analysis - now uses full scan/attack data instead of templates
  • πŸ” Added intelligent endpoint pattern recognition (auth, API, admin, file ops)
  • πŸ“Š Enhanced analysis with technology stack identification
  • 🎯 Increased AI token limits (4000 β†’ 8000) for detailed analysis
  • πŸ› οΈ Fixed API parameter naming (max_tokens β†’ max_completion_tokens)
  • ⚑ REPL-only mode - simplified architecture, removed unused CLI commands
  • πŸ”§ Updated default endpoint to https://models.github.ai/inference
  • πŸ“ Improved help documentation and command examples

v1.0.0

  • Initial release with Copilot SDK integration

Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Write tests for new functionality
  4. Submit a pull request

License

MIT License - see LICENSE file.

Disclaimer

This tool is provided for educational and authorized security testing purposes only. The authors assume no liability for misuse or damage caused by this program. Always obtain explicit written permission before testing any systems you do not own.

Support


Built with ❀️ using GitHub Models API

About

AI-powered penetration testing framework with hot-reloadable plugins, intelligent WAF bypass, and GitHub Copilot Models integration.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published