What Is Nmap
What Is Nmap
What Is Nmap
Many systems and network administrators are used for managing network
inventory, service upgrade schedules, monitoring hosts and service uptime.
Nmap Definition
At the top-level, Nmap is defined as a tool that can detect or diagnose services that
are running on an Internet-connected system by a network administrator in their
networked system used to identify potential security flaws. It is used to automate
redundant tasks, such as monitoring the service.
Working of Nmap
Nmap is convenient during penetration testing of networked systems. Nmap
provides the network details, and also helps to determine the security flaws present
in the system. Nmap is platform-independent and runs on popular operating
systems such as Linux, Windows and Mac.
It is effortless to work with the Nmap. With the release of a new graphical user
interface called GenMap User, it performs many tasks such as saving and comparing
scan results, scanning the results in a database, and visualize the network system
topology graphically, etc.
Advantages of Nmap
Nmap has a lot of advantages that make it different from other network scanning
tools. Nmap is open-source and free to use.
Essential skills
Nmap offers various technologies to scan the networks, such as TCP Connect
scanning, FTP bounce scanning, TCP reverse identification scanning, etc. to scan the
Network. One should start with Nmap to learn all of the techniques.
Nmap is used for regular network audits. Nevertheless, it can perform redundant
tasks such as managing network inventory, scheduling service upgrades, and
monitoring various uptime and downtime services.
It also lists the status of services such as open, filtered, unfiltered or closed.
The output is extended to reverse operating system type, MAC address, device
type, and also DNS names.
TCP Scan
UDP Scan
The UDP scan is used to check if there is a UDP port and listening for incoming
requests to the target the machine. Unlike the TCP, UDP has no mechanism to react
with positive acceptability, so there is a chance for false-positive scan
results. UDP scans are used to reveal Trojan horses, which run on a UDP port or to
reveal the hidden RPC services. These scans are slow because the machines slow
down their responses to such traffic as a precaution.
SYN Scan
It is another form of TCP scan. Nmap crafts a sync packet, the first packet sent to
establish is a TCP connection.
ACK Scan
ACK scans are used to determine a particular port that has been filtered. It proves to
be extremely helpful when trying to check for firewalls and their current regulations.
Bang Scan
The bang scan is like SYN scans. It sends the TCP fin packet instead of RST packet
(reset packet) if it receives the input so that false scans and negativity are seen in the
scan. But it may be under the radar of some IDS programs and many
countermeasures.
Full Scan
The null scan is very secretive, and as the name suggests what they do - they set all
header fields to zero. It is not a valid packet, and targets will not know how to deal
with packet.
Xmas Scan
Computers running windows will not respond to X MAS scans due to the way they
implement their TCP stack. A set of flags triggered within a scanning packet derives
its Name that is sent for scanning. XMAS scans are used to manipulate PSH,
URG and FIN flags in TCP headers.
RPC Scan
RPC scans are used to search for machines that respond to Remote Procedure Call
services (RPC). It allows remote to run on a particular machine under a particular set
of connections. The RPC service can run on various ports. Therefore, regular scans are
challenging to detect if RPC services are running.
IDE Scan
IDE scan is the most secure scan as packets are bounced from external hosts. Control
is not required on the host, but the host must fulfil a specific set of conditions.
Nmap Functions
1. Ping Scanning
The ping scanning gives information about every active IP on your Network. We can
perform a ping scan by using the below command:
1. #nmap-sn<target>
2. -PS/PA/PU/PY[portlist]: TCP SYN/ ACK, UDP or SCTP discovery to given ports.
2. Port Scanning
Port scanning is one of the most popular forms of reconnaissance ahead of a hack,
helping attackers determine which ports are most susceptible.
3. Host scanning
Host scanning provides a detailed description of a particular host or IP address. As
mentioned above, you can scan a host using the following command:
4. OS Scanning
OS scanning is the most powerful feature of Nmap. It sends TCP and UDP packets to
a port and analyzes the response when using this type of scan. It compares the
response to a database of operating systems and returns information on a host's OS.
To run the OS scan, use the command, given below:
Replace "20" with the number of ports you want to scan. It gives a brief output that
details the most common ports status and allows you to see if you have any
unnecessarily open ports.
6. Output to a file
If we want the output of results of Nmap scan of any file, you can add an extension
to the command.
1. Add:-oN output.txt
1. -oX output.xml
For example, add-en to turn off the DNS resolution for the required ping scans.