Skip to content

07. Nmap Output and Verbosity

Nmap Output Options

  1. nmap 192.168.1.1 -oA <filename>

    • Purpose: Saves the scan results in all three major formats simultaneously: Normal (.nmap), XML (.xml), and Grepable (.gnmap).
    • Usage: Useful for comprehensive reporting, as you get all output formats in one command.
    • Output:
      • <filename>.nmap - Normal output for human-readable results.
      • <filename>.xml - XML output for use in automation scripts or tools.
      • <filename>.gnmap - Grepable format for quick search and parsing.
    • nmap 192.168.1.1 -oN <filename>

    • Purpose: Saves the scan results in Normal human-readable format.

    • Usage: Best for manual analysis or reading results as plain text.
    • Output: A single file <filename> with the .nmap extension.
    • nmap 192.168.1.1 -oG <filename>

    • Purpose: Saves the scan results in Grepable format.

    • Usage: Ideal for quickly extracting specific information using command-line tools like grep, awk, or cut.
    • Output: A single file <filename> with the .gnmap extension.
    • nmap 192.168.1.1 -oX <filename>

    • Purpose: Saves the scan results in XML format.

    • Usage: Useful for automation, integration with tools like Metasploit or custom scripts.
    • Output: A single file <filename> with the .xml extension.

Nmap Verbosity Levels

  1. nmap -v 192.168.1.1

    • Purpose: Runs the scan with low verbosity.
    • Effect: Displays minimal real-time output during the scan process.
    • Use Case: If you want to monitor basic progress and results.
    • nmap -vv 192.168.1.1

    • Purpose: Runs the scan with medium verbosity.

    • Effect: Provides detailed information about scan progress, including additional details like timing and host discovery.
    • Use Case: For more insights into what Nmap is doing without overwhelming output.
    • nmap -vvv 192.168.1.1

    • Purpose: Runs the scan with high verbosity.

    • Effect: Displays the most detailed output, including every action Nmap performs during the scan.
    • Use Case: Debugging or deeply analyzing how Nmap interacts with the target.

Key Takeaways

  • -oA is ideal for saving all types of outputs when you need multiple formats.
  • -oN, -oG, and -oX are single-format options, each suited for specific use cases.
  • Verbosity (-v, -vv, -vvv) controls the level of detail displayed during the scan.

These commands help tailor Nmap's behavior to your specific needs in penetration testing or network reconnaissance.