01DDT20F1011 - Lab - Exploring Nmap
01DDT20F1011 - Lab - Exploring Nmap
DDTS5
Objectives
Part 1: Exploring Nmap
Part 2: Scanning for Open Ports
Background / Scenario
Port scanning is usually part of a reconnaissance attack. There are a variety of port scanning methods that
can be used. We will explore how to use the Nmap utility. Nmap is a powerful network utility that is used for
network discovery and security auditing.
Required Resources
• CyberOps Workstation virtual machine
• Internet access
Instructions
♥ 2017 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 6 www.netacad.com
What is Nmap?
- Nmap is used to scan a network and determine the available hosts and
services offered in the network. Nmap is often used in security audits to
discover open ports, network inventories, and network vulnerabilities.
♥ 2017 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 6 www.netacad.com
Lab - Exploring Nmap
d. While in the man page, you can use the up and down arrow keys to scroll through the pages. You can
also press the space bar to forward one page at a time.
To search for a specific term or phrase use enter a forward slash (/) or question mark (?) followed by the
term or phrase. The forward slash searches forward through the document, and the question mark
searches backward through the document. The key n moves to the next match.
Type /example and press ENTER. This will search for the word example forward through the man page.
e. In the first instance of example, you see three matches. To move to the next match, press n.
Look at Example 1.
♥ 2017 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 6 www.netacad.com
Lab - Exploring Nmap
f. Scroll through the page to learn more about nmap. Type q when finished.
♥ 2017 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 6 www.netacad.com
Lab - Exploring Nmap
♥ 2017 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 6 www.netacad.com
Lab - Exploring Nmap
For each of the open ports, record the software that is providing the services.
a. At the terminal command prompt, enter ip address to determine the IP address and subnet mask for this
host. For this example, the IP address for this VM is 10.0.2.15 and the subnet mask is 255.255.255.0.
[analyst@secOps ~]$ ip address
<output omitted>
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP
group default qlen 1000
link/ether 08:00:27:ed:af:2c brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3
valid_lft 85777sec preferred_lft 85777sec
inet6 fe80::a00:27ff:feed:af2c/64 scope link
valid_lft forever preferred_lft forever
♥ 2017 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 6 www.netacad.com
Lab - Exploring Nmap
b. To locate other hosts on this LAN, enter nmap -A -T4 network address/prefix. The last octet of the IP
address should be replaced with a zero. For example, in the IP address 10.0.2.15, the .15 is the last
octet. Therefore, the network address is 10.0.2.0. The /24 is called the prefix and is a shorthand for the
netmask 255.255.255.0. If your VM has a different netmask, search the internet for a “CIDR conversion
table” to find your prefix. For example, 255.255.0.0 would be /16. The network address 10.0.2.0/24 is
used in this example
Note: This operation can take some time, especially if you have many devices attached to the network. In
one test environment, the scan took about 4 minutes.
[analyst@secOps ~]$ nmap -A -T4 10.0.2.0/24
♥ 2017 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 6 www.netacad.com
Lab - Exploring Nmap
From your Nmap results, list the IP addresses of the hosts that are on the same LAN as your VM. List
some of the services that are available on the detected hosts.
- ssh
- telnet
♥ 2017 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 6 www.netacad.com
Lab - Exploring Nmap
- This site allows users to learn about Nmap and test their Nmap installation.
♥ 2017 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 6 www.netacad.com
Lab - Exploring Nmap
- Ubuntu Linux
♥ 2017 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 10 of 6 www.netacad.com
Lab - Exploring Nmap
Reflection Question
Nmap is a powerful tool for network exploration and management.
1. How can Nmap help with network security?
- Internet security companies can use Nmap to scan a system and understand what weaknesses
exist that a hacker could potentially exploit.
4. Explain the ways used by cybersecurity analysts to identify the assets, vulnerabilities and threats.
- Make a cyber risk assessment as risk assessments used to identify, estimate, and prioritize
risk to organizational operations, organizational assets, individuals, other organizations, and
the nation as a result of the operation and use of information systems.
♥ 2017 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 11 of 6 www.netacad.com