Skip to content

Preshy/aibughunter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎯 AI Bug Hunter

AI-Powered Automated Bug Hunting Platform with Qwen CLI Integration

Python 3.10+ License: MIT FastAPI CLI

Automated security scanning platform that leverages AI for intelligent vulnerability discovery, exploit development, and professional bug bounty report generation. Built on top of Qwen CLI with full Kali Linux tools integration.

✨ Features

πŸ” Automated Target Discovery

  • Google Dork Finder - 60+ pre-built dorks across 8 categories, powered by Qwen web search
  • Subdomain Enumeration - Passive DNS and brute-force techniques
  • OSINT Gathering - Open-source intelligence collection
  • Tech Stack Analysis - Automatic framework and technology detection

πŸ›‘οΈ Comprehensive Scanning

  • Web Application Scanner - XSS, SQLi, security headers, cookies, info disclosure
  • API Scanner - REST and GraphQL security testing
  • Infrastructure Scanner - Port scanning, service detection
  • Mobile Scanner - APK/IPA analysis (stub)

πŸ‰ Kali Linux Integration

  • 40+ Security Tools - Direct access to Kali's toolkit
  • Automated Installation - One-command tool installation with graceful fallbacks
  • Unified CLI Interface - Run any Kali tool from the CLI
  • Quick Scan Presets - Pre-configured multi-tool scanning profiles

πŸ€– AI-Powered Analysis

  • Qwen CLI Integration - Uses Qwen's built-in tools (web_search, run_shell_command, etc.)
  • Smart Recon - AI analyzes scan data to identify attack vectors
  • Automated Planning - AI creates prioritized attack plans
  • Vulnerability Discovery - Suggests what to test next based on findings
  • Anti-Refusal System - Engineered prompts for authorized security research

πŸ“Š Web Dashboard

  • Beautiful UI - Dark theme with interactive charts
  • Real-time Stats - Auto-refresh every 10 seconds
  • Finding Management - Filter, triage, and update status
  • REST API - Full programmatic access via /api/* endpoints
  • Daemon Mode - Run as background service

πŸ“ Professional Reporting

  • HTML Reports - Beautiful, client-ready reports
  • Markdown Reports - Bug bounty platform compatible
  • Auto-Generation - Reports created automatically after scans
  • Folder Organization - Each scan gets its own report folder
  • SQLite Database - Persistent storage for all findings

🐍 Python API

from aibughunter.api import BugHunter

async with BugHunter() as hunter:
    results = await hunter.hunt("https://target.com")
    findings = await hunter.scan_web("https://target.com")
    stats = hunter.get_stats()

πŸš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/Preshy/aibughunter.git
cd aibughunter

# Install
pip install -e .

Prerequisites

  • Python 3.10+
  • Qwen CLI - Already installed (uses the qwen command)
  • Kali Linux - Optional, for full tool integration

Verify Installation

aibughunter --version
aibughunter --help

πŸ“– Usage

🎯 Full Automated Hunt

End-to-end bug hunting workflow:

# Start a full hunt on a target
aibughunter hunt https://target.com

# With custom options
aibughunter hunt https://target.com --depth aggressive --auto-exploit --report

🌐 Web Dashboard

# Start dashboard as daemon (background)
aibughunter web serve --daemon

# Open in browser
open http://127.0.0.1:8000

# Stop daemon
aibughunter web stop

# Check status
aibughunter web status

Dashboard Features:

  • Real-time vulnerability statistics
  • Interactive severity charts
  • Filter findings by severity/status/target
  • Update finding status (New β†’ Triaged β†’ Reported β†’ Resolved)
  • Recent scan history

πŸ” Google Dork Finder

# Find exposed admin panels
aibughunter recon dork exposed_panels

# Find config files with credentials
aibughunter recon dork config_files -m 50

# Auto-find bug bounty targets
aibughunter recon dork --find-targets

# Search for specific domain
aibughunter recon dork subdomains -t example.com

# Add custom dork
aibughunter recon dork --add-custom "inurl:login site:example.com"

# List all categories
aibughunter recon dork --list

Available Categories:

Category Description Dorks
exposed_panels Admin dashboards, login pages 10
config_files Environment files, configs with secrets 10
sensitive_files Leaked documents, credentials 10
vulnerable_apps WordPress, Joomla, Drupal installations 10
cloud_storage Exposed S3 buckets, Google Cloud storage 5
api_endpoints Public APIs, GraphQL, Swagger docs 8
error_pages SQL errors, stack traces 6
subdomains Subdomain enumeration 1

πŸ‰ Kali Linux Tools

# List all available tools
aibughunter kali list

# Show installed tools
aibughunter kali list --installed

# Search for tools
aibughunter kali search sql

# Get tool info
aibughunter kali info sqlmap

# Install a tool
aibughunter kali install nmap

# Run a tool
aibughunter kali run nmap -sV -sC target.com

# Quick scan with multiple tools
aibughunter kali quick-scan https://target.com --type standard

# View statistics
aibughunter kali stats

Available Tools by Category:

  • Reconnaissance: nmap, masscan, amass, theharvester, sublist3r
  • Web Application: sqlmap, nikto, wfuzz, gobuster, ffuf, wpscan, joomscan
  • Vulnerability Scanning: nuclei, openvas, nessus
  • Exploitation: metasploit, searchsploit, beef
  • Password Attacks: john, hashcat, hydra, crunch, cewl
  • Sniffing: wireshark, tcpdump, mitmproxy
  • Wireless: aircrack-ng, wifite
  • Post Exploitation: mimikatz, mimipenguin
  • Forensics: autopsy, volatility

πŸ“‘ Reconnaissance

# Subdomain enumeration
aibughunter recon subdomains example.com

# Technology stack analysis
aibughunter recon techstack https://target.com --detailed

# Endpoint discovery
aibughunter recon endpoints https://target.com --crawl --js

# OSINT gathering
aibughunter recon osint example.com --emails --leaks

πŸ”¬ Vulnerability Scanning

# Web application scan
aibughunter scan web https://target.com --depth aggressive

# API scanning
aibughunter scan api https://api.target.com/v1 --type rest
aibughunter scan api https://api.target.com/graphql --type graphql

# Infrastructure scanning
aibughunter scan infra target.com --ports top-1000

# Mobile app scanning
aibughunter scan mobile app.apk --platform android

πŸ“ Report Generation

# Generate reports (auto-creates both Markdown + HTML)
aibughunter report generate

# List all findings
aibughunter report list-findings

# Generate POC for a vulnerability
aibughunter report poc VULN-001

# Export findings
aibughunter report export --format json --output findings.json

🎯 Target Management

# Add target to scope
aibughunter targets add example.com --program hackerone

# List targets
aibughunter targets list

# Import scope from file
aibughunter targets import-scope scope.json --program bugcrowd

# Export scope
aibughunter targets export-scope --output my-scope.json

🐍 Python API

import asyncio
from aibughunter.api import BugHunter, hunt, scan, query

async def main():
    # Full hunt
    async with BugHunter() as hunter:
        results = await hunter.hunt("https://target.com")
        print(f"Found {results['total_findings']} vulnerabilities")
        
        if results['report_path']:
            print(f"Report: {results['report_path']}")
    
    # Quick scan
    findings = await scan("https://target.com", scan_type="web")
    
    # Query database
    high_vulns = query(severity="high")
    
    # Find targets
    async with BugHunter() as hunter:
        targets = await hunter.find_targets(max_results=50)
    
    # Reconnaissance
    async with BugHunter() as hunter:
        recon = await hunter.recon("https://target.com")
    
    # Generate report
    async with BugHunter() as hunter:
        report_path = await hunter.generate_report(scan_id="scan_123")

asyncio.run(main())

🌐 REST API

When the dashboard is running, access the API at http://127.0.0.1:8000:

# Get statistics
curl http://127.0.0.1:8000/api/stats

# Query findings
curl "http://127.0.0.1:8000/api/findings?severity=high"

# List scans
curl http://127.0.0.1:8000/api/scans

# Get specific scan
curl http://127.0.0.1:8000/api/scans/scan_123

# Update finding status
curl -X PUT "http://127.0.0.1:8000/api/findings/VULN-001/status?status=triaged"

# List targets
curl http://127.0.0.1:8000/api/targets

πŸ“ Project Structure

aibughunter/
β”œβ”€β”€ aibughunter/
β”‚   β”œβ”€β”€ api/                 # 🐍 Python API module
β”‚   β”‚   └── __init__.py      # BugHunter class
β”‚   β”œβ”€β”€ ai/                  # πŸ€– AI integration
β”‚   β”‚   └── qwen_client.py   # Qwen CLI wrapper
β”‚   β”œβ”€β”€ commands/            # πŸ’» CLI commands
β”‚   β”‚   β”œβ”€β”€ scan.py          # Scanning commands
β”‚   β”‚   β”œβ”€β”€ recon.py         # Reconnaissance + Dorks
β”‚   β”‚   β”œβ”€β”€ kali.py          # Kali Linux tools
β”‚   β”‚   β”œβ”€β”€ web.py           # 🌐 Web dashboard
β”‚   β”‚   β”œβ”€β”€ report.py        # Report generation
β”‚   β”‚   β”œβ”€β”€ config.py        # Configuration
β”‚   β”‚   └── targets.py       # Target management
β”‚   β”œβ”€β”€ core/                # βš™οΈ Core functionality
β”‚   β”‚   β”œβ”€β”€ orchestrator.py  # Main hunt coordinator
β”‚   β”‚   β”œβ”€β”€ database.py      # πŸ’Ύ SQLite database
β”‚   β”‚   β”œβ”€β”€ scope.py         # Scope management
β”‚   β”‚   └── dashboard.py     # Terminal dashboard
β”‚   β”œβ”€β”€ scanners/            # πŸ” Scanning modules
β”‚   β”‚   β”œβ”€β”€ recon_scanner.py # Reconnaissance
β”‚   β”‚   β”œβ”€β”€ dork_finder.py   # Google Dork finder
β”‚   β”‚   β”œβ”€β”€ web_scanner.py   # Web vulnerabilities
β”‚   β”‚   β”œβ”€β”€ api_scanner.py   # API security
β”‚   β”‚   β”œβ”€β”€ infra_scanner.py # Infrastructure
β”‚   β”‚   └── exploit_module.py# Exploitation testing
β”‚   β”œβ”€β”€ tools/               # πŸ› οΈ Tool management
β”‚   β”‚   β”œβ”€β”€ kali_tools.py    # Kali Linux integration
β”‚   β”‚   β”œβ”€β”€ manager.py       # General tools
β”‚   β”‚   └── creator.py       # AI tool creator
β”‚   β”œβ”€β”€ reports/             # πŸ“ Report generation
β”‚   β”‚   β”œβ”€β”€ generator.py     # Report templates
β”‚   β”‚   β”œβ”€β”€ html_template.py # HTML report template
β”‚   β”‚   β”œβ”€β”€ poc_generator.py # POC generation
β”‚   β”‚   └── exporter.py      # Export findings
β”‚   └── web/                 # 🌐 Web dashboard
β”‚       β”œβ”€β”€ api.py           # FastAPI application
β”‚       └── dashboard.html   # Dashboard UI
β”œβ”€β”€ tests/                   # πŸ§ͺ Test suite
β”œβ”€β”€ examples/                # πŸ“– Usage examples
β”œβ”€β”€ data/                    # πŸ’Ύ SQLite database
└── reports/                 # πŸ“Š Generated reports

πŸ”§ Configuration

Environment Variables

# .env file
AIBH_QWEN_MODEL=coder-model
AIBH_SCAN_RATE_LIMIT=0.1
AIBH_SCAN_MAX_CONCURRENT=5

CLI Configuration

# Show current config
aibughunter config show

# Set configuration
aibughunter config set qwen-model coder-model
aibughunter config set scan-rate-limit 0.5

# Validate configuration
aibughunter config validate

Database

All findings are stored in SQLite at data/aibughunter.db:

-- Tables:
-- scans      - Scan history with duration and status
-- findings   - All vulnerabilities (queryable, filterable)
-- targets    - Target scope management
-- programs   - Bug bounty programs
-- tool_usage - Tool execution history

πŸŽ“ Examples

Example 1: Find Bug Bounty Targets

# Discover vulnerable targets automatically
aibughunter recon dork --find-targets

# Filter for high-severity results
# (Results are sorted by severity automatically)

# Add promising targets to scope
aibughunter targets add target.com --program hackerone

Example 2: Automated Web App Testing

# Full workflow
aibughunter hunt https://webapp.com

# Or step-by-step
aibughunter recon subdomains webapp.com
aibughunter recon techstack https://webapp.com
aibughunter scan web https://webapp.com --depth aggressive

Example 3: Python Script

# examples/api_usage.py
import asyncio
from aibughunter.api import BugHunter

async def bug_hunt():
    targets = ["https://target1.com", "https://target2.com"]
    
    async with BugHunter(output_dir="./my-reports") as hunter:
        for target in targets:
            print(f"\nHunting {target}...")
            
            # Reconnaissance
            recon = await hunter.recon(target)
            print(f"  Found {len(recon['endpoints'])} endpoints")
            
            # Web scanning
            findings = await hunter.scan_web(target, depth="standard")
            print(f"  Found {len(findings)} vulnerabilities")
            
            # Generate report
            if findings:
                report = await hunter.generate_report()
                print(f"  Report: {report}")

asyncio.run(bug_hunt())

Example 4: Using Kali Tools

# Quick reconnaissance
aibughunter kali run nmap -sV -sC -O example.com

# Web application testing
aibughunter kali run sqlmap -u "https://example.com/page?id=1" --batch --dbs

# Directory enumeration
aibughunter kali run ffuf -u https://example.com/FUZZ -w wordlist.txt -mc 200,301,302

πŸ§ͺ Testing

# Run all tests
python run_tests.py

# Or directly
pytest tests/ -v

# Run specific test file
pytest tests/test_qwen_client.py -v

Test Coverage:

  • βœ… Qwen CLI client integration
  • βœ… Configuration management
  • βœ… Google Dork finder
  • βœ… Scope management
  • βœ… Tools management
  • βœ… Report generation & POC
  • βœ… Finding storage & export

πŸ›£οΈ Roadmap

  • Core CLI framework
  • Qwen CLI integration (subprocess)
  • Google Dork finder
  • Kali Linux tools integration
  • Web application scanner
  • API scanner
  • SQLite database
  • Web dashboard with FastAPI
  • Python API module
  • HTML report generation
  • Mobile app scanner (full implementation)
  • Automated exploit development
  • CI/CD integration
  • Burp Suite extension
  • Team collaboration features
  • Vulnerability database
  • Integration with bug bounty platforms (HackerOne, Bugcrowd APIs)

⚠️ Safety & Ethics

IMPORTANT: This tool is for authorized security testing only.

  • βœ… Only test targets you own or have explicit permission to test
  • βœ… Respect scope and rules of engagement
  • βœ… Follow responsible disclosure practices
  • βœ… Comply with applicable laws and regulations
  • βœ… Bug bounty programs require following their specific rules

πŸ“„ License

MIT License - See LICENSE file for details

🀝 Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests.

πŸ“ž Support

⭐ Acknowledgments


Built with ❀️ for the bug bounty community

"The best way to find bugs is to automate the hunt."

About

AI Bug Hunter CLI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors