
Bring Your Own Vulnerable Driver (BYOVD)
Loading a vulnerable signed driver on Windows to get kernel access, kill security software and bypass kernel protections.
Description
Bring Your Own Vulnerable Driver (BYOVD) means dropping a legitimately signed but vulnerable driver onto a target and exploiting its bugs. Drivers run in the kernel (Ring 0), with full access to memory, hardware and the rest of the system.
Windows trusts code-signed drivers from known vendors. The attacker loads one of those drivers, which Windows accepts, then uses a known bug in it to run code or read and write memory in the kernel. From there EDR, antivirus and Windows Defender can be blinded or killed, because they run at the same or a lower level.
Why it works so well:
- The drivers carry valid signatures from trusted certificate authorities.
- Security software sees them as normal system components.
- Once loaded, the driver gives unrestricted kernel access.
- Kernel access is enough to switch off or get around most security controls.
APT groups and ransomware operators both use BYOVD, mostly to kill EDR before the main payload runs.
Kernel access
A working BYOVD chain gives Ring 0 access. With it an attacker can change system behaviour, turn off security controls and keep persistence that survives reboots and scans.
Impact
- Privilege escalation to Ring 0, the highest privilege level in Windows.
- EDR agents, antivirus and other security tools can be disabled or bypassed.
- Rootkits and other persistence can be installed that survive restarts.
- Direct kernel memory access allows credential theft and tampering with other processes.
- Driver Signature Enforcement can be switched off, so unsigned malicious drivers load afterwards.
- Security policies and core system components can be modified.
- With EDR out of the way, lateral movement goes unnoticed.
- All data on the system is readable.
Common vulnerable drivers
Frequently exploited drivers
| Driver | File | Flaw |
|---|---|---|
| Process Explorer | procexp.sys | Opens and closes handles inside protected processes, which Backstab and AuKill use to kill EDR |
| CPU-Z | cpuz.sys | Memory access bugs |
| MSI Afterburner | RTCore64.sys | I/O control flaws |
| ASUS GPU Tweak | ATSZIO.sys | Unrestricted memory access |
| Dell DBUtil | dbutil_2_3.sys | Arbitrary write |
| Gigabyte GDRV | gdrv.sys | Kernel memory access |
| Intel Network Adapter | iqvw64e.sys | Privilege escalation bugs |
| NVIDIA display driver | several versions | Local privilege escalation |
LOLDrivers keeps a much longer list with hashes.
Bug classes
- Arbitrary memory read/write exposed to user mode.
- IOCTL handlers that don't validate input, giving privilege escalation.
- Buffer overflows and other memory corruption in driver code.
- Symbolic link races (time-of-check to time-of-use).
- Missing checks on who is calling the driver.
BYOVD tooling
- EDRSandblast uses vulnerable drivers to bypass EDR.
- KDU (Kernel Driver Utility) wraps exploits for many vulnerable drivers.
- TDL (Turla Driver Loader) loads unsigned drivers through a vulnerable signed one.
- Ghost is a rootkit framework built on BYOVD.
Detection
System monitoring
Driver load events:
- Monitor Sysmon Event ID 6 (driver loaded) in the Microsoft-Windows-Sysmon/Operational log.
- Track new .sys files in
System32\drivers\. - Alert on drivers loaded from unusual paths.
Sysmon:
<!-- Sysmon Event ID 6: Driver loaded -->
<RuleGroup name="BYOVD Detection" groupRelation="or">
<DriverLoad onmatch="include">
<ImageLoaded condition="contains">procexp</ImageLoaded>
<ImageLoaded condition="contains">cpuz</ImageLoaded>
<ImageLoaded condition="contains">RTCore64</ImageLoaded>
</DriverLoad>
</RuleGroup>Registry monitoring
- Watch
HKLM\SYSTEM\CurrentControlSet\Services\for new driver services. - Track changes to the driver store.
- Alert on drivers signed with compromised or revoked certificates.
Memory analysis
Live checks:
# List loaded drivers
Get-WmiObject Win32_PnPSignedDriver | Select-Object DeviceName, DriverVersion, DriverDate
# Check for suspicious drivers
driverquery /v | findstr /i "vulnerable_driver_name"Volatility can analyse memory dumps for signs of BYOVD, and WinAPIOverride can monitor a driver's API calls.
Behavioural detection
Signs that EDR has been tampered with:
- EDR telemetry stops suddenly.
- Security processes get terminated.
- Unusual kernel API calls.
Network signs:
- Command and control traffic starting after a driver load.
- Exfiltration following the privilege escalation.
Remediation
Immediate response
Block the driver:
# Block specific vulnerable drivers using Group Policy
# Configure Windows Defender Application Control (WDAC) policies
New-CIPolicy -Level Publisher -FilePath "C:\temp\BYOVD-Block.xml" -UserPEsRemove it:
# Stop and remove vulnerable driver service
sc stop vulnerable_driver_service
sc delete vulnerable_driver_service
del "C:\Windows\System32\drivers\vulnerable_driver.sys"Ask the certificate authority to revoke the certificate used to sign a known vulnerable driver.
Preventive measures
Windows Defender Application Control (WDAC):
Do not hand-write the driver deny rules. Microsoft publishes the full policy as the recommended driver block rules. Merge that XML into your existing policy, or download the prebuilt binary from that page, rename it to SiPolicy.p7b and copy it to %windir%\system32\CodeIntegrity. Test in audit mode first, because blocking a driver that is in use can blue-screen the machine.
Driver signature enforcement:
# Make sure the boot options that weaken driver signature enforcement are off
bcdedit /set testsigning off
bcdedit /set nointegritychecks offTurn on Microsoft's vulnerable driver blocklist. Since the Windows 11 2022 update it is on by default, and it is also enforced whenever memory integrity (HVCI), Smart App Control or S mode is active:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CI\Config]
"VulnerableDriverBlocklistEnable"=dword:00000001Enterprise defence
Endpoint protection:
- Run EDR that protects itself in the kernel.
- Allowlist drivers.
- Use memory protection features such as Control Flow Guard and Intel CET.
Network segmentation:
- Keep critical systems off the general network.
- Move toward a zero-trust network design.
- Watch east-west traffic for lateral movement.
Access control:
- Restrict administrative rights with Privileged Access Management (PAM). Loading a driver needs admin, so fewer admins means fewer chances.
- Give out administrative access just in time.
- Audit privileged account use.
Advanced mitigations
Hypervisor-based protection:
- Enable Windows Defender System Guard.
- Turn on virtualization-based security (VBS).
- Deploy Hypervisor-protected Code Integrity (HVCI).
Hardware security:
- Enable Secure Boot and measured boot.
- Use TPM 2.0.
- Turn on Intel TXT or AMD SVM.
Prevention
Policy
Run a driver management process:
- Keep an inventory of approved drivers.
- Require approval before a new driver goes out.
- Review approved drivers for new vulnerabilities on a schedule.
Train IT and incident response staff on BYOVD and run tabletop exercises that include it.
Technical controls
Configuration management with PowerShell DSC:
# PowerShell DSC for driver management
Configuration SecureDriverConfig {
Registry BlockVulnerableDrivers {
Key = "HKLM:\SYSTEM\CurrentControlSet\Control\CI\Config"
ValueName = "VulnerableDriverBlocklistEnable"
ValueData = 1
ValueType = "Dword"
}
}Group Policy:
- Restrict driver installation.
- Deploy security baselines that cover drivers.
- Apply least privilege.
Monitoring and alerting
SIEM rule:
# SIEM rule for BYOVD detection
rule: BYOVD_Driver_Load
condition:
- event_id: 6
- image_loaded contains: ["procexp", "cpuz", "RTCore64"]
action: alert_high_priorityThreat hunting:
- Search for known vulnerable driver hashes and signatures.
- Look for unusual kernel activity.
- Correlate driver loads with what happens right after.
Verification
Check the hardening
Driver inventory:
# Comprehensive driver enumeration
Get-WindowsDriver -Online | Where-Object {$_.ProviderName -notlike "*Microsoft*"} |
Select-Object Driver, ProviderName, Date, VersionWDAC policy:
# Verify WDAC policy enforcement
Get-CIPolicy -FilePath "C:\Windows\System32\CodeIntegrity\SIPolicy.p7b"Driver certificate:
# Check driver certificate status
signtool verify /pa /v "C:\Windows\System32\drivers\target_driver.sys"Test the controls
- Include BYOVD in red team assessments.
- Run purple team exercises that load a known vulnerable driver and see whether anyone notices.
- Scan regularly for vulnerable drivers in the environment.
Incident response
Detection
First signs:
- Unexpected driver load events.
- The EDR agent stops reporting.
- Odd kernel-level process activity.
Collect artifacts:
# Collect driver forensic artifacts
Copy-Item "C:\Windows\System32\drivers\*.sys" "C:\Forensics\Drivers\"
Get-EventLog -LogName System | Where-Object {$_.EventID -eq 6}Containment
- Isolate affected systems from the network.
- Disable the vulnerable driver's service.
- Block lateral movement from those hosts.
Preserve evidence: take a memory dump, back up the registry hives and verify system file integrity.
Recovery
- Remove the vulnerable driver.
- Rebuild systems where the kernel was compromised. You cannot trust a host after Ring 0 code ran on it.
- Add monitoring for driver loads and tighten driver management.
References
MITRE ATT&CK techniques
- T1068 - Exploitation for Privilege Escalation - Kernel-level exploitation via drivers
- T1562.001 - Impair Defenses: Disable or Modify Tools - EDR evasion via drivers
- T1014 - Rootkit - Kernel-level persistence
- T1055 - Process Injection - Post-exploitation via kernel access
Microsoft documentation
- Microsoft: Vulnerable Driver Attacks - Prevention strategies
- Microsoft Vulnerable Driver Blocklist - Blocklist guidance
Other resources
- CWE-822 - Untrusted Pointer Dereference - Common driver vulnerability
- LOLDrivers - Database of vulnerable Windows drivers
Tools
- EDRSandblast - EDR evasion framework
- PPLKiller - PPL bypass via vulnerable drivers
Next steps
If you find vulnerable drivers or signs of BYOVD:
- Check how many hosts have the vulnerable driver installed.
- Contain affected hosts before the driver is used again.
- Add monitoring for driver loads and kernel activity.
- Related topics:
- PrintNightmare and other Windows privilege escalation vectors
- Endpoint security bypass techniques
- Advanced persistent threat (APT) detection and response
Windows Security
Windows privilege escalation techniques, group exploitation, system hardening, and vulnerability exploitation for penetration testing and red team operations.
Credential Dumping: LSASS and Windows Secrets
Windows credential dumping techniques targeting LSASS memory, SAM database, NTDS.dit, and cached credentials with defensive countermeasures.