Refresher Guide Nmap
Refresher Guide Nmap
Nmap is a tool used for determining the hosts that are running and what services
the hosts are running. Nmap can be a valuable diagnostic tool for network administrators
while they can be also a potent reconnaissance tool for the Black-hat community
(Hackers, Crackers, Script Kiddies, etc). Once the network is charted out using tools like
Lan MapShot, the Nmap can be used to determine the type of services and hosts running
in the network.
Primary Uses of Nmap
1. Determining open ports and services running in an host:
2. Determine the Operating System running on a host
3. Alter the source IP of the scan (One way is to use S option)1
Nmap using Redhat 9.0
In the Cyberdefense lab scenario, it is recommended that Nmap be run from a
Redhat Linux machine. Nmap can be run from a terminal using command lines or it can
be run using a front end. Using the front end is more user-friendly. It also automatically
shows the command being used. More information on Nmap can be obtained from the
manual pages of Redhat using the command man nmap.
3
4
The figure shows the Nmap front end in the Fedora Core 2 which is very similar
to the one in Redhat 9.0.
5. Once the front end opens (Refer to Figure 2), the Target host IP could be entered
for scanning (Callout 1 in Figure 2). The command used for scanning s also
shown in the front end (Callout 2 in Figure 2).
The Nmap was run on the gateway server that is protected by IPTables firewall.
Nmap identifies the ports scanned as filtered (Callout 3 in Figure 2). The major
The Nmap identifies the open ports, the services, and the flavor of operating
system running on the host.
2
3
www.insecure.org
Currently the downloadable version is nmap-3.75
The figure shows Nmap run on a host with IP 172.16.4.34 from a Windows
machine (Callout 1 in Figure 4). The make of the computer and the MAC or the
NIC s physical address is also detected (Callout 2 in Figure 4).
3. TCP FIN Scanning: FIN packets tend to be undetected by firewalls and packet
filters. TCP property forces closed port to respond with a RST packet to a FIN
packet. This property is used for scanning to determine the open and closed ports.
4. Fragmentation Scanning: The TCP header of the probe packet is spilt to smaller
packets making it difficult for detection. But beware that this kind of scanning can
cause many programs to be unstable.
5. ICMP Port Unreachable Scanning: The scan uses the property of the closed port
sending ICMP_port_unreachable error message for closed port for detection.