An Nmap -sV report shows nginx 1.18.0 on 443, tcpwrapped on 8443 and http-proxy? on 8080; how far do you trust each result?
answer
- each result has a different evidence grade
- a version is a claim
- tcpwrapped says nothing about the service
- a trailing question mark is a guess
basics
~20 sTrust them differently. The nginx version is what the answering service reported. tcpwrapped means the handshake completed and the peer closed without sending data. The trailing question mark marks a name guessed from the port number, not a probed answer.
solid answer
~40 sEach result has a different evidence grade. `nginx 1.18.0` came from a reply matched against `nmap-service-probes`, so it records what the answering process said, which may be a front proxy, and it does not prove a vulnerability because fixes can be back-ported. `tcpwrapped` means the connection was accepted and then closed quickly with no data; it points to a TCP wrapper, an access list or a middlebox, and says nothing about the service behind it. A trailing `?`, as in `http-proxy?`, means the name is only the `nmap-services` entry for that port number. Verify with the owner, host-side listings and configuration before recording anything as fact.
code
xml · 8 lines<port protocol="tcp" portid="8080">
<state state="open" reason="syn-ack"/>
<service name="http-proxy" method="table" conf="3"/>
</port>
<port protocol="tcp" portid="443">
<state state="open" reason="syn-ack"/>
<service name="http" product="nginx" version="1.18.0" tunnel="ssl" method="probed" conf="10"/>
</port>go deeper
Know that the service name can be a lookup or a probe result, and that tcpwrapped is a real Nmap result.
Explain how method=table differs from method=probed, and what tcpwrapped and the trailing question mark each mean.
Grade each row of a report by its evidence, name who may have answered, and say what you would confirm with the owner before recording a fact.
Define how an organisation's inventory marks scanner-derived facts versus confirmed facts so downstream reports do not round guesses up.
## Three results, three grades of evidence A version scan mixes results that deserve different trust. Reading them uniformly is the usual mistake. | Result | Where it came from | Trust it as | |---|---|---| | `nginx 1.18.0` | A probe reply matched a `match` line and the regex extracted the version | What the answering process reported, as of this scan | | `tcpwrapped` | The NULL probe: the connection closed quickly with no data | A statement about the connection, not about the service | | `http-proxy?` | No probe matched, so the name is the `nmap-services` lookup for port 8080 | A guess from the port number | ## The version string The version is **an extract from a reply**, so three limits apply. - **Who answered.** If a reverse proxy, load balancer or CDN sits in front, the header may come from that device rather than from the application server. This is a middlebox answering for the host. - **Back-porting.** A distribution may fix a flaw inside a build that still reports the old version number. Treat the string as a lead, not a verdict; how a vulnerability scanner turns a version into a finding belongs to that tool's material. - **Changed banners.** An owner can edit what a service reports, so a version that looks too clean can be wrong in either direction. Read the `Service Info` line and the CPE too, but keep the same caution: they come from the same replies. ## What tcpwrapped means In the shipped database, the NULL probe carries a `tcpwrappedms` value (3,000 milliseconds). If Nmap connects, sends nothing, and the peer closes the connection or resets it before that time having sent no data, Nmap names the service `tcpwrapped`. The cause could be: - a TCP wrapper or an access list on the service that refuses this client's address after the handshake, - a middlebox that completes the handshake for many ports and then closes, - a service that closes idle connections very quickly. The source carries a TODO saying the assumption deserves further verification. So `tcpwrapped` says the port accepted a connection, not what is listening. The next step is to ask the owner which software and which restriction sit on that port. ## What a trailing ? means With `-sV`, if an open port's name did not come from a probe match (its confidence is five or lower), Nmap appends `?`. The XML output records `method="table"` for such a name and `method="probed"` for one a probe confirmed. Without `-sV`, the service column is always the table lookup, so it is a hint about the port number and not a statement about the software. ## A trust routine for the report 1. Mark every service row as `probed`, `table` or `tcpwrapped` before discussing versions. 2. For each version, ask whether a proxy answered, and compare with the owner's software inventory. 3. For `tcpwrapped` and `?` rows, request the configuration of that port, and the host's own socket listing. 4. Do not feed a version straight into a patch-priority list without checking against the vendor's advisory for that build. 5. Record the open questions in the report instead of rounding them to facts. ## What to write in the report For the three rows: "443/tcp ssl/http nginx 1.18.0, probed; the Server header may come from the front-end device; compare with the build's advisory notes". "8443/tcp tcpwrapped; connection accepted then closed with no data; owner to identify the software and the access control". "8080/tcp http-proxy?; name guessed from the port number; unverified". Each line says what the evidence is and what is still open, which is what a reviewer needs. ## Defender's side An engineer who sees these results in a scan report from their own estate can use the same grades. A `tcpwrapped` port is a place where an access control exists but is not documented in the inventory; an `?` row is a service whose identity nobody has confirmed. Both belong on the follow-up list. ## Common mistakes - Treating `tcpwrapped` as "nothing there" or "a TCP wrapper definitely installed". - Quoting the version column as the installed package version. - Ignoring the trailing question mark. - Missing that the answer came from a front-end device.
- How do you check whether the nginx header came from the application or a front-end device?Ask the owner for the network diagram and the front-end configuration, and compare the header against the host's own server configuration. A proxy often answers for the host, so the version describes that device unless the application's own response differs.
- Why does a trailing ? matter in an inventory?It shows the name is the nmap-services entry for the port number, with a confidence of five or lower, not a probed answer. Software on an unusual port or an unknown service can carry a plausible but wrong name, so unverified rows should be confirmed with the owner.
- The version column is the installed package version.
- Tcpwrapped means nothing is listening on the port.
- A trailing question mark is decoration.
- A header version proves the host is vulnerable.
- The service name always comes from a probe.