Skip to content
Tutorials Center
My learning

Topics

Lesson 15 of 53 Β· Reconnaissance and Scanning

Vulnerability Scanning and Triage

Learn how vulnerability scanners work, what CVE and CVSS mean, how to spot false positives, and how to rank findings by exploitability and exposure instead of by score alone.

A port scan tells you what is listening. A vulnerability scan goes a step further: it checks each service against a database of known weaknesses and reports which ones appear to be present. A single scan of a mid-sized network can easily produce hundreds or thousands of findings. Nobody can fix all of them at once, so the valuable skill is not running the scanner. It is triage: deciding what matters, what is noise, and what to fix first.

This lesson explains the vocabulary (CVE, CVSS, exploitability), how scanners reach their conclusions and why they are sometimes wrong, and a practical way to rank findings. Real scanners (commercial and open source) need a target network and cannot run on this site, so they are described read-only. The runnable parts are Python stand-ins that triage sample findings you would get from such a tool. Only scan systems you are authorized to test, as covered in Law, Scope and Rules of Engagement; the previous lesson on port scanning shows how discovery feeds this step.

CVE and CVSS

A CVE (Common Vulnerabilities and Exposures) is a public identifier for one specific known flaw, written CVE-YEAR-NUMBER, such as CVE-2021-44228. The identifier is only a name, so everyone can talk about the same flaw. The details (affected versions, description, references) live in public databases.

The CVSS (Common Vulnerability Scoring System) gives a flaw a severity score from 0.0 to 10.0 based on characteristics such as how it is attacked (over the network or locally), how complex the attack is, whether privileges or user interaction are needed, and what the impact on confidentiality, integrity and availability is. Scores map to labels:

Score Label
0.0 None
0.1 – 3.9 Low
4.0 – 6.9 Medium
7.0 – 8.9 High
9.0 – 10.0 Critical

CVSS describes the flaw in general. It does not know whether the vulnerable service is on the internet, holds payroll data or is already protected by a firewall. That is the main reason a score alone is a poor priority list.

Score is not risk

CVSS How bad the flaw is in general.
Exploitability Is it being used in the wild?
Exposure Can an attacker reach it?
Asset value What is lost if it falls?

Priority combines all four.

1 / 2

Two other signals help. A public list of vulnerabilities known to be exploited in the wild turns "could be abused" into "is being abused". A probability score for the next 30 days of exploitation activity serves a similar role. Both are published by security organizations and are worth checking for any High or Critical finding.

How scanners work, and why they are wrong

A scanner usually combines several methods:

  1. Discovery: find hosts and open ports.
  2. Fingerprinting: identify the product and version from banners and probes.
  3. Checks: compare the version to a database of affected versions, or send a safe probe that tests behavior.
  4. Authenticated scans: log into the system (with a read-only account) and inspect installed packages and configuration. These are far more accurate than outside-only scans.

Each step can mislead:

  • A false positive is a reported flaw that is not really there. The most common cause is version-based detection: a Linux distribution often backports a security fix without changing the version number, so the scanner sees "version 1.18.0" and flags a flaw the package already contains a patch for.
  • A false negative is a missed flaw: the scanner could not reach the service, could not log in, or has no check for it. A clean report is never a proof of security.
  • Context errors: the flaw is real but not exploitable here, for example the vulnerable function is never called or the service is bound to localhost.

Validating a suspicious finding means checking evidence: the package version in the system's own package manager, the vendor advisory, whether the configuration that triggers the flaw is enabled, and in a lab or authorized test, whether a safe check confirms it.

Reading a finding

A typical scanner row has these fields (the data below is invented):

TEXT
host        port  plugin / title                    CVE              CVSS  evidence
10.0.5.12   443   Outdated web server version      CVE-2099-0001    9.8   Server: examplehttpd/2.1
10.0.5.40   22    Weak key exchange algorithms     -                3.7   diffie-hellman-group1
10.0.5.7    8080  Admin console without password   -                8.8   HTTP 200 on /admin

Not every finding has a CVE. Misconfigurations (a default password, an exposed admin page) are often more dangerous and easier to exploit than a patchable software bug, and their CVSS score may be absent or understated.

Triage by exploitability and exposure

A workable approach in plain steps:

  1. Remove duplicates and confirmed false positives.
  2. Ask what is reachable: internet-facing first, then internal systems that sit on sensitive networks.
  3. Weight exploitability: known to be exploited, public exploit code available, or only theoretical.
  4. Weight asset value: a customer database outranks a printer.
  5. Pick a deadline from the result, and record who owns the fix.

Typical patch cycles then follow policy: emergency changes for actively exploited critical flaws on exposed assets (hours to days), normal monthly patching for the rest, and risk acceptance (documented, with an expiry date) for things that cannot be fixed yet. Compensating controls such as a firewall rule or a disabled feature reduce risk while the patch is prepared.

A triage calculator

The stand-in below ranks sample findings. The weights are a teaching model, not an industry formula. It multiplies the base score by factors for exposure, exploitation and asset value, then assigns a fix-by deadline.

Python Rank sample findings by real risk

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.

Look at the effect: a printer flaw with a High score ends up below a Medium-scored database issue on a valuable asset, and the exposed, actively exploited web server jumps to the top. That is the whole point of triage: the same data in a more useful order. The real scanner output and exploit feeds are not available here; the sample table and weights are the stand-in.

Tracking progress

Fixing is a process, not an event. Track each finding with an owner and a deadline, re-scan after the patch to confirm it is gone (this is retesting), and measure how long findings stay open. A second small stand-in shows the bookkeeping: counting overdue items and the average age of open findings.

Python Find overdue findings

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.

Programs such as this scale up into dashboards with service-level targets (for example "criticals within 7 days"). You will build a fuller one in Project: Vulnerability Triage Tracker.

Good habits

  • Prefer authenticated scans and scan regularly, because new CVEs appear every day against software you already run.
  • Treat a clean report with suspicion: check what was not scanned.
  • Verify before you escalate. A false alarm costs engineers' time and trust.
  • Scan gently: use safe checks, schedule outside peak hours and exclude fragile devices unless agreed.
  • Report what was found, how you know and what to do, not just a score. The reporting lesson returns to this.

Nmap result reading and the Nikto web scanner

Nmap output lists each port with a state (open, closed, filtered, open|filtered), the service and, with version detection, the product and version. A UDP-only scan prints the same table, with "open|filtered" being common. Keep results in the XML or grepable formats so they can be compared between scans.

Nikto is an open-source web server scanner that checks for dangerous files, outdated server software and common misconfigurations. Typical options include -host (the target to scan), -port, -ssl, -useproxy (send traffic through a proxy), -output and -Tuning (choose test categories). It is noisy: it sends thousands of requests and every one shows up in logs, so run it only against your own servers or with written permission, and never against production at peak time. Limitations: it relies on a signature database, produces many false positives, cannot understand application logic or authenticated areas, and can miss anything not in the database. Treat its output as leads to verify manually.

Dynamic application security testing (DAST)

DAST tests a running application from the outside, like an attacker. A DAST tool crawls the application to map pages and forms, then sends crafted inputs to find problems such as injection, cross-site scripting, weak headers and misconfigurations. Popular tools include OWASP ZAP (free), and commercial products such as Acunetix, Invicti (formerly Netsparker), Veracode Dynamic Analysis and Checkmarx DAST.

Advantages: it needs no source code, works for any language, finds runtime and environment-specific problems that source review cannot see (a missing header on the production proxy), and produces few "theoretical" findings. Limits: it comes late in the cycle, cannot point to the exact line of code, coverage depends on the crawl, and it cannot reach logic hidden behind complex workflows. Combine it with static analysis (SAST) and code review.

Check your understanding

Quick check Β· 4 questions

of 4 answered You scored / 4 Β· perfect!

  1. 1. What does a CVE identifier represent?

    A CVE number is only an identifier for a particular flaw, so people and tools can refer to the same one. The severity is a separate CVSS score.
  2. 2. Why is CVSS alone not enough to prioritize fixes?

    The base score is context-free. A medium flaw on a critical internet-facing system can matter more than a high flaw on an isolated printer.
  3. 3. A scanner flags a package as vulnerable by version number, but the distribution backported the fix. This is…

    The scanner reported a flaw that is not actually present. Checking the package's changelog or vendor advisory reveals the backported patch.
  4. 4. What is the purpose of a retest after patching?

    Retesting verifies that the fix worked and that the finding can be closed, rather than trusting that the change was applied correctly.

Summary

  • A vulnerability scan compares discovered services against known flaws; the hard work is triage.
  • A CVE names a flaw, and CVSS rates its general severity from 0.0 to 10.0.
  • Scanners produce false positives (for example from backported fixes) and false negatives, so evidence must be checked.
  • Rank findings using exploitability, exposure and asset value, not the score alone.
  • Assign owners and deadlines, re-scan after patching and measure overdue items.
  • Misconfigurations without a CVE can be more serious than patchable bugs.

Next: Cryptography Essentials