Skip to content
Tutorials Center
My learning

Topics

Lesson 13 of 31 ยท Vulnerability Assessment

Vulnerability Scanners and Their Reports

Learn how vulnerability scanners such as OpenVAS and Nessus work, the difference between authenticated and unauthenticated scans, and how to read a report.

A vulnerability scanner is a program that checks systems against a large database of known weaknesses and produces a report. Open-source scanners such as OpenVAS (part of the Greenbone project) and commercial products such as Nessus, Qualys or Rapid7 InsightVM all follow the same basic idea: they talk to a host, work out what is running on it, and compare that with thousands of tests written for known flaws.

The scanner is only half of the story. The other half is the report, and most of the value of an assessment comes from reading it well. A report with 400 findings is useless if nobody can tell the three that matter from the 397 that do not. This lesson explains how scanners find things, why the same host can look very different depending on how you scan it, and how to read and process the output. It builds on the Vulnerability Assessment Workflow.

Only scan systems you own or have written permission to scan. Scanners are noisy, can slow down fragile devices, and can crash old services. See Law, Ethics and Authorization.

How a scanner works

Most scanners run in stages. Each stage narrows what the next one has to do:

Four stages of a scan

Discovery Which hosts are alive?
Port scan Which ports answer?
Fingerprint Which service and version?
Tests Run checks that match.

Each stage feeds the next one.

1 / 2

Discovery and port scanning use the techniques from How Port Scanning Works. Fingerprinting uses banners and behavior, as in Service and Version Enumeration. The last stage is where the scanner is different from a plain port scanner: it runs plugins (OpenVAS calls them Network Vulnerability Tests, or NVTs; Nessus calls them plugins). A plugin is a small check written for one weakness, and it can be one of three kinds:

  • Version-based. The service says it is "ExampleHTTPd 2.4.1", and the plugin knows that 2.4.1 is affected by a CVE. This is fast and safe, but it can be wrong, because a vendor may have patched the issue without changing the version string.
  • Behavior-based. The plugin sends a harmless request that a vulnerable version answers differently from a fixed one. This is more accurate and a little riskier.
  • Configuration-based. The plugin checks a setting: an expired certificate, an old TLS version, a default password page, a directory listing that should be off.

Real scanners also update their plugin feed daily. A scan with last month's feed will miss this month's vulnerabilities, so check the feed date before trusting a clean result.

Authenticated and unauthenticated scans

The biggest choice you make is whether the scanner gets credentials.

An unauthenticated (or "remote") scan sees only what any stranger on the network could see: open ports, banners, web pages. It is a good picture of the external attack surface, and it needs no setup. But it can only guess about what is installed, because it cannot log in and look.

An authenticated (or "credentialed") scan logs in, usually with a read-only account over SSH or WinRM/SMB, and inspects the system from the inside. It lists installed packages, compares them with the vendor's patch data, checks file permissions and reads settings. It finds far more, and with far fewer false positives, because it does not guess from banners.

Two views of one server

Unauthenticated Sees what a stranger sees.
Authenticated Sees installed packages and settings.

Use both. They answer different questions.

1 / 2

A useful rule: scan from outside without credentials to see what attackers see, and from inside with credentials to find what needs patching. Give the scan account the least privilege that works, store its password in the scanner's credential vault, and delete the account when the project ends.

A typical OpenVAS setup on Kali is installed and started with commands like these. They are shown read-only because the scanner runs as a service with a web interface and a large database, which a browser page cannot host:

Terminal
sudo apt install gvm
sudo gvm-setup          # downloads the feed, creates the admin user
sudo gvm-check-setup    # verifies the installation
sudo gvm-start          # opens the web interface (Greenbone Security Assistant)

You then create a target (the hosts and ports), optionally a credential, and a task that ties the target to a scan configuration such as "Full and fast". Always begin with a small, authorized target.

Reading a report

Every report is built from the same pieces. Learn them once and any product becomes readable:

  • Host and port. Where the problem is.
  • Name and plugin ID. What was checked.
  • Severity. Usually a CVSS-based score from 0.0 to 10.0 and a label (Low, Medium, High, Critical). The CVSS idea is covered in Vulnerability Assessment Workflow.
  • CVE references. Public identifiers for the weakness.
  • Quality of detection. OpenVAS reports a QoD percentage: how sure the scanner is. A 30% QoD finding is a hint to verify, a 95% finding is nearly certain.
  • Evidence. The output the scanner saw, for example the banner or the config line.
  • Solution. The fix: upgrade, change a setting, or apply a vendor patch.

Reports can be exported as PDF for people and as XML, CSV or JSON for tools. A script can read the machine formats and answer questions faster than scrolling, such as "show only High and Critical findings on the web servers, sorted by score".

The data below is an invented sample, not from any real scan. Run it and see how a few lines of Python turn a JSON report into a summary. Python here is a stand-in for what a real scanner export plus your own tooling does. The scan itself is not simulated.

Python Summarize a sample scan report

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice the 9.8 finding has a QoD of only 30%. The high score says "if real, this is serious". The low QoD says "the scanner guessed from a banner". That finding should be verified by hand before anyone wakes up the on-call engineer.

False positives, false negatives and noise

Two kinds of mistakes appear in every scan:

  • A false positive is a reported problem that does not exist, for example a patched package that still shows the old version string. Hunting these wastes time, and a team that sees too many will stop trusting the tool.
  • A false negative is a real problem the scanner did not report: it could not log in, the host was down, the port was filtered, or the plugin does not exist yet. These are more dangerous because they feel like safety.

Good habits reduce both: use authenticated scans, keep the feed current, record exceptions with a reason and an expiry date, and sample-check results by hand. Also watch for scan coverage. If you expected 120 hosts and the report lists 95, the 25 missing hosts are a finding in themselves.

The second stand-in checks exactly that: it compares the hosts you expected with the hosts that appear in a report, and filters findings by QoD so only trustworthy ones need action right away.

Python Check coverage and confidence

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

What is real and what is the stand-in

The commands for installing and driving OpenVAS are real, and so are the report fields described above. The JSON used here is invented and simplified: real exports (OpenVAS XML, Nessus .nessus files) are larger and differ in field names. The Python code stands in for the post-processing step you would write against a real export. Nothing in these examples scans a network.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why does an authenticated scan usually produce fewer false positives than an unauthenticated one?

    With credentials the scanner can read the real package list and configuration, so it does not have to infer a version from a banner.
  2. 2. A finding has a CVSS score of 9.8 but a quality of detection of 30%. What is the best next step?

    The score describes how bad the issue is if real. The QoD describes how sure the scanner is. A low QoD means a human should confirm it before acting.
  3. 3. Which situation is a false negative?

    A false negative is a real problem that was not reported. A missing host gives a false sense of safety.
  4. 4. Why should you check the plugin feed date before trusting a clean report?

    A scanner is only as current as its tests. An out-of-date feed misses recent vulnerabilities.

Summary

  • A scanner discovers hosts, finds open ports, fingerprints services and runs plugins that check for known weaknesses.
  • Plugins are version-based, behavior-based or configuration-based, and each has different accuracy.
  • Unauthenticated scans show the outside view; authenticated scans find more and guess less. Use both.
  • Read reports by host, port, severity, CVE, confidence (QoD), evidence and solution, and export JSON or XML for scripting.
  • Handle false positives with verification and false negatives with coverage checks and fresh feeds.
  • Only scan what you are authorized to scan.

Next, move from tools to the credentials that attackers target most often in Password Storage and Hashing.