An Advanced, Context-Aware Recon & Automated Web Vulnerability Assessment Framework
Overview β’ Features β’ Architecture β’ Installation β’ Usage β’ FP Engine β’ Report β’ Configuration β’ Testing β’ Docker β’ Roadmap
BugScanner is a modular, high-performance web vulnerability scanner and reconnaissance framework engineered specifically for Bug Bounty Hunters, Red Teams, and Penetration Testers.
Unlike standard passive scanners, BugScanner combines deep subdomain discovery, active TCP service fingerprinting, and a Context-Aware Vulnerability Verification Engine designed to minimize false positives (by ~80%) and bypass modern Web Application Firewalls (WAFs) through adaptive rate limiting and jitter control.
The framework is built entirely on asyncio and httpx for maximum concurrency, with a modern React + FastAPI web dashboard for real-time scan monitoring.
- 9+ Vulnerability Modules β XSS, SQLi (error + time-based), CORS, SSRF, Open Redirect, JWT, IDOR, Information Disclosure, Business Logic
- False-Positive Reduction Engine β 5-rule verification pipeline eliminating ~80% of noise
- SPA-Aware Scanning β Detects Single Page Application fallbacks to eliminate fake findings
- WAF Evasion β Detects Cloudflare, Akamai, AWS WAF, Imperva and adapts strategies
- Adaptive Rate Limiter β Token bucket that responds to 429/503 with backoff
- Authenticated Scanning β Full support for cookies, headers, and Bearer tokens
- Modern HTML Reports β Dark/light theme, sidebar, bento KPIs, filters, live search, JSON export
- SARIF Export β GitHub Security tab integration
- Scan Diff Engine β Compare two scans to see what changed
- Structured Logging β JSON logs via
structlog - Docker Ready β One-command deployment with
docker-compose - Test Suite β 35 tests passing with
pytest,respx,pytest-asyncio
-
Subdomain Enumeration β Dual-engine discovery using Certificate Transparency Logs (
crt.sh) for passive reconnaissance and Async DNS Bruteforcing (120+ wordlist) for active discovery. Uses an isolated HTTP client so enumeration never stalls behind the target's rate limiter. -
TCP Port Scanner β High-speed asynchronous TCP connect scanning with banner grabbing. Supports three ranges:
commonβ 19 most common portsextendedβ ~30 additional portsfullβ 1-65535 with chunked processing (memory bounded to ~80 MB vs 800 MB)
-
Technology Fingerprinting β Identifies web servers, CMSs, backend frameworks, and frontend libraries via HTTP Response Headers, HTML DOM patterns, and Session Cookies (nginx, Apache, PHP, WordPress, Drupal, React, Angular, Next.js, Vue.js, Laravel, Django, FastAPI, and more).
-
Endpoint Discovery β Async path bruteforce across 200+ common administration, API (
/graphql,/swagger), auth, debug, and backup endpoints. Includes SPA-specific endpoints (/api/Users,/rest/products/search, etc.) and sensitive file candidates (.env,.git/HEAD,actuator/heapdump).
-
Reflected XSS Scanner β Evaluates parameter reflection in
text/htmlcontexts with execution-aware payload sets (script tags, HTML5 event handlers, filter bypasses, polyglots, template literals). Uses a unique marker (xsstest7731) to detect partial reflections. -
SQL Injection Scanner β Two-stage verification:
- Error-Based β 30+ regex patterns covering MySQL, PostgreSQL, MSSQL, Oracle, SQLite
- Time-Based Blind β Multi-DB payloads (
SLEEP(),WAITFOR DELAY,pg_sleep(),BENCHMARK()) with 3-request double-check to eliminate network latency false positives
-
CORS Misconfiguration Auditor β Tests 7 different origin patterns: wildcard,
null, arbitrary reflection, subdomain bypass, suffix/prefix bypass. CombinesAllow-Credentials: truedetection with auto-generated JavaScript PoC exploits. -
SSRF & Open Redirect β Tests cloud metadata endpoints (AWS IMDSv1, GCP, Azure), decimal/hex IP bypasses (
2130706433,0x7f000001),file://protocol leaks, DNS rebinding hints, and location-header redirection validation. -
JWT Security Auditor β Automates
alg: nonebypass, weak secret brute-forcing (20+ common secrets), algorithm confusion (RS256 β HS256), missingexpclaim, and sensitive payload data detection. -
IDOR & Path Tampering β Evaluates parameter/path numerical shifts, UUID mutations, and HTTP Method Swapping (
DELETE/PUT/PATCH) with SPA-aware false-positive protection and real-DELETE verification. -
Sensitive Data Exposure β Regex-based scanning for leaked AWS keys, Private RSA keys, GitHub/Stripe/Slack/SendGrid/Google API tokens, JWT tokens, database passwords,
.gitrepository exposures, and Directory Listing. -
Business Logic Scanner (optional) β Tests mass assignment, price manipulation, rate-limit bypass via header rotation, password reset vulnerabilities (Host header injection), and response manipulation flaws. Recommended for authenticated scans.
-
Nuclei Integration β Wraps ProjectDiscovery's
nucleiengine (if installed) to execute 9000+ CVE and misconfiguration templates.
-
Adaptive Token-Bucket Rate Limiter β Per-domain buckets that respond dynamically:
429 Too Many Requestsβ halve RPS503 Service Unavailableβ 30-second pause- 20 successful requests β 20% RPS increase
- Configurable min/max RPS bounds
-
WAF Detection & Jitter Engine β Signature-based detection for Cloudflare, Akamai, AWS WAF, Imperva/Incapsula, Sucuri, F5 BIG-IP, Barracuda, ModSecurity, and Nginx WAF. Applies per-WAF evasion strategies (RPS reduction, User-Agent rotation, bypass headers).
-
HTTP Response Caching β Per-domain request cache (TTL configurable) that reduces requests by ~30-40% during follow-up scans.
-
Automatic Retry β Exponential backoff on 5xx/429 responses using
tenacity. -
Structured Logging β JSON logs via
structlogfor SIEM integration (ELK, Splunk, Datadog), plus human-readable console output.
BugScanner v2.1.1 introduces a 5-rule verification pipeline that reduces false positives by approximately 80% β the most common source of frustration in automated scanning.
Finding a file with HTTP 200 is not enough. BugScanner verifies actual content:
| File Type | Required Signature |
|---|---|
.env |
DB_*, APP_KEY, SECRET, API_KEY, or KEY=value lines |
.sql |
CREATE TABLE, INSERT INTO, SELECT ... FROM |
.key / .pem |
-----BEGIN PRIVATE KEY----- or -----BEGIN RSA PRIVATE KEY----- |
.git/HEAD |
ref: refs/heads/ |
If a file returns HTML content (<!DOCTYPE html>, <div id="root">), it is immediately flagged as a false positive.
For Single Page Applications, every route returns HTTP 200 with the same index.html body. BugScanner detects this by:
- Requesting the base URL
- Requesting a random non-existent path (
/__bs_probe_abc123) - Comparing status codes, body sizes, and SHA-256 hashes
If the fake path returns the same content as the base URL β SPA detected β route-based findings are filtered with high confidence.
Admin panels are only reported if the response body contains login-form DOM signals:
- Strong signals:
<input type="password">,wp-login.php,phpmyadmin,admin panel - Weak signals (need 3+):
username,password,sign in,log in,dashboard,forgot password
A page returning HTTP 200 without these markers is not reported as an admin panel.
| Context | Adjustment |
|---|---|
localhost, 127.0.0.1, ::1 |
Downgrade severity by 1 level; skip HSTS entirely |
RFC1918 IPs (10.x, 192.168.x, 172.16-31.x) |
Downgrade severity by 1 level |
.local, .internal, .test |
Downgrade severity by 1 level |
CORS wildcard on public endpoint (not /auth, /api/user, etc.) |
Downgrade to INFO |
A vulnerability is only marked as Confirmed if it has:
- A
payload_usedor acurl_poc - An
evidencestring of at least 10 characters - Successful active re-validation (for XSS, SQLi time-based, CORS, redirects, disclosure)
Otherwise, it is flagged as Suspicious and filtered from the final report.
| Target | Before FP Engine | After FP Engine | Reduction |
|---|---|---|---|
| OWASP Juice Shop (SPA) | 0 findings β | 18 findings β | False negatives fixed |
| carfy.az | ~35 findings (noisy) | 5 findings (2 real, 3 hardening) | ~86% noise removed |
BugScanner uses a modular, asynchronous architecture built on top of asyncio and httpx:
cli.py ββ> scanner.py (Orchestrator)
βββ recon/
β βββ subdomain.py # crt.sh + Async DNS (isolated HTTP client)
β βββ portscan.py # TCP Connect & Banner Grab (chunked)
β βββ fingerprint.py # Headers, DOM & Cookies (context-aware)
β βββ discovery.py # Endpoint Bruteforce (SPA/API-aware)
βββ vulns/
β βββ xss.py # Reflected XSS Engine
β βββ sqli.py # Error + Time-Based (multi-DB)
β βββ cors.py # Origin Reflection (context-aware)
β βββ ssrf.py # Metadata & Protocol Leaks
β βββ redirect.py # Open Redirect Auditor
β βββ jwt.py # Alg None, Confusion & Weak Secret
β βββ idor.py # Parameter & Verb Tampering (SPA-aware)
β βββ disclosure.py # Content Signature Verification
β βββ business_logic.py # Mass Assignment, Price Manipulation
β βββ nuclei_wrapper.py # Native Nuclei CLI Wrapper
βββ core/
βββ rate_limiter.py # Adaptive RPS & Jitter
βββ http_client.py # Async HTTP Wrapper (retry + cache)
βββ models.py # Dataclasses & CVSS Scoring
βββ validator.py # Active False-Positive Validator
βββ fp_filter.py # β¨ 5-Rule FP Reduction Engine
βββ waf_detector.py # WAF Signature Engine
βββ differ.py # Scan Diff Engine
βββ sarif_reporter.py # SARIF 2.1.0 Export
βββ logger.py # Structured Logging (structlog)
βββ reporter.py # JSON / HTML / SARIF Generator
frontend/ # React + Vite dashboard
βββ src/
β βββ App.jsx # Main shell + tab navigation
β βββ components/
β βββ Scanner.jsx # Scan configuration form
β βββ Results.jsx # Live results (WebSocket)
β βββ History.jsx # Past scan browser
reports/
βββ template.html # Main HTML report
βββ _styles.html # Embedded CSS
βββ _scripts.html # Embedded JS
tests/
βββ conftest.py # Shared fixtures
βββ test_models.py # Dataclass & CVSS tests
βββ test_rate_limiter.py # Token bucket tests
βββ test_http_client.py # Retry & cache tests
βββ test_validator.py # FP validator tests
βββ test_idor_spa.py # SPA-aware IDOR tests- Python 3.11+ β download
- Git β download
- (Optional) Nuclei for CVE template scanning β install guide
- (Optional) Node.js 20+ for the web dashboard β download
- (Optional) Docker Desktop for containerized deployment β download
# 1. Clone the repository
git clone https://github.com/eldarshiraliyev/BugScanner.git
cd BugScanner
# 2. Create and activate a virtual environment
python -m venv venv
# Windows (PowerShell)
.\venv\Scripts\Activate.ps1
# macOS / Linux
source venv/bin/activate
# 3. Install dependencies
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
# 4. Verify installation
python cli.py versionExpected output:
BugScanner v2.1
Bug Bounty Automation Tool
Authorized use only# macOS
brew install nuclei
# Linux
curl -sSL https://raw.githubusercontent.com/projectdiscovery/nuclei/main/scripts/install.sh | bash
# Or with Go
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
# Update templates
nuclei -update-templates# Full comprehensive scan (recon + vulnerabilities)
python cli.py scan https://target.com
# Reconnaissance only
python cli.py scan https://target.com --mode recon
# Vulnerability audit only (skip recon)
python cli.py scan https://target.com --mode vulns
# Custom port scan without subdomain enumeration
python cli.py scan https://target.com --no-subdomains --ports extended
# Adjust adaptive rate limit
python cli.py scan https://target.com --rps 5
# Export to JSON only
python cli.py scan https://target.com --format json
# Export to SARIF (GitHub Security tab)
python cli.py scan https://target.com --format sarif
# Disable HTTP cache (always re-request)
python cli.py scan https://target.com --no-cache# Session cookie authentication
python cli.py scan https://target.com \
--cookie "session=abc123" \
--cookie "csrf=xyz789"
# Bearer token
python cli.py scan https://target.com \
--header "Authorization: Bearer eyJhbGciOi..."
# Burp Suite proxy + business logic scan
python cli.py scan https://target.com \
--cookie "session=abc123" \
--proxy http://127.0.0.1:8080 \
--business-logic# Fast scan β disable FP validation, higher RPS
python cli.py scan https://target.com \
--no-subdomains \
--no-fp-validation \
--no-nuclei \
--rps 20
# WAF-protected target β slow and careful
python cli.py scan https://target.com \
--rps 3 \
--no-subdomains \
--ports common# Recon only
python cli.py recon https://target.com --ports extended
# Vulnerability scan only (with auth)
python cli.py vulnscan https://target.com --cookie "session=abc123"
# Business logic scan only
python cli.py bizlogic https://target.com --cookie "session=abc123"
# Diff two previous scans
python cli.py diff reports/old.json reports/new.json
# Show version
python cli.py version# Backend API + frontend
python app.py
# Open http://localhost:8000The dashboard provides:
- Live scan progress via WebSocket
- Interactive vulnerability browser with severity filters
- Chip-based severity filter + live search
- Historical scan comparison
- Direct report download (JSON, HTML, SARIF)
- Dark theme optimized for long sessions
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health |
Health check + auth status |
| POST | /api/scan/start |
Start a new scan (requires API key if configured) |
| GET | /api/scan/{id} |
Get scan status and result |
| GET | /api/scans |
List all scans |
| DELETE | /api/scan/{id} |
Delete a scan |
| WS | /ws/{id} |
Real-time scan progress |
| Option | Description | Default |
|---|---|---|
target |
Target URL (e.g., https://target.com) |
Required |
--mode, -m |
Scan mode: all, recon, vulns |
all |
--ports, -p |
Port scan range: common, extended, full |
common |
--rps |
Initial Requests Per Second limit | 10 |
--no-subdomains |
Skip subdomain enumeration | False |
--no-fp-validation |
Disable false-positive validation | False |
--no-nuclei |
Skip Nuclei scan | False |
--no-cache |
Disable HTTP response cache | False |
--business-logic |
Enable business logic scan | False |
--cookie, -c |
Session cookie (name=value, repeatable) |
β |
--header, -H |
Custom header (Name: Value, repeatable) |
β |
--proxy |
HTTP proxy (e.g., Burp Suite) | β |
--output, -o |
Report output directory | ./reports |
--format, -f |
Report format: all, json, html, sarif |
all |
BugScanner's v2.1.1 HTML report features a completely redesigned 2026-era interface:
- π Dark / Light Theme β Toggleable, persists via
localStorage - π Bento-Grid KPIs β Risk score ring (SVG animated), vulnerability distribution bars, recon surface, scan duration
- π§ Sidebar Navigation β Auto-highlights current section while scrolling (IntersectionObserver)
- π Live Search & Filters β Chip-based severity filter + text search across title, URL, CWE
- β‘ Copy-to-Clipboard PoCs β One-click copy for every
curlproof-of-concept - π¨οΈ Print Stylesheet β Clean printable output (expands all collapsed sections)
- π₯ JSON Export β Download the raw scan data directly from the report
- π― FP Breakdown β Shows filtered false positives categorized by rule (SPA, no-signature, no-admin-DOM, no-PoC, downgraded)
- π± Responsive β Works on tablet and mobile devices
- π Self-Contained β No external CDN dependencies, works offline
| Section | Content |
|---|---|
| Summary | Risk ring, vulnerability breakdown, recon surface, scan duration |
| Vulnerabilities | Filterable, searchable list with expandable details (description, evidence, exploitation, remediation, PoC, references) |
| Technologies | Pill-based display of detected tech stack |
| Subdomains | Table with IP, HTTP status, technologies |
| Open Ports | Table with port, protocol, service, version/banner |
| Endpoints | Numbered list of all discovered URLs |
The settings.yaml file at the project root controls global behavior:
rate_limiting:
default_rps: 10 # requests per second
min_rps: 1
max_rps: 50
backoff_multiplier: 2
pause_on_503: 30 # seconds
scanning:
timeout: 10 # seconds per request
max_redirects: 5
user_agent: "Mozilla/5.0 (compatible; BugScanner/2.1)"
verify_ssl: false
ports:
common: [21, 22, 23, 25, 53, 80, 110, 143, 443, 445, 3306, 3389, 5432, 6379, 8080, 8443, 8888, 9200, 27017]
extended: [20, 21, 22, 23, 25, 53, 80, 110, 111, 135, 139, 143, 443, 445, 993, 995, 1723, 3306, 3389, 5432, 5900, 6379, 8080, 8443, 8888, 9200, 27017]
nuclei:
enabled: true
templates_path: "~/.local/nuclei-templates"
severity: ["critical", "high", "medium", "low"]
rate_limit: 150
output:
default_format: ["terminal", "json", "html", "sarif"]
reports_dir: "./reports"| Variable | Description | Default |
|---|---|---|
BUGSCANNER_API_KEY |
API key for FastAPI backend. If empty, auth is disabled. | β |
BUGSCANNER_CORS |
Allowed CORS origins (comma-separated, or *) |
* |
BUGSCANNER_LOG_LEVEL |
Logging level (DEBUG, INFO, WARNING, ERROR) |
INFO |
BUGSCANNER_LOG_FILE |
Optional path to write JSON logs | β |
| Severity | CVSS Score | Example Vulnerabilities |
|---|---|---|
| π΄ CRITICAL | 9.0 β 10.0 | SQLi, RCE, SSRF with Cloud Metadata, Weak JWT Secret, Private Key Exposure |
| π HIGH | 7.0 β 8.9 | Reflected XSS, Unauthenticated IDOR, CORS with Credentials, .git Exposure, Mass Assignment |
| π‘ MEDIUM | 4.0 β 6.9 | Open Redirect, Wildcard CORS, Missing CSP/HSTS, Directory Listing, GraphQL Introspection |
| π΅ LOW | 1.0 β 3.9 | Missing X-Frame-Options, Missing X-Content-Type-Options, 403 Bypass Candidates |
| βͺ INFO | 0.0 β 0.9 | Technology Fingerprint, Server Banner, Missing Permissions-Policy |
BugScanner includes a comprehensive test suite built with pytest, pytest-asyncio, and respx (HTTP mocking).
pytest -vpytest --cov=core --cov=modules --cov-report=term-missingpytest --cov=core --cov=modules --cov-report=html
start htmlcov/index.html # Windows
open htmlcov/index.html # macOS
xdg-open htmlcov/index.html # Linux| File | Tests | Coverage |
|---|---|---|
tests/test_models.py |
8 | 96% (models, CVSS, risk score) |
tests/test_rate_limiter.py |
9 | 96% (token bucket, 429/503 handling) |
tests/test_http_client.py |
5 | 91% (GET, cache, retry) |
tests/test_validator.py |
4 | 31% (XSS, SQLi, CORS, disclosure) |
tests/test_idor_spa.py |
9 | 29% (SPA detection, body similarity, admin DOM) |
Total: 35 tests passing
# Build and start
docker-compose up -d
# View logs
docker-compose logs -f
# Stop
docker-compose downThe container exposes the FastAPI backend + frontend on http://localhost:8000.
Create a .env file:
BUGSCANNER_API_KEY=your-long-random-api-key
BUGSCANNER_LOG_LEVEL=INFO
BUGSCANNER_CORS=http://localhost:5173,http://localhost:8000docker exec -it bugscanner python cli.py scan https://target.comContributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Write tests for new functionality
- Ensure all tests pass:
pytest - Update
CHANGELOG.mdunder the[Unreleased]section - Commit using Conventional Commits:
feat: add new scannerfix: correct rate limiterdocs: update README
- Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request with a clear description
- Line length: 100 characters max
- Type hints: Required for public functions
- Docstrings: Google style for public APIs
- Formatting:
blackandisort
pip install black isort
black core modules cli.py app.py
isort core modules cli.py app.py- β
Authenticated Scope Scanning β
--cookieand--headersession preservation - β Modern Report UI β Dark/light theme, interactive filters
- β False-Positive Reduction Engine β 5-rule verification pipeline (~80% noise reduction)
- β SPA-Aware Detection β Multi-layer false-positive protection
- β Chunked Port Scanning β Full 1β65535 range without memory blowup
- β Structured Logging β JSON logs via structlog
- β SARIF Export β GitHub Security tab integration
- β Scan Diff Engine β Compare two scans
- β Docker Compose β One-command deployment
- β¬ Headless DOM Analysis β Playwright integration for Blind XSS and SPA route extraction
- β¬ Multi-Role IDOR Diff Engine β Automated differential testing between User A and User B session tokens
- β¬ PyPI Package Release β
pip install bugscanner - β¬ Plugin System β User-defined scanner modules
- β¬ Postgres Backend β Persistent scan history and comparison
- β¬ GraphQL Introspection Scanner β Full schema dump and query abuse detection
- β¬ Web Cache Deception β Automated testing for CDN/cache poisoning
This project is licensed under the MIT License β see the LICENSE file for details.
IMPORTANT: This tool is developed for educational purposes, defensive auditing, and authorized penetration testing / bug bounty activities only.
Scanning targets without prior explicit consent is illegal and punishable by law. The developer assumes no liability and is not responsible for any misuse or damage caused by this program.
Authorized Use Only β Always obtain written permission before scanning any system you do not own.
By using BugScanner, you agree to:
- Only scan systems you own or have explicit permission to test
- Respect rate limits and avoid denial-of-service conditions
- Report vulnerabilities responsibly to the affected party
- Never use findings for malicious purposes
- Kali Linux β Community and inspiration
- ProjectDiscovery β Nuclei template engine
- PortSwigger β Web Security Academy reference material
- OWASP β Vulnerability classification standards
- httpx β Excellent async HTTP library
- rich β Beautiful terminal output
π Built with β€οΈ for the security community
Report a Bug β’ Request a Feature β’ Star the Project
If you find BugScanner useful, consider starring the repo β it helps others discover the project.