Nikto Guide: Web Server Security Scanner
A complete guide to Nikto for web server vulnerability scanning, covering CGI scanning, server misconfiguration detection, and security assessment.
Why You Need Nikto
You need a comprehensive security audit of a web server — Nikto checks for dangerous files, outdated software, misconfigurations, and CGI issues in one pass. It has been a mainstay of web server scanning for over two decades, providing a thorough (if noisy) overview of a server's security posture.
Prerequisites
Installation
Nikto comes pre-installed on Kali Linux:
# Debian/Ubuntu
sudo apt install nikto
# From source
git clone https://github.com/sullo/nikto.git
cd nikto/program
perl nikto.pl -h
# Docker
docker pull sullo/nikto
Basic Usage
nikto -h http://target.com
Essential Options
| Option | Description |
|--------|-------------|
| -h HOST | Target host |
| -p PORT | Port number |
| -ssl | Force SSL mode |
| -output FILE | Save results |
| -Format FORMAT | csv, html, txt, xml |
| -Tuning X | Test categories |
| -evasion TECH | Evasion technique |
Scan Examples
nikto -h https://target.com -ssl
nikto -h http://target.com -p 8080
nikto -h http://target.com -o scan-results.html -Format html
Tuning Options
nikto -h http://target.com -Tuning 0 3 5
Tuning codes: 0 (file upload), 1 (interesting files), 3 (info disclosure), 4 (injection), 8 (command execution), 9 (SQL injection), e (admin consoles).
Evasion Techniques
nikto -h http://target.com -evasion 1
Types: random URI encoding, directory self-reference, premature URL ending, fake parameter, change URL case.
Real-World Example: Comprehensive Scan
nikto -h https://target.com -ssl -o nikto-report.html -Format html -Tuning 12345b -evasion 1
nikto -h https://target.com -ssl -Tuning e -o admin-panels.txt
Common Mistakes
Not using SSL flag for HTTPS targets. Ignoring output — always use -o. Running without tuning produces overwhelming results.
Best Practices
Always save output. Use tuning parameters. Run multiple passes. Combine with manual testing. Update databases with nikto -update.
Related Tools
Related Articles
Summary
Nikto is a comprehensive web server scanner that identifies configuration issues, outdated software, and dangerous files. Effective use requires understanding tuning parameters, saving output, and combining with manual verification.