Getting ready
In order to perform this activity, you will have to satisfy the following prerequisites on your machine:
- Install Nmap.
- Provide network access to the hosts on which the scans are to be performed.
In order to install Nmap, you can follow the instructions provided in Chapter 2, Understanding Network Scanning Tools. This will allow you to download a compatible version of Nmap and install all the required plugins. In order to check whether your machine has Nmap installed, open Command Prompt and type Nmap.
If Nmap is installed, you will see a screen similar to the following screenshot:
If you do not see this screen, retry the step by moving the Command Prompt control into the folder where nmap is installed (C:\Program Files\nmap). If you do not see the screen even after doing this, remove and reinstall nmap.
To populate the open ports on hosts for which the scan is to be done, you are required to have network-level access to that particular host. A simple way to check whether you have access to the particular host is through ICMP by sending ping packets to the host. But this method works only if ICMP and ping is enabled in that network. If ICMP is disabled, live host detection technique varies, and we will see this in How do it.. sections of this recipe.
The prerequisites for this recipe are common to all the other recipes in this chapter.