GO KALI FREE

Nikto

Vulnerability Analysis

Beginnermedium risk

Nikto is an open-source web server scanner which performs comprehensive tests against web servers for multiple items, including over 6700 potentially dangerous files/programs, outdated versions of over 1250 servers, and version-specific problems on over 270 servers.

Installation

sudo apt install nikto

Basic Syntax

nikto -h <target_url_or_ip>

Quick Facts

Full Name
Nikto Web Scanner
License
GPL
Language
Perl
Tests
6700+ dangerous files
Category
Web Server Scanner
Created By
CIRT.net / Sullo

Tool Overview

Nikto is an open-source web server scanner that performs comprehensive tests against web servers for multiple items, including over 6700 potentially dangerous files/programs, outdated versions of over 1250 servers, and version-specific problems on over 270 servers.

The tool checks for misconfigurations, dangerous files and CGIs, outdated server software, and server-specific vulnerabilities. It supports tuning filters, IDS evasion techniques, and multiple output formats.

Nikto is widely used for initial web server reconnaissance, identifying low-hanging fruit, and checking for common security issues. It is often used alongside Nmap and WhatWeb for comprehensive web assessments.

Common Commands

nikto -h http://192.168.1.1Basic web scan - Perform a standard vulnerability scan against a target web server
nikto -h http://192.168.1.1 -sslSSL/TLS scan - Force the use of SSL for HTTPS web testing
nikto -h http://192.168.1.1 -Tuning 4Tuning filter - Restrict scan to specific test types (e.g., 4 is for injection flaws)
nikto -h http://192.168.1.1 -p 8080Custom port - Non-standard port
nikto -h http://192.168.1.1 -o report.html -Format htmHTML report - Save results
nikto -h http://192.168.1.1 -Tuning 1Interesting files - Find sensitive files
nikto -h http://192.168.1.1 -Tuning 2Misconfig scan - Server misconfigurations
nikto -h http://192.168.1.1 -Tuning 3Info disclosure - Find info leaks
nikto -h http://192.168.1.1 -Tuning 9SQL Injection - Find SQLi points
nikto -h http://192.168.1.1 -Tuning xAll tests - Complete scan
nikto -h http://192.168.1.1 -C allAll CGI dirs - Check all CGI paths
nikto -h http://192.168.1.1 -evasion 1IDS evasion - Random URI encoding
nikto -h http://192.168.1.1 -evasion 2Directory self-reference - Use /./
nikto -h http://192.168.1.1 -evasion 4Prepend directory - Random path
nikto -h http://192.168.1.1 -mutate 1Test all files - With all roots

Step-by-Step Guide

  1. 1Determine the IP or domain name of the web server you want to audit
  2. 2Initiate the assessment: nikto -h <target>
  3. 3Allow the tool time to finish processing all built-in checks
  4. 4Look for specific vulnerability database references in the output text
  5. 5Investigate the listed issues to confirm their validity and impact
  6. 6Export the completed findings: nikto -h <target> -o output_report.txt
  7. 7Rank the discovered vulnerabilities by their potential risk level

Warnings

Use Cases

Web Server Scanning

Scan web servers for misconfigurations and vulnerabilities.

Outdated Software

Identify outdated server software with known CVEs.

Dangerous Files

Find sensitive files like .git, .env, backup files.

CGI Testing

Test CGI scripts for vulnerabilities.

Key Features

People Also Ask

How do I use Nikto in Kali Linux?

Run 'nikto -h http://example.com' to scan a web server. Nikto is pre-installed on Kali. Use '-h' to specify the target host, '-o output.html' to save results, and '-Tuning 123b' to enable specific tests. Always scan only systems you own or have authorization to test.

What does Nikto scan for?

Nikto checks for over 6,700 potentially dangerous files/programs, checks for outdated versions of over 125 servers, and looks for version-specific problems on over 270 servers. It also tests for server configuration issues, missing security headers, and common misconfigurations.

Nikto vs Nmap vs Nessus — what's the difference?

Nikto focuses specifically on web server scanning and content discovery. Nmap scans network ports and services. Nessus is a comprehensive vulnerability scanner with authenticated checks. Nikto is best for quick web server audits; combine with Nmap for full network coverage.

How do I install Nikto?

On Kali Linux, Nikto is pre-installed. On other systems: 'git clone https://github.com/sullo/nikto.git' then run 'perl nikto.pl -h target'. Install Perl first if not present. Docker: 'docker run -it sullo/nikto -h http://example.com'.

Is Nikto stealthy?

No. Nikto sends over 7,000 requests per scan and is trivially detected by any IDS/IPS or WAF. It generates significant logs and is not designed for stealthy reconnaissance. Use Nikto for thorough authorized audits, not evasive testing.

How do I save Nikto scan results?

Use '-o output.html' for HTML reports, '-o output.xml' for XML, or '-o output.csv' for CSV. The '-Format' flag specifies the format. Combine with '-Display V' for verbose output to see each test being performed during the scan.

Related Tools

WhatWeb

Information Gathering

Nuclei

Vulnerability Analysis

Gobuster

Web Applications

SQLMap

Web Applications

Nikto

Vulnerability Analysis

Dirb

Web Applications

Frequently Asked Questions

What is Nikto used for?

Nikto is used for scanning web servers for vulnerabilities, misconfigurations, outdated software versions, and dangerous files/programs. It tests against over 6700 potentially dangerous files.

Is Nikto a vulnerability scanner?

Nikto is a web server scanner that identifies misconfigurations, outdated software, and known vulnerabilities. It does not perform full vulnerability scanning like Nessus or OpenVAS.

Can Nikto scan HTTPS sites?

Yes, Nikto can scan HTTPS sites using the -ssl flag. It handles SSL/TLS connections and can test secure web servers.

How long does a Nikto scan take?

A full Nikto scan can take 10-60 minutes depending on the server speed, number of checks, and network latency. Use -maxtime to limit scan duration.

What are the different Nikto scan types?

Nikto supports multiple scan types: basic HTTP scan (default), SSL scan with -ssl, tunneled proxy scan with -useproxy, and host-specific scans with -vhost for virtual hosting environments.

Can I use Nikto with a proxy?

Yes, use the -useproxy flag to route all Nikto scan traffic through a proxy server. This is useful for scanning through corporate proxies or anonymizing your scan origin.

How do I tune Nikto scan results?

Use the -Tuning flag with numeric options to enable specific tests. For example, -Tuning 12 enables XSS tests, -Tuning 3 enables file upload tests, and combining numbers (e.g., -Tuning 123) runs multiple test categories.

Does Nikto detect CMS vulnerabilities?

Nikto can detect common CMS files and directories (WordPress, Joomla, Drupal) but does not perform deep CMS-specific vulnerability scanning. Use specialized tools like WPScan or CMS-specific scanners for comprehensive CMS testing.

How do I interpret Nikto scan output?

Nikto output includes server information, OS fingerprints, discovered files/directories, and identified vulnerabilities. Pay attention to OSVDB entries which link to known vulnerabilities. Use -Format to export results in various formats for reporting.

Can Nikto scan multiple targets?

Yes, use -h with multiple hostnames or IPs separated by commas. Nikto also supports scanning from a file using -h @targets.txt where the file contains one target per line.

What is the difference between Nikto and Nmap web scripts?

Nikto specializes in web server vulnerability scanning with 6700+ tests, while Nmap's HTTP scripts (http-enum, http-vuln-*) focus on service discovery and specific CVE detection. Nikto provides more comprehensive web-specific coverage.

How do I customize Nikto scans?

Create custom configuration files with -config, modify the templates directory for custom 404 page detection, use -Plugins to enable/disable specific test modules, and tune with -Tuning to focus on specific vulnerability categories.

Can Nikto scan virtual hosts?

Yes, use the -vhost flag to specify a virtual host: nikto -h http://192.168.1.1 -vhost example.com. This sends the Host header for the virtual host, allowing Nikto scan the correct website when multiple sites share an IP.

How do I limit Nikto scan speed?

Use -maxtime to set a global timeout in seconds, -pause to add delays between requests, and -throttle to limit request rate. These options help avoid triggering IDS/IPS and reduce network noise.

Can Nikto scan through a SOCKS proxy?

Yes, Nikto supports proxy connections with -useproxy. For SOCKS proxies, use proxychains or configure the proxy in the Nikto configuration file. This allows scanning through corporate proxies or anonymizing scan origin.

How do I export Nikto results in JSON format?

Use -Format json -output report.json to export results in JSON format. JSON output is machine-readable and can be imported into SIEM tools, vulnerability management platforms, or custom reporting pipelines.

Can Nikto detect server-side request forgery (SSRF)?

Nikto checks for some SSRF-related misconfigurations through its test database, but it is not specialized for SSRF detection. For comprehensive SSRF testing, use dedicated tools like Burp Suite or custom scripts.

How do I update Nikto's test database?

Update Nikto with: cd /opt/nikto && git pull. This downloads the latest test database with new vulnerability checks. The test database is updated regularly with new misconfigurations and vulnerability signatures.

Can Nikto scan multiple ports on the same host?

Yes, use -p to specify multiple ports: nikto -h 192.168.1.1 -p 80,443,8080. Nikto scans each port separately and reports findings for each web server found.

Tags

#web#scanning#vulnerability#reconnaissance

Output Explanation

Nikto output lists web server vulnerabilities, misconfigurations, and dangerous files organized by severity. Results include CVE references, server version information, outdated software, and potentially harmful files/CGIs. The output identifies specific issues with remediation recommendations.

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.