Skip to content
Tutorials Center
My learning

Topics

Lesson 17 of 37 ยท Exploits and Payloads

Vulnerability Research: CVEs, Advisories and Matching Modules

Learn to connect findings to vulnerabilities: reading CVE entries and CVSS scores, using search cve filters, vendor advisories, and prioritising what to patch first.

A banner says "Example web server 2.4.50". Is that dangerous? To answer you need a process: look up known vulnerabilities for that version, read the advisories, check whether a test module exists, confirm with a safe check, and rate the real risk. This lesson teaches that process and the vocabulary around it.

Identifiers and scores

  • CVE (Common Vulnerabilities and Exposures) gives each publicly known flaw an identifier like CVE-2021-12345 (year, then a number). One CVE describes one vulnerability, but a single product update may fix several.
  • CWE (Common Weakness Enumeration) names the class of mistake, such as out-of-bounds write or improper input validation.
  • CVSS (Common Vulnerability Scoring System) rates severity from 0.0 to 10.0 using metrics such as attack vector (network or local), complexity, privileges needed, user interaction and impact on confidentiality, integrity and availability.
  • Vendor advisories state which versions are affected and which are fixed. They are the final authority.
  • KEV lists (known exploited vulnerabilities) published by public agencies identify flaws attackers are using right now.

A CVSS score is a rating of the flaw in general. It does not know your network. A 9.8 on a server isolated from every network may matter less than a 6.5 on your internet-facing login page.

Vocabulary

CVE The flaw's public ID.
CWE The kind of mistake.
CVSS Generic severity 0 to 10.
KEV Flaws seen in real attacks.

Scores help sorting, not deciding.

1 / 2

From a banner to a candidate

flowchart LR
    A["Banner: product + version"] --> B["Search advisories and CVE lists"]
    B --> C["Affected version range matches?"]
    C --> D["search cve:ID in msfconsole"]
    D --> E["check (if available)"]
    E --> F["Confirmed, report and patch"]

Every arrow is a place to stop: no advisory, no module and a negative check are all valid outcomes.

In the console, modules are searchable by CVE:

TEXT
msf6 > search cve:2021-12345
Matching Modules
================
   #  Name                                  Disclosure Date  Rank   Check  Description
   0  exploit/example/vulnerable_service    2021-06-01       great  Yes    Example service remote exec

msf6 > info exploit/example/vulnerable_service

(Example output.) info shows the references, which link to the CVE entry and vendor advisory; read them. If no module exists, the flaw may still be real: lack of a module only means Metasploit does not have one.

Also check scanner imports: vulns lists what imported scan results claim. Treat scanner claims as hypotheses.

Comparing versions properly

Version comparison is fiddly: "2.4.9" is lower than "2.4.10", but as plain text "2.4.9" sorts higher. Use numeric tuples. The stand-in below checks a version against an advisory's affected range (invented data).

Python Is this version in the affected range?

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.

The final line demonstrates why plain text comparison is a bug.

Prioritising

Rank findings by combining several signals, not CVSS alone:

  1. Is the service reachable from the internet or an untrusted network?
  2. Is the flaw known to be exploited (KEV)? Is public exploit code available (a Metasploit module is a strong signal of easy exploitation)?
  3. What does the affected system hold or control?
  4. How easy is the fix? Cheap, safe fixes go first.
Python A simple risk score

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.

The formula is invented for teaching; real programmes document their own and review it. The lesson is that context changes order: the medium-score login-page bug can outrank the high-score internal printer.

Responsible handling of new findings

If your testing discovers a flaw that is not yet public, tell the vendor and give them time to fix it (coordinated disclosure). Do not publish exploit details for an unpatched flaw. If you write a Metasploit module, submit it only after a patch exists, per the project's contribution guidelines.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. What does a CVE identify?

    CVE gives each publicly known flaw a unique identifier.
  2. 2. Why is plain text comparison of version numbers wrong?

    Compare numeric components, not characters.
  3. 3. Which command finds modules for a given CVE?

    search accepts a cve: filter.
  4. 4. Does a missing Metasploit module mean the flaw is not real?

    Absence of a module says nothing about the flaw's existence.
  5. 5. Why is CVSS alone not enough for prioritising?

    Reachability, exploitation in the wild and asset value change the real risk.

Summary

  • CVE names a flaw, CWE the weakness class, CVSS rates it generally, advisories say which versions are affected.
  • Go from banner to advisory to module to check, and stop wherever evidence ends.
  • Compare versions numerically; confirm before reporting.
  • Prioritise with exposure, exploitation, asset value and fix cost; disclose new flaws responsibly.

Next: Encoders, Evasion Testing and the Defender View