Nmap Host Discovery with Examples

RSS
FACEBOOK
FACEBOOK
PINTEREST
PINTEREST
LINKEDIN
INSTAGRAM

Nmap is popular tool used by pentesters, system administrators and network administrators. Nmap provides a lot of features for free. In this tutorial, we will look host discovery features and options of nmap.

Discover with Ping Scan

One of the basic usages for Host discovery is Ping scan. Ping uses ICMP protocol to communicate with targets. Targets generally responses Ping r ICMP requests which show the remote system is up. In some cases, a firewall can block Ping or ICMP packets where we can not get remote system status.

Discover with Ping Scan

Discover with Ping Scan

As we can see from the result that 1 IP address or Host is up.

Discover with ARP Scan or ARP Ping

Ethernet or Mac is a protocol used to communicate between host in a network. If the target is in the same network segment with us we can scan remote systems with ARP scan. ARP scan will send ARP request to the IP addresses and if remote systems respond to this ARP requests this means it is up. This is the most reliable Host scan technique for the local network segment. This can not be prevented from regular firewalls.

Discover with Port Scan

Another useful technique is port scan. If the target has enabled Firewall and not in the same network with us we can use some port scan to detect Host status. We will provide generic ports numbers where the host will answer our request if it is up. We will scan ports 22,23,80,139,445,3389,8080  to detect remote host.

LEARN MORE  How To Pass and Parse Linux Bash Script Arguments and Parameters

Discover with Port Scan

Discover with Port Scan

Bash Script To List Live IP Addresses

If we only want IP addresses and clear other text data we can use some scripting for this. We will use grep and sort commands to filter only IP addresses.

Bash Script To List Live IP Addresses

Bash Script To List Live IP Addresses

We can also redirect this output into a file like below.

RSS
FACEBOOK
FACEBOOK
PINTEREST
PINTEREST
LINKEDIN
INSTAGRAM

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)