What is Nmap? How to use Nmap for Information Gathering

Nmap stands for Network Mapper, a powerful network scanning and host detection tool that is being used to perform reconnaissance in a very first step of penetration testing. It does not only gather information about the target or conduct enumeration to find potential attack vectors, but also has an ability to be used as a security scanner.

This makes this utility a multipurpose tool having flexibility to run on different operating systems including Linux. Windows and Mac. In most famous Linux penetration testing distributions namely Kali Linux and Parrot OS, nmap comes pre-installed. We can simply list down its capabilities as:

  1. It detects live host on a network
  2. It used to perform port scanning on the host
  3. It also detects what service is on at the targeted port
  4. It identifies the hardware address along with operating system and software version
  5. It helps to find vulnerability of the target

To download this tool just browse the address https://nmap.org/ which is the official website.

After the download and installation process complete, launch the tool by typing “nmap” in the command prompt, or if you are using a pentesting distro like Parrot OS or Kali Linux, launch it from the information gathering section.

nmap

You will see a detailed manual where all the commands and operations are explained to help you perform target scanning. At the end of the manual you will also find some examples to follow.

perform target scanningBasically, nmap is not a stealthy tool, and easily detectable by firewalls. Servers would get notified that they have been scanned so the real charm of nmap is how to perform scanning anonymously.

There are some useful commands to utilize this tool for stealthy scanning, but just for learning the basic commands we will use a free testing scanning machine given by nmap as shown in the example section: http://scanme.nmap.org/

Nmap allows you to scan this website as educational purpose so we will use this as our target machine.

Nmap allowsLet us just observe the first command in the example of the manual:

# nmap -v -A scanme.nmap.org

The parameter -v here specifies the address name and version number of the server while -A enables the Aggression mode which specifies OS detection, version detection, script scanning and traceout.

Another big advantage of using nmap is it allows users to write (and share) simple scripts and automate a wide variety of networking tasks. The scripts are compiled in Lua Programming language allowing users to discover the target’s vulnerabilities more effectively.

Nmap also provides an interactive GUI interface named as Zenmap an official Nmap Security Scanner GUI aims to provide the amateur pentesters an easy platform, practice more advance features of nmap while saving the scan results which can be viewed later. These results can also be compared to another to see the differences among them. The results of recent scans are stored in a searchable database.

searchable databas

Conclusion

Reconnaissance is the very first step of penetration testing and to perform it wisely, you need to grip on some amazing tools to get fruitful results. Nmap is one of those tools that every pentester must learn and be expert on it.

This article gives the basic know how of the usage of nmap. There are so many other things that you can do with the Nmap, and we will discuss them in the future articles.

Ehacking Staff
With more than 50 global partners, we are proud to count the world’s leading cybersecurity training provider. EH Academy is the brainchild of Ehacking, which has been involved in the field of training since the past Five years and continues to help in creating professional IT experts.

Most Popular

The Complete OSINT Tutorial to Find Personal Information About Anyone

This article mainly focuses on how to discover a person's digital footprint and gather personal data by using open-source intelligence (OSINT). So, in its...

How to find the password of hacked email addresses using OSINT

Open-source intelligence or OSINT is a potent technique, and it can give a lot of valuable information, if implemented correctly with the right strategy...

How to Identify Company’s Hacked Email Addresses Using Maltego & HaveIbeenPawned

This article is part of the Maltego OSINT tutorial, where you will learn to identify the already hacked account, and it’s password using the...

5 Key Vulnerabilities in Global Payroll

The cyber threat against payroll is growing in sophistication and frequency, according to the latest FBI cybercrime report. Many of these attacks exploit fixable...