skip to content

How does a defender recognise a slow Nmap scan that touches one port every five minutes for days, and what can an empty log not prove?

level: seniorimportance: nice to knowfreq 14%

answer

  1. pace sets the time window to watch
  2. count distinct ports per source
  3. days, not minutes
  4. retention and sampling decide visibility
  5. a pattern is not an intent

basics

~20 s

A slow scan shows as one source touching many distinct ports or hosts at a steady pace, so count them per source over hours or days, not seconds. An empty log proves only what the control logged, sampled and kept.

solid answer

~40 s

A serialised template such as `-T0` waits five minutes between probes (12 an hour), so a short-window threshold, such as a count of ports per minute, never trips. The signal is still there: one source, many distinct destination ports or hosts, mostly denied or reset. Detect it by aggregating per source over hours to days in flow records or firewall logs, and keep the data that long. Then check it against the assessment calendar, because the pattern does not prove intent. An empty log proves little: dropped traffic may not be logged, flows may be sampled, and retention may be shorter than the scan.

go deeper

for a junior

Recall that a scan touches many ports or hosts from one source, and that slower scans are spread out in time.

for a middle

Explain how the slow templates' delays defeat short-window counting, and what to count instead: distinct ports and hosts per source over a long window.

for a senior

Design the detection with retention that matches the window, denies included and authorised sources reported, and state what an empty log can and cannot show.

for a principal

Set the detection and retention standard across the estate, with a stated coverage claim that names its blind spots rather than implying total visibility.

## Pace sets the window Nmap's slow templates are not subtle in time, only in rate. In 7.991, `-T0` runs one probe at a time with a five-minute gap, which is 12 probes an hour and 288 a day; `-T1` waits 15 seconds, so 240 an hour. A default list of 1,000 ports to one host at `-T0` therefore takes about three and a half days. A detector that counts distinct ports within a minute or two sees one or no probes in any such window and stays quiet. The pattern exists, but only at a longer scale. ## What a slow scan looks like from the receiving side - **One source, many targets.** Distinct destination ports on one host (a vertical pattern), or one port across many hosts (a horizontal pattern). - **Mostly failures.** Denied connections in a firewall log, resets from closed ports, or SYN-only flows with no completed session. - **A steady rhythm.** Intervals close to the template's delay, which gives a regularity unlike human or application traffic. - **Little payload.** A flow record carries enough to see it: addresses, ports, flags, counts and times. Packet capture is not required. ## Detection that works at that pace 1. **Aggregate per source over a long window**, measured in hours to days, counting distinct destination ports and distinct destination hosts. 2. **Retain the data that long.** A seven-day question cannot be answered from a one-day log buffer. 3. **Include denies**, not only accepted traffic; a scan produces mostly refused attempts. 4. **Exempt the known assessment source addresses** from the paging alert, and keep them visible in a report. Who authorised a scan, and how a team confirms it, belongs to the engagement-authorisation material. 5. **Alert on the pattern, then verify.** A count of ports per source says what happened, not whose tool it was or why. How a particular rule or signature is written belongs to the network-defence owners. What this leaf adds is the reasoning: the window has to be at least as long as the scan's slowest plausible cycle. ## The other direction: fast scans At `-T4` or `-T5`, or under a high `--min-rate`, the same count is reached in seconds and a short-window rule fires easily. A `--max-rate` cap shows as an unusually constant packets-per-second line. Pace is a fingerprint of the configuration, which is useful when matching a log to a plan and unreliable as a verdict. ## A worked reading A firewall's deny log shows 203.0.113.50 refused on 192.0.2.30 over a weekend: port 21 at 02:10 Saturday, port 22 at 02:15, port 23 at 02:20, and so on, twelve distinct ports by dawn and more on Sunday. Any one hour holds twelve entries on twelve different ports, which a per-minute rule would never flag. Rolled up per source over 72 hours, the same data is one address touching hundreds of distinct ports at a five-minute rhythm, which is easy to see. The next step is to check the assessment calendar and the authorised scanner addresses, not to conclude anything about intent. ## What an empty log cannot prove | Reason | Effect | |---|---| | Log level | Many firewalls log accepted traffic only or only matched rules; drops may be absent | | Sampling | A sampled flow export can miss a few low-rate probes entirely | | Retention | A scan longer than the retention window is never seen in one piece | | Time or source skew | Clock differences and address changes split one scan into unrelated rows | | Placement | A sensor on one side of a stateful device never sees what the device dropped | So an empty result establishes only that this control, with these settings, saw no such pattern. It does not establish that no scan occurred. ## Operational summary Choose the window from the slowest cycle you must catch, retain denies for that long, exempt and report authorised scanner addresses, and write down the blind spots next to the claim of coverage.

  • How long should the aggregation window be, and what does it cost?
    At least as long as the slowest cycle you intend to catch. A default 1,000-port list at `-T0` runs about three and a half days, so a window of days. The cost is retention storage and heavier queries, which flow summaries and per-source rollups keep modest.
  • An alert shows one source touching 400 distinct ports in a week. Does that prove it was Nmap?
    No. It proves a port-touching pattern from one address. Monitoring, an inventory tool, a misconfigured client or an authorised assessment can produce the same counts. Match the source and dates to the assessment calendar and investigate if nothing explains it.

  • A scan that trips no alert never happened
  • A one-minute distinct-port count catches slow scans too
  • Only the sensor in front of the server matters
  • Scans always arrive as bursts of many packets per second
  • An empty firewall log proves no scan crossed the network

Assumes Nmap 7.991; the -T0 and -T1 delays are read from the 7.991 reference guide and source.