Identifying network hosts
There are various methods we can use to scan for hosts on internal or external networks. We will explore some of these in detail. We will use nmap for several examples in this section. TCP port scans are default within nmap as most of our well-known servers running using TCP. However, from a penetration standpoint, there are some very useful UDP ports that might be open that could provide us with attack vectors such as SNMP.
Getting ready
Let's ensure the following prerequisites:
- Kali Linux is running and you are logged in as root
- Bring up your other test machines (Metasploitable and Windows)
- Validate network connectivity to the network you plan on scanning
How to do it...
We will use nmap and various command line options to perform a variety of different scans:
- Open the terminal screen by clicking on the terminal icon:

- From the main terminal screen, you should be at a Command Prompt of
root@kali:~#
.
- Type
nmap
and press Enter. A list of options should fill the screen; briefly...