Performing Web Application Scanning with Nikto
Overview
Nikto is an open-source web server and web application scanner that tests against over 7,000 potentially dangerous files/programs, checks for outdated versions of over 1,250 servers, and identifies version-specific problems on over 270 servers. It performs comprehensive tests including XSS, SQL injection, server misconfigurations, default credentials, and known vulnerable CGI scripts.
When to Use
- When conducting security assessments that involve performing web application scanning with nikto
- When following incident response procedures for related security events
- When performing scheduled security testing or auditing activities
- When validating security controls through hands-on testing
Prerequisites
- Nikto installed (Perl-based, included in Kali Linux)
- Written authorization to scan target web servers
- Network access to target web applications
- Understanding of HTTP/HTTPS protocols
Core Concepts
What Nikto Detects
- Server misconfigurations and dangerous default files
- Outdated server software versions with known CVEs
- Common CGI vulnerabilities and dangerous scripts
- Default credentials and admin pages
- HTTP methods that should be disabled (PUT, DELETE, TRACE)
- SSL/TLS misconfigurations and weak ciphers
- Missing security headers (X-Frame-Options, CSP, HSTS)
- Information disclosure through headers and error pages
Nikto vs Other Web Scanners
| Feature |
Nikto |
OWASP ZAP |
Burp Suite |
Nuclei |
| License |
Open Source |
Open Source |
Commercial |
Open Source |
| Focus |
Server/Config |
App Logic |
Full Pentest |
Template-Based |
| Speed |
Fast |
Medium |
Slow |
Very Fast |
| False Positives |
Moderate |
Low |
Low |
Low |
| Authentication |
Basic |
Full |
Full |
Template |
| Active Community |
Yes |
Yes |
Yes |
Yes |
Workflow
Step 1: Basic Scanning
# Basic scan against a target
nikto -h https://target.example.com
# Scan specific port
nikto -h target.example.com -p 8443
# Scan multiple ports
nikto -h target.example.com -p 80,443,8080,8443
# Scan with SSL enforcement
nikto -h target.example.com -ssl
# Scan from a host list file
nikto -h targets.txt
Step 2: Advanced Scanning Options
# Comprehensive scan with all tuning options
nikto -h https://target.example.com \
-Tuning 123456789abcde \
-timeout 10 \
-Pause 2 \
-Display V \
-output report.html \
-Format htm
# Tuning options control test types:
# 0 - File Upload
# 1 - Interesting File / Seen in logs
# 2 - Misconfiguration / Default File
# 3 - Information Disclosure
# 4 - Injection (XSS/Script/HTML)
# 5 - Remote File Retrieval - Inside Web Root
# 6 - Denial of Service
# 7 - Remote File Retrieval - Server Wide
# 8 - Command Execution / Remote Shell
# 9 - SQL Injection
# a - Authentication Bypass
# b - Software Identification
# c - Remote Source Inclusion
# d - WebService
# e - Administrative Console
# Scan with specific tuning (XSS + SQL injection + auth bypass)
nikto -h https://target.example.com -Tuning 49a
# Scan with authentication
nikto -h https://target.example.com -id admin:password
# Scan through a proxy
nikto -h https://target.example.com -useproxy http://proxy:8080
# Scan with custom User-Agent
nikto -h https://target.example.com -useragent "Mozilla/5.0 (Security Scan)"
# Scan specific CGI directories
nikto -h https://target.example.com -Cgidirs /cgi-bin/,/scripts/
# Evasion techniques (IDS avoidance for authorized testing)
# 1-Random URI encoding, 2-Directory self-reference
# 3-Premature URL ending, 4-Prepend long random string
nikto -h https://target.example.com -evasion 1234
Step 3: Output and Reporting
# Generate multiple output formats
nikto -h https://target.example.com -output scan.csv -Format csv
nikto -h https://target.example.com -output scan.xml -Format xml
nikto -h https://target.example.com -output scan.html -Format htm
nikto -h https://target.example.com -output scan.txt -Format txt
> 📎 Detailed content (full examples / references / data tables) has been split into `reference.md` in the same directory; use Read to load the relevant section on demand.
1---2name: performing-web-application-scanning-with-nikto3description: "Runs Nikto web server and application scanner. Signals: web scanning, vulnerability scanning, Burp."4zh-signals: "Runs Nikto, an open-source web server and web application scanner 信号:web扫描,漏洞扫描,burp。"5when-to-use: Runs Nikto, an open-source web server and web application scanner,6 to test over 7,000 potentially dangerous files/programs, check for outdated versions7 across 1,250+ servers, and identify XSS, SQL injection, misconfigurations, default8 credentials, and vulnerable CGI scripts. Use when performing web application vulnerability9 scanning, security assessments, scheduled security testing, or validating web10 server security controls.11domain: cybersecurity12subdomain: vulnerability-management13tags:14- vulnerability-management15- cve16- nikto17- web-scanning18- owasp19- risk20version: '1.0'21author: mahipal22license: Apache-2.023nist_csf:24- ID.RA-0125- ID.RA-0226- ID.IM-0227- ID.RA-0628mitre_attack:29- T119030- T120331- T106832metadata:33 source: https://skillmd.com/skills/dangeroussong/performing-web-application-scanning-with-nikto34---3536# Performing Web Application Scanning with Nikto3738## Overview39Nikto is an open-source web server and web application scanner that tests against over 7,000 potentially dangerous files/programs, checks for outdated versions of over 1,250 servers, and identifies version-specific problems on over 270 servers. It performs comprehensive tests including XSS, SQL injection, server misconfigurations, default credentials, and known vulnerable CGI scripts.404142## When to Use4344- When conducting security assessments that involve performing web application scanning with nikto45- When following incident response procedures for related security events46- When performing scheduled security testing or auditing activities47- When validating security controls through hands-on testing4849## Prerequisites50- Nikto installed (Perl-based, included in Kali Linux)51- Written authorization to scan target web servers52- Network access to target web applications53- Understanding of HTTP/HTTPS protocols5455## Core Concepts5657### What Nikto Detects58- Server misconfigurations and dangerous default files59- Outdated server software versions with known CVEs60- Common CGI vulnerabilities and dangerous scripts61- Default credentials and admin pages62- HTTP methods that should be disabled (PUT, DELETE, TRACE)63- SSL/TLS misconfigurations and weak ciphers64- Missing security headers (X-Frame-Options, CSP, HSTS)65- Information disclosure through headers and error pages6667### Nikto vs Other Web Scanners68| Feature | Nikto | OWASP ZAP | Burp Suite | Nuclei |69|---------|-------|-----------|------------|--------|70| License | Open Source | Open Source | Commercial | Open Source |71| Focus | Server/Config | App Logic | Full Pentest | Template-Based |72| Speed | Fast | Medium | Slow | Very Fast |73| False Positives | Moderate | Low | Low | Low |74| Authentication | Basic | Full | Full | Template |75| Active Community | Yes | Yes | Yes | Yes |7677## Workflow7879### Step 1: Basic Scanning80```bash81# Basic scan against a target82nikto -h https://target.example.com8384# Scan specific port85nikto -h target.example.com -p 84438687# Scan multiple ports88nikto -h target.example.com -p 80,443,8080,84438990# Scan with SSL enforcement91nikto -h target.example.com -ssl9293# Scan from a host list file94nikto -h targets.txt95```9697### Step 2: Advanced Scanning Options98```bash99# Comprehensive scan with all tuning options100nikto -h https://target.example.com \101 -Tuning 123456789abcde \102 -timeout 10 \103 -Pause 2 \104 -Display V \105 -output report.html \106 -Format htm107108# Tuning options control test types:109# 0 - File Upload110# 1 - Interesting File / Seen in logs111# 2 - Misconfiguration / Default File112# 3 - Information Disclosure113# 4 - Injection (XSS/Script/HTML)114# 5 - Remote File Retrieval - Inside Web Root115# 6 - Denial of Service116# 7 - Remote File Retrieval - Server Wide117# 8 - Command Execution / Remote Shell118# 9 - SQL Injection119# a - Authentication Bypass120# b - Software Identification121# c - Remote Source Inclusion122# d - WebService123# e - Administrative Console124125# Scan with specific tuning (XSS + SQL injection + auth bypass)126nikto -h https://target.example.com -Tuning 49a127128# Scan with authentication129nikto -h https://target.example.com -id admin:password130131# Scan through a proxy132nikto -h https://target.example.com -useproxy http://proxy:8080133134# Scan with custom User-Agent135nikto -h https://target.example.com -useragent "Mozilla/5.0 (Security Scan)"136137# Scan specific CGI directories138nikto -h https://target.example.com -Cgidirs /cgi-bin/,/scripts/139140# Evasion techniques (IDS avoidance for authorized testing)141# 1-Random URI encoding, 2-Directory self-reference142# 3-Premature URL ending, 4-Prepend long random string143nikto -h https://target.example.com -evasion 1234144```145146### Step 3: Output and Reporting147```bash148# Generate multiple output formats149nikto -h https://target.example.com -output scan.csv -Format csv150nikto -h https://target.example.com -output scan.xml -Format xml151nikto -h https://target.example.com -output scan.html -Format htm152nikto -h https://target.example.com -output scan.txt -Format txt153154> 📎 Detailed content (full examples / references / data tables) has been split into `reference.md` in the same directory; use Read to load the relevant section on demand.