GO KALI FREE

Nikto

Vulnerability Analysis

Beginnermedium risk

Learn how to use Nikto, an open-source web server scanner written in Perl and pre-installed on Kali Linux, to audit servers you own or have written permission to test. Its 6700+ checks for potentially dangerous files and programs, plus tests for outdated software and misconfigurations, highlight issues that need verification.

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

To learn how to use Nikto, confirm Kali Linux's pre-installed copy with nikto -Version, or install it if missing with sudo apt update && sudo apt install nikto. To scan a website you own or have written permission to test, run nikto -h http://example.com after replacing the example URL with your authorized target. Read the findings as leads to verify, not proof of a vulnerability. Narrow checks to misconfigurations and default files with nikto -h http://example.com -Tuning 2, then export a new scan's results with nikto -h http://example.com -Tuning 2 -o report.html -Format htm.

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.

Quick Reference Commands

Verified quick-reference commands for Nikto
CommandPurpose
nikto -h <url>Run the standard web-server test set.
nikto -h <url> -sslForce SSL/TLS mode.
nikto -h <url> -port 8080Test a non-default port.
nikto -h <url> -Tuning 2Restrict testing to misconfiguration and default-file checks.
nikto -h <url> -Tuning 3Restrict testing to information-disclosure checks.
nikto -h <url> -Pause 1Pause one second between tests to reduce load.
Nikto Annotated Option List

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
nikto -h http://192.168.1.1 -mutate 2Guess passwords - File name guessing
nikto -h http://192.168.1.1 -useproxy http://127.0.0.1:8080Through proxy - Route via Burp
nikto -h http://192.168.1.1 -id admin:passwordHTTP auth - Basic authentication
nikto -h http://192.168.1.1 -vhost target.comVirtual host - Set Host header
nikto -h http://192.168.1.1 -Plugins "@@ALL"All plugins - Enable everything
nikto -h http://192.168.1.1 -maxtime 300Time limit - 5 minute max
nikto -h http://192.168.1.1 -pause 3Delay requests - Avoid rate limits
nikto -h hosts.txtMultiple hosts - Scan from file
nikto -h http://192.168.1.100 -o scan.xml -Format xmlXML output for tool integration
nikto -h http://192.168.1.100 -Tuning 5678Tuning for specific vulnerability types

Step-by-Step Guide

  1. 1Confirm Kali Linux's pre-installed Nikto with nikto -Version; if the package is missing, install it with sudo apt update && sudo apt install nikto
  2. 2Choose a web server you own or have written permission to test, record its URL and approved ports, and replace example.com in every command below with that target
  3. 3Run your first HTTP scan with nikto -h http://example.com
  4. 4Scan an approved HTTPS endpoint with nikto -h example.com -p 443 -ssl
  5. 5Check an approved HTTP server on a non-standard port with nikto -h example.com -p 8080
  6. 6Read each finding's path and message, investigate CVE references or legacy OSVDB IDs when present, and assign severity only after confirming impact; Nikto findings are not standardized risk scores
  7. 7Narrow checks to misconfigurations and default files with nikto -h http://example.com -Tuning 2; 2 selects a test category, not a severity level
  8. 8Save findings during a new scan with nikto -h http://example.com -o report.html -Format htm, then open report.html to review the report

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

Nuclei

Vulnerability Analysis

Nuclei is used to send requests across targets based on templates, allowing zero false positives and providing rapid scanning over large infrastructure footprints.

WhatWeb

Information Gathering

Learn how to use WhatWeb, the website fingerprinting tool that answers 'What is that website?' by detecting content management systems (CMS), blogging platforms, analytics packages, JavaScript libraries, web servers, embedded devices, and over 1800 other web technologies using its plugin architecture.

DIRB

Web Application

DIRB is a web content scanner that finds hidden directories, backup files, and other sensitive content on web servers by launching dictionary-based attacks against a target URL. This beginner tutorial shows how to use DIRB in Kali Linux: install it, run your first scan, read the output, switch wordlists, and hand verified findings to the next tool.

Gobuster

Web Application

Learn how to use Gobuster, the fast Go-based directory and subdomain brute-forcer, with install steps, your first dir scan, wordlist picks, and result filtering — a beginner tutorial for Kali Linux.

SQLMap

Web Application

SQLMap is an open-source penetration testing tool that automates SQL injection detection and exploitation. It supports six SQL injection techniques (boolean-based blind, time-based blind, error-based, UNION query-based, stacked queries, and out-of-band) and over 30 database backends including MySQL, Oracle, PostgreSQL, Microsoft SQL Server, and many more.

WPScan

Vulnerability Analysis

Learn how to use WPScan, the black-box WordPress vulnerability scanner: install it in Kali Linux, add a free API token, and scan a WordPress site to enumerate plugins, themes and users and match them against known vulnerabilities.

Related Cybersecurity Guides

Tools · Beginner

Nikto Commands: Complete Guide to Web Server Scanning in Kali Linux

Nikto commands cheat sheet: install Nikto, run your first web server scan, read the results, tune scans and save reports — with a worked example.

Web Security · Intermediate

What Is SQL Injection? Types, Examples & How to Prevent SQL Injection Attacks

What is SQL injection? See real SQL injection examples, a worked DVWA lab test, and how to prevent SQL injection with parameterized queries.

Web Security · Intermediate

Web Security Fundamentals: OWASP Top 10 and Beyond

A comprehensive guide to web application security covering the OWASP Top 10 vulnerabilities, defense in depth strategies, and secure development lifecycle practices.

OSINT · Intermediate

Amass Guide: Open Source Attack Surface Mapping

Learn to use Amass for comprehensive attack surface mapping including DNS enumeration, subdomain discovery, integration with APIs, and visualizations.

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.

How do I use Nikto in Kali Linux?

Nikto is pre-installed on Kali Linux; confirm it with nikto -Version, or install it if missing with sudo apt update && sudo apt install nikto. Replace example.com with a server you own or have written permission to test, then run nikto -h http://example.com for a first scan. Use nikto -h http://example.com -Display V to enable verbose output for more detail about scan activity.

How do I use Nikto to scan a website?

Replace example.com with a website you own or have written permission to test, then run nikto -h http://example.com -o report.html -Format htm to scan it and save an HTML report. For HTTPS, use nikto -h example.com -p 443 -ssl; for HTTP on port 8080, use nikto -h example.com -p 8080. Findings point to potentially dangerous files, outdated software, or misconfigurations; a reported version or header alone does not establish exploitability. Verify each issue against the server's actual configuration and software before assigning risk or reporting a vulnerability.

How do I update Nikto?

Check your version with nikto -Version. For Nikto 2.5/2.6, update through your installation source rather than relying on the legacy nikto -update command. Update Kali's package with sudo apt update && sudo apt install --only-upgrade nikto, then rerun nikto -Version. For a GitHub clone, run git pull from the repository root and verify that copy with perl program/nikto.pl -Version.

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.