Using Nmap to find open ports
Network Mapper (Nmap) is a security scanner written by Gordon Lyon. It is used to find hosts and services in a network. It first came out in September 1997. Nmap has various features as well as scripts to perform various tests such as finding the OS, service version, brute force default logins, and so on.
Some of the most common types of scan are:
- TCP
connect()
scan - SYN stealth scan
- UDP scan
- Ping scan
- Idle scan
How to do it...
The following is the recipe for using Nmap:
- Nmap is already installed in Kali Linux. We can type the following command to start it and see all the options available:
nmap -h
The following screenshot shows the output of the preceding command:
- To perform a basic scan we use the following command:
nmap -sV -Pn x.x.x.x
The following screenshot shows the output of the preceding command:
-Pn
implies that we do not check whether the host is up or not by performing a ping request first. The-sV
parameter is to list all the running services on...