Nmap Simulator
PenTest+ PBQs do not ask you to recite Nmap flags — they hand you a scenario and real scan output and expect you to work like a tester: build the right command (Adding Nmap Scan Capabilities) and then read what came back (Reading Nmap Scan Output). This simulator trains both halves. Pick a mission, build a command from real flags — or type it yourself — run it, and answer questions on your own output.
Step 1 — Pick your mission
Step 2 — Build the command
Tap flags to add or remove them. The command line below is live — you can also type in it directly, exactly as you would in a real terminal.
Timing template (optional — quieter on the left, faster on the right):
The flags in this lab
| Flag | What it does | When to use it |
|---|---|---|
| -sS | TCP SYN (half-open) scan — sends SYN, reads the reply, never completes the handshake | The default scan type with root privileges; the quiet general-purpose choice |
| -sT | TCP connect scan — completes the full three-way handshake | When you lack raw-socket privileges; noisier and easily logged |
| -sV | Service and version detection — probes each open port and fills the VERSION column | Whenever you need to know exactly what is listening, e.g. to spot a vulnerable build |
| -sU | UDP port scan (this lab simulates TCP; -sU is covered here for the exam) | To find UDP services such as DNS, SNMP and TFTP that TCP scans never see |
| -O | OS detection — fingerprints the target's TCP/IP stack | To identify the operating system family and version of a host |
| -sC | Runs the default NSE script set against open ports | For quick extra detail (banners, titles, common checks) without picking scripts by hand |
| -A | Aggressive scan — turns on -O, -sV, -sC and traceroute together | When you want everything at once and stealth does not matter |
| -Pn | Skips host discovery — treats every target as online | When a host blocks ping probes and Nmap wrongly reports it as down |
| -sn | Ping scan — host discovery only, port scanning disabled | To map which hosts are alive on a network before scanning any of them |
| -p | Scans only the ports you list, e.g. -p 22,80,443 or -p- for all 65,535 | To focus on specific services, or to check one port across many hosts |
| --top-ports | Scans the N most common ports, e.g. --top-ports 100 | For a fast first pass; note it ranks by frequency, not by port number |
| -T0 … -T5 | Timing templates: -T0 paranoid, -T1 sneaky, -T2 polite, -T3 normal (default), -T4 aggressive, -T5 insane | Lower is slower and quieter — what you pick when the rules of engagement say low-and-slow |
Three port states you must not mix up
| State | What Nmap actually saw | What it means |
|---|---|---|
| open | A SYN/ACK came back | A service is listening and accepting connections |
| closed | A RST came back from the host itself | The host is reachable, but nothing listens on that port |
| filtered | Nothing usable came back — a filter dropped or rejected the probe | A firewall is interfering; Nmap cannot tell open from closed |
The “Not shown” line is the count of scanned ports Nmap did not list individually — by default it scans the 1,000 most common TCP ports, so a host showing 5 ports reads “Not shown: 995 …”. If those unlisted ports are closed, the host answered for them; on a firewalled host they show as filtered instead, which is itself a finding.
Nmap FAQ
What is the difference between -sS and -sV in Nmap?
They do different jobs. -sS chooses how ports are probed: a TCP SYN (half-open) scan that sends a SYN packet and never completes the handshake. -sV adds service and version detection: after finding open ports, Nmap probes each one to identify the application and version listening, which is what fills the VERSION column.
Why does Nmap report a host as down when it is switched on?
Before scanning, Nmap runs host discovery (ping probes). If a host or its firewall blocks those probes, Nmap assumes the host is down and skips it, printing “Host seems down”. Adding -Pn disables host discovery and treats every target as online, so the port scan runs anyway.
What does a filtered port mean in Nmap output?
A filtered port is one where a packet filter — usually a firewall — prevented Nmap from determining whether the port is open or closed, because the probes were dropped or rejected. It is different from closed, which means the host itself answered with a RST and no service is listening.
What does the -A flag turn on in Nmap?
-A is aggressive scan: it enables OS detection (-O), version detection (-sV), the default NSE script set (-sC) and traceroute in a single flag. It is thorough but noisy, so it is a poor choice when the rules of engagement call for a quiet scan.
This simulator mirrors the Nmap PBQs in the PenTest+ book — building scan capabilities flag by flag, then reading real scan output line by line. The full PenTest+ practice package on certcrack.com adds all 10 PBQ labs, including Adding Nmap Scan Capabilities and Reading Nmap Scan Output, free with the book code.