Insights

Nikto on Kali Linux: web server security scanner

4 min read

nikto on Kali Linux web server security scanner title card

Nikto on Kali Linux: web server security scanner

Nikto on Kali Linux is a web server security scanner. It checks a running web server for known vulnerabilities, dangerous files and misconfigurations, then reports what it finds. The tool is written in Perl and built on the LibWhisker library. It sends a wide range of probes at a target and compares the responses against an updatable checks database. Testers use it to see what a server might expose before they start looking at individual applications. Defenders use it to run the same baseline checks against their own hosting before an attacker gets there.

This post covers what nikto is, when a tester or defender would reach for it, how to install it on Kali Linux, the legal limits that apply, a worked example against a lab VM you own, and the defences that reduce the risk it demonstrates.

Nikto on Kali Linux: what it is and when to use it

Nikto carries out generic checks and server-specific checks. Generic checks look at the web server as a whole: whether dangerous files or programs are present, whether index files are misconfigured, and whether information is disclosed. Server-specific checks use the software identified on the target, such as Apache or nginx, and apply version-aware checks. The checks database is updated regularly, and the tool can report in plain text or HTML.

When a tester reaches for nikto, the goal is usually to build a starting point for a web assessment. It answers basic questions about what is running, which versions are behind it, and whether obvious risks are already present. When a defender reaches for it, the same questions apply, and the findings often become the starting point for hardening.

Installing nikto on Kali Linux

Kali Linux ships nikto as a standard package, so installation is a single step from the distribution repositories.

sudo apt update
sudo apt install nikto

The Kali tools page lists the package, gives the install command as sudo apt install nikto, and describes nikto as a pluggable web server and CGI scanner written in Perl, using LibWhisker for fast security or informational checks.

Ethical and lawful use

Only run nikto against a web server you own or have written permission to test. In the UK, unauthorised access to or interference with a computer system can engage the Computer Misuse Act 1990 and the Investigatory Powers Act 2016.

A scan can reveal paths, software versions and configuration details that help an attacker. Treat the output as sensitive. Run scans against your own lab environment, keep the scope narrow, and stop when the engagement ends.

Worked example on a lab target you own

Lab target: a local VM on an isolated host-only network, such as the setup described in our guide to creating a pentesting environment with Parrot OS and Kali Linux on VirtualBox.

Point nikto at the lab VM and run a scan:

nikto -h 192.168.56.101

The scan assumes port 80 unless told otherwise. To target a lab service on a different port, use the port option:

nikto -h 192.168.56.101 -p 8080

The output reports the server in use, the findings and the number of requests made. Findings might include an outdated server version, missing security headers, or a dangerous file. Because the target is your own lab VM, this is safe practice and gives you a record to work from.

For related coverage, see our posts on sqlmap on Kali Linux, gobuster on Parrot OS and nmap.

Defences and detections

Reduce the exposure nikto finds, and the tool has less to show.

  • Patch early. Nikto flags outdated server versions. Keep the web server patched.
  • Remove dangerous files. Do not leave install, debug or backup files in a web root.
  • Configure headers. Set HSTS and anti-clickjacking headers where they apply.
  • Restrict admin interfaces. Put them behind authentication and access control.

Sources