Share
## https://sploitus.com/exploit?id=BB81C264-FDC1-559D-9F14-D1E022D06463
# ๐ WebVulnScanner v1.0
> A production-grade, async Python web vulnerability scanner for bug bounty hunting, security research, and CTF/lab environments.
---
## โ ๏ธ Ethical Disclaimer
**This tool is for authorised security testing only.** Always obtain explicit written permission before scanning any target. Unauthorised scanning is illegal. The authors accept no responsibility for misuse.
---
## โจ Features
| Module | Techniques |
|--------|-----------|
| **SQL Injection** | Error-based ยท Boolean blind ยท Time-based ยท WAF bypass mutations |
| **XSS** | Reflected ยท DOM-based (static) ยท Blind/OOB ยท Context-aware |
| **SSRF** | Internal IP probes ยท AWS/GCP/Azure metadata ยท OOB callback |
| **LFI / RFI** | Path traversal ยท Null-byte ยท Linux + Windows targets |
| **Header Injection** | CRLF ยท Host ยท X-Forwarded-For ยท Referer ยท User-Agent |
**Architecture:**
- Async engine (asyncio + aiohttp) for high-speed concurrent scanning
- Modular design โ add new analyzers without touching core code
- Intelligent response analysis with confidence scoring (minimises false positives)
- OOB listener for blind vulnerability detection (blind XSS, SSRF callbacks)
- JSON + dark-theme HTML reports with Charts.js visualisations
- Cookie / Bearer token / custom header authentication
- Rate limiting, retry logic, exponential back-off
---
## ๐ Project Structure
```
web_vuln_scanner/
โโโ scanner.py โ Main entry point
โโโ demo_target.py โ Intentionally vulnerable Flask app for testing
โโโ requirements.txt
โโโ core/
โ โโโ config.py โ All configuration (ScannerConfig dataclass)
โ โโโ session.py โ Async HTTP session manager
โ โโโ models.py โ Finding, Target, ScanResult data models
โ โโโ logger.py โ Coloured logging
โโโ crawler/
โ โโโ crawler.py โ BFS async web crawler
โโโ analyzers/
โ โโโ response_analyzer.pyโ Shared detection logic (error matching, diff, timing)
โ โโโ sqli.py โ SQL injection analyzer
โ โโโ xss.py โ XSS analyzer
โ โโโ ssrf.py โ SSRF analyzer
โ โโโ lfi.py โ LFI / RFI analyzer
โ โโโ header_injection.py โ Header injection analyzer
โโโ fuzzer/
โ โโโ engine.py โ Async fuzzing orchestrator
โโโ payloads/
โ โโโ sqli_payloads.py โ SQL injection payload library + WAF bypass mutations
โ โโโ xss_payloads.py โ XSS payload library (reflected, DOM, blind)
โ โโโ ssrf_payloads.py โ SSRF target URLs
โ โโโ lfi_payloads.py โ Path traversal + sensitive file list
โ โโโ header_payloads.py โ CRLF, Host, XFF, Referer payloads
โโโ oob/
โ โโโ listener.py โ Async HTTP server for OOB callback capture
โโโ reports/
โ โโโ reporter.py โ JSON + dark-theme HTML report generation
โโโ utils/
โโโ helpers.py โ URL normalisation, deduplication, terminal output
```
---
## ๐ Installation
**Requirements:** Python 3.11+
```bash
# 1. Clone / download the project
git clone https://github.com/yourname/web-vuln-scanner.git
cd web-vuln-scanner
# 2. Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
# 3. Install dependencies
pip install -r requirements.txt
```
---
## ๐ฏ Quick Start
### Option A โ Scan a real (authorised) target
```bash
python scanner.py --url https://target.example.com
```
### Option B โ Test against the included vulnerable demo app
```bash
# Terminal 1: Start the demo target
pip install flask
python demo_target.py
# Terminal 2: Run the scanner against it
python scanner.py --url http://127.0.0.1:5000 --depth 2 --concurrency 5
```
---
## ๐ ๏ธ CLI Reference
```
usage: scanner.py [options] --url URL
Required:
--url URL Target URL to scan
Crawling:
--depth INT Crawl depth (default: 3)
--max-urls INT Max URLs to crawl (default: 200)
Performance:
--concurrency INT Concurrent requests (default: 10)
--timeout INT Request timeout in seconds (default: 15)
--delay FLOAT Delay between requests in seconds (default: 0.2)
Authentication:
--cookies STR Cookies: "name=val,name2=val2"
--headers STR Extra headers: "Name:Value,Name2:Value2"
--token STR Bearer token for Authorization header
Modules:
--modules STR Comma-separated: sqli,xss,ssrf,lfi,headers (default: all)
OOB / Blind detection:
--oob-url URL OOB callback URL (e.g. http://yourserver:8888)
Output:
--output DIR Output directory (default: scan_results)
--no-json Disable JSON report
--no-html Disable HTML report
--min-confidence FLOAT Minimum confidence to report 0.0โ1.0 (default: 0.5)
--log-file PATH Write logs to file
General:
--verbose, -v Verbose debug logging
--help, -h Show this help message
```
---
## ๐ก Example Commands
```bash
# Basic scan
python scanner.py --url http://testphp.vulnweb.com
# Deep crawl with custom concurrency
python scanner.py --url https://app.example.com --depth 5 --max-urls 500 --concurrency 20
# Authenticated scan (cookie + bearer token)
python scanner.py --url https://app.example.com \
--cookies "session=abc123;csrftoken=xyz" \
--token "eyJhbGciOiJIUzI1NiJ9..."
# SQLi and XSS only (faster)
python scanner.py --url http://target.com --modules sqli,xss
# With blind XSS/SSRF OOB listener
python scanner.py --url http://target.com --oob-url http://YOUR_IP:8888
# DVWA (low security)
python scanner.py --url http://localhost/dvwa/vulnerabilities \
--cookies "PHPSESSID=abc123;security=low" \
--depth 2
# High confidence only, save logs
python scanner.py --url http://target.com \
--min-confidence 0.75 \
--log-file logs/scan.log
# Run standalone OOB listener
python -m oob.listener --host 0.0.0.0 --port 8888
```
---
## ๐ Sample Output
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Web Vulnerability Scanner v1.0 โ
โ SQL Injection ยท XSS ยท SSRF ยท LFI ยท Header Injection โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
10:23:01 INFO scanner โ Target : http://127.0.0.1:5000
10:23:01 INFO scanner โ Depth : 2 | Max URLs: 200 | Concurrency: 10
10:23:01 INFO scanner โ Modules : SQLi=True XSS=True SSRF=True LFI=True
10:23:01 INFO scanner โ โโโ Phase 1: Crawling โโโโโโโโโโโโโ
10:23:03 INFO crawler โ Crawler finished โ 12 URLs crawled, 18 targets built
10:23:03 INFO scanner โ โโโ Phase 2: Fuzzing โโโโโโโโโโโโโโ
10:23:05 WARNING sqli โ โก SQLi (error) @ http://127.0.0.1:5000/user param=id
10:23:06 WARNING xss โ โก Reflected XSS @ http://127.0.0.1:5000/search param=q ctx=html
10:23:08 WARNING ssrf โ โก SSRF @ http://127.0.0.1:5000/fetch param=url
10:23:10 WARNING lfi โ โก LFI @ http://127.0.0.1:5000/file param=name
[Critical] SQL Injection
URL: http://127.0.0.1:5000/user?id='
Parameter: id | Method: GET
Payload: '
Confidence:90%
Evidence: ...error in your SQL syntax near ''' at line 1...
[High] Cross-Site Scripting
URL: http://127.0.0.1:5000/search?q=alert(1)
Parameter: q | Method: GET
Payload: alert(1)
Confidence:85%
Evidence: Payload reflected verbatim: alert(1)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SCAN COMPLETE (18.3s)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
URLs crawled : 12
Requests sent : 847
Total findings : 6
Critical : 2
High : 2
Medium : 1
Low : 1
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Reports saved:
[JSON] scan_results/scan_report_20240523_102319.json
[HTML] scan_results/scan_report_20240523_102319.html
```
---
## ๐๏ธ Adding Custom Modules
1. Create `analyzers/my_module.py` implementing an `async def analyze(self, target) -> list[Finding]` method
2. Add to `fuzzer/engine.py` `_analyzers` list
3. Add toggle in `core/config.py`
4. Done โ the engine handles the rest
---
## ๐ Recommended Practice Targets
| Target | URL | Notes |
|--------|-----|-------|
| DVWA | `http://localhost/dvwa` | Run with Docker |
| WebGoat | `http://localhost:8080/WebGoat` | OWASP Java app |
| Vulnweb (Acunetix) | `http://testphp.vulnweb.com` | Public demo (authorised) |
| HackTheBox / TryHackMe | Various | Legal CTF platforms |
---
## ๐ False Positive Reduction
The scanner uses a multi-factor confidence scoring system:
- **Error matching**: Specific DB error patterns โ 0.75โ0.9 confidence
- **Boolean differential**: Response length diff TRUE/FALSE โ 0.5โ0.85
- **Time delay**: Measured delay vs baseline โ 0.7โ0.95
- **Reflection**: Exact payload match in body โ 0.75โ0.98
- **Status change**: Auth bypass indicators โ 0.6โ0.8
Use `--min-confidence 0.75` for stricter, lower-noise output.
---
## ๐ License
MIT โ For educational and authorised security testing purposes only.