An Nmap vuln script prints State: LIKELY VULNERABLE under a VULNERABLE: heading on one host and nothing on another; what does each result actually prove?
answer
- a state is the script's confidence
- one heading groups several states
- version or uptime heuristics
- silence has several causes
- an argument reveals NOT VULNERABLE
basics
~20 sLIKELY VULNERABLE means the script found indirect evidence, such as a version or uptime comparison, not a confirmed flaw, and the VULNERABLE: heading also covers it. Silence proves nothing: scripts normally report only positives and may not have run.
solid answer
~40 sScripts built on Nmap's `vulns` library report `VULNERABLE` (confirmed), `LIKELY VULNERABLE` (indirect evidence, for instance a version comparison, kept separate because it can be a false positive), `NOT VULNERABLE`, `VULNERABLE (DoS)`, `VULNERABLE (Exploitable)` or `UNKNOWN (unable to test)`. The `VULNERABLE:` heading groups every positive state, so read each finding's own `State:` line. `NOT VULNERABLE` entries are hidden unless `vulns.showall` is set. A host that printed nothing may be clean, may not have matched the script's `portrule`, may have hit `--script-timeout`, or may sit behind a middlebox, so I confirm any finding with a patch or configuration check and record which scripts ran.
code
bash · 4 lines# Show NOT VULNERABLE entries too, report timeouts, keep XML as evidence
nmap -sV -p 445 --script "vuln and safe and not external" \
--script-args vulns.showall --script-timeout 5m -d \
-oX vuln-review.xml 192.0.2.20go deeper
Recall that LIKELY VULNERABLE is weaker than VULNERABLE and that a vuln script printing nothing does not mean the host is safe.
Explain the states from the vulns library, that the heading hides the per-finding state line, and that NOT VULNERABLE needs vulns.showall.
Demonstrate verification: say which evidence each script uses, list the reasons for silence (rule, timeout, path), and confirm findings on the host before reporting.
Set the reporting standard: how a scanner's inferred states are labelled in findings, and what evidence promotes a lead to a confirmed finding.
## What each state means Nmap's `vulns` library gives scripts a common way to report findings. Its documentation defines the states, and each one is the script's **inference** at the moment it ran: | State printed | Library meaning | Read it as | |---|---|---| | `VULNERABLE` | Confirmed to be vulnerable | The script's test succeeded; still verify | | `LIKELY VULNERABLE` | Likely, for example from a simple version comparison; covers possible false positives | A lead, not a finding | | `NOT VULNERABLE` | Confirmed not vulnerable | A negative for this check on this path | | `VULNERABLE (DoS)` | Confirmed vulnerable to a denial-of-service attack | A DoS-type flaw; the script's description says how it was confirmed | | `VULNERABLE (Exploitable)` | Confirmed vulnerable and exploited successfully | The script actually carried out an exploit | | `UNKNOWN (unable to test)` | The script could not test | Neither a positive nor a negative | ## Heading versus state line The report's `VULNERABLE:` heading is printed when any finding is `LIKELY VULNERABLE`, `VULNERABLE`, `VULNERABLE (DoS)` or `VULNERABLE (Exploitable)`. The state of each finding is on its own line: ``` | smb2-vuln-uptime: | VULNERABLE: | MS17-010: Security update for Windows SMB Server | State: LIKELY VULNERABLE ``` A reader who stops at the heading will file a heuristic as a confirmed vulnerability. The `smb2-vuln-uptime` script's own description shows why the distinction matters: it infers missing patches from the uptime in the SMB2 negotiation response, sends no further probes, and warns that a rebooted system may still be vulnerable. A script that tests for slow-connection exhaustion likewise says that a `LIKELY VULNERABLE` result shows a timeout-extension behaviour and that a full denial of service is not always possible. ## Why silence is not a clean bill By default the library reports only the `VULNERABLE` family of entries. `NOT VULNERABLE` entries appear only when the `vulns.showall` argument is set, and `vulns.short` switches to a one-line format. A host with no output for a script can mean: - The check ran and found nothing. - The script's `portrule` or `hostrule` did not match, for example because the service was not detected on that port. - The script instance exceeded `--script-timeout`. It is terminated and **no output is shown**; with `-d`, Nmap reports each timeout. - The probe never reached the service, because a firewall or a load balancer answered or dropped it. - The script is not one of those that use the common library, or reports in its own format. ## Evidence differs between scripts Two scripts for the same flaw can disagree because they test different things: - A **behavioural** check sends a request and observes the reply. `ssl-heartbleed` and `smb-vuln-ms17-010` are in `vuln` and `safe`. - A **heuristic** check reasons from a side effect, such as uptime or a timeout. - A **lookup** check matches a version string against a database. `vulners` queries a remote service for each detected software name and version or CPE and prints CVE identifiers with CVSS scores. It shows what is known about a version, not whether this installation is exposed, and a backported fix or a trimmed banner changes the truth. ## Making a finding usable 1. Record the Nmap release, the script names and the full command line next to the result. 2. Treat `LIKELY VULNERABLE` as a lead and confirm it with an authenticated patch or configuration check on the host. 3. Re-run with `vulns.showall` and `-d` when a negative matters, so timeouts and `NOT VULNERABLE` entries are visible. 4. Keep the `-oX` file; the XML carries the state per finding. 5. Remember that the result describes one network path. A different source address, a firewall rule or a proxy can change what a script sees. ## Two hosts, one script Suppose `smb2-vuln-uptime` is run against two Windows servers in the documentation range. Server A prints a finding with `State: LIKELY VULNERABLE`; server B prints nothing. The careful reading is: - **A**: the boot time in the negotiation response is old enough that a patch-and-reboot cycle looks to have been missed. That is a reason to check A's patch level, not a verdict, because the script never sees the patch level itself. - **B**: either B rebooted recently, in which case the script says nothing about whether it is patched, or the script did not run (SMB2 not detected, or filtered), or it timed out. Silence leaves B unassessed by this check. - **Neither** is confirmed. The report should say "indicated by uptime heuristic" for A and "not assessed by this check" for B, and name the follow-up verification for both. Handling false positives as a programme, and the scan-window policy, belong to the vulnerability-assessment material; this question is only about reading what Nmap printed.
- What does the VULNERABLE (Exploitable) state say about the script that produced it?The library defines it as confirmed vulnerable and exploited successfully, so the script actually carried out an exploit. Scripts able to reach it sit in the `exploit` category and need their own written authorisation. Seeing that state in a production report prompts the question of who approved the run.
- Why can two vuln scripts disagree about the same host and flaw?They gather different evidence: one tests behaviour, another infers from uptime or a timeout, another looks a version string up in a database. Backported fixes, trimmed banners and middleboxes affect them differently. Read each script's description with `--script-help`, trust behavioural tests more than lookups, and still verify on the host.
- No output from a vuln script means the host is not vulnerable
- LIKELY VULNERABLE is a confirmed finding to file as critical
- Everything under a VULNERABLE: heading is confirmed
- NOT VULNERABLE is always printed, so a missing one means untested
- A script's state is a fact about the host, however the traffic reached it
- NOT VULNERABLE proves the host is patched against every variant
Assumes Nmap 7.991: state names are those in that release's nselib/vulns.lua; individual scripts and their heuristics change between releases.