Overview
SeLoadDriverPrivilege allows a user to load and unload kernel-mode drivers by calling the NtLoadDriver system call. Loading a driver means inserting arbitrary code into the Windows kernel — ring 0 execution. An attacker with this privilege can load a vulnerable signed driver (BYOVD), exploit it to gain kernel read/write, and steal the SYSTEM token for full machine compromise.
This is not a theoretical attack. It has been used extensively in the wild by both red teams and threat actors (Turla, Lazarus, RansomHub) to bypass EDR, disable security products, and escalate privileges.
Who Has It by Default
Print Operators is the most commonly exploited path. On domain controllers, Print Operators is a domain-level group — any member can load kernel drivers on the DC itself.
Check If Enabled
If the privilege shows as Disabled, it can still be enabled programmatically via
AdjustTokenPrivileges. The privilege only needs to be present in the token — the Enabled/Disabled state is a soft toggle. Tools like EoPLoadDriver enable it automatically before calling NtLoadDriver.How It Works Technically
The exploitation chain is: create registry key > point to driver on disk > call NtLoadDriver > driver runs in kernel.NtLoadDriver Internals
NtLoadDriver is an undocumented ntdll syscall that takes a single argument — a registry path pointing to a service key under HKLM\SYSTEM\CurrentControlSet\Services\. The kernel reads the ImagePath value from that key, loads the specified .sys file into kernel memory, and executes its DriverEntry function.
- The caller holds
SeLoadDriverPrivilege(enabled in token) - The registry key exists and contains a valid
ImagePath - The driver binary is validly signed (unless test signing is enabled)
HKU\<SID>\System\CurrentControlSet\Services\). This means a non-admin user with SeLoadDriverPrivilege can load drivers without needing write access to HKLM — they create the service key under their own HKCU.
The Attack Flow
Loading a Driver via Registry Key (Manual Method)
Before using any tool, understand the manual process. You need a registry service key with specific values.Step 1 — Create the Registry Key
Under HKLM (requires admin write to HKLM):Registry Values Explained
Step 2 — Call NtLoadDriver
Using PowerShell with P/Invoke:0 (STATUS_SUCCESS) means the driver is loaded.
Step 3 — Verify the Driver Loaded
EoPLoadDriver Tool
EoPLoadDriver automates the registry key creation and NtLoadDriver call. It handles privilege enabling, HKCU key creation, and the NT path format automatically.Download and Compile
Load a Driver
- Enables
SeLoadDriverPrivilegein the current token - Creates the registry key under
HKCU\System\CurrentControlSet\Services\VulnDriver - Sets
ImagePathto\??\C:\Windows\Temp\VulnDriver.sys - Calls
NtLoadDriverwith the HKCU registry path
NTSTATUS: 00000000 means success. Common errors:
Capcom.sys Attack
Capcom.sys is a legitimately signed driver (by Capcom Co., Ltd.) that contains an intentional feature allowing any user-mode process to execute arbitrary code in kernel mode by disabling SMEP (Supervisor Mode Execution Prevention). It was signed with a valid Authenticode certificate and is the classic example of BYOVD.Why Capcom.sys Works
The driver exposes a device\\.\Htsysm72FB that accepts an IOCTL. When called, it:
- Disables SMEP by clearing the CR4 register bit
- Calls a user-supplied function pointer in kernel context
- Re-enables SMEP
Step-by-Step Exploitation
Step 1 — Place Capcom.sys on Disk
TransferCapcom.sys to the target:
Step 2 — Load the Driver
Using EoPLoadDriver:Step 3 — Exploit with ExploitCapcom
ExploitCapcom is the standard exploit tool:cmd.exe as SYSTEM. To run a custom command, modify the source or use the version that accepts arguments:
Step 4 — Verify SYSTEM
Alternative: Capcom Exploit with Custom Payload
If you need a reverse shell instead of an interactive cmd:BYOVD — Bring Your Own Vulnerable Driver
BYOVD is the modern evolution of the Capcom.sys technique. Instead of relying on a single known driver, attackers use any legitimately signed driver that contains an exploitable vulnerability — typically arbitrary kernel read/write via exposed IOCTLs.Attack Pattern
Why It Works
Windows enforces Driver Signature Enforcement (DSE) — only drivers signed by Microsoft or through the WHQL process can load. However, many legitimate vendor drivers contain vulnerabilities. Since they are validly signed, Windows loads them without complaint. The vulnerabilities are typically:- Arbitrary physical memory read/write — map physical memory pages to user space
- Arbitrary MSR read/write — modify Model-Specific Registers
- Arbitrary kernel memory read/write — read/write via IOCTL with attacker-controlled addresses
- CR register manipulation — disable SMEP/SMAP
Finding Vulnerable Drivers
LOLDrivers is the definitive database of known vulnerable drivers:Common Vulnerable Drivers
RTCore64.sys (MSI Afterburner) — CVE-2019-16098
The most commonly used post-Capcom driver. Ships with MSI Afterburner, a popular GPU overclocking tool.IOCTL Interface
Load the Driver
Exploit for SYSTEM Token
Multiple public exploits exist. The general approach:dbutil_2_3.sys (Dell) — CVE-2021-21551
Dell’s BIOS utility driver. Exposes five distinct vulnerabilities, all leading to kernel memory access.iqvw64e.sys (Intel) — CVE-2015-2291
Intel Network Adapter Diagnostic Driver. Maps arbitrary physical memory to user space.KDU — Kernel Driver Utility
KDU (by hfiref0x) is a comprehensive framework that automates the entire BYOVD chain. It ships with support for 50+ vulnerable drivers and handles driver loading, kernel read/write primitives, and exploitation automatically.How KDU Works
Usage
List Available Providers (Vulnerable Drivers)
Load an Unsigned/Custom Driver (DSE Bypass)
The primary use case — load any arbitrary driver by patching DSE in kernel memory:-prv 1selects provider 1 (RTCore64.sys)-mapmaps (loads) your custom unsigned driver into kernel
Disable PPL (Protected Process Light) on a Process
lsass.exe before dumping.
Disable Driver Signature Enforcement
sc create / sc start normally.
Re-enable DSE (Cleanup)
Common KDU Providers for Offensive Use
KDU requires SeLoadDriverPrivilege or an elevated administrator shell (which has it). It handles the full chain: dropping the driver, creating registry keys, loading via NtLoadDriver, and exploitation. You do not need EoPLoadDriver separately.
Extracting SYSTEM Token via Kernel Exploitation
Once you have kernel read/write (via any vulnerable driver), the standard technique for privilege escalation is token theft — copying the SYSTEM process token to your current process.Token Theft — How It Works
Every process in Windows has a_EPROCESS kernel structure. This structure contains a Token field pointing to a _TOKEN object that defines the process’s security context. PID 4 (System process) always runs as NT AUTHORITY\SYSTEM.
Step-by-Step in Pseudocode
Key Offsets (Windows 10/11 x64)
These offsets vary by Windows build. Use!process 0 0 in WinDbg or query PDB symbols to get exact offsets.
C Implementation (Conceptual)
Using PPLKiller for Token Theft
PPLKiller combines driver loading with token theft:Full Attack Chain Walkthrough
Complete step-by-step from SeLoadDriverPrivilege to SYSTEM shell.1. Confirm the Privilege
2. Transfer Tools and Driver
On attacker machine, start a web server:3. Load the Driver
4. Exploit for SYSTEM
5. Verify
Alternative: Reverse Shell as SYSTEM
If you need a remote shell instead of an interactive prompt:Cleanup
Defenses and Detection
What Blocks This Attack
Detection — Event Logs and Indicators
HVCI Status Check
Defenders (and attackers) can check if HVCI is enabled:SecurityServicesRunningincludes2= HVCI is active- HVCI prevents loading of blocklisted or vulnerable drivers at the hypervisor level
Driver Blocklist Check
C:\Windows\System32\CodeIntegrity\driversipolicy.p7b and is updated via Windows Update.