Skip to content

Nikto

Nikto is an open-source web server scanner written in Perl. It is designed to identify potential vulnerabilities, misconfigurations, outdated software, and insecure files or scripts on web servers.

Nikto performs comprehensive tests against web servers for:

  • Dangerous files/CGIs
  • Outdated server software
  • Insecure HTTP headers
  • Common configuration issues

Nikto uses a database of known vulnerabilities and scan signatures. It sends crafted HTTP requests to the target server and analyzes the responses to identify issues.

It is not stealthy β€” it’s fast and noisy, meaning it can be easily detected by intrusion detection/prevention systems.


Terminal window
nikto -h <target>
Terminal window
nikto -h http://192.168.1.100

Scans the target web server for vulnerabilities.


OptionDescription
-hHost to scan (IP or URL)
-pPort to scan (default: 80 for HTTP)
-sslForce SSL connection (useful for HTTPS on non-443 ports)
-TuningTune the scan type (e.g., files, robots.txt, etc.)
-oOutput results to file
-FormatOutput format: csv, txt, xml, etc.
-DisplayCustomize output verbosity
-timeoutSet request timeout
-evasionAttempt evasion techniques to avoid WAFs

πŸ”§ Example: Scan HTTPS on custom port with output

Section titled β€œπŸ”§ Example: Scan HTTPS on custom port with output”
Terminal window
nikto -h https://example.com -p 8443 -o scan_results.txt -Format txt

Use the -Tuning option to focus on specific types of tests. Values include:

CodeScan Type
0File Upload
1Interesting Files
2Misconfigurations
3Information Disclosure
4Injection Vulns (e.g., XSS)
5Remote File Retrieval
6Denial of Service
7Remote Execution
8Command Execution
9SQL Injection

Example:

Terminal window
nikto -h http://192.168.1.100 -Tuning 123

This scans for interesting files, misconfigurations, and info disclosure.


  • Not stealthy β€” easily detectable
  • Can produce false positives
  • Does not exploit vulnerabilities, only detects
  • Can be slow on large servers with many endpoints

  • Reconnaissance and enumeration during penetration testing
  • Quick scans for common vulnerabilities in web apps
  • Checking default and dangerous files (like /phpinfo.php, /admin/, etc.)

Run Nikto in combination with tools like Nmap, Gobuster, and Burp Suite for better coverage and correlation of results.