Scan in two passes, wide and shallow first. nmap -sn 10.20.0.0/16 asks only which addresses respond, across 65,536 of them, in a couple of minutes; the deep scan then runs against the hundred that answered rather than against the range. Running the deep scan first is the difference between an afternoon and a week.
Ewan's test of a housing association in Falkirk started with a scope of two ranges and finished with 94 live hosts, of which 61 were things the client did not know were switched on.
The passes, and what each one costs
The discovery pass is quiet and fast because it sends a handful of probes per address. The port pass is where the time goes: nmap -sS -p- --min-rate 1000 10.20.4.0/24 scans all 65,535 ports on each host, and -p- is not optional, because the interesting service is regularly on a port nobody would have guessed.
Two ranges, one morning
What each pass leaves for the next one
Each band is what the next pass has to work through, and the widest one is answered in minutes precisely because it asks almost nothing.
- Addresses in scopeTwo ranges as written in the document, most of which are empty65,536
- Responding to discoveryA couple of minutes, and the asset register had 33 of them94
- With at least one open portThe full port pass, which is where the scanning time actually goes71
- Services worth a version checkPorts rather than hosts, and each one costs seconds rather than milliseconds210
- Worth looking at by handAnonymous shares, management interfaces, and one thing nobody could name12
The fourth band counts ports and the others count hosts, which is why it is wider than the one above it. Running the passes in the other order costs a week and finds the same twelve.
Interactive Practice Lab
Edit and run this snippet directly in your browser (zero setup)
/\b(Role|Task|Constraint|Format):\s*([^\n]+)/gi
# sample: Role: Senior Python Reviewer
Task: Audit CSV parser edge cases
Constraint: Max 3 bullet points, zero fluff
Format: Markdown checklist
HTTP/TLS Request Lifecycle & Latency Waterfall Lab
Inspect every hop from DNS to Brotli stream and replay packet flow live.
The numbers on that engagement ran 65,536 addresses in scope, 94 responding, 71 with at least one open port, 210 ports worth a version check, and 12 things worth opening by hand.
The version pass is the expensive one and the one that produces findings. nmap -sV -sC -p 22,80,443,8080 10.20.4.9 asks each open port what it is, running the default script set alongside, and it takes seconds per port rather than milliseconds. Running it only against ports already known to be open is what makes it affordable.
--min-rate 1000 is the flag worth knowing and the one to be careful with: it sets a floor on packets per second, which turns a two hour scan into ten minutes and can also take a fragile device off the network. On anything industrial, leave it out.
Reading what comes back
Three port states and they are not degrees of the same thing. Open means something answered. Closed means the host answered and refused, which proves the host is up and that a firewall is not silently dropping. Filtered means nothing came back at all, which is a firewall and tells you about the network rather than about the host.
Interpreting probes
What open, closed and filtered actually tell you
Port states are not degrees of openness; they separate host behaviour from firewall policy across the whole machine.
Probe sent to port
- Host sends a replyProves the host is alive and no firewall silently drops traffic
- OpenA service answered on that port
- ClosedHost refused the connection; hundreds of closed ports signal no firewall in front
- Nothing comes backReveals network filtering rather than the host itself
- FilteredEverything filtered except one open port marks a deliberately configured firewall
Seeing the difference between an exposed machine with a hundred closed ports and a purposefully firewalled host is most of what a scan is for.
A host with a hundred closed ports and two open ones is a machine with no firewall in front of it. A host where everything is filtered except one port is a machine somebody configured deliberately, and the difference between those two readings is most of what a scan is for.
Enumeration, which is the half that finds things
A scan says a port is open and enumeration asks what is behind it. nmap --script smb-enum-shares -p 445 lists the shares on a Windows host, and an anonymously readable share is a finding on its own without any exploitation at all.
Behind the port
Enumeration turns an open port into what sits behind it
Knowing a port is open is only the pointer; asking the protocol what it serves is where findings appear without exploitation.
- SMB on port 445
- Run nmap --script smb-enum-shares
- Lists readable Windows shares
- Anonymous read access is a finding on its own
- Web virtual hosts
- One IP serves multiple named apps
- Requesting the raw IP returns only a default page
- Supplying host names from recon reveals the real application
Reconnaissance and scanning behave like one activity split across two days because recon host names feed directly into web enumeration.
For web ports the same idea is a virtual host list: one address serves many names, and requesting the address gets a default page while requesting the right name gets the application. Names collected during reconnaissance go here, which is why the two phases are one activity split across two days.
nmap, masscan and the trap in a version banner
nmap is free and has been the standard for this since the 1990s; the script engine is what replaced a separate tool per protocol, and -sC runs the safe default set. masscan is free and answers only the discovery question, at a rate that will find every host on a large range in minutes, and it replaced nmap for that one pass on anything larger than a few thousand addresses.
Tools and false positives
What masscan and nmap report vs what is actually patched
masscan handles wide discovery and nmap runs default scripts, yet trusting a raw version banner alone creates false findings.
- masscan wide discoverySweeps thousands of addresses in minutes to find live hosts
- nmap -sC safe default scriptsProbes protocols with one engine instead of separate per-service tools
- Reported vulnerable version stringBanner claims an older software release
- Backported distribution fixesMaintained OS packages patch security flaws without changing the banner string
- Manual verification requiredReporting an unverified banner loses the reader in the first three pages
Both tools are free, and checking whether a vendor backported the fix prevents embarrassing the whole report early on.
The honest caution is about versions. A banner is what the software says it is, and on a maintained distribution a package backports security fixes without changing the version string, so a scanner reporting a vulnerable version may be reading a patched service. Reporting that as a finding without checking is how a report loses its reader in the first three pages.
Scanning the range you were given
The stall is treating the scope list as the network. It is a list somebody wrote, from a diagram, at some point, and the discovery pass exists precisely to find out what is actually there rather than what was documented.
Reality vs documentation
Falkirk live hosts against the client asset register
Discovery exists to measure what is actually switched on in the scoped ranges rather than assuming the asset list is complete.
94 live hosts discovered across two scoped ranges in Falkirk
- Recorded in asset register33
- Undocumented hosts answering61
Most of the 61 extra hosts were printers, test machines and a retired server, plus one unidentified building management interface that became the key finding.
Falkirk's scope named two ranges and the discovery pass found 94 hosts where the asset register had 33. Most of the difference was ordinary, printers and test machines and a decommissioned server still answering, and one was a management interface on a building system that nobody in the room could identify. That was the finding, it came out of the cheapest pass on the engagement, and it would have been invisible to any test that started from the register.
What was known before any of this ran, and where the host names came from, is what is discoverable before you touch anything. Turning one of these open ports into demonstrated access is turning a weakness into access. And the document that decides whether the 61 extra hosts were in scope at all is scope, rules of engagement and the phases.