Vulnerability Scanners: Greenbone, Nessus and False Positives
Port scanners tell you what listens; vulnerability scanners go on to ask each service thousands of questions ("which version are you? do you accept this weak cipher? does this request return what a vulnerable build returns?") and turn the answers into findings with CVE references, severities and remediation advice. The two names you meet most often are Greenbone (the company behind OpenVAS; its community edition is free, the software stack is called GVM) and Nessus (Tenable). Others include Qualys, Rapid7 InsightVM and open-source tools such as Nuclei for specific checks. All of them produce long reports that are partly wrong, and the assessor's skill is in reading them: separating real issues from false positives, and knowing what an unauthenticated scan can't see.
How a scan works
- Discovery: host liveness and port scanning, as in How Port Scanning Works.
- Service and version detection on open ports.
- Checks (Nessus calls them plugins, Greenbone NVTs, network vulnerability tests): small scripts that each test for one issue. Kinds of checks:
- version checks: compare a banner or reported version with the affected range of an advisory;
- configuration checks: weak TLS, anonymous FTP, default community strings, missing headers;
- active checks: send a request that only a vulnerable service answers in a particular way (non-destructive by default; "dangerous" checks that can crash services are off unless explicitly enabled);
- local checks (with credentials): read the installed package versions, registry keys, configuration files.
- Reporting: each result with a severity (usually CVSS-based), the evidence, and references.
Unauthenticated versus authenticated
| Unauthenticated (network) scan | Authenticated (credentialed) scan | |
|---|---|---|
| Sees | what an outside attacker sees: open services, banners, behaviour | installed packages, patches, local configuration, client software (browsers, office suites) |
| Typical false positives | many: banners with backported fixes, version ranges | few: package versions map to vendor advisories |
| Typical false negatives | vulnerable software that isn't listening (local privilege escalation, client-side bugs), services behind authentication | services that only misbehave remotely |
| Needs | network access | a low-privilege account per platform (SSH key, Windows domain account with remote registry/WMI rights), stored securely in the scanner |
| Risk | probes can disturb fragile devices | credentials in the scanner are a high-value target; use dedicated, monitored, least-privilege accounts |
Both have their place: the unauthenticated view shows exposure, the authenticated one shows patch state. Mature programmes run authenticated scans of all managed systems weekly or continuously, and unauthenticated external scans of the perimeter.
A Greenbone scan, as a lab session
Greenbone Community Edition on the assessor's scanner, target db.lab.test (lab session; scope 10.10.0.30, window and rate as in the scope document; scan config "Full and fast"):
assessor@gvm:~$ gvm-cli --gmp-username audit socket --xml '<get_tasks filter="name=lab-db"/>' | xmllint --xpath '//task/status/text()' -
Done
assessor@gvm:~$ gvm-script --gmp-username audit socket export-csv-report.gmp.py 3f6c2a9e-1b7d-4c55-9a0e-6d2f8b41c7a3 lab-db
assessor@gvm:~$ python3 - <<'PY'
import csv
for r in csv.DictReader(open("lab-db.csv")):
if r["Port"]:
print(f'{r["IP"]:11} {r["Port"] + "/" + r["Port Protocol"]:9} {r["CVSS"]:5} {r["QoD"]:4} {r["NVT Name"]}')
PY
10.10.0.30 5432/tcp 9.8 80 PostgreSQL End of Life (EOL) Detection
10.10.0.30 22/tcp 8.1 80 OpenSSH Multiple Vulnerabilities (version check)
10.10.0.30 22/tcp 5.3 80 Weak Encryption Algorithm(s) Supported (SSH)
10.10.0.30 22/tcp 5.3 95 SSH Password Authentication Enabled
10.10.0.30 5432/tcp 4.3 70 PostgreSQL: SSL/TLS not required(export-csv-report.gmp.py from gvm-tools takes the report's UUID and a file name and saves the "CSV Results" format; the Python snippet prints a few of its columns (names as in this Greenbone version's CSV header) and skips host-level results such as "TCP timestamps", which have no port. The scores are this lab feed's; Greenbone's severity classes map them to Low, Medium, High and, in current versions, Critical for 9.0 and above.)
QoD (Quality of Detection) is Greenbone's own confidence score for each result, from 0 to 100%: active checks that observed the vulnerability score high, remote banner checks lower, package checks with credentials near the top. By default results below 70% are hidden. Nessus has no QoD field, but its plugin output says how a finding was made ("Version source: banner", "local check"), which serves the same purpose.
Triaging the report
The program takes a scanner export (synthetic, in the shape of the report above, merged for three hosts) and does what an analyst does before anything goes into the assessment report: it merges duplicate findings, marks the ones that the authenticated package data contradicts as false positives, and sorts the rest.
import pandas as pd
findings = pd.DataFrame([
("10.10.0.30", "22/tcp", "OpenSSH Multiple Vulnerabilities (version check)", 8.1, "banner", "openssh-server"),
("10.10.0.30", "5432/tcp", "PostgreSQL End of Life (EOL) Detection", 9.8, "banner", "postgresql-12"),
("10.10.0.30", "22/tcp", "SSH Password Authentication Enabled", 5.3, "active", None),
("10.10.0.30", "22/tcp", "Weak Encryption Algorithm(s) Supported (SSH)", 5.3, "active", None),
("10.10.0.10", "443/tcp", "nginx Multiple Vulnerabilities (version check)", 7.5, "banner", "nginx"),
("10.10.0.10", "443/tcp", "nginx Multiple Vulnerabilities (version check)", 7.5, "banner", "nginx"), # duplicate
("10.10.0.10", "80/tcp", "Missing HSTS header", 4.3, "active", None),
("10.10.0.60", "21/tcp", "FTP Unencrypted Cleartext Login", 4.8, "active", None),
("10.10.0.60", "445/tcp", "Samba Multiple Vulnerabilities (version check)", 9.1, "banner", "samba"),
], columns=["host", "port", "finding", "cvss", "method", "package"])
# Authenticated package data: installed version, and whether the distribution's advisory says it is fixed.
packages = {("10.10.0.10", "nginx"): ("1.24.0-2ubuntu7.4", True),
("10.10.0.30", "openssh-server"): ("1:8.2p1-4ubuntu0.5", False),
("10.10.0.30", "postgresql-12"): ("12.9-0ubuntu0.20.04.1", False),
("10.10.0.60", "samba"): ("2:4.6.2+dfsg-1", False)}
f = findings.drop_duplicates().copy()
def status(r):
if r.method != "banner":
return "confirmed (observed)"
inst = packages.get((r.host, r.package))
if inst is None:
return "unverified (no package data)"
return f"FALSE POSITIVE (package {inst[0]} has the fix)" if inst[1] else f"confirmed (package {inst[0]})"
f["status"] = f.apply(status, axis=1)
f = f.sort_values(["status", "cvss"], ascending=[True, False])
print(f"{len(findings)} raw results -> {len(f)} after de-duplication")
print(f[["host", "port", "cvss", "finding", "status"]].to_string(index=False))9 raw results -> 8 after de-duplication
host port cvss finding status
10.10.0.10 443/tcp 7.5 nginx Multiple Vulnerabilities (version check) FALSE POSITIVE (package 1.24.0-2ubuntu7.4 has the fix)
10.10.0.30 22/tcp 5.3 SSH Password Authentication Enabled confirmed (observed)
10.10.0.30 22/tcp 5.3 Weak Encryption Algorithm(s) Supported (SSH) confirmed (observed)
10.10.0.60 21/tcp 4.8 FTP Unencrypted Cleartext Login confirmed (observed)
10.10.0.10 80/tcp 4.3 Missing HSTS header confirmed (observed)
10.10.0.30 5432/tcp 9.8 PostgreSQL End of Life (EOL) Detection confirmed (package 12.9-0ubuntu0.20.04.1)
10.10.0.30 22/tcp 8.1 OpenSSH Multiple Vulnerabilities (version check) confirmed (package 1:8.2p1-4ubuntu0.5)
10.10.0.60 445/tcp 9.1 Samba Multiple Vulnerabilities (version check) confirmed (package 2:4.6.2+dfsg-1)
Nine raw results become eight; one high-severity result turns out to be a false positive (the Ubuntu nginx package carries backported fixes the banner can't show); the others are confirmed, either because the check observed the behaviour or because the package data agrees with the banner. In the report, each finding keeps its evidence: "observed", or "package version X from an authenticated check".
Kinds of false positives and how to handle them
| Cause | Example | How to settle it |
|---|---|---|
| Backported fixes | Ubuntu/Debian/RHEL packages keep the upstream version | authenticated scan, or the distribution's advisory for the package version |
| Version ranges from fingerprints | "PostgreSQL 12.0 – 12.9" | ask the service (an authenticated SELECT version()), or the package database |
| Shared infrastructure | the scan hit a load balancer or WAF, not the server | scan the backend directly (in scope) or read the response headers |
| Mitigations not visible remotely | a vulnerable feature disabled in configuration | configuration evidence from the owner |
| Generic checks | "TCP timestamps", "ICMP timestamp" | decide once, by policy, what is informational |
Never mark a finding false positive without evidence, and record the evidence next to the decision: a scanner that is "tuned" by deleting inconvenient results becomes a scanner that misses real ones.
How scanning itself is managed
- Schedule and announce scans; give the scanner a fixed source address the SOC whitelists for alert routing, not for blind trust (Scope and Authorization).
- Use safe settings on production (no dangerous checks; Greenbone's and Nessus's defaults exclude them) and test new scan policies on a lab segment first.
- Protect the scanner: it holds credentials and maps of every weakness. Put it in the management zone, patch it, monitor its accounts.
- Track findings over time (new, still open, fixed, reopened) in a ticketing or vulnerability-management system: the report is a snapshot, the programme is the trend.
Pitfalls
- Pasting the scanner's PDF into the assessment report: hundreds of pages, many duplicates and false positives, and no prioritisation.
- Scanning without credentials and concluding "only 12 findings, we're fine".
- Treating the scanner's CVSS base score as the priority (CVE, CVSS and Patch Prioritisation shows why not).
- Running "dangerous" checks against production because they were on in the lab policy.
Practice
1. A Nessus result says "Version source: banner" for an Apache vulnerability on a RHEL 9 server. What do you do before reporting it?
Check the installed httpd package version (authenticated scan or the owner's rpm -q httpd) against Red Hat's advisory for that CVE. RHEL backports fixes, so the upstream version in the banner often looks vulnerable when the package is fixed.
2. Change the Samba package data to ("2:4.6.2+dfsg-1", True). What does the triage say, and should you believe it?
The Samba finding becomes a false positive. Only believe it if the evidence is real: an advisory showing that this exact package version contains the fixes. For a package this old that is unlikely, so check the advisory before accepting the change.
3. Why should the scanner's service account be monitored?
It logs in to every system with rights to read configuration and packages. If stolen, it gives an attacker the same access; its logins should come only from the scanner's address and only during scan windows.
Test yourself
What does an authenticated scan see that an unauthenticated one can't?
- Open ports
- Installed package versions and local configuration
- Banners
- TLS ciphers
What is Greenbone's QoD?
- A CVSS variant
- Quality of Detection: the scanner's confidence in how the result was obtained
- A query language
- A scan speed setting
Why was the nginx finding a false positive?
- nginx was not installed
- The distribution package contained backported fixes not visible in the banner
- The port was closed
- The scanner crashed
What must accompany every false-positive decision?
- Nothing
- The evidence that settled it (package version, advisory, configuration)
- A new scan policy
- A CVSS score