Nikto: Web Vulnerability Scanning Tool in Kali Linux

nikto-main

Web applications are increasingly vulnerable to various attacks, making security a top priority for developers and system administrators. Among the tools available for identifying these vulnerabilities, Nikto stands out as a robust web vulnerability scanner. Pre-installed in Kali Linux, Nikto can efficiently detect issues like SQL injection, Cross-Site Scripting (XSS), and more. This article provides a step-by-step guide to using Nikto, focusing on its capabilities to enhance your web security assessments.

What is Nikto?

Nikto is an open-source web server scanner that performs comprehensive tests against web servers for multiple vulnerabilities. It can identify outdated software, potentially harmful files, and common security issues by examining web server configurations and responses. Supporting both HTTP and HTTPS protocols, Nikto can scan a wide range of web applications and frameworks, making it an essential tool for security professionals.

Key Features of Nikto:

  • Comprehensive Scanning: Identifies over 6,700 potential vulnerabilities.
  • File and Directory Scanning: Checks for default files and scripts that may be exploitable.
  • SSL Support: Can perform scans over secure connections.
  • Multiple Output Formats: Results can be exported in various formats, including HTML, CSV, and XML.

Launching Nikto and Performing a Basic Scan

Step 1: Launch Nikto on Kali Linux

To start using Nikto, follow these simple steps:

  • Log into your Kali system with valid credentials (Here username is kali and the password is kali).
  • Nikto comes pre-installed in Kali Linux. You can launch it either through the GUI by navigating to Applications -> Vulnerability Analysis -> Nikto or directly from the command line.

nikto-GUI

  • To familiarize yourself with the commands and options, type the following command to view the help file:
Command: nikto --help

nikto-help

Step 2: Perform a Basic Scan on a Website

Now that you have Nikto open, you can perform a basic scan on a website. For this example, we’ll use http://example.com:

Command: nikto -h http://example.com

nikto-scan

Note: Scans against internet servers can take a few minutes. Wait for the command prompt to return before proceeding. If you need to stop the scan, simply press CTRL+C.

HTTPS Scanning

To scan websites that use HTTPS, you must specify the -ssl flag. Here’s how to scan https://nmap.org:

Command: nikto -h https://nmap.org -ssl

Scanning Multiple Web Servers

In many scenarios, especially during penetration testing, you may want to scan multiple servers at once. Here’s how to do it:

Step 1: Create an IP Address List

  • Open a text editor and list the IP addresses of the web servers you want to scan. For example, your IP_list.txt might look like this:
10.1.1.1
10.2.2.2
10.3.4.4
192.2.2.2
  • Save this document to your Desktop.

Step 2: Run the Scan

To scan all servers listed in your IP_list.txt, use the following command:

Command: nikto -h IP_list.txt

Investigating Website Vulnerabilities

Once the scan is complete, Nikto provides detailed information about any vulnerabilities it has detected. Pay close attention to the output for insights on how to mitigate the identified risks. This information is vital for maintaining the security of your web applications.

Exporting Nikto Results to a File

Nikto allows you to export your scan results in various formats, which is useful for reporting and further analysis.

Exporting to HTML

To save the results of a scan to an HTML file, use the -o option followed by the desired file name. For example:

Command: nikto -h http://example.com -o nkfile.htm

nikto-outputfile-html

You can find nkfile.htm on your Desktop. Open it in a browser to view the report in an organized format.

Exporting to CSV

If you prefer to work with CSV files for data analysis, you can use the -Format flag. Here’s how to save your results in a CSV format:

Command: nikto -h http://192.2.2.2 -o scan_results.txt -Format csv

nikto-outputfile-txt

After the scan, use the following command to view your results:

Command: cat scan_results.txt

Conclusion

Nikto is an essential tool for anyone serious about web security. Its ability to detect vulnerabilities across a variety of web applications makes it invaluable for penetration testers, security researchers, and system administrators alike. By following the steps outlined in this guide, you can effectively utilize Nikto to bolster your website’s defenses against common vulnerabilities.

Whether you’re performing a basic scan on a single website or assessing multiple servers, Nikto provides the insights needed to improve web application security. Make it a part of your regular security assessments and stay ahead of potential threats.

Related Posts