Skip to content

RicheByte/bugHunter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BugHunter Pro v7.0 - Vulnerability Scanner

Version Python License PRs Welcome Tests Accuracy

Demo Video

Table of Contents


Overview

BugHunter Pro v7.0 provides a comprehensive solution for identifying vulnerabilities across various systems. It integrates an up-to-date CVE database and uses a realistic approach to vulnerability scanning, focusing on actual implementation and measurable results rather than exaggerated claims.

Architecture Overview

Architecture

What's New in v7.0

BugHunter Pro v7.0 represents a complete rewrite, moving from a marketing-driven v6.0 to an honest, working implementation.

Metric v6.0 Claim v7.0 Reality
Modules 100+ 12 working modules
Speed 10,000+ req/s 500+ req/s (localhost), 100-300 req/s (production)
Accuracy 99.99% 100% on 10 test cases (limited dataset)
AI "AI-powered" RandomForest ML (synthetic training data)
Tests None 26 tests (16 unit + 10 accuracy + 8 integration)
False Positives "Zero" 0% on test dataset (needs validation)

Key Features

Core Infrastructure (Phase 1)

  • Async HTTP Engine: High-performance asynchronous HTTP client with connection pooling, rate limiting, and batch request processing. (File: core/async_engine.py)
  • Plugin Architecture: Extensible scanner framework with abstract base classes, dynamic plugin discovery, and category-based organization. (File: core/plugin_manager.py)
  • Configuration Management: Multi-source configuration system supporting YAML files, environment variables, and command-line arguments. (File: core/config_manager.py)

CVE Database Integration (Phase 2)

  • NVD API Client: Full NIST National Vulnerability Database REST API 2.0 support with CVSS v2/v3 parsing and rate limiting. (File: modules/cve_database.py)
  • CVE Synchronization: Automated daily/weekly database updates, delta updates, and SQLite storage. (File: modules/cve_sync.py)
  • ExploitDB Integration: Local caching of ExploitDB with CVE-to-exploit mapping. (File: modules/exploit_db.py)
  • GitHub Advisory API: Package vulnerability detection across multiple ecosystems with severity filtering. (File: modules/github_advisory.py)
  • Dynamic Payload Generator: Context-aware, template-based exploit generation for various vulnerability types. (File: modules/payload_generator.py)

Advanced Scanning (Phase 3)

  • Advanced Evasion Engine: WAF bypass techniques including 8 encoding methods, case manipulation, and polymorphic payload generation. (File: modules/evasion_advanced.py)
  • ML Vulnerability Predictor: RandomForest classifier for false positive reduction, trained on 100 synthetic samples. (File: modules/ml_vuln_predictor.py)

Specialized Modules (Phase 4)

  • Crypto/TLS Analyzer: SSL/TLS security assessment, protocol/cipher suite analysis, and security header validation. (File: modules/crypto_analyzer.py)
  • Cloud Metadata Scanner: SSRF testing for cloud environments (AWS, Azure, GCP) with 50+ payload variations. (File: modules/cloud_metadata_scanner.py)

Installation

Requirements

  • Python 3.8 or higher
  • pip package manager
  • Virtual environment (recommended)

Quick Start

  1. Clone the repository:

    git clone https://github.com/RicheByte/bugHunter.git
    cd bugHunter
  2. Create and activate a virtual environment:

    python -m venv .venv
    # Windows:
    .venv\Scripts\activate
    # Linux/Mac:
    source .venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt

Dependencies

Core Requirements:

aiohttp>=3.9.0          # Async HTTP client
pyyaml>=6.0.0           # YAML configuration
apscheduler>=3.10.0     # Task scheduling
scikit-learn>=1.3.0     # Machine learning
numpy>=1.24.0           # Numerical computing
psutil>=5.9.0           # System monitoring
requests>=2.31.0        # HTTP requests
beautifulsoup4>=4.12.0  # HTML parsing

Optional Dependencies:

pyOpenSSL>=23.3.0       # TLS/SSL analysis (recommended)
redis>=5.0.0            # Distributed caching (enterprise)
reportlab>=4.0.0        # PDF reporting

Usage Examples

Reports

Basic Scan

python bughunter.py -u https://example.com

Full-Featured Scan

python bughunter.py -u https://target.com \
  --threads 50 \
  --depth 3 \
  --enable-ml \
  --enable-evasion \
  --enable-compliance \
  --report-formats json html csv sarif markdown

Quick Scan (Fast, Reduced Coverage)

python bughunter.py -u https://target.com --mode quick

Stealth Scan (Slow, Evasive)

python bughunter.py -u https://target.com \
  --mode stealth \
  --threads 5 \
  --delay 2 \
  --enable-evasion

With NVD API Key (Faster CVE Lookups)

Set the environment variable:

export BUGHUNTER_CVE_DATABASE_NVD_API_KEY="your-api-key"

Or use the config.yaml file.

CI/CD Integration

python bughunter.py -u https://staging.example.com \
  --fail-on-critical \
  --report-formats sarif json \
  --output-dir ./security-reports

Command-Line Options

Basic Options

Option Description Default
-u, --url URL Target URL to scan (required) -
--threads N Number of concurrent threads 50
--timeout N Request timeout in seconds 10
--depth N Maximum crawl depth 3
--max-pages N Maximum pages to crawl 500
--delay N Rate limit delay in seconds 0.1

Advanced Features

Option Description Default
--enable-ml Enable ML false positive reduction Disabled
--enable-evasion Enable WAF evasion techniques Disabled
--enable-compliance Enable compliance framework mapping Disabled
--adaptive-rate-limit Enable adaptive rate limiting Enabled

Scan Modes

Mode Threads Depth Pages Delay Use Case
full 50 3 500 0.1s Complete coverage (default)
quick 100 2 100 0.05s Fast preliminary scan
stealth 5 2 200 2s Slow and evasive
aggressive 200 5 1000 0.01s Maximum speed and coverage

Reporting Options

Option Description
--report-formats FORMAT [FORMAT ...] Output formats: json, html, csv, sarif, markdown
--output-dir DIR Output directory for reports (default: current directory)
--webhook URL Webhook URL for notifications
--slack-webhook URL Slack webhook for notifications
--fail-on-critical Exit with error if critical vulnerabilities found

Verbose Output

Option Description
-v, --verbose Verbose output
--debug Debug mode (very verbose)

Configuration

Configuration File

Copy config.yaml.example to config.yaml and customize:

# Scanner Configuration
scanner:
  max_threads: 50
  timeout: 10
  max_depth: 3
  max_pages: 500
  rate_limit_delay: 0.1
  user_agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"

# Detection Settings
detection:
  enable_ml: true
  enable_evasion: false
  enable_compliance: true

# CVE Database
cve_database:
  nvd_api_key: ""                  # Optional: Increases rate limit
  sync_enabled: true
  sync_schedule: "daily"           # daily, weekly, or manual
  database_path: "database/cve_database.db"

# Reporting
reporting:
  output_dir: "./reports"
  formats:
    - "json"
    - "html"
    - "csv"
    - "sarif"
  include_compliance: true
  include_remediation: true

Environment Variables

Override configuration with environment variables using the pattern BUGHUNTER_SECTION_KEY:

# Examples
export BUGHUNTER_SCANNER_MAX_THREADS=100
export BUGHUNTER_CVE_DATABASE_NVD_API_KEY="your-api-key"
export BUGHUNTER_LOGGING_LEVEL="DEBUG"
export BUGHUNTER_PERFORMANCE_REDIS_URL="redis://localhost:6379/0"

See config.yaml.example for all 100+ configuration options.


Inigration

Testing

BugHunter v7.0 includes comprehensive testing across 3 categories:

Test Suite

  • Unit Tests (16 tests):

    python tests/test_core_modules.py

    Tests individual modules: AsyncEngine, PluginManager, ConfigManager, Evasion, PayloadGenerator, ML Predictor, Crypto Analyzer, Cloud Scanner.

  • Accuracy Tests (10 tests):

    python tests/accuracy_test.py

    DVWA-style vulnerability detection tests with pattern-based validation.

  • Integration Tests (8 tests):

    python tests/integration_test.py

    End-to-end workflows: full scan pipeline, CVE database, ML prediction, crypto analysis, error handling, config integration, plugin system.

Performance Benchmarking

python benchmark/performance_test.py

Measures:

  • Async engine throughput (requests/second)
  • Response latency (min, max, avg, p95, p99)
  • Resource utilization (CPU, memory)
  • Concurrent request handling

Test Results Summary

Unit Tests:        16/16 passing (100%)
Accuracy Tests:    10/10 passing (100%)
Integration Tests:  8/8  passing (100%)
Total:            26/26 passing (100%)

Benchmarks

Performance Metrics

Honest Performance Numbers

Metric Value Test Methodology
Throughput (localhost) 500+ req/s benchmark/performance_test.py on localhost
Throughput (production) 100-300 req/s Live testing on real targets
Accuracy 100% Pattern matching on 10 DVWA test cases
Precision 100% True positives / (TP + FP) on test set
Recall 100% True positives / (TP + FN) on test set
False Positive Rate 0% On limited test dataset only
Test Coverage 26 tests 16 unit + 10 accuracy + 8 integration

Important Caveats

  1. Accuracy (100%): Achieved on a limited test set of 10 cases. More extensive testing will likely reveal false positives.
  2. False Positives (0%): Measured on test dataset only. Production use may differ.
  3. ML Model: Trained on synthetic data (100 samples). Requires real-world training data for production use.
  4. Performance: Tested on localhost and small-scale targets. Large-scale deployments may experience different performance.
  5. Test Coverage: 26 tests provide basic validation but do not guarantee bug-free operation.

Project Structure

bugHunter/
├── core/                          # Phase 1: Core Infrastructure
│   ├── async_engine.py           # Async HTTP engine (500+ req/s)
│   ├── plugin_manager.py         # Plugin architecture (450 lines)
│   └── config_manager.py         # Configuration management (350 lines)
│
├── modules/                       # Phases 2-4: Detection Modules
│   ├── cve_database.py           # NVD API client (450 lines)
│   ├── cve_sync.py               # CVE synchronization (350 lines)
│   ├── exploit_db.py             # ExploitDB integration (400 lines)
│   ├── github_advisory.py        # GitHub Security Advisory (400 lines)
│   ├── payload_generator.py      # Dynamic payloads (450 lines)
│   ├── evasion_advanced.py       # WAF evasion (120 lines)
│   ├── ml_vuln_predictor.py      # ML predictor (360 lines)
│   ├── crypto_analyzer.py        # TLS/SSL analysis (330 lines)
│   └── cloud_metadata_scanner.py # Cloud SSRF testing (330 lines)
│
├── tests/                         # Phases 5-7: Testing Suite
│   ├── test_core_modules.py      # 16 unit tests
│   ├── accuracy_test.py          # 10 accuracy tests
│   └── integration_test.py       # 8 integration tests
│
├── benchmark/
│   └── performance_test.py       # Performance benchmarking
│
├── database/
│   ├── schema.sql                # SQLite schema (6 tables)
│   └── cve_database.db          # CVE database (generated)
│
├── bughunter.py                  # Main scanner (v7.0)
├── config.yaml.example           # Example configuration (100+ options)
├── requirements.txt              # Python dependencies
├── CHANGELOG.md                  # Version history and changes
├── ACCURACY_REPORT.md            # Detailed accuracy metrics
└── README.md                     # This file

Database Schema

BugHunter uses SQLite for local storage with 6 optimized tables:

  • cves: CVE vulnerability data (indexes on: cve_id, severity, published_date, platform)
  • exploits: ExploitDB exploit database (indexes on: edb_id, cve_id, exploit_type, platform)
  • findings: Scan results and discoveries (indexes on: scan_id, url, severity, timestamp)
  • scan_history: Historical scan metadata (indexes on: target_url, start_time, status)
  • payloads: Generated payload templates (indexes on: vuln_type, cve_id, effectiveness_score)
  • sync_metadata: Synchronization tracking (indexes on: source, last_sync, status)

Compliance Mapping

BugHunter maps vulnerabilities to compliance frameworks:

NIST Cybersecurity Framework (CSF)

  • IDENTIFY: Asset Management, Risk Assessment
  • PROTECT: Access Control, Data Security
  • DETECT: Security Monitoring, Anomalies
  • RESPOND: Response Planning, Mitigation
  • RECOVER: Recovery Planning

PCI DSS (Payment Card Industry Data Security Standard)

  • Requirement 6: Secure Systems and Applications
  • Requirement 11: Regular Security Testing

ISO 27001

  • A.12.6: Technical Vulnerability Management
  • A.14.2: Security in Development

CIS Controls

  • Control 7: Continuous Vulnerability Management
  • Control 16: Application Software Security

OWASP Top 10 (2021)

  • A01: Broken Access Control
  • A02: Cryptographic Failures
  • A03: Injection
  • A04: Insecure Design
  • A05: Security Misconfiguration
  • A06: Vulnerable and Outdated Components
  • A07: Identification and Authentication Failures
  • A08: Software and Data Integrity Failures
  • A09: Security Logging and Monitoring Failures
  • A10: Server-Side Request Forgery (SSRF)

Accuracy

Roadmap

v7.1.0 (Q1 2026)

  • Real Dataset Integration: Include public benchmark scan reports and anonymized test data to elevate credibility from anecdotal to peer-review ready. This will provide verifiable validation metrics against industry-standard test suites (OWASP Benchmark, NIST SAMATE).
  • Expand ML training dataset with real-world examples (target: 1000+ samples)
  • Add 40+ more test cases (target: 50 total accuracy tests)
  • Implement Redis caching for distributed scanning
  • Add PostgreSQL support for enterprise deployments
  • Expand WAF detection signatures (Cloudflare, Akamai, Imperva, F5)
  • Support additional cloud providers (Alibaba Cloud, Oracle Cloud, IBM Cloud)
  • Improve payload generation with context-aware templates
  • Add authentication module (OAuth, JWT, SAML testing)

v8.0.0 (Q2-Q3 2026)

  • Distributed scanning architecture (multi-node coordination)
  • Real-time threat intelligence integration (AlienVault OTX, Shodan)
  • Advanced PDF report generation with charts and graphs
  • CI/CD pipeline integration (GitHub Actions, GitLab CI, Jenkins)
  • SIEM integration (Splunk, ELK Stack, QRadar)
  • Automated remediation suggestions with code examples
  • Web UI dashboard for scan management
  • API endpoint for programmatic access
  • Docker containerization
  • Kubernetes deployment support

Security and Responsible Use

Legal Notice

FOR AUTHORIZED SECURITY TESTING ONLY

This tool is designed for legitimate security testing and research. Users must:

  • Obtain written authorization before scanning any systems
  • Comply with all applicable laws and regulations
  • Use the tool ethically and responsibly
  • Respect bug bounty program rules and scope

Unauthorized scanning is illegal and unethical. The authors assume no liability for misuse.

Ethical Guidelines

  1. Authorization Required: Never scan systems without explicit permission.
  2. Respect Rate Limits: Do not overwhelm target servers.
  3. Responsible Disclosure: Report vulnerabilities through proper channels.
  4. Bug Bounty Rules: Follow program scope, rules, and disclosure timelines.
  5. No Exploitation: Do not exploit vulnerabilities without authorization.
  6. Privacy: Do not access, modify, or exfiltrate data.
  7. Compliance: Follow organizational security policies.

Getting Authorization

  • For Corporate Networks: Obtain written approval, define scope, set schedule, establish communication.
  • For Bug Bounty Programs: Read program rules carefully, stay within scope, follow disclosure timelines, use provided communication.
  • For Personal Projects: Own the infrastructure, scan only your domains/servers, document for audit purposes.

API Rate Limits

NVD (National Vulnerability Database)

GitHub Advisory API

ExploitDB

  • No authentication required.
  • CSV mirror updated daily.
  • Local caching reduces requests.

Troubleshooting

Common Issues

  • Problem: Module import errors
    • Solution: Ensure all dependencies are installed pip install -r requirements.txt.
  • Problem: NVD API rate limit exceeded
    • Solution: Get API key or reduce sync frequency export BUGHUNTER_CVE_DATABASE_NVD_API_KEY="your-key".
  • Problem: SSL certificate errors
    • Solution: Disable SSL verification for testing python bughunter.py -u https://target.com --verify-ssl false.
  • Problem: High memory usage
    • Solution: Reduce threads and max pages python bughunter.py -u https://target.com --threads 20 --max-pages 100.
  • Problem: Slow scanning
    • Solution: Increase threads and reduce delay python bughunter.py -u https://target.com --threads 100 --delay 0.01.

Contributing

Contributions are welcome! Please follow these guidelines:

Development Setup

# Clone repository
git clone https://github.com/RicheByte/bugHunter.git
cd bugHunter

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run tests
python tests/test_core_modules.py
python tests/accuracy_test.py
python tests/integration_test.py

Contribution Process

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/amazing-feature).
  3. Add tests for new features.
  4. Ensure all tests pass (26/26).
  5. Update documentation (README.md, CHANGELOG.md).
  6. Commit changes (git commit -m 'Add amazing feature').
  7. Push to branch (git push origin feature/amazing-feature).
  8. Submit Pull Request.

Code Standards

  • Python 3.8+ compatibility
  • Type hints for all functions
  • Docstrings for all classes and methods
  • Unit tests for new features (target: 100% pass rate)
  • Integration tests for workflows
  • Honest metrics and documentation

Comparison with Other Tools

Feature BugHunter v7.0 SQLMap Nikto Burp Community OWASP ZAP
SQL Injection Yes Excellent No Good Good
XSS Detection Yes No Yes Good Good
CVE Database Yes (45K) No Yes No No
ML Filtering Yes (basic) No No No No
TLS Analysis Yes No Yes Yes Limited
Cloud Scanning Yes No No Limited No
Async Engine Yes (500 req/s) No No Excellent Good
Plugin System Yes No Yes Excellent Excellent
Price Free Free Free Free / $399 Pro Free
Accuracy 100% (10 tests) 95%+ ~70% ~98% ~85%

Honest Assessment:

BugHunter v7.0 is a solid tool for automated vulnerability scanning with integrated CVE database support. However, specialized tools excel in their domains:

  • SQLMap: Superior for SQL injection testing with advanced techniques.
  • Burp Suite Pro: Best for manual testing and advanced exploitation.
  • OWASP ZAP: Excellent for automated web app scanning with proxy.
  • Nikto: Fast web server scanning but higher false positives.

Recommendation: Use BugHunter v7.0 for comprehensive automated scanning with CVE integration, then deep-dive with specialized tools for specific vulnerability types.


FAQ

General Questions

  • Q: What makes v7.0 different from v6.0?
    • A: v6.0 was marketing-driven with unimplemented claims ("100+ modules", "AI-powered", "10,000+ req/s"). v7.0 is a complete honest rewrite with 12 real modules, 26 passing tests, and documented limitations.
  • Q: Is this better than Burp Suite Pro?
    • A: No. Burp Pro has 15+ years of development and is far more mature. BugHunter v7.0 is better for automated scanning with CVE database integration. Use Burp Pro for manual testing and advanced exploitation.
  • Q: Can I use this for bug bounties?
    • A: Yes, if the program allows automated scanning. Always read program rules first. Some programs prohibit automated scanners.
  • Q: Is it production-ready?
    • A: Yes, with caveats. It's stable and tested (26/26 tests passing), but the ML model needs real-world training data and more extensive testing is recommended before enterprise use.

Technical Questions

  • Q: How do I get an NVD API key?
  • Q: Can this detect zero-day vulnerabilities?
    • A: No. It detects known vulnerability patterns and CVEs. Zero-day discovery requires manual analysis and research.
  • Q: Why is accuracy 100% but FP rate might differ in production?
    • A: 100% accuracy is on a limited test set (10 cases). Production environments have more variability, which may reveal false positives not seen in testing.
  • Q: Does it support authenticated scanning?
    • A: Basic cookie-based authentication is supported. OAuth, JWT, and SAML testing modules are planned for v7.1.0.
  • Q: Can I run distributed scans?
    • A: Not yet. Distributed architecture is planned for v8.0.0. The current version supports Redis caching but not multi-node coordination.

Configuration Questions

  • Q: How do I configure scan intensity?
    • A: Use scan modes (--mode quick|full|stealth|aggressive) or customize threads, depth, and delay parameters.
  • Q: How do I reduce false positives?
    • A: Enable ML filtering (--enable-ml) and review for known limitations.
  • Q: Can I scan password-protected sites?
    • A: Yes, use cookie-based authentication. Set cookies in the session or provide authentication credentials via the config file.

Support

Documentation

  • config.yaml.example: Complete configuration reference (100+ options).

Community

Reporting Bugs

When reporting bugs, please include:

  1. BugHunter version (python bughunter.py --version)
  2. Python version (python --version)
  3. Operating system
  4. Full command used
  5. Error messages or unexpected behavior
  6. Minimal reproducible example

Acknowledgments

Data Sources

  • NIST NVD: National Vulnerability Database.
  • ExploitDB: Offensive Security Exploit Database.
  • GitHub Security Advisory: Package vulnerability database.

Frameworks and Standards

  • OWASP: Testing methodologies and Top 10.
  • NIST CSF: Cybersecurity Framework.
  • PCI DSS: Payment Card Industry standards.
  • ISO 27001: Information security management.
  • CIS Controls: Center for Internet Security.

Open Source Libraries

  • aiohttp: Async HTTP client/server.
  • scikit-learn: Machine learning library.
  • BeautifulSoup: HTML/XML parsing.
  • APScheduler: Task scheduling.
  • pyOpenSSL: TLS/SSL analysis.

Community

  • Security researchers worldwide.
  • Bug bounty platforms (HackerOne, Bugcrowd, Synack).
  • Open source contributors.
  • Ethical hacking community.

About

Automated CVE Exploit Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages