After this lesson, you will be able to: Use Nmap to scan a network for open ports and services, and interpret the results.
Before you can manage vulnerabilities, you have to know what's there. Nmap is the universal tool for discovering hosts, ports, and services. This lesson teaches the most common scans and what their output means.
Nmap sends crafted network packets to target hosts and watches the responses. From those responses it figures out: which hosts are up, which ports are open, what software is listening on them, and (often) which OS the host is running. It's a flashlight in a dark room, you can't fix problems you can't see.
These are the scans you'll run in real engagements. Always run on systems you own or have written permission to scan.
# Quick discovery, which hosts are up?nmap -sn 192.168.1.0/24# Top 1000 TCP ports on a hostnmap example.com# Service + version detection (slower)nmap -sV example.com# Full port range + scriptsnmap -p- -sV --script default example.com# OS detectionnmap -O example.com
Run an Nmap scan in a safe lab environment.
Sign in to TryHackMe and start the free 'Nmap' room
Connect to the VPN as the room instructs
Run an SYN scan against the target machine: nmap -sS <target-IP>
Identify the open ports and the running services
Record what you found and submit it to the room's questions
Open = the service is listening and reachable. Closed = no service, but the host responded. Filtered = a firewall is blocking the probe. Service columns show what software is running and often the version, this is what you cross-reference against the NVD to find known vulnerabilities.
Choose the best one-liner.
Sign in and purchase access to unlock this lesson.