Top Commands of Nmap
Top Commands of Nmap
Nmap is short for network mapper. It has been the go to tool for network mapping, port scanning and vulnerability checking. Despite being introduced a few decades ago, it is still a hugely popular and sought after tool. In this article we’ll look at some of the useful commands in it.
Scanning a range of IP addresses.
In this command a range of IP addresses will be scanned in one go, which in this case
would be 10.0.2.15 to 10.0.2.30

Scanning a range of IP addresses, excluding host(s)
In this command, a range of IP addresses would be scanned as above command, but in
this example, an IP address would be excluded from the scan.

Scanning IP addresses/hosts from a list
In this command, scanning would be done on a list of IP addresses/hosts which are saved in a file

Saving Nmap results to a file
Opposite of example 3, through this command, we are able to save scans’ results to a
file. First command is to get it saved in .txt format and second in .xml format.


Scanning all possible ports
Total number of ports that are available out there would be 65532. In this command, all
these possible ports would be scanned on the specified host.

Scanning of top ports
In this command, top ports would be scanned on the specified host

Identifying open ports on a targeted device
All the opened ports on the host would be shown through this command

Status of a port range
Through this command, specified port range would be showing it’s status on the host

Scanning specific port
This command would be scanning tcp port 80 on the specified host

This command would be scanning udp port 53 on the specified host

Identification of service version
This command would help us in identifying the service version on the specified host

A quicker identification of service version
This command is an alternative to example 10 above, in this it would do the detection
quicker with the help of -T4

CVE Detection
One of Nma[‘s greatest features is its “Nmap Scripting Engine” (better known as NSE). It comes with a predefined set of scripts and it’ll help in automating system and
vulnerability scans.

Conclusion
Nmap is useful in finding useful information about networks, ports, hosts and operating systems. I’d suggest to better understand and to better utilize this tool's commands, it's best to get more hands on practice on it.