Skip to content
intermediate Phase 3 · Operating System Hardening and Permissions

Patching and Vulnerability Management

Inventory assets, prioritize CVEs by exposure, and patch on an SLA.

55m
0 problems
Topic Progress 0%

You Cannot Patch What You Do Not Know Exists

The Asset Inventory Problem

The most common reason organizations get breached through known vulnerabilities is not that they did not have patches available — it is that they did not know the vulnerable system existed. A complete, accurate asset inventory is the foundation of all vulnerability management. Without it, you are patching blindly.

Building the Asset Inventory

An asset inventory must capture:

  • Hardware: Servers (physical and virtual), workstations, network devices, IoT devices, mobile devices
  • Software: Operating systems, applications, libraries, frameworks, containers
  • Cloud resources: VMs, serverless functions, storage buckets, databases, Kubernetes clusters
  • Network information: IP addresses, DNS names, open ports, network segments
  • Ownership: Who is responsible for each asset
  • Criticality: How important is this asset to the business?
# Discover hosts on a network
nmap -sn 192.168.1.0/24

# Detailed discovery with OS and service detection
nmap -sV -sC -O 192.168.1.0/24

# Check installed packages on a Linux host
dpkg -l > inventory.txt    # Debian/Ubuntu
rpm -qa > inventory.txt     # RHEL/CentOS

# Check for outdated packages
apt list --upgradable        # Debian/Ubuntu

The inventory must be continuous, not periodic. New assets appear constantly — cloud instances are created and destroyed, developers spin up test servers, employees connect personal devices. A point-inventory snapshot is outdated the moment it is taken. Continuous discovery tools (cloud asset management, network scanning, EDR platforms) maintain a current inventory automatically.

Vulnerability Scanning

Once you know what assets exist, you scan them for vulnerabilities:

# Open-source vulnerability scanner
# OpenVAS (Greenbone)
# Install and run a scan against a target

# Nessus (commercial, free for home use)
# Create a scan policy, target specific assets, run scan

# Command-line scanning with nmap scripts
nmap --script vuln 192.168.1.100

Vulnerability scanners detect:

  • Missing security patches
  • Default credentials
  • Misconfigurations (weak TLS, unnecessary services, default pages)
  • Known CVEs in installed software

Scanner limitations:

  • Scanners cannot detect vulnerabilities in custom application code
  • Scanners may cause service disruptions if not configured carefully
  • Scanners require credentials for authenticated scans (more thorough but riskier)
  • Scanners produce false positives that must be triaged

The Vulnerability Management Lifecycle

Vulnerability management is a continuous cycle, not a one-time project:

  1. Discover: Identify all assets in the environment
  2. Assess: Scan for vulnerabilities and misconfigurations
  3. Prioritize: Rank vulnerabilities by risk (not just CVSS)
  4. Remediate: Patch, mitigate, or accept the risk
  5. Verify: Confirm the remediation was effective
  6. Monitor: Continuously scan for new vulnerabilities
    Discover → Assess → Prioritize → Remediate → Verify
        ↑                                        |
        └──────────── Monitor ←───────────────────┘

Each stage feeds the next. Discovery finds new assets, assessment finds vulnerabilities on them, prioritization determines which to fix first, remediation applies the fix, verification confirms it worked, and monitoring finds new vulnerabilities introduced by changes.

Prioritization: Why CVSS Alone Is Not Enough

Risk-Based Prioritization

The most common mistake in vulnerability management is prioritizing solely by CVSS score. A CVSS 9.8 vulnerability on an isolated internal test server is a lower priority than a CVSS 7.5 vulnerability on an internet-facing payment system. CVSS measures severity — how bad the vulnerability would be if exploited — but it does not measure risk, which combines severity with likelihood and impact.

Adjusting CVSS for Your Environment

The CVSS base score should be adjusted by environmental factors:

Exploitability adjustment:

  • Is there a known public exploit? (Exploit-DB, Metasploit module)
  • Is the exploit reliable or does it require specific conditions?
  • Is the vulnerability being actively exploited in the wild? (CISA KEV catalog)

Exposure adjustment:

  • Is the asset internet-facing or internal-only?
  • Is the asset in a segmented network with firewall protection?
  • Does the asset process sensitive data (PII, financial, health)?

Asset criticality adjustment:

  • Is the asset a single point of failure?
  • How many users depend on this asset?
  • What is the financial impact of downtime?
  • Are there regulatory requirements for this asset?

Temporal adjustment:

  • Has a patch been available for a long time? (Longer = more likely to be exploited)
  • Is a patch available now, or is mitigation the only option?

The CISA KEV Catalog

The CISA Known Exploited Vulnerabilities (KEV) catalog lists vulnerabilities that are being actively exploited in the wild. Any vulnerability on this catalog should be treated as critical regardless of its CVSS score, because attackers are actively using it.

# Check if a CVE is in the KEV catalog
# https://www.cisa.gov/known-exploited-vulnerabilities-catalog
# Download the JSON and search:
curl -s https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json | \
  python3 -c "import json,sys; data=json.load(sys.stdin); [print(v['cveID']) for v in data['vulnerabilities'] if 'CVE-2024' in v['cveID']]"

Patch SLAs: Balancing Speed and Stability

Patching too slowly leaves you vulnerable. Patching too quickly can break production systems. Patch SLAs (Service Level Agreements) define how quickly different categories of vulnerabilities must be patched:

Vulnerability Category SLA Rationale
Critical, internet-facing, known exploit 24-48 hours Active exploitation risk is highest
Critical, internal 7 days Lower exposure but still urgent
High, internet-facing 7 days Significant risk but more time for testing
High, internal 14 days Moderate risk, standard change window
Medium 30 days Lower risk, can follow normal patch cycle
Low 90 days Minimal risk, patch during regular maintenance

The SLA clock starts when the patch is available, not when the vulnerability is disclosed. Vendors often release patches on a regular schedule (e.g., Microsoft's Patch Tuesday). The SLA should account for the time required to test the patch in a staging environment before deploying to production.

Patch Testing and Deployment

1. Vendor releases patch
2. Security team assesses urgency (CVSS + environmental factors)
3. Patch is deployed to staging environment
4. QA team tests for regressions
5. Patch is deployed to production (maintenance window)
6. Vulnerability scan verifies the patch was applied
7. Risk register is updated

When patching is not possible:

  • Compensating controls: If a patch cannot be applied immediately, implement compensating controls — firewall rules, WAF rules, network segmentation, or configuration changes that reduce the risk.
  • Virtual patching: A WAF or IPS rule that blocks exploitation of a specific vulnerability without patching the underlying software.
  • Risk acceptance: If the cost of patching exceeds the risk, document the decision and the rationale. This is a valid choice — but it must be explicit, not implicit.

Vulnerability Management Metrics

Track these metrics to measure the effectiveness of your vulnerability management program:

  • Mean time to patch (MTTP): Average time from patch availability to deployment
  • Patch compliance rate: Percentage of assets patched within SLA
  • Vulnerability aging: How long vulnerabilities have been open
  • Recurrence rate: How often the same vulnerability reappears (indicates process failure)
  • Coverage: Percentage of assets scanned in the last 30 days

These metrics tell you whether your program is improving or degrading over time. A rising MTTP or declining patch compliance rate indicates a process problem that needs attention.

Practice Problems

0 / 2 solved

Solution
Prioritization approach: (1) First, adjust CVSS scores for environmental factors — identify which critical vulnerabilities are on internet-facing servers with known exploits (check CISA KEV). These get patched first regardless of CVSS. (2) Patch critical vulnerabilities on internet-facing servers within 48 hours. (3) Patch critical vulnerabilities on internal servers within 7 days. (4) For high-severity vulnerabilities, prioritize by asset criticality — payment systems before internal tools. (5) Medium/low vulnerabilities follow the normal patch cycle (30/90 days). (6) For vulnerabilities that cannot be patched immediately, implement compensating controls (WAF rules, firewall rules) and document risk acceptance. (7) Track MTTP and patch compliance rate to measure progress. With 3 people patching 10 servers per week, the 50 critical vulnerabilities should be addressed within 2-3 weeks, assuming each server has an average of 10 critical vulnerabilities.

Solution
This is a common scenario that requires balancing security urgency with operational stability. Approach: (1) Immediately implement compensating controls — add a WAF rule to block exploitation of the specific vulnerability, restrict network access to the application to only required sources, and increase monitoring on the application. (2) Test the patch in a staging environment that mirrors production as closely as possible. (3) If the patch passes testing, schedule deployment during the next maintenance window (weekend or overnight). (4) If the patch causes regressions, work with the vendor to identify a fix or alternative. (5) If the patch cannot be deployed within the SLA, document a risk acceptance with a specific deadline for patching. (6) Consider virtual patching as an interim measure — a WAF rule that specifically blocks the exploit pattern. (7) Communicate the risk to stakeholders — they need to understand the exposure and the plan to address it. The key is that the risk is explicitly acknowledged and managed, not ignored.

Quiz

1. Why is a complete asset inventory the foundation of vulnerability management?

Question 1 options

2. Why is CVSS alone insufficient for vulnerability prioritization?

Question 2 options

3. What is the purpose of the CISA KEV catalog in vulnerability management?

Question 3 options

Flashcards

Question

Why is asset inventory the foundation of vulnerability management?

Answer

You cannot patch systems you do not know exist. Unknown assets are unpatched assets. A complete, continuously updated inventory ensures every system is included in scanning and patching.

Question

What are the stages of the vulnerability management lifecycle?

Answer

Discover → Assess → Prioritize → Remediate → Verify → Monitor. It is a continuous cycle, not a one-time project.

Question

Why is CVSS alone insufficient for prioritization?

Answer

CVSS measures severity, not risk. Risk = likelihood × impact. A critical vulnerability on an isolated internal server is lower risk than a high vulnerability on an internet-facing system. Adjust CVSS for exploitability, exposure, and asset criticality.

Question

What is the CISA KEV catalog and why does it matter?

Answer

The Known Exploited Vulnerabilities catalog lists CVEs being actively exploited in the wild. Any vulnerability on this catalog should be treated as critical regardless of CVSS score, because active exploitation means the risk is not theoretical.

Question

What are typical patch SLAs for critical vulnerabilities?

Answer

Critical + internet-facing + known exploit: 24-48 hours. Critical + internal: 7 days. High + internet-facing: 7 days. High + internal: 14 days. Medium: 30 days. Low: 90 days.

Question

What are compensating controls and when are they used?

Answer

Controls that reduce risk when a patch cannot be applied immediately — firewall rules, WAF rules, network segmentation, virtual patching, increased monitoring. Used when patching is delayed by testing requirements or operational constraints.

Revision Notes

Key Takeaways

  • 1. Asset inventory is the foundation — unknown assets are unpatched assets
  • 2. The vulnerability management lifecycle is continuous: discover → assess → prioritize → remediate → verify → monitor
  • 3. CVSS measures severity, not risk — always adjust for exploitability, exposure, and asset criticality
  • 4. CISA KEV catalog identifies actively exploited vulnerabilities — treat as critical regardless of CVSS
  • 5. Patch SLAs balance urgency with stability: 24-48 hours for critical internet-facing, 30-90 days for lower severity
  • 6. When patching is not possible, use compensating controls and document risk acceptance explicitly

Interview Tips

  • • Be ready to describe how you would prioritize a large backlog of vulnerabilities with limited staff
  • • Explain why CVSS alone is insufficient and how you adjust for environmental factors
  • • Discuss how you handle the tension between patching urgency and operational stability
  • • Describe how you would build and maintain a continuous asset inventory
  • • Connect vulnerability management to metrics — how do you measure whether your program is improving?

Cheat Sheet

Patching and Vulnerability Management Cheat Sheet

Phase: Operating System Hardening and Permissions | Level: intermediate

Asset Inventory:

  • Foundation of all vulnerability management — you cannot patch what you do not know exists
  • Must be continuous, not periodic (new assets appear constantly)
  • Capture: hardware, software, cloud resources, ownership, criticality

Vulnerability Management Lifecycle:
Discover → Assess → Prioritize → Remediate → Verify → Monitor (continuous cycle)

Prioritization (CVSS + Environmental Factors):

  • Exploitability: known public exploit? Active exploitation? (CISA KEV)
  • Exposure: internet-facing or internal? Segmented?
  • Asset criticality: single point of failure? Sensitive data? Regulatory?
  • CVSS measures severity, not risk — adjust for your environment

Patch SLAs:

Category SLA
Critical + internet-facing + known exploit 24-48 hours
Critical + internal 7 days
High + internet-facing 7 days
High + internal 14 days
Medium 30 days
Low 90 days

When Patching Is Not Possible:

  • Compensating controls (firewall, WAF, segmentation)
  • Virtual patching (WAF/IPS rule blocking the exploit)
  • Risk acceptance (documented decision with rationale)

Key Metrics:

  • Mean time to patch (MTTP)
  • Patch compliance rate
  • Vulnerability aging
  • Recurrence rate
  • Scan coverage

Continue Learning

Before You Start

  • No prerequisites listed.