Using NMAP for Scanning Networks.docx
Using NMAP for Scanning Networks.docx
● The ARP ping scan probes ARP request to target host; an ARP
response means that the host is active.
UDP Ping Scan:
● In the terminal window, type command: “nmap -sn -PU
[Target IP Address]”, (here, the target IP address is
192.168.1.8) and press Enter.
● For UDP scanning you need to be in root terminal. Use
Command: “sudo su -” for switching into root terminal.
● The result will display the number of hosts are up within the
ranged IP .
ICMP Timestamp Ping Scan:
● In the terminal window, type command: “nmap -sn -PP
[Target IP Address]”, (here, the target IP address is
192.168.1.8) and press Enter. The scan results appear,
indicating the target Host is up, as shown in the screenshot.
● Note: -PP: performs the ICMP timestamp ping scan.
● Note: ICMP timestamp ping is an optional and additional type
of ICMP ping whereby the attackers query a timestamp
message to acquire the information related to the current
time from the target host machine.
● Note : -sT : performs the TCP Connect/full open scan and -v:
enables the verbose output(include all hosts and ports in the
output).
● After hitting you will see the following results appearing as
shown in the screenshot.
● This displays all the open TCP ports and services running on
the target machine.
● It also displays the ports, protocol, state, service and version
of the scan.
● Now in the command terminal use command: nmap -sS -v
[Target IP Address]
● Note: -sS: performs the Stealth Scan/TCP half-open scan and
-v: enables the verbose output (include all hosts and ports in
the output).
● The following result appears as shown in the screenshot.
● In the command terminal, type the command: nmap -sX -v
[Target IP Address]
● -sX: performs the Xmas scan and -v: enables the verbose
output (include all hosts and ports in the output).
● Note: Xmas scan sends a TCP frame to a target system with
FIN, URG, and PUSH flags set. If the target has opened the
port, then you will receive no response from the target
system. If the target has closed the port, then you will receive
a target system reply with an RST.
● Using this command shows the following result.
● In the Command field, type the command : nmap -sM -v
[Target IP Address]
● Note: -sM: performs the TCP Maimon scan and -v: enables the
verbose output (include all hosts and ports in the output).
● In the TCP Maimon scan, a FIN/ACK probe is sent to the
target; if there is no response, then the port is Open |
Filtered, but if the RST packet is sent as a response, then the
port is closed.
● After scanning it shows the following results as shown in the
screenshot.
● After this when you switch to the wireshark then you will
observe fragmented packets captured by the wireshark. As
shown in the screenshot.
● Now switch to the Kali-Linux virtual machine.
● In the terminal windows type command : nmap -g 80 [Target
IP Address]
● Target IP Address = 192.168.1.8
● Note: In this command, you can use the -g or -- source-port
option to perform source port manipulation.
● Note: Source port manipulation refers to manipulating actual
port numbers with common port numbers to evade
IDS/firewall: this is useful when the firewall is configured to
allow packets from well-known ports like HTTP, DNS, FTP, etc.
● Now hit enter to view the results.
● Now the result appears displaying all open TCP ports along
with the name of the services running on the port.
● Switch to the Windows server 2019 virtual machine (target
machine). In the Wireshark window, scroll-down and you can
observe the TCP packets indicating that the port number 80 is
used to scan other ports of the target host, as shown in the
screenshot.