VulnHawk is a comprehensive web security scanning tool designed to detect and report vulnerabilities in web applications. It combines automated scanning capabilities with AI-enhanced analysis to provide actionable insights for improving web application security.
- Project Overview
- Features
- Application Architecture
- Key Security Checks
- Usage Instructions
- Technical Requirements
- License
- Contributing
VulnHawk is a full-stack web application that allows users to scan websites for common vulnerabilities, generate detailed security reports, and visualize security scores. The platform features:
- Automated vulnerability scanning for SQL Injection, XSS, and insecure forms
- Security header and SSL/TLS analysis
- Technology stack detection
- AI-powered PDF analysis of security reports
- User-friendly interface for scanning and report visualization
- Comprehensive Security Scanning: Detects common web vulnerabilities and misconfigurations.
- SSL/TLS Assessment: Checks certificate validity, supported protocols, and cipher suites.
- Security Header Analysis: Ensures essential security headers are configured correctly.
- Technology Detection: Identifies frameworks, servers, and libraries used by the target.
- Report Generation: Generates detailed PDF reports with security scores and findings.
- AI-Enhanced Analysis: Uses OpenAI GPT models to analyze vulnerabilities from uploaded PDF reports.
VulnHawk follows a client-server architecture with the following components:
Handles core scanning and vulnerability detection:
- Security Header Analysis: Detects missing headers like Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, and more.
- SSL/TLS Assessment: Validates certificates, checks for insecure protocols (TLS 1.0/1.1), and evaluates cipher suites.
- Configuration Analysis: Identifies misconfigurations in HTTP settings.
- Vulnerability Detection:
- SQL Injection testing (basic syntax, authentication bypass, union-based, and destructive payloads)
- Cross-Site Scripting (XSS) detection (DOM-based, event handler injections, JavaScript URI payloads)
- Form vulnerability analysis
- Technology Detection: Identifies the web stack, server, and frameworks in use.
API Endpoints:
GET /- Serves the frontend applicationGET /<path:filename>- Serves static filesPOST /scan- Initiates a security scan and returns a comprehensive assessment
Performs AI-enhanced analysis of uploaded PDF reports:
- PDF Text Extraction: Extracts content from security reports.
- AI Analysis: Leverages OpenAI GPT to evaluate vulnerabilities and provide actionable insights.
- Memory-Efficient Processing: Handles large PDF files efficiently.
API Endpoint:
POST /api/upload-pdf- Uploads PDF and returns AI-generated vulnerability analysis.
- Report Generation: Uses
jsPDFto generate downloadable PDF reports. - Security Score Calculation: Computes scores based on detected issues.
- UI Features:
- Summary of scan results
- Color-coded security indicators
- Circular progress visualization for security scores
- Downloadable PDF reports
VulnHawk checks for critical headers:
Strict-Transport-Security– Enforces HTTPSContent-Security-Policy– Mitigates XSS and injection attacksX-Frame-Options– Prevents clickjackingX-Content-Type-Options– Prevents MIME sniffingReferrer-Policy– Controls referrer information
- Certificate validation and expiration check
- Protocol support analysis (TLS 1.0/1.1 detection)
- Cipher suite evaluation
- Security best practice verification
Tests URL parameters and form inputs with payloads like:
- Basic SQL syntax:
'or" - Authentication bypass:
' OR '1'='1 - Union-based attacks:
' UNION SELECT 1,2,3 -- - Database manipulation:
1'; DROP TABLE users; --
- Script injection:
<script>alert(1)</script> - Event handler injection:
<img src=x onerror=alert(1)> - JavaScript URI payloads:
javascript:alert(1) - DOM-based injection vectors
- Tests form fields with malicious payloads
- Detects reflected and unsanitized input
- Enter the target URL in the input field.
- Click Scan to initiate the security assessment.
- Review results:
- Security score
- Missing headers
- Detected vulnerabilities
- SSL/TLS issues
- Technology stack
- Upload a PDF report (max 2MB) via the AI analysis endpoint.
- VulnHawk extracts text and evaluates vulnerabilities.
- Review AI-generated recommendations and insights.
Backend:
- Python 3.6+
- Flask framework
- Required Python packages:
requestsbeautifulsoup4PyPDF2openaipython-dotenvflask-corsOpenSSL
Frontend:
- HTML5, CSS3, JavaScript
jsPDFlibrary for PDF generation
VulnHawk combines automated scanning with AI-powered insights to provide a holistic view of web application security, helping developers and security professionals strengthen their security posture.