Chapter 05

Windows Update and Patch Management

The window between a vulnerability being patched and being deployed is the most dangerous period in an organization's security posture. Understanding why — and how attackers exploit that window — changes how you think about patching urgency.

Scenario

It's the second Tuesday of the month — Patch Tuesday. Microsoft releases a cumulative update that fixes 86 vulnerabilities. The security team reviews the bulletin. One CVE stands out: a remote code execution vulnerability in the Windows Print Spooler, rated Critical, with a CVSS score of 9.8. The organization has a 30-day patch cycle. The patch goes into the testing queue.

Eight days later, a security researcher publishes a proof-of-concept exploit on GitHub. Two days after that, the PoC is integrated into Metasploit. The organization's Print Spooler is actively exploited sixteen days before their scheduled patch deployment. The 30-day patch cycle, which felt reasonable in a management meeting, became a 16-day window of preventable compromise.

This chapter explains the vulnerability lifecycle, why patch Tuesday creates a predictable exploitation window, and what the actual patching risk calculus looks like.

The Vulnerability Lifecycle

Every exploited vulnerability travels a predictable path from discovery to widespread exploitation. Understanding this timeline changes the risk calculus of patch deployment speed.

  Vulnerability Lifecycle — From Discovery to Mass Exploitation
  ══════════════════════════════════════════════════════════════════════

  [Discovery]
       │  Researcher or attacker finds vulnerability.
       │  If researcher: reported to vendor (CVD process) or published
       │  If attacker: used privately, may be sold to brokers
       ▼
  [Patch Development]  (Days to months)
       │  Vendor develops and tests fix.
       │  CVE ID assigned (may happen before or after patch).
       │  For Microsoft: fix targets next Patch Tuesday unless
       │  severity warrants an out-of-band release (Wormable = OOB)
       ▼
  [Patch Tuesday Release]  ← The most dangerous moment
       │  Patch released. Details of what was fixed become public.
       │  Security researchers reverse-engineer the patch to understand
       │  what vulnerability it fixed and how it can be exploited.
       │  This process takes hours to days for skilled researchers.
       ▼
  [Proof of Concept Published]  (Hours to 2 weeks after patch)
       │  PoC exploit code appears on GitHub, exploit-db, Twitter.
       │  Now any attacker with basic skills can test the exploit.
       │  Exploitation incidents accelerate dramatically.
       ▼
  [Framework Integration]  (1-7 days after PoC)
       │  Metasploit module, CobaltStrike BOF, or other framework
       │  integration makes exploitation accessible to script kiddies.
       │  Exploitation becomes point-and-click.
       ▼
  [Widespread Exploitation]  (Variable — days to weeks)
       │  Automated scanning and exploitation at internet scale.
       │  Ransomware groups and commodity malware use the exploit.
       ▼
  [Legacy Risk]  (Months to years)
       Unpatched systems remain vulnerable indefinitely.
       EternalBlue (MS17-010, patched March 2017) was still
       being actively exploited in 2023.
    
Why Patch Tuesday is "attacker Christmas"

When Microsoft releases a patch, they simultaneously give the entire research community — including offensive researchers — a precise set of changes to analyze. The patch tells you exactly what changed; a binary diff between the patched and unpatched DLL shows you the changed code. Skilled researchers then reason backwards: "What vulnerability required this specific change?" The patch is essentially a hint about where to look for the bug. For high-severity vulnerabilities, working PoC code often appears within 48-72 hours of the patch release. Organizations with 30-day patch cycles are systematically deploying patches after the exploitation window opens — not before it.

0-Day vs N-Day: The Risk Spectrum

The patching conversation is often framed around zero-days — vulnerabilities for which no patch exists. But statistically, most exploitation uses n-days: known vulnerabilities for which patches have existed for weeks, months, or years, against organizations that haven't deployed them.

Category Definition Who Uses Them Frequency in Real Attacks
0-Day No patch exists. Only the attacker (and possibly the vendor if reported) knows about it. Nation-states, top-tier criminal groups. Very expensive — a zero-day exploit for a major OS can cost $1M+. Rare — reserved for high-value targets. Most organizations will never encounter a genuine 0-day in the wild.
N-Day (recent) Patch exists but was released recently (days to weeks). Window between release and deployment. Ransomware groups, sophisticated threat actors. PoC is public; exploitation is straightforward. Very common — most ransomware entry vectors are recent n-days. This is where urgency matters most.
N-Day (old) Patch has been available for months or years. Still exploited because many systems remain unpatched. Commodity malware, botnets, opportunistic scanning. EternalBlue is still used 7 years after patching. Extremely common — represents the vast majority of vulnerability exploitation by volume.
Configuration Weakness Not a vulnerability in the CVE sense — default settings, weak credentials, exposed services. Everyone. Easiest to exploit. Dominant attack vector. Most breaches involve configuration weaknesses, not novel vulnerabilities.

WSUS: The Update Infrastructure as an Attack Surface

Windows Server Update Services (WSUS) is the Microsoft tool used by enterprises to centrally manage and deploy Windows updates. Machines configured to use WSUS check in with the WSUS server rather than Microsoft's update servers, allowing IT to test and approve updates before deploying them. This is good patch management practice. It is also an attack surface that most security teams overlook.

  WSUS Architecture and Attack Vector
  ══════════════════════════════════════════════════════════════════════

  Normal WSUS Flow:
  ─────────────────────────────────────────────────────────────────
  Windows Client ──HTTP(S)──► WSUS Server ──HTTPS──► Microsoft Update
       └── "What updates are approved for me?"
       └── Downloads approved update packages from WSUS server

  The Attack (WSUS without TLS):
  ─────────────────────────────────────────────────────────────────
  By default, client-to-WSUS traffic uses HTTP (not HTTPS).
  The WSUS server uses HTTPS to talk to Microsoft,
  but the client may use plain HTTP to talk to WSUS.

  Attacker with network position between client and WSUS:
  1. Intercept the HTTP WSUS traffic
  2. Replace legitimate update packages with malicious ones
     OR inject a fake "update available" response pointing to
     attacker-controlled content
  3. Client downloads and installs "update" with SYSTEM privileges

  The update package must be signed by Microsoft — WSUS
  clients verify signatures. So the attacker can't push
  arbitrary unsigned code.

  BUT: The attacker can push a legitimate but outdated
  (vulnerable) signed package, or can abuse WSUS's metadata
  manipulation to point at attacker-controlled infrastructure
  that serves signed packages the attacker has previously
  obtained (e.g., old CVE-vulnerable packages).

  More realistically: if the WSUS server itself is compromised
  (low-privileged AD account may have write access to WSUS),
  an attacker can approve their own malicious update through
  the WSUS interface, which then deploys to all managed clients.

  Defense:
  ─────────────────────────────────────────────────────────────────
  ✓ Use HTTPS for client-to-WSUS communication
  ✓ Restrict WSUS console access to dedicated admin accounts
  ✓ Monitor WSUS for unexpected update approvals
  ✓ Log and alert on new software distributions
    
Wild: WSUSpendu — a WSUS exploit tool for corporate environments

At DEF CON 2015, researchers presented "WSUSpendu" — a technique for abusing WSUS to deploy arbitrary commands to all managed Windows machines. The attack requires only an account with write access to the WSUS database, which in many organizations is a domain account far below domain admin. Once an attacker can approve updates, they can deploy a PowerShell payload as a "fake" update package that the WSUS client executes with SYSTEM privileges. The deployment requires signing with a Microsoft certificate — the researchers worked around this by creating a fake update package that used an existing signed cab file as a wrapper, with the malicious payload executed as a pre-install command. This technique continues to work in organizations that deploy WSUS without adequate access controls on the server itself.

Rollback Attacks: Unpatching Through Legitimate Channels

Downgrade or rollback attacks exploit the fact that Windows maintains the ability to revert to previous versions of system components — for compatibility and recovery reasons. An attacker with sufficient access can use legitimate Windows mechanisms to "unpatch" a previously fixed vulnerability.

Rollback Method How It Works Security Impact
Windows Update history rollback Administrator can uninstall recent Windows Updates via Settings or PowerShell. Previous version of the patched component is restored. Immediately re-exposes fixed vulnerabilities. Detectable via Windows Update logs and Event ID 19 (Update successfully uninstalled).
Driver rollback Device Manager allows rolling back a driver to the previous version. Driver files are stored in the DriverStore. If a vulnerable driver was replaced with a patched version, rollback re-installs the vulnerable version. Used by BYOVD attackers who need a specific vulnerable driver.
Windows Downdate (2024) Discovered by researcher alon_leviev: Windows Update itself can be weaponized to install older, vulnerable component versions, bypassing component-based servicing (CBS) integrity checks in certain scenarios. Demonstrated ability to roll back Windows kernel and hypervisor components to vulnerable versions on fully-patched Windows 11 systems. Microsoft mitigated this with additional CBS checks.
Virtualization-level rollback Attacker snapshots a VM before patching, restores snapshot to revert. Relevant for VM-based workloads. Snapshot management should be access-controlled and audited.

Unpatched Systems as Lateral Movement Staging

In enterprise environments, patching is rarely uniform. Some machines are current. Some are behind. Legacy systems may be intentionally excluded from patch management for compatibility reasons. These unpatched machines create an asymmetric landscape that attackers exploit systematically.

  Unpatched Machine as Lateral Movement Pivot
  ══════════════════════════════════════════════════════════════════════

  Environment:
  ─────────────────────────────────────────────────────────────────
  Most workstations: Current patches, EDR deployed, no known RCE vulns
  Legacy server: Windows Server 2012, not patched, has EternalBlue
  Legacy workstation: Windows 7, "can't be patched due to app compat"

  Attack flow:
  1. Attacker gains initial access via phishing → current workstation
     Current workstation: EDR catches credential dumping, lateral move
     attempt to other current machines fails
  2. Attacker scans internal network, finds Windows 2012 server
     EternalBlue (MS17-010) gives SYSTEM access in <1 second
  3. From the Windows 2012 server:
     • Less aggressive EDR or no EDR (legacy server exclusion)
     • Can dump credentials locally, access network shares
     • Can pivot to other segments the server has access to
     • Domain admin credentials may be cached here from admin sessions

  The unpatched legacy machine became the pivot point that
  bypassed all the controls deployed on modern machines.

  Lessons:
  ─────────────────────────────────────────────────────────────────
  • Patch priority should consider network segment and data access,
    not just machine "importance"
  • Legacy systems that can't be patched should be network-segmented
  • EDR coverage on legacy systems is critical precisely because
    they're more likely to be exploitable
    
Mental model: think in terms of exploitability windows, not patch age

The relevant risk metric is not "how old is this machine's last patch" — it's "are there public exploits for the vulnerabilities this machine hasn't patched, and is this machine accessible from attacker-reachable segments?" A machine with a 90-day-old patch level but no public exploits for any of its missing patches is lower risk than a machine that skipped one Patch Tuesday that contained an actively-exploited critical vulnerability. Vulnerability management tools that provide exploitability scoring (whether a PoC exists, whether it's in Metasploit, whether it's listed in CISA's KEV catalog) are more useful than raw patch age metrics.

Q & A

1. What is CISA's KEV (Known Exploited Vulnerabilities) catalog and how should it inform patching priority?

CISA's Known Exploited Vulnerabilities catalog is a list maintained by the US Cybersecurity and Infrastructure Security Agency of CVEs that have been actively exploited in the wild. It differs from CVE severity scores: a CVE can be rated Critical (CVSS 9.8) but have no public exploit, while a "Medium" CVE might be actively exploited and in the KEV catalog. CVSS scores measure theoretical impact; KEV tracks actual exploitation activity. CISA mandates that federal agencies patch KEV catalog entries within specific timeframes (typically 14 days for high-risk, 30 days for others). For non-federal organizations, the KEV catalog is the most reliable indicator that a vulnerability is being actively weaponized right now. Prioritization recommendation: patch KEV catalog entries that affect your environment before anything else, regardless of CVSS score, because active exploitation means real attackers are using these against real organizations today. Then prioritize by CVSS + exposure. The catalog is updated frequently and available at cisa.gov/known-exploited-vulnerabilities-catalog.

2. Can a Windows machine be configured to not accept patches from Microsoft (to prevent uncontrolled updates) while still being considered "managed"?

Yes — this is exactly the WSUS model. A WSUS-managed machine has its Windows Update client configured via Group Policy to report to an internal WSUS server instead of Microsoft's update servers. The machine only installs updates that have been approved and staged on the WSUS server. The machine is still "managed" in the sense that it has a defined update source and IT controls what it receives — but it won't install updates directly from Microsoft without WSUS staging. The security tradeoff: WSUS allows IT to test updates before rolling them out (preventing update-induced incompatibilities) but introduces a delay that widens the exploitation window for critical patches. Best practice for critical out-of-band patches (wormable RCE with active exploitation) is to create an expedited approval path in WSUS rather than waiting for the normal testing cycle. Microsoft Intune/Endpoint Manager and Windows Autopatch are newer alternatives that offer ring-based deployment (test group → broad) without requiring on-premises WSUS infrastructure.

3. EternalBlue was patched in March 2017. Why was WannaCry still so devastating in May 2017?

Several factors combined. First, the patch (MS17-010) had only been available for 59 days when WannaCry launched — enterprise organizations with 30-60 day patch cycles had not yet deployed it. Second, Windows 7 (still widely deployed in 2017) automatically applied updates but many organizations had disabled automatic updates to maintain control over deployments. Third, Windows XP and Server 2003 were beyond end-of-life and received no patch at all until Microsoft issued emergency patches after the outbreak began. Fourth, many systems on internal networks were behind NAT and perceived as "not exposed to the internet," leading to deprioritized patching — but WannaCry spread internally once inside a network, reaching those "protected" machines via SMB. Fifth, the SMBv1 protocol that EternalBlue targeted was still enabled by default even on patched systems — the only thing MS17-010 patched was the specific vulnerability; administrators needed to separately disable SMBv1 as defense-in-depth. The combination of slow enterprise patching, legacy OS usage, and internal network trust made the worm devastatingly effective despite a 59-day-old available patch.

4. What are "driver vulnerability blocklists" and how do they relate to patch management?

Driver vulnerability blocklists address a specific gap in traditional patching: vulnerable third-party drivers that are signed by Microsoft's WHQL program and can therefore be loaded by Windows, even though they contain exploitable vulnerabilities. Traditional Windows Update patches Microsoft's own code; it doesn't automatically remove third-party drivers that have been found vulnerable. BYOVD attacks exploit this by loading legitimate but vulnerable signed drivers to gain kernel code execution. The vulnerable driver blocklist (VDB) maintained by Microsoft lists known-vulnerable driver versions by hash and prevents them from being loaded, even though they have valid signatures. This list is enforced by HVCI (Hypervisor-Protected Code Integrity) when enabled, and also applied via Windows Defender Application Control policies. Organizations should ensure HVCI is enabled (it's on by default on modern hardware in Windows 11) and that the VDB is current. The list can also be customized to add vulnerable drivers specific to the organization's environment that Microsoft hasn't yet added to the official blocklist.