CVE DatabaseCVE-2024-38193
한국어 권고문 →
CVE-2024-381937.8/HIGHCISA KEVCWE-416

Windows Ancillary Function Driver (afd.sys) Use-After-Free Privilege Escalation Vulnerability (CVE-2024-38193) Technical Analysis and Mitigation Guide

⚡ Jump to Patch
Affected Vendors
microsoft
Affected Components
windows, windows_server
Published Date
2024-08-13
CVSS v3.1
7.8
HIGH
EPSS (30d)
28.7%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Most versions of Windows 10, 11, and Windows Server 2008 through 2022

Impact

Local attackers can exploit kernel memory corruption to execute arbitrary code with SYSTEM privileges

Mitigation

Immediately apply the Microsoft August 2024 security updates and monitor for unauthorized local account activities

Affected Products & Version Scope

Windows 10, Windows 11, and Windows Server 2008, 2012, 2016, 2019, 2022 running unpatched afd.sys drivers prior to the August 2024 security updates

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

The primary remediation is to apply the official cumulative security updates provided by Microsoft. You can force the installation of these updates using PowerShell.

powershell
# Install and import the PSWindowsUpdate module to apply pending security patches
Install-Module PSWindowsUpdate -Force -SkipPublisherCheck -Verbose
Get-WindowsUpdate -Category 'Security Updates' -AcceptAll -Install -AutoReboot

2. Temporary Workaround & Hardening Configuration

Because this is a kernel-level driver vulnerability, direct workarounds are highly limited. Organizations should restrict local execution capabilities by enforcing AppLocker or Windows Defender Application Control (WDAC) to prevent unauthorized binaries from running and attempting exploitation.

powershell
# Enable and start the Application Identity service required for AppLocker policies
Set-Service -Name 'AppIDSvc' -StartupType Automatic
Start-Service -Name 'AppIDSvc'
Write-Output 'AppLocker service has been started to enforce application execution control policies.'

3. Log Audit & IoC Verification Commands

Verify the patch level of the target system by checking the file version of the afd.sys driver.

powershell
# Retrieve the file version of afd.sys to verify patch status
$DriverPath = '$env:SystemRoot\System32\drivers\afd.sys'
if (Test-Path $DriverPath) {
    $VersionInfo = (Get-Item $DriverPath).VersionInfo.FileVersion
    Write-Output 'Current afd.sys version: ' $VersionInfo
    Write-Output 'Verify this version against the Microsoft August 2024 Patch Tuesday release notes for your OS build.'
} else {
    Write-Error 'afd.sys driver file was not found in the standard directory.'
}
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
SentinelOne Singularity AI EDR
Due to active exploitation in the wild (CISA KEV), immediately deploy the August 2024 Microsoft Security Updates to all Windows endpoints and servers.

Block Kernel Privilege Escalation & Ransomware Payloads Before You Can Reboot

Protect unpatched Windows, Linux, and macOS workloads against in-memory exploitation and lateral movement with autonomous EDR.

100% MITRE ATT&CK Detection · 1-Click Rollback

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2024-38193) is a Use-After-Free (UAF, CWE-416) flaw residing in the Windows Ancillary Function Driver (afd.sys), which serves as the entry point for Windows Sockets (WinSock). The root cause lies in how afd.sys manages socket connection states and internal buffer objects. When processing specific Input/Output Control (IOCTL) requests, the driver fails to properly nullify or invalidate pointers to memory blocks that have already been freed, leading to subsequent dangling pointer dereferences.

2. Exploitation Mechanics & Attack Scenario

An attacker with local, low-privilege access on the target system initiates the exploit by sending crafted IOCTL requests to the afd.sys device object. By triggering the premature release of specific socket resources and leveraging kernel pool feng shui techniques, the attacker reclaims the freed memory space with controlled payload data. When the driver subsequently attempts to access the previously freed object, it executes the attacker-controlled data within the kernel context, resulting in local privilege escalation to SYSTEM. This vulnerability has been actively exploited in the wild and is cataloged in CISA's KEV.

3. Infrastructure & Business Impact

Local Privilege Escalation (EoP) vulnerabilities pose a severe threat in multi-tenant environments, terminal servers, and container hosts. Once an attacker gains initial access via web application exploits or phishing, they can leverage this vulnerability to move laterally across the network or compromise Active Directory Domain Controllers. Furthermore, executing code at the kernel level allows attackers to bypass and disable Endpoint Detection and Response (EDR) agents, severely impacting business continuity and data integrity.

Official Vendor Advisories & References

Frequently Asked SecOps Questions (CVE-2024-38193)

FAQ

Q1. How critical is CVE-2024-38193 and is it actively exploited in the wild?

CVE-2024-38193 is rated CVSS 7.8 (HIGH) with a 30-day EPSS exploitation probability of 28.7%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2024-38193?

Primary impacted vendors include microsoft across windows, windows_server. Scope summary: Windows 10, Windows 11, and Windows Server 2008, 2012, 2016, 2019, 2022 running unpatched afd.sys drivers prior to the August 2024 security updates

Q3. What temporary mitigations or workarounds exist for CVE-2024-38193 before patching?

[Mitigation] Immediately apply the Microsoft August 2024 security updates and monitor for unauthorized local account activities Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2024-38193

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (microsoft)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2024-38193 Windows Ancillary Function Driver (afd.sys) Use-After-Free Privilege Escalation Vulnerability (CVE-2024-38193) Technical Analysis and Mitigation Guide (CVSS 7.8) - Patch & Workaround | CVE Pulse