Lab Complete!

You found a hidden port with nmap.

LABS / nmap recon
BEGINNER
Tasks
What is nmap?

nmap (Network Mapper) is a free tool that checks which computers are online and which ports on them are listening. It is usually the first step of recon: learning what is on a network before you test it.

Think of a building: The computer is the building. Each port is a numbered door. nmap walks past every door and notes which are open, which are locked, and which are hidden behind a guard.
Port states

Every port you scan comes back with one of three answers:

WHAT NMAP REPORTS
open = a service answered
closed = host replied "nothing here"
filtered = firewall, no reply
How a scan works
BASIC SCAN FLOW
You
Probe ports
Target replies
Open / closed / filtered
nmap 192.168.1.10

That is the whole basic command: nmap plus a target. By default it checks the 1,000 most common ports, not all of them. Remember that for later.

Flags you will use
FlagWhat it does
-snOnly check if the host is alive
-sVIdentify software and version
-p-Scan all 65,535 ports
-p 80,443Scan chosen ports only
-OGuess the operating system
-T4Scan faster
Permission first: Only scan devices you own or are allowed to test. Scanning others can be illegal. This lab uses a fake, simulated target.
Mission: Map the lab server at 192.168.1.10 and find the service hiding on a port the default scan misses.
1
Run your first scan
Use the Terminal on the right to scan the target with a plain nmap command. Note which ports are open.
2
Find out what is running
Open ports show a service name, but not always the software. Add the flag that detects versions.
3
Find the hidden port
The default scan checks only common ports. Scan every port and look for one that was not in your first result.
4
Submit the flag
Version detection on the hidden port reveals a flag. Paste it in the flag box at the bottom right.
Try first, then peek. Each hint nudges you without giving the answer away.
Check the Theory tab flag table. One flag starts with -s and ends with a capital V. Add it before the IP address.
Default scans check only the top 1,000 ports. A service on an unusual port will not appear. Which flag tells nmap to check every port?
Flags can be stacked in one command: nmap flag1 flag2 target. Use both ideas from hints 1 and 2, then read the VERSION column.
Stuck after trying? Reveal the walkthrough below.
lab@recon ~ nmap
$
Live Command Breakdown
Start typing a command to see what each part does...
Waiting for input
Common ports: knowing these helps you read scan results fast.
PortServiceUsually
21FTPFile transfer
22SSHRemote login
53DNSName lookups
80HTTPWebsite
443HTTPSSecure website
3306MySQLDatabase
8080HTTP-altProxy or admin site