
Nikto is a powerful open-source web server scanner that detects vulnerabilities, outdated server software, and security misconfigurations. Below are the top 21 Nikto commands that security professionals can use to identify and mitigate risks on web servers.
- Basic Web Server Scan
- Run Specific Plugins
- Comprehensive Scan with All Tests
- Tuning Scan for Interesting Files
- Export Vulnerabilities to Metasploit
- Check for robots.txt Vulnerabilities
- Check for File Upload Vulnerabilities
- Scan for Shellshock Vulnerability
- Scan for Heartbleed Vulnerability
- Scan for POODLE Vulnerability
- Generate a Vulnerability Report
- Check for CGI Vulnerabilities
- Scan for Apache-Specific Vulnerabilities
- Scan for IIS-Specific Vulnerabilities
- Scan for Horde-Specific Vulnerabilities
- Check for Nessus Compatibility
- Scan for PHP-Specific Vulnerabilities
- Check for SSL/TLS Vulnerabilities
- Run Generic Tests for Common Vulnerabilities
- Check for Metasploit Integration
- Scan for Tomcat-Specific Vulnerabilities
1. Basic Web Server Scan
nikto -h http://192.168.1.1
This command scans the target web server for known vulnerabilities, misconfigurations, and potential security threats.
2. Run Specific Plugins
nikto -h http://192.168.1.1 -Plugins
Executes specified plugins to check for specific vulnerabilities.
3. Comprehensive Scan with All Tests
nikto -h http://192.168.1.1 -C all
Performs a complete scan using all available Nikto tests.
4. Tuning Scan for Interesting Files
nikto -h http://192.168.1.1 -Tuning 1
Focuses on scanning for interesting files instead of running a full vulnerability check.
5. Export Vulnerabilities to Metasploit
nikto -h http://192.168.1.1 -Format msf+
Formats the scan results for Metasploit integration.
6. Check for robots.txt Vulnerabilities
nikto -h http://192.168.1.1 -Plugins robots
Analyzes robots.txt for security flaws.
7. Check for File Upload Vulnerabilities
nikto -h http://192.168.1.1 -Plugins fileupload
Detects insecure file upload mechanisms that attackers might exploit.
8. Scan for Shellshock Vulnerability
nikto -h http://192.168.1.1 -Plugins shellshock
Checks if the server is vulnerable to the Shellshock exploit.
9. Scan for Heartbleed Vulnerability
nikto -h http://192.168.1.1 -Plugins heartbleed
Detects Heartbleed SSL vulnerabilities.
10. Scan for POODLE Vulnerability
nikto -h http://192.168.1.1 -Plugins poodle
Detects SSLv3 POODLE attack susceptibility.
11. Generate a Vulnerability Report
nikto -h http://192.168.1.1 -output report.html
Outputs the scan results into an HTML report.
12. Check for CGI Vulnerabilities
nikto -h http://192.168.1.1 -Plugins cgi
Scans for CGI script-related vulnerabilities.
13. Scan for Apache-Specific Vulnerabilities
nikto -h http://192.168.1.1 -Plugins apache
Checks Apache web servers for known security issues.
14. Scan for IIS-Specific Vulnerabilities
nikto -h http://192.168.1.1 -Plugins iis
Checks Microsoft IIS web servers for security weaknesses.
15. Scan for Horde-Specific Vulnerabilities
nikto -h http://192.168.1.1 -Plugins horde
Detects vulnerabilities specific to Horde web applications.
16. Check for Nessus Compatibility
nikto -h http://192.168.1.1 -Plugins nessus
Ensures scan results are compatible with Nessus security scanner.
17. Scan for PHP-Specific Vulnerabilities
nikto -h http://192.168.1.1 -Plugins php
Finds security risks in PHP-based web applications.
18. Check for SSL/TLS Vulnerabilities
nikto -h http://192.168.1.1 -Plugins ssl
Analyzes SSL/TLS configurations and vulnerabilities.
19. Run Generic Tests for Common Vulnerabilities
nikto -h http://192.168.1.1 -Plugins generic
Performs a general security assessment.
20. Check for Metasploit Integration
nikto -h http://192.168.1.1 -Plugins msf
Identifies vulnerabilities that can be exploited using Metasploit.
21. Scan for Tomcat-Specific Vulnerabilities
nikto -h http://192.168.1.1 -Plugins tomcat
Finds security flaws in Apache Tomcat servers.
Conclusion
Nikto is a powerful tool for web security assessments, capable of identifying vulnerabilities and misconfigurations across various web platforms. By using these 21 commands, security analysts can perform comprehensive scans and generate reports to strengthen web security defenses.