Scanning a Host with NMAP

30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

In this lab, we’ll use a well-known network and host scanning tool named NMAP to scan a host for open ports and attempt to identify which services are running on those ports.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Install NMAP.
  1. Switch from the cloud_user account to root by running sudo su and entering the cloud_user password.
  2. Run the command apt-get update.
  3. Run the command apt-get install -y nmap.
Scan the localhost with NMAP and output results to a file named `scan.txt`.

Run the following command: nmap -sV localhost -oN scan.txt

Additional Resources

You are tasked to scan a host using NMAP to identify what services are running on the host. Since this host is isolated from the rest of the network, you will need to log into the host, install NMAP, and scan it with localhost and not an IP address.

You need to export the NMAP findings to a normal file named scan.txt, which will later be reviewed by the system's owner to check for any services that shouldn't be running.

Connecting to the lab:

  1. Connect to the lab host using SSH (ssh [email protected]). Use the lab provided public IP address and generated password for cloud_user.
  2. Log in with the username and password generated by the lab.

NOTE: This is an introduction to NMAP lab. The CySA+ exam does not delve deep into NMAP. If you would like to learn more about NMAP, we offer an NMAP Deep Dive lesson in the Pentest+ course as well as 3 additional NMAP labs.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?