Skip to main content
Meet us at Black Hat USA 2026— Las Vegas, August 1–6Book a Meeting
Mallory
HighCISA KEVExploited in the wildPublic exploit

Windows AppLocker Driver Elevation of Privilege in appid.sys

IdentifiersCVE-2024-21338CWE-822· Untrusted Pointer Dereference

CVE-2024-21338 is a Windows kernel elevation-of-privilege vulnerability affecting the AppLocker driver (appid.sys) on Windows 10 and Windows 11. The provided content identifies it as a local privilege escalation flaw and specifically describes it as an "admin-to-kernel" issue on systems where HVCI (Hypervisor-Protected Code Integrity) is enabled. Reporting in the supplied material states that the flaw was exploited in the wild, including by North Korean threat actors, to obtain kernel-level access and disable security tools. The content does not provide sufficient technical detail about the precise vulnerable function, root cause, or memory corruption/logic flaw class, so a more specific CWE assignment and lower-level implementation description are currently not available.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows an attacker who already has local code execution and administrative privileges to escalate from administrator context into kernel-mode execution. This enables full compromise of the affected host, including the ability to tamper with or disable endpoint security controls, manipulate kernel structures, evade detection, and establish highly privileged persistence. The supplied reporting also indicates the vulnerability was used in the wild as part of post-compromise activity by advanced threat actors.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, reduce opportunities for local post-compromise exploitation by minimizing administrative access, enforcing least privilege, restricting execution of untrusted code, and monitoring for attempts to load or abuse appid.sys and related kernel-level tooling. Harden endpoints with application control, EDR tamper protection, and detection for suspicious privilege-escalation chains. These measures are only compensating controls; the provided content does not describe a vendor-supported workaround that eliminates the vulnerability without patching.

Remediation

Patch, then assume compromise.

Apply Microsoft's security updates for CVE-2024-21338 on affected Windows 10 and Windows 11 systems. Because the content confirms in-the-wild exploitation, patching should be prioritized on exposed or high-value endpoints. Standard remediation should include verifying that all relevant cumulative/security updates are installed across the fleet and validating that vulnerable builds are no longer present.
PUBLIC EXPLOITS

Exploits

7 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (2 hidden).

VALID 7 / 9 TOTALView more in app
CVE-2024-21338-ExploitMaturityPoCVerified exploit

Repository contains a Windows local privilege escalation PoC for CVE-2024-21338 (appid.sys/AppLocker driver). It is a Visual Studio C++ solution/project (CVE-2024-21338.slnx, .vcxproj) with core exploit logic in three C++ sources: (1) main.cpp orchestrates token/impersonation, gadget discovery, IOCTL triggering, and post-exploitation memory write; (2) CVE-2024-21338.cpp implements prerequisite helpers: enabling privileges, enumerating processes, duplicating SYSTEM token from winlogon.exe, querying kernel module base via NtQuerySystemInformation, and resolving kernel object pointers from handles; (3) gadget_search.cpp provides PE parsing and pattern scanning utilities to map ntoskrnl.exe from disk and locate a KCFG-compatible gadget in the PAGE section. Exploit flow (high level): - Enables token privileges (SeDebug/SeImpersonate/SeAssignPrimaryToken/SeIncreaseQuota). - Duplicates a SYSTEM token from winlogon.exe, impersonates SYSTEM, enumerates svchost.exe processes, and selects one running as LocalService (SID S-1-5-19). It then impersonates LocalService to open the vulnerable device \\.\AppID. - Maps C:\Windows\System32\ntoskrnl.exe in user mode, resolves kernel base of ntoskrnl.exe, and searches for a hardcoded byte-pattern gadget in the PAGE section. It also computes the offset of ETHREAD->PreviousMode by pattern searching ExGetPreviousMode. - Creates a file (test.txt) and uses system handle enumeration to obtain the kernel FILE_OBJECT pointer for the file handle; also resolves the kernel ETHREAD pointer for the current thread. - Sends DeviceIoControl to \\.\AppID with IOCTL 0x22A018 and an APPID_KERNEL_EXPLOIT structure containing: a pointer to a target address (threadObj + PreviousModeOffset + 0x30), a FILE_OBJECT pointer, and a small “shellcode array” that effectively supplies a gadget address and a function pointer (ZwQuerySystemInformation RVA rebased to kernel) to achieve a kernel write primitive. - After PreviousMode is flipped to Kernel, it calls NtWriteVirtualMemory on the current process to write 4 bytes to an arbitrary address provided interactively by the user, demonstrating arbitrary kernel memory modification. No network C2 or remote endpoints are present; the exploit is purely local and interacts with Windows kernel/user APIs and the AppID device interface.

MistyFirDisclosed Mar 11, 2026cppc/c++ headerslocalkernel-driver ioctl abuse
CVE-2024-21338-1MaturityPoCVerified exploit

This repository contains a proof-of-concept (PoC) exploit for CVE-2024-21338, a local privilege escalation vulnerability in the Windows 11 22H2 Build 22621 appid.sys driver. The main file, 'cve-2024-21338.c', is a C program that demonstrates how to exploit the vulnerability by crafting a malicious SMART_HASH_IMAGE_FILE structure and sending it to the appid.sys driver via DeviceIoControl. The exploit leverages Direct Kernel Object Manipulation (DKOM) to overwrite the current process's token with that of the SYSTEM process, effectively granting SYSTEM privileges. After successful exploitation, the code spawns a SYSTEM shell (cmd.exe). The exploit requires local access and sufficient privileges to interact with device drivers. The repository also includes a README and a GitHub Actions workflow file, but the core exploit logic resides in the C source file.

wusijieDisclosed May 5, 2024clocal
kcfg-bypassMaturityPoCVerified exploit

This repository provides a proof-of-concept (PoC) local privilege escalation exploit for CVE-2024-21338, a vulnerability in Microsoft Windows. The main exploit file, 'CVE-2024-21338.c', demonstrates how to leverage a vulnerable device driver (accessed via the device name '\\?\AppID' and IOCTL 0x22A018) to manipulate kernel memory structures. The exploit locates and manipulates kernel objects such as KTHREAD and EPROCESS, and uses direct system calls (via ntdll.dll) to perform memory operations. The exploit ultimately overwrites process tokens to escalate privileges to SYSTEM and spawns a SYSTEM shell (cmd.exe). The repository also includes 'example-with-windbg.c', which is a variant intended for debugging and manual manipulation with WinDbg, and 'defines.h', which contains necessary structure and function definitions for interacting with Windows kernel APIs. The exploit is not weaponized but serves as a functional PoC for researchers and defenders to understand and test the vulnerability.

hackyboizDisclosed Jan 12, 2025clocal
CVE-2024-21338MaturityPoCVerified exploit

This repository is a Proof-of-Concept (PoC) exploit for CVE-2024-21338, a local privilege escalation vulnerability affecting Microsoft Windows 10 and 11 with HVCI enabled. The exploit is implemented in C++ and is structured as a Visual Studio project, with the main logic spread across several files: - `main.cpp` is the entry point, checking for administrator privileges and orchestrating the privilege escalation steps. - `impersonate.cpp` and `impersonate.hpp` handle token manipulation and impersonation, allowing the exploit to escalate from admin to SYSTEM and then to Local Service. - `poc.cpp` and `poc.hpp` contain the core exploit logic, including kernel memory manipulation via a vulnerable IOCTL (0x22A018) in the AppLocker driver. The exploit crafts specific buffers and leverages Windows internals to manipulate the 'PreviousMode' field in the ETHREAD structure, ultimately allowing code execution in kernel mode. - `console.hpp` provides logging and console management utilities. The exploit requires local administrator access and targets the AppLocker driver to achieve kernel-level code execution. It does not contain a weaponized or post-exploitation payload, but demonstrates the ability to escalate privileges by manipulating kernel structures. The only fingerprintable endpoint is the creation of a dummy file at `C:\Users\Public\example.txt` for exploitation purposes. No network or remote attack vectors are present; this is a purely local privilege escalation exploit.

hakaioffsecDisclosed Apr 13, 2024cpphlocal
CVE-2024-21338MaturityPoCVerified exploit

This repository contains a single exploit file (CVE-2024-21338.cpp) targeting CVE-2024-21338, a local privilege escalation vulnerability in the Windows AppLocker driver (appid.sys). The exploit is written in C++ and is intended to be compiled and run on a Windows system where a vulnerable version of appid.sys is present. The code interacts directly with the device object for the driver (\\.\GLOBALROOT\Device\AppId) and leverages kernel memory manipulation to escalate privileges. It locates and duplicates the token of the winlogon.exe process to spawn a SYSTEM-level shell (cmd.exe). The repository structure is minimal, containing only the exploit source code and a .gitignore file. The exploit is operational and provides a working SYSTEM shell if successful, but is not part of a larger framework and does not include detection or auxiliary scripts.

CrowdfenseDisclosed Jul 29, 2024c++local
CVE-2024-21338_PoCMaturityPoCVerified exploit

This repository contains a functional local privilege escalation exploit for CVE-2024-21338, targeting Microsoft Windows 10 22H2 (10.0.19045.3930) with the January 2024 update (KB5034122). The exploit is implemented in C++ (main.cpp) and leverages a vulnerability in the AppId device driver (\\.\GLOBALROOT\Device\AppId) to perform arbitrary kernel memory read/write operations. The exploit locates the SYSTEM process's token in kernel memory and overwrites the current process's token, effectively granting SYSTEM privileges. Upon success, it spawns a SYSTEM-level command prompt (cmd.exe). The code demonstrates advanced kernel exploitation techniques, including kernel pointer leakage, token stealing, and direct DeviceIoControl interaction. The repository also includes a minimal README.md. No network endpoints are present; the attack vector is purely local, requiring code execution on the target system.

tykawaii98Disclosed Jun 23, 2024cpplocal
CVE-2024-21338MaturityPoCVerified exploit

This repository is a Proof-of-Concept (PoC) exploit for CVE-2024-21338, a local privilege escalation vulnerability affecting Microsoft Windows 10 and 11 with HVCI enabled. The exploit is implemented in C++ and is structured as a Visual Studio project. The main entry point is 'src/main.cpp', which checks for administrator privileges, impersonates SYSTEM and LOCAL SERVICE accounts, and then executes the core exploit logic in 'src/poc.cpp'. The exploit works by crafting and sending a malicious IOCTL (0x22A018) to the AppLocker driver, manipulating kernel memory structures to escalate privileges from Administrator to SYSTEM. The code includes helper classes for token manipulation and impersonation ('impersonate.cpp', 'impersonate.hpp'), as well as detailed logging utilities ('console.hpp'). The exploit requires local access and administrator rights to run, and does not target remote or networked systems. No hardcoded IPs or network endpoints are present; the only fingerprintable endpoint is the use of a dummy file at 'C:\Users\Public\example.txt' for kernel object manipulation. The repository is a standalone PoC and does not belong to any exploit framework.

UMU618Disclosed Apr 17, 2024cpphlocal
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Microsoft CorporationWindows 10 1809operating_system
Microsoft CorporationWindows 10 21h2operating_system
Microsoft CorporationWindows 10 22h2operating_system
Microsoft CorporationWindows 11 21h2operating_system
Microsoft CorporationWindows 11 22h2operating_system
Microsoft CorporationWindows 11 23h2operating_system
Microsoft CorporationWindows Server 2019operating_system
Microsoft CorporationWindows Server 2022operating_system
Microsoft CorporationWindows Server 2022 23h2operating_system
Microsoft CorporationWindows Server 23h2operating_system

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence2

Every observed campaign linking this CVE to a named adversary.

Associated malware3

Malware families riding this exploit, with evidence and IOCs.

Detection signatures2

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity2

Community discussion across Reddit, Mastodon, and other social sources.