skip to content

Your web tier's Server header exposes nginx/1.18.0 to Nmap -sV; why is trimming the version a weak control, and what do you do instead?

level: seniorimportance: nice to knowfreq 14%

answer

  1. the banner is not the exposure
  2. product is still recognisable
  3. patching beats hiding
  4. your own scan is the inventory check

basics

~20 s

Trimming removes a label, not the exposure: Nmap's database still recognises a bare nginx header, other responses may carry the version, and the flaw stays. Patch, limit exposure, and use your own authorised -sV scans to check the inventory.

solid answer

~40 s

Trimming the version from a `Server` header is **hygiene, not a control**. The flaw remains, `nmap-service-probes` has a match for a bare `Server: nginx` header so the product is still identified, and other match lines read the version from nginx's default error pages. A reduced banner can even make your own inventory worse, because scans stop reporting what is running. The controls are patching, closing or restricting the port, and monitoring. Run authorised `-sV` scans of your own estate on a schedule and reconcile the VERSION column with the software inventory. The service's logs show such a scan as a burst of unusual first requests from one source.

go deeper

for a junior

Know that a banner reveals the product and version, and that hiding it does not remove a flaw.

for a middle

Explain what Nmap's database does with a bare Server header, and name patching and restricting exposure as the real controls.

for a senior

Defend a review decision that treats trimming as hygiene, and say how an authorised -sV schedule feeds the inventory and what the service's log shows.

for a principal

Set a policy that treats banner reduction as optional, ties scanner output to inventory ownership, and defines who accepts residual exposure.

## The question a reviewer is really asking A scan report lists `nginx 1.18.0`, and someone proposes "remove the version from the header" to close the finding. A reviewer deciding a control asks what that change removes and what it leaves. Version detection reads replies, so a banner is evidence of what runs; hiding it hides evidence, not the cause. ## What trimming changes and what it does not | Question | Answer from the pinned Nmap 7.991 database | |---|---| | Is the product still named when the number is gone? | Yes: a match line exists for a bare `Server: nginx` header, giving product nginx with no version | | Is the number only in the header? | No: other match lines read it from nginx's default error pages | | Does the service stop being reachable or flawed? | No: the code and the exposed port are unchanged | | Does the owner learn anything? | Less: the owner's own scans now report less detail | So trimming reduces the amount of information in one reply. It does not change what the software is, what flaws it has, or whether the port is exposed. ## Why it is a weak control, not a useless one - **It is obscurity.** Security that depends on a banner staying silent fails the first time another response differs, a header is added back, or an error page is changed by a later upgrade. - **It damages your own visibility.** An inventory built from authorised scans depends on those banners. Hiding them forces the owner back to configuration management as the only source of truth. - **It can mislead a report.** A clean scan after trimming looks like an improvement and can close a finding that was never fixed. It remains reasonable as one layer, provided nobody records it as the fix. ## What the controls are 1. **Patch or upgrade** the service, or confirm that the running build carries the vendor's fix even though its version string looks old. 2. **Restrict exposure.** If the port does not need to be public, put it behind a filter, or stop listening on it. 3. **Keep an inventory.** Reconcile scheduled, authorised `-sV` scans of your own estate with the software list, so a surprising version or an unexpected service is noticed. 4. **Monitor.** Know what a version scan looks like on the receiving end and have it explained by a change ticket. ## What a version scan looks like to the service The probes are service-specific first requests. The database includes a plain web request (`GetRequest`), an `OPTIONS` request (`HTTPOptions`) and an RTSP request (`RTSPRequest`), among many others, and the NULL probe is an empty connection. In a web server's access log that appears as a run of unusual or empty requests from one address against one port, often followed by the same pattern on the next open port. A sensor or log rule that spots it is written by the network-defence owners; the audit's job is to tell them the source address and window beforehand, which is part of the rules of engagement. ## Writing the finding A useful finding reads: "nginx 1.18.0 is reported on the front end; the product would still be identified without the number; remediation is to update the service to a supported build or confirm the vendor fix, and to restrict the port if it need not be public; banner trimming is optional hygiene and does not close the finding". Closing criteria name the evidence: an updated build or advisory confirmation, and a rescan that shows the new state. ## Rules of engagement for the scan itself - Written scope naming the networks and the scan window. - An agreed intensity and port list, so the footprint is predictable. - A named contact on the owner's side, for when the monitoring fires anyway. ## Common mistakes - Closing a finding because the banner no longer shows the version. - Moving the service to an unusual port as if that were protection. - Forgetting that the product name still appears after the number is removed. - Having no authorised scan of your own to compare against.

  • Is there any value in trimming a banner at all?
    Slightly: it removes a free label from casual automated inventories and keeps a version out of caches and logs. It must be recorded as hygiene, never as the fix, because the flaw and the exposed port are unchanged.
  • What should accompany a scheduled -sV scan of your own estate?
    A written scope, a fixed source address and window shared with the SOC, an agreed intensity and port list, and a reconciliation of the VERSION column against the software inventory. Differences become tickets, not assumptions.

  • Hiding the version number closes the vulnerability.
  • Without a version, Nmap cannot identify the product.
  • Moving the service to another port protects it.
  • Blocking the scanner's address fixes the exposure.
  • Scanning your own estate is unnecessary once banners are trimmed.