Nikto Output Formats

Detailed guide to Nikto's output formats and reporting capabilities

This guide covers Nikto's various output formats and reporting capabilities. Understanding these options will help you generate appropriate reports for different audiences and integrate Nikto results with other tools.

Available Output Formats

Nikto supports several output formats, each with specific use cases:

Text Format

The default plain text format is readable and suitable for quick analysis:

nikto -h example.com -o report.txt -Format txt

Sample Output:

- Nikto v2.1.6
---------------------------------------------------------------------------
+ Target IP:          93.184.216.34
+ Target Hostname:    example.com
+ Target Port:        80
+ Start Time:         2023-10-15 14:30:12 (GMT-4)
---------------------------------------------------------------------------
+ Server: ECS (dcb/7F84)
+ The anti-clickjacking X-Frame-Options header is not present.
+ The X-XSS-Protection header is not defined. This header can hint to the user agent to protect against some forms of XSS
+ The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ 7915 requests: 0 error(s) and 3 item(s) reported on remote host
+ End Time:           2023-10-15 14:35:27 (GMT-4) (315 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

Use Cases:

  • Quick analysis
  • Command line review
  • Log file integration
  • Simple documentation

Configuring Output Options

Basic Output Configuration

To save scan results to a file:

# Basic output to file
nikto -h example.com -o report.txt

# Specify format explicitly
nikto -h example.com -o report.html -Format htm

Multiple Output Formats

You can generate multiple output formats in a single scan:

# Using the report_* plugins
nikto -h example.com -Plugins "report_text;report_html;report_xml" -o nikto_report

This will create:

  • nikto_report.txt
  • nikto_report.html
  • nikto_report.xml

Controlling Output Content

Control what information is included in the output:

# Include only vulnerabilities
nikto -h example.com -o report.txt -Display 1

# Include vulnerabilities and information items
nikto -h example.com -o report.txt -Display 12

# Include full HTTP requests and responses
nikto -h example.com -o report.txt -Display V -show

Understanding Output Elements

Common Report Elements

All Nikto reports typically include:

  1. Scan Metadata

    • Target information (IP, hostname, port)
    • Scan start and end times
    • Nikto version
  2. Server Information

    • Server type and version
    • Detected technologies
  3. Findings

    • Vulnerabilities
    • Misconfigurations
    • Information disclosure
    • Each finding includes:
      • Description
      • URL/path
      • Reference IDs (OSVDB, etc.)
      • Severity indication
  4. Statistics

    • Number of requests
    • Number of findings
    • Scan duration

Severity Indicators

Nikto uses different indicators to show the severity of findings:

  • In text format: +, -, *, ! symbols
  • In HTML format: Color coding (red, yellow, green)
  • In structured formats: Severity fields or IDs

Working with Output Files

Post-Processing Reports

1
Extract Specific Information

Extract specific information from reports:

# Extract all URLs from a text report
grep "+" report.txt | grep -o "http://[^ ]*"

# Extract all vulnerabilities from a CSV report
awk -F, '{print $7}' report.csv
2
Convert Between Formats

Convert between different formats:

# Convert XML to JSON using tools like jq
cat report.xml | xml2json > converted.json

# Convert CSV to HTML using tools like csvkit
csvtohtml report.csv > converted.html
3
Filter and Sort

Filter and sort findings:

# Filter for specific vulnerabilities
grep "XSS" report.txt > xss_findings.txt

# Sort CSV by severity
sort -t, -k5,5 report.csv > sorted_report.csv

Integration with Other Tools

Vulnerability Management Systems

Integration with vulnerability management systems:

# Generate XML for import into vulnerability management systems
nikto -h example.com -o report.xml -Format xml

Many vulnerability management systems can import Nikto's XML or CSV output, including:

  • DefectDojo
  • ThreadFix
  • OWASP ZAP (via XML import)
  • Nessus (via CSV import)

Best Practices for Reporting

Choosing the Right Format

Select the appropriate format based on your needs:

  • Text: For quick analysis and command line review
  • HTML: For client reports and visual presentation
  • CSV: For data analysis and spreadsheet integration
  • XML/JSON: For integration with other security tools

Enhancing Reports

Improve the value of your reports:

  1. Add Context

    • Include scope information
    • Add business impact assessments
    • Prioritize findings based on risk
  2. Include Remediation Steps

    • Add specific remediation advice
    • Link to best practices
    • Provide code examples where applicable
  3. Track Changes Over Time

    • Compare with previous scans
    • Highlight new and resolved issues
    • Track security posture improvements

Next Steps

Now that you understand Nikto's output formats, explore the following topics: