Share
## https://sploitus.com/exploit?id=3EFB21F7-B711-5DED-9ECD-7627DC7F9796
# ๐ก๏ธ VulnHawk โ OWASP Top 10 Web Vulnerability Scanner
VulnHawk is an advanced, full-stack web application vulnerability scanner that tests for all OWASP Top 10 (2021) vulnerability classes using active probing, ML-based severity classification, CVE enrichment, and automated PDF reporting โ all wrapped in a real-time terminal-style web dashboard.
---
## ๐ธ Dashboard Preview
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ก VULNHAWK STATUS: ACTIVE FINDINGS: 14 โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ TARGET: http://testphp.vulnweb.com โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโ 87% โ
โ ๐ค Running ML severity classifier... โ
โ โโโโโโโโโโโโโโโฆโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ RISK: HIGH โ FINDINGS TABLE โ
โ CRIT: 2 โ # Vulnerability Severity Score โ
โ HIGH: 5 โ 1 SQL Injection CRITICAL 95 โ
โ MED: 4 โ 2 Reflected XSS HIGH 78 โ
โ LOW: 3 โ 3 Missing HSTS MEDIUM 52 โ
โโโโโโโโโโโโโโโโฉโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
---
## โจ Key Features
### ๐ Scanning Modules
| Module | OWASP | What It Detects |
|--------|-------|-----------------|
| **SQL Injection** | A03:2021 | Error-based, time-based blind, boolean blind, NoSQL |
| **Cross-Site Scripting** | A03:2021 | Reflected, DOM-based, filter bypass payloads |
| **Security Headers** | A05:2021 | Missing HSTS, CSP, X-Frame-Options, cookie flags |
| **SSRF** | A10:2021 | Internal endpoints, cloud metadata (AWS/GCP/Azure) |
| **Path Traversal / LFI** | A01:2021 | Unix/Windows traversal, encoded variants |
### ๐ค ML Severity Classifier
- **Gradient Boosting** model trained on vulnerability feature vectors
- Features: vuln type, CVSS score, detection confidence, parameter context, OWASP rank
- Outputs: `ml_severity`, `ml_confidence`, `exploitability_score` (0โ100)
- Auto-trains and caches model on first run (`ml/vulnhawk_model.pkl`)
### ๐ Threat Intelligence
- **NIST NVD API v2.0** โ fetches related CVEs per CWE/vulnerability type
- **AbuseIPDB** โ scores target IP for malicious activity history
- **HaveIBeenPwned** โ checks if target domain appears in known data breaches
### ๐ Live Dashboard
- Real-time WebSocket progress updates
- Interactive severity bar chart, OWASP doughnut chart
- Filterable findings table with exploitability scores
- Click-to-expand detail modal with CVEs, MITRE ATT&CK mapping, remediation
### ๐ PDF Reports
- Auto-generated, professionally styled PDF with:
- Executive summary & risk rating
- Per-finding detail blocks with evidence and remediation
- MITRE ATT&CKยฎ coverage matrix
- Prioritized remediation roadmap
- Threat intelligence data (IP rep, breach records)
---
## ๐๏ธ Architecture
```
VulnHawk/
โโโ api/
โ โโโ main.py โ FastAPI app + WebSocket engine + scan orchestrator
โโโ scanner/
โ โโโ crawler.py โ Async BFS web crawler (URLs, forms, params)
โ โโโ sqli.py โ SQL Injection scanner (3 detection methods)
โ โโโ xss.py โ XSS scanner (Reflected + DOM-based)
โ โโโ headers.py โ HTTP headers + cookie + TLS auditor
โ โโโ ssrf.py โ SSRF + Path Traversal scanner
โโโ ml/
โ โโโ classifier.py โ Gradient Boosting severity classifier
โโโ intel/
โ โโโ cve_lookup.py โ NVD CVE + AbuseIPDB + HIBP integration
โโโ report/
โ โโโ pdf_gen.py โ ReportLab PDF generator + MITRE mapper
โโโ dashboard/
โ โโโ templates/index.html โ Terminal-style live dashboard (vanilla JS)
โโโ config/
โ โโโ settings.py โ All config, OWASP categories, severity maps
โโโ tests/
โ โโโ test_scanner.py โ pytest unit tests
โโโ Dockerfile
โโโ docker-compose.yml
โโโ requirements.txt
โโโ .env.example
```
---
## ๐ Quick Start
### Option 1 โ Docker (Recommended)
```bash
# Clone the repo
git clone https://github.com/YOUR_USERNAME/VulnHawk.git
cd VulnHawk
# Configure API keys (optional but recommended)
cp .env.example .env
nano .env
# Build and run
docker-compose up --build
# Open dashboard
open http://localhost:8000
```
### Option 2 โ Local Python
```bash
# Clone
git clone https://github.com/YOUR_USERNAME/VulnHawk.git
cd VulnHawk
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your API keys
# Run
python -m api.main
# OR
uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload
# Open dashboard
open http://localhost:8000
```
---
## ๐ API Keys (Optional)
All API integrations are optional โ VulnHawk works without them, but they enrich results significantly.
| Service | Purpose | Get Key |
|---------|---------|---------|
| NIST NVD | CVE enrichment (free) | [nvd.nist.gov/developers](https://nvd.nist.gov/developers/request-an-api-key) |
| AbuseIPDB | IP reputation (free tier) | [abuseipdb.com/register](https://www.abuseipdb.com/register) |
| HaveIBeenPwned | Breach data ($3.50/mo) | [haveibeenpwned.com/API/Key](https://haveibeenpwned.com/API/Key) |
---
## ๐ก API Reference
### Start a Scan
```http
POST /api/scan
Content-Type: application/json
{
"target_url": "http://testphp.vulnweb.com",
"scan_modules": ["sqli", "xss", "headers", "ssrf", "traversal"],
"generate_pdf": true,
"enrich_cve": true
}
```
### Get Scan Status
```http
GET /api/scan/{scan_id}
```
### Download PDF Report
```http
GET /api/scan/{scan_id}/report
```
### WebSocket Live Updates
```javascript
const ws = new WebSocket('ws://localhost:8000/ws/{scan_id}');
ws.onmessage = (e) => {
const { type, progress, message, findings } = JSON.parse(e.data);
// type: "progress" | "complete" | "error"
};
```
---
## ๐ง ML Model Details
The ML classifier uses a **Gradient Boosting** ensemble with 8 handcrafted features:
| Feature | Description |
|---------|-------------|
| `vuln_type_enc` | Encoded vulnerability category (0โ19) |
| `cvss_score` | Base CVSS score from scanner |
| `detection_method` | Confidence of detection (0=passive, 2=active) |
| `has_payload` | Whether an active payload was used |
| `has_evidence` | Whether direct evidence was captured |
| `param_is_url` | Detects URL-class injection parameters |
| `param_is_file` | Detects file-class injection parameters |
| `owasp_rank` | OWASP category rank (A01=1 โ A10=10) |
Training data: 460 synthetic samples with Gaussian noise for generalization.
Model accuracy on held-out test set: **~89%** (5-class severity classification).
---
## โ๏ธ Legal & Ethical Use
> **VulnHawk is designed exclusively for authorized security testing.**
- โ
Scan your own applications
- โ
Scan with explicit written permission
- โ
Use in CTF / bug bounty targets that allow automated scanning
- โ
Use against intentionally vulnerable apps: [DVWA](https://dvwa.co.uk/), [WebGoat](https://owasp.org/www-project-webgoat/), [VulnHub](https://www.vulnhub.com/)
- โ Never scan targets without authorization
- โ Never use against production systems without permission
The author is not responsible for misuse of this tool.
---
## ๐งช Running Tests
```bash
pip install pytest pytest-asyncio
pytest tests/ -v
```
---
## ๐บ๏ธ MITRE ATT&CKยฎ Coverage
| Vulnerability | Tactic | Technique |
|--------------|--------|-----------|
| SQL Injection | Initial Access | T1190 โ Exploit Public-Facing Application |
| XSS | Execution | T1059 โ Command & Scripting Interpreter |
| SSRF | Discovery | T1083 โ File and Directory Discovery |
| Path Traversal | Collection | T1005 โ Data from Local System |
| Missing HSTS | Credential Access | T1557 โ Adversary-in-the-Middle |
| Insecure Cookie | Credential Access | T1539 โ Steal Web Session Cookie |
---
## ๐ ๏ธ Technologies Used
| Layer | Technology |
|-------|-----------|
| Backend | Python 3.11, FastAPI, Uvicorn |
| Async HTTP | httpx, asyncio |
| HTML Parsing | BeautifulSoup4, lxml |
| Machine Learning | scikit-learn (Gradient Boosting, StandardScaler) |
| Threat Intel | NIST NVD API, AbuseIPDB API, HaveIBeenPwned API |
| PDF Generation | ReportLab |
| Frontend | Vanilla JS, Chart.js, WebSocket API |
| Containerization | Docker, Docker Compose |
| Testing | pytest, pytest-asyncio |
---
## ๐ License
MIT License โ see [LICENSE](LICENSE) for details.
---
## ๐ References
- [OWASP Top 10 (2021)](https://owasp.org/www-project-top-ten/)
- [MITRE ATT&CKยฎ Framework](https://attack.mitre.org/)
- [NIST National Vulnerability Database](https://nvd.nist.gov/)
- [PortSwigger Web Security Academy](https://portswigger.net/web-security)
- [OWASP Testing Guide v4.2](https://owasp.org/www-project-web-security-testing-guide/)