Understanding Nmap outputs

Nmap displays results based on the responses it receives from the remote hosts. The more hosts that are scanned, the more complex the results are that are printed on the screen. Analyzing these results when printed in terminal or Command Prompt becomes impossible when the number of hosts increases. In order to solve this problem, Nmap supports various reporting formats which can be used as per the user's requirements. One of the simplest ways to store Nmap's output is to use a  >> operator followed by a text file name such as output.txt. This will allow Nmap to forward all the contents to that text file. Even the content of a text file becomes a nightmare to analyze for 10+ hosts. Nmap also gives a lot of verbose and debug information, along with a port scan, which can complicate this process even more. The operating system's detection and fingerprinting adds a lot more junk to this data.

The following command is used to run a SYN scan on the IP address 192.168.75.128 and store the output displayed to the output.txt file. This file can be found in the C:\Users\admin folder since Command Prompt is running in the same folder. Furthermore, you can store this file anywhere by just mentioning the absolute path of the file in double quotes:

Nmap –sS –Pn192.168.65.128>> output.txt

Let's see how the result can be copied to a text file by going through the following screenshots:

Navigate to the Nmap installation folder and locate the output.txt file:

You can open this file using any text editor. I personally recommend Notepad++ as it allows you to perform complex analysis on text files and displays them in a segregated manner:

Nmap allows a user to define the output format using command-line flags. The following lists explains the different flags that are allowed by Nmap:

Nmap also provides various other details as part of the scan results, some of which can be controlled by the verbosity options that are available. The following are the few extra pieces of data that are produced by the verbose option:

Some of the options that can be used along with the verbose ones to control the data displayed in the output are as follows: