Vulnerability management
لم يُترجم بعد؛ يُعرض باللغة الإنجليزية
عن هذا الدرس
Vulnerability management is the loop that keeps known flaws out of your systems: keep an inventory, scan it, judge each finding by severity (CVSS) and by whether attackers are really using it (CISA's KEV catalog), fix the most urgent first, check the fix, and repeat. Follow one small firm through the loop, with a short Python script that ranks its findings so an exploited high-severity flaw is fixed before an unexploited critical one.
What a vulnerability is
A vulnerability is a weakness a threat could use: a bug in software, a bad setting, a missing step. Each publicly known one gets an ID called a CVE. This mail server runs software with one.
vulnerability a weakness that a threat could use
(NIST CSRC glossary)
CVE one public ID per known flaw
CVE-YEAR-NUMBER, for example
CVE-2021-44228 (Log4Shell, in Apache Log4j)
here the flaws are made-up examplesاقرأ الدرس خطوة بخطوة
What a vulnerability is
A vulnerability is a weakness a threat could use: a bug in software, a bad setting, a missing step. Each publicly known one gets an ID called a CVE. This mail server runs software with one.
vulnerability a weakness that a threat could use (NIST CSRC glossary) CVE one public ID per known flaw CVE-YEAR-NUMBER, for example CVE-2021-44228 (Log4Shell, in Apache Log4j) here the flaws are made-up examplesStart with an inventory
Vulnerability management is a loop: find flaws, rank them, fix them, check the fix, repeat. It starts with an inventory of every system and the software on it, with versions. You cannot fix what you do not know you have.
the loop inventory → scan → rank → fix → verify → repeat inventory every system, its software and versions web web server mail mail server db database NIST CSF 2.0 ID.AM-01 / ID.AM-02: inventories are maintainedScan for known flaws
A vulnerability scanner compares each system's software and versions with public lists of known flaws. Every match is a finding. Here it reports one finding on each server: the web server, the mail server and the database.
scanner installed versions vs known flaws finding one known flaw on one system web 1 finding mail 1 finding db 1 finding NIST CSF 2.0 ID.RA-01: vulnerabilities are identified, validated and recordedHow severe? CVSS
The Common Vulnerability Scoring System (CVSS) rates how severe a flaw is, from 0 to 10. NIST's National Vulnerability Database publishes scores. Ours: web 9.1 (critical), mail 7.5 (high), database 5.3 (medium).
CVSS severity scale (FIRST, v3.1 and v4.0) None 0.0 Low 0.1 - 3.9 Medium 4.0 - 6.9 High 7.0 - 8.9 Critical 9.0 - 10.0 web 9.1 Critical mail 7.5 High db 5.3 MediumIs it being exploited?
Severity is not urgency. CISA's Known Exploited Vulnerabilities (KEV) catalog lists flaws attackers are really using, and CISA urges everyone to fix these first. The mail server's flaw is on the list; the other two are not.
KEV flaws known to be exploited in the wild BOD 26-04 US federal agencies must fix them within set timelines (2026) web not listed mail on the KEV list db not listedFindings as Python data
A short Python script ranks the work. Each finding is a tuple, a fixed group of values: the host, its CVSS score, and True or False for 'on the KEV list'. The three findings make one list.
findings = [("web", 9.1, False), ("mail", 7.5, True), ("db", 5.3, False)] tuple (host, cvss, kev) kev True = on the KEV listA sort key: KEV first
rank() turns a finding into a sort key: (not kev, -cvss). Python compares tuples item by item, and False sorts before True, so KEV flaws come first. The minus sign then puts higher scores first.
def rank(f): host, cvss, kev = f return (not kev, -cvss) rank(web) → (True, -9.1) rank(mail) → (False, -7.5) rank(db) → (True, -5.3) False < True, and -9.1 < -5.3The fix queue
sorted() orders the findings by that key, and the loop prints each host: mail, web, db. The exploited high-severity flaw goes ahead of the critical one that is not known to be exploited. That order is the fix queue.
for f in sorted(findings, key=rank): print(f[0]) output mail web dbRemediate: patch or mitigate
Remediating removes the flaw, usually by installing the vendor's patch: a fixed version of the software. If no patch exists yet, mitigate: switch off the risky feature or isolate the system until one arrives.
remediate remove the flaw: install the patch (a fixed version from the vendor) mitigate no patch yet: turn the feature off, or isolate the system NIST SP 800-40r4 patching is preventive maintenanceVerify, then close
Then check. A fresh scan of the mail server confirms the flaw is gone, and only then is the finding closed. The queue moves on to web, then db. Tracking how long each fix takes shows if you keep up.
verify rescan: is the flaw really gone? close only after the rescan is clean queue mail ✓ · web · db measure time from finding to fixRound the loop again
New flaws are published every day, and the KEV list keeps growing. So the loop never stops: keep the inventory current, scan regularly, re-rank when the lists change and patch on a schedule. NIST calls patching preventive maintenance.
every day new CVE records, new KEV entries so inventory current scan regularly rank again when the lists change patch on a schedule (preventive maintenance)
أسئلة سريعة: 5
اختر إجابة واحدة لكل سؤال. يمكنك تغيير اختياراتك قبل التحقق منها.
01A finding has a CVSS base score of 7.5. On FIRST's qualitative scale, what severity is that?
FIRST's scale (CVSS v3.1 and v4.0): Low 0.1-3.9, Medium 4.0-6.9, High 7.0-8.9, Critical 9.0-10.0. So 7.5 is High.
02Two findings: one scores 9.1 but is not known to be exploited; the other scores 7.5 and is in CISA's KEV catalog. Following CISA's advice, which do you fix first?
KEV lists flaws known to be exploited in the wild, and CISA urges every organisation to fix those first. CVSS measures how severe a flaw is, not how likely it is to be used against you.
03In Python, sorted(findings, key=rank) with rank returning (not kev, -cvss). Why does a finding with kev = True come first?
Tuples compare item by item. For a KEV finding the first item is not True, which is False (equal to 0), so it sorts before every non-KEV finding, whose first item is True (equal to 1). Only ties are then settled by -cvss.
04A flaw has no vendor patch yet. What is a reasonable response?
When a patch cannot be applied, NIST SP 800-40 describes mitigating the risk in other ways, such as disabling the vulnerable feature or isolating the system, until the patch can be installed.
05The mail server has been patched. When should its finding be closed?
Verifying with a new scan catches patches that failed, did not restart, or missed a system. Only a clean rescan closes the finding.
المسرد
- Vulnerability
- A weakness in a system, its settings or its procedures that a threat could use (NIST). Software bugs and bad configurations are common examples.
- CVE ID
- The public identifier the CVE Program gives each disclosed vulnerability, in the form CVE-YEAR-NUMBER, for example CVE-2021-44228 (Log4Shell).
- Vulnerability scanner and finding
- A scanner compares the software and versions installed on each system with lists of known flaws. Each match is a finding: one known flaw on one system.
- CVSS
- The Common Vulnerability Scoring System, maintained by FIRST: a severity score from 0.0 to 10.0, grouped as None, Low, Medium, High and Critical. FIRST says it should not be used alone to assess risk.
- NVD
- NIST's National Vulnerability Database, which adds CVSS scores and other details to CVE records.
- KEV catalog
- CISA's Known Exploited Vulnerabilities catalog: flaws known to be exploited in the wild. CISA urges every organisation to fix them first, and US federal agencies must fix them within set timelines (BOD 26-04).
- Remediate and mitigate
- Remediating removes the flaw, usually by installing the vendor's patch. Mitigating lowers the risk when a fix is not possible yet, for example by switching off a feature or isolating the system.
- Verification
- A fresh scan after a fix that confirms the flaw is really gone before the finding is closed.
الملاحظات والمصادر
- The three findings, their scores and the KEV mark are made up to show the method. Real CVE records list their own scores, and an NVD score can change as more is learned.
- FIRST, which maintains CVSS, says it is designed to measure severity and should not be used alone to assess risk. Real programs also weigh how exposed a system is and how important it is: CISA's SSVC decision trees and FIRST's EPSS (the chance of exploitation) help with that.
- KEV first, then CVSS, is one sensible rule, not the only one. It follows CISA's advice to fix known exploited flaws first; each organisation sets its own deadlines.
- Scanners only find flaws that are already known and listed. A clean scan does not prove a system has no weaknesses, so it is one layer among several.
- This course is about defence. Flaws are described only as weaknesses and how to fix them, never how to exploit one.
- NIST SP 800-40 Rev. 4: Guide to Enterprise Patch Management Planning: Preventive Maintenance for Technology (2022)
- NIST CSWP 29: The NIST Cybersecurity Framework (CSF) 2.0 (2024)
- NIST CSRC Glossary: vulnerability
- NIST National Vulnerability Database: Vulnerability Metrics (CVSS)
- FIRST: CVSS v3.1 Specification Document
- FIRST: CVSS v4.0 Specification Document
- The CVE Program
- CISA: Known Exploited Vulnerabilities Catalog
- CISA: BOD 26-04, Prioritizing Security Updates Based on Risk (2026)
- CISA: Stakeholder-Specific Vulnerability Categorization (SSVC)
- OWASP Top 10 2021: A06 Vulnerable and Outdated Components
- OWASP Vulnerability Management Guide
- Python documentation: Sorting Techniques
- Python documentation: Value comparisons (sequences compare lexicographically)
اختبار يتاح بعد الخطوة الأخيرة.