Using Nmap to perform host discovery (layers 2/3/4)
Network Mapper (Nmap) is one of the most effective and functional tools in Kali Linux. Nmap can be used to perform a large range of different scanning techniques and is highly customizable. This tool will be addressed frequently throughout the course of this book. In this recipe, we will discuss how to use Nmap to perform layer 2 scanning with ARP, layer 3 scanning with ICMP, and layer 4 scanning utilizing TCP/UDP.
Getting ready
To use Nmap to perform ARP discovery, you will need to have at least one system on the LAN that will respond to ARP requests. In the examples provided, a combination of Linux and Windows systems are used. For more information on setting up systems in a local lab environment, refer to the Installing Metasploitable2 and Installing Windows Server recipes in Chapter 1, Getting Started.
Using Nmap to perform layer 3 and layer 4 discovery does not require a lab environment, as many systems on the Internet will reply to ICMP...