AI-powered penetration testing framework with intelligent analysis powered by GitHub Models API (GPT-4o/GPT-5).
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.
- π― 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
- 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
# 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/go install github.com/htunn/simple-exploit/cmd/exploit@latestDownload pre-compiled binaries from GitHub Releases.
- GitHub Token: Get a GitHub personal access token from https://github.com/settings/tokens
- GitHub Models Access: Ensure you have access to GitHub Models (requires GitHub Copilot subscription or free tier)
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> exitTarget Management:
target <url>- Set the target URLshow 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 vulnerabilitiesattack [type]- Execute attack with confirmationanalyze scan|attack- Get AI analysis of resultsshow scan|attack- Display raw results
AI Assistance:
ask <question>- Ask AI security questionsbypass <waf-type>- Get WAF bypass techniques? <question>- Quick ask (alias)
Utilities:
history- Show command historyclear- Clear screenhelp- Show helpexit|quit- Exit REPL
Configuration files are located in ~/.exploit/configs/:
trusted-authors.yaml- Plugin author allowlistpre-approval.yaml- Target β exploit category mappingslimits.yaml- Rate limits and concurrency settingsscope.yaml- Authorized target ranges
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{}},
},
})
}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
The AI receives complete scan data and provides:
- Attack Surface Analysis: Identifies specific vulnerabilities from actual endpoints
- Technology-Specific Risks: Known CVEs and attack vectors for detected tech stack
- 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)
- Recommended Attack Vectors: Prioritized based on actual findings
- Exploitation Roadmap: Step-by-step recommendations with specific endpoints
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
This tool uses the GitHub Models API for AI-powered security analysis.
- gpt-4o (default) - Fast, balanced performance
- openai/gpt-5 - Latest GPT model with enhanced reasoning
- Custom models supported via the
modelcommand
Get a GitHub Personal Access Token:
- Go to https://github.com/settings/tokens
- Generate new token (classic or fine-grained)
- Ensure GitHub Models access (requires Copilot subscription or free tier)
- Set environment variable:
export GITHUB_TOKEN="github_pat_xxxxxxxxxxxxx"- 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
go build -o exploit cmd/exploit/main.gogo test ./...- β¨ 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 (
modelcommand) - π§ 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
- Initial release with Copilot SDK integration
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Write tests for new functionality
- Submit a pull request
MIT License - see LICENSE file.
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.
- π Documentation
- π Issue Tracker
- π¬ Discussions
Built with β€οΈ using GitHub Models API