Skip to main content

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

Filter for it directly:
Expected output when exploitable:
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.
Check group membership for Print Operators (common source of this privilege):

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 kernel checks:
  1. The caller holds SeLoadDriverPrivilege (enabled in token)
  2. The registry key exists and contains a valid ImagePath
  3. The driver binary is validly signed (unless test signing is enabled)
Critically, starting from Windows 10 1607+, NtLoadDriver also accepts paths under the current user’s registry hive (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):
Under HKCU (no admin write needed — works on Windows 10 1607+):

Registry Values Explained

Step 2 — Call NtLoadDriver

Using PowerShell with P/Invoke:
A return value of 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

Pre-compiled binary is also available in the releases.

Load a Driver

This command:
  1. Enables SeLoadDriverPrivilege in the current token
  2. Creates the registry key under HKCU\System\CurrentControlSet\Services\VulnDriver
  3. Sets ImagePath to \??\C:\Windows\Temp\VulnDriver.sys
  4. Calls NtLoadDriver with the HKCU registry path
Expected output:
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:
  1. Disables SMEP by clearing the CR4 register bit
  2. Calls a user-supplied function pointer in kernel context
  3. Re-enables SMEP
This means: you pass a pointer to your shellcode, and the driver executes it at ring 0.

Step-by-Step Exploitation

Step 1 — Place Capcom.sys on Disk

Transfer Capcom.sys to the target:
SHA-256 of the original Capcom.sys:

Step 2 — Load the Driver

Using EoPLoadDriver:
Or manually:

Step 3 — Exploit with ExploitCapcom

ExploitCapcom is the standard exploit tool:
Run it to get a SYSTEM shell:
Default behavior: launches 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:
Start listener on attacker:
Capcom.sys has been added to the Microsoft Vulnerable Driver Blocklist and is blocked by HVCI (Hypervisor-protected Code Integrity). On modern Windows 10/11 with HVCI enabled, the driver will not load. Use alternative BYOVD drivers listed below.

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:
KDU driver database maintains another curated list.

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:
Python PoC using ctypes (run from target):

dbutil_2_3.sys (Dell) — CVE-2021-21551

Dell’s BIOS utility driver. Exposes five distinct vulnerabilities, all leading to kernel memory access.
Exploit tools:

iqvw64e.sys (Intel) — CVE-2015-2291

Intel Network Adapter Diagnostic Driver. Maps arbitrary physical memory to user space.
This driver is the default backend for many offensive tools including KDU.

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)

Output shows all supported driver providers with their index numbers:

Load an Unsigned/Custom Driver (DSE Bypass)

The primary use case — load any arbitrary driver by patching DSE in kernel memory:
  • -prv 1 selects provider 1 (RTCore64.sys)
  • -map maps (loads) your custom unsigned driver into kernel

Disable PPL (Protected Process Light) on a Process

Useful for unprotecting lsass.exe before dumping.

Disable Driver Signature Enforcement

After this, you can load any unsigned driver using 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.
Offsets change between Windows builds. Using wrong offsets causes BSOD. Always verify offsets for the target OS version. Tools like KDU and public exploits maintain offset tables for common builds.

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:
On target:

3. Load the Driver

Verify:

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:
  • SecurityServicesRunning includes 2 = HVCI is active
  • HVCI prevents loading of blocklisted or vulnerable drivers at the hypervisor level

Driver Blocklist Check

The blocklist file is located at C:\Windows\System32\CodeIntegrity\driversipolicy.p7b and is updated via Windows Update.

Quick Reference