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

Blind SQL Injection Tutorial to Hack a Website

In the previous article, we have the basics of SQL Injection; what SQLi is and what are the types of SQL injection. And, In...

What is SQL Injection? Tutorial: Type and Example

What is SQL injection, and what are the types of SQL injection? These are the common questions, and we will seek the answer to...

Are Cisco 300-410 Exam and Its Related Certification Your Pathway to Career Success? Find Out about This

Introduction Career success can mean different things to different people. For some, it could mean having a prestigious title and for others, it could be...

How to Hack Windows 10 Password Using FakeLogonScreen in Kali Linux

This article demonstrates an in-depth guide on how to hack Windows 10 Passwords using FakeLogonScreen. Hacking Windows 10 password is an exciting topic and...

LOOKING FOR HACKING RECIPES FORM THE PRO?

Then sign up for FREE to the ehacking’s exclusive group. You will get the exclusive tips/tricks, tutorials, webinars & courses that I ONLY share with my fellow on this exclusive newsletter.