Performing network discovery and security audits with Nmap

I was looking at a software to perform network discovery and security audits, where I discovered the open source utility Nmap (, OK I was already aware of it!

I was looking to install Nmap on an Ubuntu operating system, which requires the following to be run:

apt-get install nmap

I also required the ability to create HTML reports from the XML output, so I also installed xsltproc (

apt-get install xsltproc

Nmap is quite simple to run from the command line interface to scan either single IP addresses, IP address ranges or network subnets, below are number of commands you can use, where -oX outputs the file to .xml format.

To perform an intense scan of the target IP address

nmap -T4 -A -v -oX <filename>.xml

To perform a quick scan of the subnet

nmap -T4 -F -oX <filename>.xml

To perform a slow comprehensive scan of the IP address range

nmap -sS -sU -T4 -A -v -PE -PP -PS80,443 -PA3389 -PU40125 -PY -g 53 --script "default or (discovery and safe)" -oX <filename>.xml

As mentioned previously I require to create HTML reports from the XML output, which can be achieved by using xsltproc to convert the output generated in Nmap into a readable format for review.

xsltproc <filename>.xml -o <filename>.html

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s