Skip to main content

Overview

The Vulnerability Scanner module (modules/vuln_scanner.py) integrates two powerful tools for web security testing:
  • Nikto: Web server vulnerability scanner
  • SQLMap: Automated SQL injection detection and exploitation tool

VulnerabilityScanner Class

Defined at vuln_scanner.py:13, this class orchestrates web vulnerability detection.

Initialization

vuln_scanner.py:14-24
string
required
Target IP address or domain
list
required
List of open ports from Scanner module

Web Service Detection

identify_web_services()

Automatically detects HTTP/HTTPS services from port scan results.
vuln_scanner.py:26-43
Detected Services:
  • Standard ports: 80 (HTTP), 443 (HTTPS)
  • Alternative ports: 8080, 8443, 8000, 8888, 3000, 5000
  • Service names: http, https, ssl/http, http-proxy, http-alt

Nikto Integration

scan_with_nikto()

Runs Nikto web vulnerability scanner against detected web services.
vuln_scanner.py:45-79
Nikto Parameters:
string
Target URL to scan
string
Output format (json for automated parsing)
string
Test categories: 1-9 enables all vulnerability checks
number
Request timeout in seconds (default: 10)

Nikto Vulnerability Categories

SQLMap Integration

scan_sql_injection()

Scans for SQL injection vulnerabilities using SQLMap.
vuln_scanner.py:129-165
SQLMap Parameters:
flag
Never ask for user input, use default behavior
number
Crawl depth for finding injection points (default: 2)
number
Level of tests to perform (1-5, default: 1)
number
Risk of tests (1-3, default: 1 for safe testing)
number
Number of concurrent HTTP requests (default: 5)

SQL Injection Types Detected

Uses boolean logic to infer database content through true/false responses.Example: id=1 AND 1=1 (true) vs id=1 AND 1=2 (false)

Vulnerability Severity

Vulnerabilities are classified into four severity levels:
CVSS 9.0-10.0Remote code execution, SQL injection with data exfiltration, authentication bypass

Complete Workflow

vuln_scanner.py:200-230

Usage Example

Output Format

Skipping Web Scans

Use the --skip-web CLI flag to disable web vulnerability scanning:
Web vulnerability scanning can be time-intensive (10-30 minutes per service). Use --skip-web for faster reconnaissance-only scans.

Web Vulnerabilities Guide

Detailed guide to web vulnerability scanning

Configuration

Nikto and SQLMap timeout settings

CLI Options

—skip-web flag documentation

PDF Reports

How web vulnerabilities appear in reports