Skip to content

Nikto

105 commands

A web server scanner that checks for thousands of dangerous files, outdated software and common misconfigurations. Noisy by design.

  • vulnerability scanning
  • web server
  • misconfiguration

Install Nikto

sudo apt install nikto

Basic Web Scan2

nikto -h http://example.com

Performs a standard comprehensive scan against a target web server.

nikto -h 192.168.1.10

Scans a target server specified by its IP address.

Target Specification3

nikto -h http://example.com -p 8080

Scans the target on a specific non-standard port.

nikto -h https://example.com -p 443,8443

Scans multiple specified ports on the same target host.

nikto -h http://example.com -p 80-90

Scans a range of ports on the target host.

SSL and HTTPS Scanning2

nikto -h example.com -ssl

Forces SSL/HTTPS mode for the scan regardless of port detection.

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

Disables SSL usage even if scanning port 443.

General Info2

nikto -Version

Displays the Nikto software version and plugin versions.

nikto -list-plugins

Lists all available plugins that can be run against a target.

Tuning and Scan Category15

nikto -h http://example.com -Tuning 1

Scans only for 'Interesting File' vulnerabilities like logs or backups.

Link
nikto -h http://example.com -Tuning 2

Scans strictly for server misconfigurations.

Link
nikto -h http://example.com -Tuning 3

Checks for information disclosure vulnerabilities.

Link
nikto -h http://example.com -Tuning 4

Focuses the scan on injection vulnerabilities like XSS and HTML injection.

Link
nikto -h http://example.com -Tuning 5

Scans for remote file retrieval vulnerabilities.

Link
nikto -h http://example.com -Tuning 6

Checks for denial of service conditions.

Link
nikto -h http://example.com -Tuning 7

Scans specifically for remote file inclusion vulnerabilities.

Link
nikto -h http://example.com -Tuning 8

Focuses on command execution vulnerabilities.

Link
nikto -h http://example.com -Tuning 9

Scans specifically for SQL injection vulnerabilities.

Link
nikto -h http://example.com -Tuning 0

Checks for file upload vulnerabilities.

Link
nikto -h http://example.com -Tuning a

Scans for authentication bypass vulnerabilities.

Link
nikto -h http://example.com -Tuning b

Identifies installed software banners.

Link
nikto -h http://example.com -Tuning c

Checks for remote source inclusion vulnerabilities.

Link
nikto -h http://example.com -Tuning x

Runs reverse tuning options to exclude specific checks.

Link
nikto -h http://example.com -Tuning 123

Combines tuning types to scan for Interesting Files, Misconfigurations, and Info Disclosure.

Link

Output Formats7

nikto -h http://example.com -o scan_result.txt

Saves the scan output to a plain text file.

Link
nikto -h http://example.com -o scan_result.html -Format html

Generates a readable HTML report of the scan findings.

Link
nikto -h http://example.com -o scan_result.xml -Format xml

Saves output in XML format for integration with other tools.

Link
nikto -h http://example.com -o scan_result.csv -Format csv

Exports scan results to a CSV file for spreadsheet analysis.

Link
nikto -h http://example.com -o scan_result.json -Format json

Outputs the results in JSON format for programmatic parsing.

Link
nikto -h http://example.com -o scan.nbe -Format nbe

Saves results in Nessus NBE format.

Link
nikto -h http://example.com -o .

Saves output to a file with an auto-generated name in the current directory.

Link

Verbose and Debug6

nikto -h http://example.com -Display 1

Shows redirects received from the web server during the scan.

Link
nikto -h http://example.com -Display 2

Displays cookies received during the scan.

Link
nikto -h http://example.com -Display 3

Prints all 200 OK responses to the screen.

Link
nikto -h http://example.com -Display 4

Shows URLs that require authentication.

Link
nikto -h http://example.com -Display D

Enables debug output for troubleshooting.

Link
nikto -h http://example.com -Display V

Enables verbose mode to see detailed progress.

Link

Evasion and IDS Bypass9

nikto -h http://example.com -evasion 1

Encodes the URI using random URI encoding to bypass IDS.

Link
nikto -h http://example.com -evasion 2

Adds a self-reference directory (/./) to the request URI.

Link
nikto -h http://example.com -evasion 3

Ends the URL prematurely to confuse certain filters.

Link
nikto -h http://example.com -evasion 4

Prepends a long random string to the request URI.

Link
nikto -h http://example.com -evasion 5

Appends a fake parameter to the file request.

Link
nikto -h http://example.com -evasion 6

Uses TAB as a request spacer instead of spaces.

Link
nikto -h http://example.com -evasion 7

Randomly changes the case of the URL characters.

Link
nikto -h http://example.com -evasion 8

Uses Windows-style directory separators (\) instead of forward slashes.

Link
nikto -h http://example.com -evasion 17

Combines Random URI encoding and Case changing for stronger evasion.

Link

User Agent Customization1

nikto -h http://example.com -useragent "MyCustomAgent/1.0"

Sets a custom User-Agent string to identify or hide the scanner.

Link

Authentication2

nikto -h http://example.com -id admin:password

Uses Basic Authentication with the provided username and password.

Link
nikto -h http://example.com -id "realm:admin:password"

Uses Basic Authentication for a specific realm.

Link

Proxy Integration2

nikto -h http://example.com -useproxy http://127.0.0.1:8080

Routes the scan traffic through an HTTP proxy.

Link
nikto -h http://example.com -useproxy http://user:pass@127.0.0.1:8080

Routes traffic through an authenticated HTTP proxy.

Link

Timeout and Throttling3

nikto -h http://example.com -timeout 10

Sets the connection timeout to 10 seconds.

Link
nikto -h http://example.com -maxtime 60s

Stops the scan entirely after 60 seconds.

Link
nikto -h http://example.com -pause 2

Waits 2 seconds between every request to reduce load.

Link

CGI and Specific Tests4

nikto -h http://example.com -Cgidirs /cgi-bin/

Forces scanning of a specific CGI directory.

Link
nikto -h http://example.com -Cgidirs none

Disables scanning of any CGI directories.

Link
nikto -h http://example.com -Cgidirs all

Forces scanning of all discovered directories as CGI directories.

Link
nikto -h http://example.com -root /app

Sets the root directory for the scan to a subdirectory.

Link

Mutation Techniques6

nikto -h http://example.com -mutate 1

Tests all files within all root directories.

Link
nikto -h http://example.com -mutate 2

Guesses password file names.

Link
nikto -h http://example.com -mutate 3

Enumerates user names using Apache home directory syntax (~user).

Link
nikto -h http://example.com -mutate 4

Guesses parameter values for common files.

Link
nikto -h http://example.com -mutate 5

Brute forces subdomains (requires the host to be an IP or name).

Link
nikto -h http://example.com -mutate 6

Guesses directory names using a dictionary.

Link

Advanced Configuration7

nikto -h http://example.com -config /path/to/nikto.conf

Uses a custom configuration file for the scan.

Link
nikto -h http://example.com -nolookup

Disables DNS name lookups.

Link
nikto -h http://example.com -nossl

Disables SSL completely.

Link
nikto -h http://example.com -no404

Disables 404 (Not Found) detection logic.

Link
nikto -h http://example.com -ignorecode 302

Ignores specific HTTP status codes during the scan.

Link
nikto -h http://example.com -404code 404

Ignores a specific HTTP code when determining 404 responses.

Link
nikto -h http://example.com -404string "Not Found"

Uses a custom string to identify 404 error pages.

Link

Plugin Control3

nikto -h http://example.com -Plugins apache_expect_xss

Runs only the specified plugin.

Link
nikto -h http://example.com -Plugins "@@NONE"

Runs no plugins (useful for just header checks or port verification).

Link
nikto -h http://example.com -dbcheck

Checks the syntax of the scan databases.

Link

Combined Real World4

nikto -h http://example.com -ssl -Cgidirs none -Tuning 9

Quick SQL injection scan over SSL ignoring CGI directories.

Link
nikto -h http://example.com -Tuning x 6

Scans for everything EXCEPT Denial of Service tests.

Link
nikto -h http://example.com -useragent "Mozilla/5.0" -evasion 1 -timeout 5

Stealthy scan with browser UA, URI encoding evasion, and short timeouts.

Link
nikto -h http://example.com -output scan.xml -Format xml -maxtime 300

Time-boxed 5-minute scan exporting directly to XML.

Link

Interactive1

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

Disables interactive features (like pressing space for status) for background jobs.

Link

Update1

nikto -update

Updates the Nikto plugins and databases (may require root).

Link

Multiple Targets2

nikto -h targets.txt

Scans multiple hosts listed in a text file.

Link
nmap -p80 192.168.1.0/24 -oG - | nikto -h -

Pipes Nmap grepable output directly into Nikto for scanning.

Link

Advanced Auth1

nikto -h http://example.com -id user:pass -realm "Restricted Area"

Authenticates to a specific realm using Basic Auth.

Link

Tuning Exclusion1

nikto -h http://example.com -Tuning x 6

Runs all tests except Denial of Service checks to prevent crashing the server.

Link

Header Customization1

nikto -h http://example.com -useragent "Googlebot/2.1"

Spoofs the User-Agent to appear as a Google crawler.

Link

Client Certificate2

nikto -h https://example.com -clientcert /path/cert.pem

Uses a client-side certificate for mutual TLS authentication.

Link
nikto -h https://example.com -clientkey /path/key.pem

Specifies the private key file for the client certificate.

Link

IPv6 Scanning1

nikto -h [dead:beef::1]

Scans a target specified by an IPv6 address.

Link

Host Header1

nikto -h 192.168.1.10 -vhost example.com

Scans an IP but sends a specific Host header for virtual host routing.

Link

Report Generation1

nikto -h http://example.com -o results.html -F html -o results.xml -F xml

Saves the report in both HTML and XML formats simultaneously.

Link

Red Team1

nikto -h http://example.com -evasion 1234 -pause 10

Highly evasive scan with multiple encoding methods and slow request delay.

Link

Blue Team Validation1

nikto -h http://example.com -Tuning 02 -Display V

Verbose scan focusing on uploads and misconfigurations for verification.

Link

Automated Pipeline1

nikto -h http://example.com -nointeractive -o scan.json -Format json

Non-interactive scan suitable for CI/CD pipelines producing JSON output.

Link

Port Definition1

nikto -h https://example.com -p 443 -ssl

Explicitly defines port 443 and forces SSL mode.

Link

Plugin Tuning1

nikto -h http://example.com -Plugins tests(report:500)

Passes specific arguments to plugins (e.g., reporting 500 errors).

Link

Quiet Scan1

nikto -h http://example.com -Display V -o /dev/null

Runs scan displaying verbose output to screen but discarding file output.

Link

Resume Scan1

nikto -h http://example.com -until 12:00

Runs the scan until a specified time.

Link

Force IP1

nikto -h example.com -force-ip

Forces Nikto to resolve the IP and scan the IP instead of hostname.

Link

Ignore Cookies1

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

Disables response caching to ensure fresh results.

Link

Metasploit Format1

nikto -h http://example.com -Format msf+

Outputs logs in a format compatible with Metasploit.

Link

Environment Variable1

NIKTO_IGNORE_CODE=404 nikto -h http://example.com

Uses environment variables to control configuration.

Link

Single Plugin Test1

nikto -h http://example.com -Plugins sitefiles

Runs only the sitefiles plugin to find backup files and zip archives.

Link

Advanced1

nikto -h http://example.com -mutate 3 -mutate-options user_list.txt

Enumerates users providing a custom user list for mutation.

Link

Full Comprehensive1

nikto -h http://example.com -Cgidirs all -Tuning 1234567890abc -format txt -output full_scan.txt

Runs every possible tuning category on all CGI directories saving to text.

Link