Example output from a Nikto scan, highlighting findings such as outdated server software, missing security headers, and discoverable admin directories.
In an era dominated by million-dollar enterprise security solutions and complex AI-driven platforms, one of the most effective web vulnerability scanners remains a free, open-source tool created over two decades ago: Nikto. In my 10+ years as a penetration tester, I’ve seen organizations spend fortunes on security suites, only to have their entire web presence compromised by a vulnerability that a single, five-minute Nikto scan could have exposed.
Nikto is often underrated precisely because it is simple. It doesn’t have a fancy GUI or a cloud-based dashboard. It is a lean, command-line-driven workhorse that performs thousands of checks against a web server to find low-hanging fruit and critical misconfigurations. In 2025, understanding how to use Nikto is not just a skill for ethical hackers; it’s a fundamental necessity for any developer, system administrator, or security professional responsible for a web application.
Nikto is an open-source web server scanner written in Perl. It performs comprehensive tests against web servers for multiple items, including over 6,700 potentially dangerous files and programs. Unlike network scanners that just look for open ports, Nikto interrogates the web application itself, acting like a persistent, automated hacker checking for common weaknesses.hackercoolmagazine+1
Nikto’s Core Capabilities:
PUT, DELETE, or TRACE are enabled, which could allow an attacker to modify or delete files or perform Cross-Site Tracing (XST) attacks.Content-Security-Policy (CSP), Strict-Transport-Security (HSTS), and X-Frame-Options./admin, /backup, /config, and /test.Nikto is not a quiet tool. It is designed to be fast and aggressive, which makes it “noisy” on the network. However, for a quick and thorough assessment of a web server’s security posture, it is unparalleled.
Nikto is a Perl script, so its only dependency is a Perl interpreter, which is pre-installed on most Linux and macOS systems.
For many security-focused Linux distributions like Kali Linux, Nikto is already installed. If not, installation is simple via Git.armur+1
git clone https://github.com/sullo/nikto.gitcd nikto/program./nikto.pl -h scanme.nmap.org (Note: scanme.nmap.org is a safe, legal target for security scanning practice.)program directory within the extracted folder, and run the script using the Perl interpreter. textperl nikto.pl -h scanme.nmap.orgNikto’s power comes from its command-line flags, which allow you to tailor your scan precisely.
To run a basic scan against a web server on the default port 80:
bashnikto -h target.com
If the site uses SSL/TLS, you must use the -ssl flag:
bashnikto -h target.com -ssl
To scan a non-standard port, use the -p flag:
bashnikto -h target.com -p 8080
For documentation and analysis, it’s crucial to save your scan results. The -o flag saves the output to a file. The extension determines the format.
bashnikto -h target.com -o report.html # HTML format
nikto -h target.com -o report.txt # Plain text format
nikto -h target.com -o report.csv # CSV format
The -Tuning flag allows you to control the types of tests Nikto performs. This is useful for focusing on specific vulnerability classes.
| Tuning Option | Focus of the Scan |
|---|---|
-Tuning 1 | Interesting Files / Seen in Logfiles |
-Tuning 2 | Misconfiguration / Default Files |
-Tuning 3 | Information Disclosure |
-Tuning 4 | Injection (XSS/Script/HTML) |
-Tuning 5 | Remote File Retrieval |
Example: To scan specifically for injection vulnerabilities:
bashnikto -h target.com -Tuning 4
A Nikto scan can produce a lot of output. The key is knowing what to look for. Here are some of the most critical findings and what they mean.
| Nikto Output | What It Means | The Risk |
|---|---|---|
Server: Apache/2.4.41 (Ubuntu) | The server is disclosing its exact software version. | If Apache 2.4.41 has a known RCE vulnerability, an attacker has everything they need to exploit it. |
HTTP method 'PUT' is enabled. | The server allows clients to upload files via the PUT method. | An attacker could upload a web shell and gain complete control of the server. |
The X-Frame-Options header is not present. | The site is vulnerable to Clickjacking. | An attacker can embed your site in an iframe on their own malicious site and trick users into performing actions they didn’t intend to. |
OSVDB-3233: /admin/: This might be an administrative interface. | Nikto has found a common administrative directory. | If the admin panel has weak or default credentials, an attacker could gain administrative access. |
OSVDB-3092: /test.php: This appears to be a test page. | A leftover test file is publicly accessible. | Test files often contain sensitive information, database credentials, or have security features disabled. |
Finding a vulnerability is only half the battle. Here’s how you can turn Nikto’s findings into a practical exploitation path.
Server: WordPress 5.2 (an outdated version)./ .git/ directory is publicly accessible.git-dumper to download the entire source code repository of the web application..git, .svn, and .DS_Store.In a world of complex security threats, Nikto serves as a powerful reminder that organizations are still falling victim to the basics. Misconfigurations, outdated software, and forgotten files are the entry points for the vast majority of web application breaches.
Mastering Nikto is one of the most cost-effective ways to improve your security posture. It is free, powerful, and relentless. Run it against your own servers before an attacker does. It will almost certainly find something you missed. To take your skills to the next level, set up your own Penetration Testing Lab and practice.
This is not a warning about a future threat. This is a debrief of an…
Let's clear the air. The widespread fear that an army of intelligent robots is coming…
Reliance Industries has just announced it will build a colossal 1-gigawatt (GW) AI data centre…
Google has just fired the starting gun on the era of true marketing automation, announcing…
The world of SEO is at a pivotal, make-or-break moment. The comfortable, predictable era of…
Holiday shopping is about to change forever. Forget endless scrolling, comparing prices across a dozen…