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.
What Is Nikto?
Nikto is a free, open-source web server scanner that tests a web server against a database of more than 6,700 known checks — dangerous files, outdated software, misconfigurations, CGI issues, and missing security headers — and reports everything it finds in a single run. It is written in Perl by Chris Sullo and has been a mainstay of web security testing for over two decades. Nikto is famously noisy: it fires thousands of requests at a target, so any intrusion detection system or web application firewall will spot it immediately. Use it for authorized assessments, audits of your own servers, and lab practice — never against a system you do not own or have written permission to test.
What Nikto is good at: fast, broad coverage of web server problems — missing security headers, directory listing, default files, backup files, outdated server software, and known CGI vulnerabilities. What it is not: a stealth tool, a full web application scanner, or a replacement for manual testing. It checks the server, not the application logic behind it. This guide turns Nikto into a command reference you can work from: the complete flag tables, a worked first scan, tuning and evasion, authenticated scans, multi-host scans, and fixing what it finds.
How to Use Nikto in 5 Steps
nikto -Version — Kali Linux ships it pre-installed.nikto -update — pull the latest vulnerability checks before you scan.nikto -h testphp.vulnweb.com — start with a site built for practice.+ line is a finding, tagged with an OSVDB reference where one exists.-o report.html -Format html, then work through the findings (see How to Fix What Nikto Finds below).The rest of this guide unpacks each step.
Installing Nikto
Nikto comes pre-installed on Kali Linux. Check it:
nikto -Version
# Nikto v2.5.0
Kali ships Nikto 2.5.0 — run nikto -Version to confirm yours. The upstream GitHub project may be newer; nikto -update refreshes the check database, not the program itself. To update the program, use your package manager or the source route below.
On Debian or Ubuntu, or if it is missing:
sudo apt update && sudo apt install nikto
On macOS with Homebrew:
brew install nikto
From source, for the latest checks:
git clone https://github.com/sullo/nikto.git
cd nikto/program
perl nikto.pl -Version
With Docker:
docker pull sullo/nikto
docker run --rm sullo/nikto -h http://example.com
On Windows, run Nikto through WSL with Kali or Debian, or in Docker. There is no native Windows build; the Perl source route needs a Perl interpreter installed. On Termux (Android), install Perl first, then run Nikto from the GitHub source — the apt package is not available there.
Keep its checks current — Nikto's vulnerability database is updated from the project repository:
nikto -update
If you see nikto: command not found, Nikto is not installed or not on your PATH: install it with sudo apt install nikto on Kali/Debian/Ubuntu, or run it from the source directory with perl nikto.pl. If you see "your Nikto installation is out of date", run nikto -update (see Updating Nikto and Fixing "Installation Is Out of Date" below).
Your First Nikto Scan: Worked Example
Scan a target you are allowed to test. testphp.vulnweb.com is Acunetix's public test site, built for exactly this kind of practice:
nikto -h testphp.vulnweb.com
Example output — your results will differ, because versions and findings change as the test site changes:
- Nikto v2.5.0
---------------------------------------------------------------------------
+ Target IP: 44.228.249.3
+ Target Hostname: testphp.vulnweb.com
+ Target Port: 80
+ Start Time: 2026-11-06 07:00:00 (GMT)
---------------------------------------------------------------------------
+ Server: Apache/2.4.49 (Unix)
+ Retrieved x-powered-by header: PHP/5.6.40
+ The anti-clickjacking X-Frame-Options header is not present.
+ The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type.
+ The X-XSS-Protection header is not defined. This header can hint to the user agent to protect against some forms of XSS.
+ OSVDB-3268: /admin/: Directory listing found.
+ OSVDB-3092: /admin/login.php: This might be interesting...
+ 7534 requests: 0 error(s) and 12 item(s) reported on remote host
+ End Time: 2026-11-06 07:06:00 (GMT) (367 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested
Reading it, line by line:
/admin/.Scan an HTTPS target with -ssl (or pass an https:// URL), and a non-standard port with -p:
nikto -h https://example.com -ssl
nikto -h http://example.com -p 8080
nikto -h https://example.com -p 8443 -ssl
How to Read Nikto Results
curl before calling it a vulnerability.-Display V to see the detail behind a finding, and -no404 to cut down 404-guessing noise.-Tuning and re-run.Nikto Commands: The Complete Reference
Every flag below is a real Nikto option. The tables are grouped by what you are trying to do; the compact cheat sheet further down is the daily quick list.
Target and connection
| Flag | What it does | Example |
|---|---|---|
-h <host> | Target host, IP, hostname, URL or a file of hosts | nikto -h https://example.com |
-p <port> | Port or comma-separated ports (default 80, or 443 with -ssl) | nikto -h example.com -p 8080 |
-ssl | Force SSL/TLS mode | nikto -h https://example.com -ssl |
-nossl | Disable SSL | nikto -h example.com -nossl |
-vhost <name> | Host header to send (scan a virtual host by IP) | nikto -h 192.168.1.50 -vhost staging.example.com -ssl |
-root <path> | Prepend a path to every request | nikto -h example.com -root /app/ |
-timeout <seconds> | Request timeout (default 10) | nikto -h example.com -timeout 20 |
-Pause <seconds> | Wait between requests (slows the scan) | nikto -h example.com -Pause 3 |
-nolookup | Skip DNS lookups, use the IP directly | nikto -h 93.184.216.34 -nolookup |
-no404 | Skip checks that guess at 404 responses | nikto -h example.com -no404 |
-useragent <string> | Custom User-Agent header | nikto -h example.com -useragent "Mozilla/5.0" |
-useproxy <url> | Route through a proxy (Burp Suite) | nikto -h example.com -useproxy http://127.0.0.1:8080 |
Scan scope and test selection
| Flag | What it does | Example |
|---|---|---|
-Tuning <codes> | Run only selected test categories (see the Tuning table below) | nikto -h example.com -Tuning 123b |
-Cgidirs <dirs> | Scan CGIs in these directories (all or a list) | nikto -h example.com -Cgidirs all |
-mutate <n> | Guess extra content: 1 all files with all roots, 2 password file names, 3 Apache user names, 4 cgiwrap user names, 5 sub-domains, 6 directory names from a dictionary | nikto -h example.com -mutate 1 |
-maxtime <time> | Stop the scan after a time limit (30m, 1h) | nikto -h example.com -maxtime 30m |
Evasion and stealth
| Flag | What it does | Example |
|---|---|---|
-evasion <n> | Apply an evasion technique (see the Evasion table below) | nikto -h example.com -evasion 1 |
-Display <opts> | Control output: 1 redirects, 2 cookies, 3 all 200/OK responses, 4 URLs needing auth, D debug, E all HTTP errors, P progress, S scrub output, V verbose | nikto -h example.com -Display V |
Authentication and sessions
| Flag | What it does | Example |
|---|---|---|
-id <user:pass> | Basic-auth credentials for the target | nikto -h example.com -id admin:password |
-cookies | Print cookies found during the scan | nikto -h example.com -cookies |
-config <file> | Use a custom configuration file | nikto -h example.com -config nikto.conf |
Output and reports
| Flag | What it does | Example |
|---|---|---|
-o <file> | Save results to a file | nikto -h example.com -o report.html |
-Format <type> | Report format: txt, htm, csv, xml, json, nbe | nikto -h example.com -o report.html -Format htm |
Update and maintenance
| Flag | What it does | Example |
|---|---|---|
-update | Update the vulnerability database and plugins | nikto -update |
-Version | Show the Nikto version | nikto -Version |
-Help | Show all options | nikto -Help |
-list-plugins | List available plugins | nikto -list-plugins |
-Plugin <name> | Run a specific plugin (for example headers, outdated, robots, cookies) | nikto -h example.com -Plugin headers |
-dbcheck | Check the databases for syntax errors | nikto -dbcheck |
-ask <yes/no> | Whether to ask interactive questions (default yes) | nikto -h example.com -ask no |
Scanning Multiple Hosts and Ports
Nikto scans one host per run by default, but you can feed it a file of hosts — one per line — and it scans each in turn:
# targets.txt — one host per line
# example.com
# 192.168.1.50
# https://staging.example.com:8443
nikto -h targets.txt
Scan several ports on one host with a comma list:
nikto -h example.com -p 80,443,8080,8443
And scan a virtual host by connecting to its IP and setting the Host header yourself:
nikto -h 192.168.1.50 -vhost staging.example.com -ssl -p 8443
Save each host's results separately by running Nikto once per host with -o, or re-run the file with a single -o and read the combined report — the output names each host it tested.
Authenticated Scans
Some targets need a login before Nikto can see anything useful. Pass Basic-auth credentials with -id:
nikto -h https://example.com -ssl -id admin:password
For form-based logins, log in once in a browser, copy the session cookie, and hand it to Nikto through a config file — or route the scan through Burp Suite with an authenticated session (see Scanning Through a Proxy below) so the proxy supplies the cookie. Use -cookies to see what cookies the target sets during the scan:
nikto -h https://example.com -ssl -cookies
Only scan authenticated areas on targets you own or are authorized to test, and use a dedicated test account — never your real admin credentials against a target you do not control.
Nikto Commands Cheat Sheet
| Command | What it does |
|---|---|
nikto -h <host> | Basic scan of a web server |
nikto -h <host> -ssl | Scan an HTTPS target |
nikto -h <host> -p 80,443 | Scan specific ports |
nikto -h <host> -Tuning 123b | Run only selected test categories |
nikto -h <host> -evasion 1 | Apply an evasion technique |
nikto -h <host> -Display V | Verbose output while scanning |
nikto -h <host> -o report.html -Format htm | Save results as an HTML report |
nikto -h <host> -useproxy http://127.0.0.1:8080 | Route the scan through a proxy (Burp Suite) |
nikto -h <host> -useragent "Mozilla/5.0" | Scan with a custom User-Agent |
nikto -h <host> -maxtime 30m | Stop the scan after a time limit |
nikto -h <host> -Pause 3 | Wait 3 seconds between requests |
nikto -h <host> -nolookup | Skip DNS lookups, use the IP directly |
nikto -h <host> -no404 | Skip 404-guessing checks |
nikto -h <host> -id admin:password | Scan with Basic-auth credentials |
nikto -h targets.txt | Scan every host in a file, one per line |
nikto -update | Update the vulnerability database |
nikto -list-plugins | List available plugins |
nikto -h <host> -config nikto.conf | Use a custom configuration file |
Tuning: Focus Your Scan
A full default scan checks everything and takes a long time. The -Tuning flag narrows the scan to the categories you care about:
| Code | Category |
|---|---|
| 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 | Web service |
| e | Administrative console |
| x | Reverse tuning (exclude the listed tests) |
Examples:
# Interesting files, misconfigurations, info disclosure, software versions
nikto -h http://example.com -Tuning 123b
# Only admin consoles — fast check for exposed login panels
nikto -h http://example.com -Tuning e
# Only SQL injection checks
nikto -h http://example.com -Tuning 9
# Everything except denial-of-service checks
nikto -h http://example.com -Tuning x6
Tuning is the single biggest lever on scan time: a focused scan finishes in a minute or two where a full scan takes much longer.
Evasion Techniques
The -evasion flag changes how Nikto's requests look, to get past naive pattern-matching filters:
| Code | Technique |
|---|---|
| 1 | Random URI encoding (non-UTF8) |
| 2 | Directory self-reference (/./) |
| 3 | Premature URL ending |
| 4 | Prepend long random string |
| 5 | Fake parameter |
| 6 | TAB as request spacer |
| 7 | Change the case of the URL |
| 8 | Use Windows directory separator (\) |
| 9 | Session splicing |
nikto -h http://example.com -evasion 1
nikto -h http://example.com -evasion 1 7
Be realistic about this: evasion only helps against basic filters that match known Nikto request patterns. A real web application firewall or IDS still sees thousands of requests arriving in seconds. Evasion is for authorized testing where you need to see what a lightly-protected target reveals — it is not a way to scan a target stealthily.
Scanning Through a Proxy (Burp Suite)
Route Nikto through Burp Suite so you can watch its requests, replay interesting ones, and correlate findings with manual testing:
nikto -h http://example.com -useproxy http://127.0.0.1:8080
Start Burp Suite first, confirm its proxy listener is on 127.0.0.1:8080, then run the scan. Every Nikto request appears in Burp's Proxy history, and you can send any of them to Repeater to test by hand. A custom User-Agent makes the traffic blend in a little better:
nikto -h http://example.com -useproxy http://127.0.0.1:8080 -useragent "Mozilla/5.0 (X11; Linux x86_64)"
Saving and Sharing Reports
Always save your output — terminal scrollback is not a report. Nikto supports plain text, HTML, CSV, XML, JSON and NBE (Nessus) formats:
# HTML report for sharing with a team or client
nikto -h https://example.com -ssl -o nikto-report.html -Format htm
# CSV for spreadsheets and further analysis
nikto -h https://example.com -ssl -o nikto-report.csv -Format csv
# Plain text for quick reading
nikto -h https://example.com -ssl -o nikto-report.txt -Format txt
# XML for feeding into other tools or a SIEM
nikto -h https://example.com -ssl -o nikto-report.xml -Format xml
# JSON for scripts and automation
nikto -h https://example.com -ssl -o nikto-report.json -Format json
# NBE for importing into Nessus-style workflows
nikto -h https://example.com -ssl -o nikto-report.nbe -Format nbe
Re-scan after fixes with the same command and compare the two reports — findings that disappear are fixes confirmed.
Updating Nikto and Fixing "Installation Is Out of Date"
Nikto's checks live in a database that ages. Before an assessment, refresh it:
nikto -update
That pulls the latest vulnerability checks and plugin definitions from the project repository. If Nikto tells you "your Nikto installation is out of date", it means the check database is stale — run nikto -update and scan again. If the message persists after an update, your Nikto program itself is old: update it with sudo apt update && sudo apt install nikto on Kali/Debian/Ubuntu, or git pull in a source checkout and re-run perl nikto.pl -Version to confirm the new version.
Check the database itself for corruption with:
nikto -dbcheck
Nikto Is Slow: Speed and Stability
A full default scan legitimately takes 10–30+ minutes — Nikto sends thousands of requests. If that is too slow, narrow the work instead of fighting the clock:
# Scan only the categories you need
nikto -h https://example.com -ssl -Tuning 123b
# Cap the run at 30 minutes
nikto -h https://example.com -maxtime 30m
# Skip 404-guessing checks that inflate the request count
nikto -h https://example.com -no404
# Slow down deliberately when a target rate-limits you
nikto -h https://example.com -Pause 2
Do not raise the speed by hammering a target: if the server starts refusing connections, slow down with -Pause and narrow with -Tuning. A scan that finishes cleanly on a focused scope beats a full scan that dies halfway.
Troubleshooting Nikto Problems
| Problem | Fix |
|---|---|
nikto: command not found | Nikto is not installed or not on your PATH. Install it (sudo apt install nikto on Kali/Debian/Ubuntu), or run it from the source directory with perl nikto.pl. |
| Connection refused / host unreachable | Check the target is up and the port is open first (curl -I http://example.com, or Nmap). Check the port with -p. |
| "Host does not exist" | DNS problem — check the spelling, or scan the IP directly with -nolookup. |
| "Error limit reached for host" | Nikto stops a host after 20 consecutive errors. The target is usually unreachable, dropping connections, or rate-limiting you. Verify it with curl, then slow down with -Pause 2 and narrow with -Tuning. |
| Scan returns nothing (0 items) | The target may sit behind a WAF, or return the same page for every request. Try -Display V to see what is happening and -no404 to cut guessing noise. |
| Scan is very slow | Narrow it with -Tuning, cap it with -maxtime 30m, or drop the pause — full scans legitimately take 10–30+ minutes. |
| SSL errors on an HTTPS target | Add -ssl and check the certificate (curl -vk https://example.com). A self-signed or expired certificate can break the scan. |
| Blocked after a few requests | Rate limiting or a WAF. Slow down with -Pause 3 — and if the target is telling you to stop, stop. Never hammer a target. |
| "Your Nikto installation is out of date" | Run nikto -update. If it persists, update the program itself (sudo apt install nikto or git pull in a source checkout). |
| Too much output to read | Save it (-o report.html -Format htm) and filter by category with -Tuning on the next run. |
How to Fix What Nikto Finds
Nikto finds problems; fixing them is the point. The most common findings and their fixes:
X-Frame-Options: SAMEORIGIN, X-Content-Type-Options: nosniff, a Content-Security-Policy, Strict-Transport-Security, and Referrer-Policy in your web server configuration.ServerTokens Prod and ServerSignature Off, Nginx server_tokens off. Then patch the software itself — an old version with public CVEs is a real finding, not just an information leak.Options -Indexes, Nginx autoindex off..bak, .old), sample applications, and default pages from the web root.Nikto vs Other Scanners
| Tool | Best for | How Nikto compares |
|---|---|---|
| Nmap | Finding hosts, open ports, and services | Use Nmap first to find the web server, then Nikto to test what runs on it |
| Nuclei | Fast, template-based checks including CVEs | Nuclei is faster and more targeted; Nikto is broader on misconfigurations and dangerous files |
| OWASP ZAP | Full web application scanning with spidering and active scan | ZAP is heavier and deeper; Nikto is the quick first pass |
| Burp Suite | Manual testing and request interception | Burp is hands-on; Nikto automates the broad sweep, and pairs well with Burp via -useproxy |
| Nessus | Authenticated vulnerability management with CVE coverage | Nessus is a commercial platform with scheduling and reporting; Nikto is the free, focused web-server check you run from a terminal — and Nikto can export NBE format for Nessus-style workflows |
Common Mistakes
-ssl on HTTPS targets, so the scan fails or misses everything.-o — then having nothing to show for the scan.nikto -update before an assessment, or you will miss newer checks.Best Practices
Always save output. Use tuning parameters to run focused passes instead of one giant scan. Run multiple passes and combine Nikto with Nmap for discovery, WhatWeb for fingerprinting, and manual testing for verification. Update the database with nikto -update before an assessment. Re-scan after fixes and compare reports. And only ever scan targets you own or are authorized to test.
Summary
Nikto is a comprehensive web server scanner that identifies configuration issues, outdated software, and dangerous files. Effective use means starting with a basic scan on a target you are allowed to test, reading the results critically, tuning scans to the categories you need, saving reports, and verifying each finding before fixing it. The commands in the Complete Reference above cover the whole workflow — target and connection, scope and tuning, evasion, authentication, output, and updates — and the cheat sheet is the quick list to keep beside your terminal. Paired with Nmap for discovery and Burp Suite for manual follow-up, it is one of the fastest ways to get a broad picture of a web server's security posture.
Knowledge Check
-ssl flag do?Answers: 1. It forces Nikto to use SSL/TLS when connecting to an HTTPS target. 2. The -Tuning flag limits the scan to selected test categories, cutting scan time and output noise. 3. Nikto sends thousands of requests in a single scan, so intrusion detection systems and web application firewalls spot it immediately. 4. Plain text, HTML, CSV, XML, JSON and NBE, chosen with -Format. 5. Run nikto -update to pull the latest vulnerability checks and plugin definitions. 6. It identifies the check in the Open Source Vulnerability Database so you can look the issue up. 7. Add -useproxy http://127.0.0.1:8080 with Burp Suite's proxy listener running. 8. Put one host per line in a file and pass the file with -h targets.txt.
Keep Learning
Frequently Asked Questions
Continue Learning
Nuclei Guide: Automated Vulnerability Scanning
Learn Nuclei for fast template-based vulnerability scanning with customizable templates, workflow automation, and integration into CI/CD pipelines.
Tools · BeginnerHow to Use Dirb: Beginner's Guide to Directory Brute-Forcing in Kali Linux
Learn how to use Dirb in Kali Linux: run your first directory scan, pick the right wordlist, and read the results — with a worked example and cheat sheet.
Tools · BeginnerHow to Use WPScan: WordPress Vulnerability Scanning in Kali Linux
How to use WPScan in Kali Linux: install it, save your free API token, run your first WordPress vulnerability scan — cheat sheet, 15 FAQs.
Tools · BeginnerHow to Use Tcpdump: Beginner's Guide to Packet Capture in Kali Linux
Learn how to use tcpdump in Kali Linux — capture packets, filter with BPF, save pcap files and read output, with a worked example and cheat sheet.
Related Security Tools
Nikto
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.
Vulnerability AnalysisWPScan
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.
Web ApplicationBurp Suite
Burp Suite is the industry-standard web application security testing platform from PortSwigger, free as Community Edition on Kali Linux. Learn how to use Burp Suite: install it, route your browser through its proxy, intercept your first request, and test it with Repeater and Intruder.
Web ApplicationDIRB
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.