Bring Your Own Vulnerable Driver (BYOVD)
MITRE ATT&CK™ Exploitation for Privilege Escalation - Technique T1068
Theory
As a security mechanism, Windows by default employs a feature called Driver Signature Enforcement that ensures kernel-mode drivers have been signed by a valid code signing authority before Windows will permit them to run.
However, we may bring a signed vulnerable driver onto a compromised machine so that we can exploit the vulnerability to execute code in kernel mode.
That technique requires administrative privileges on the target.
Practice
Killing AV/EDDR
Gaining kernel-mode access through vulnerable drivers exploit enables a Windows Kernel-Mode Code Integrity (KMCI) bypass, allowing the termination of Protected Process Light (PPL) processes, such as EDR or AV tools.
Backstab is a tool capable of killing antimalware protected processes by leveraging sysinternals’ Process Explorer driver (procexp.sys).
Windows Filtering Platform (WPF) Callout Driver
A callout driver implements one or more callouts. Callouts extend the capabilities of the Windows Filtering Platform by processing TCP/IP-based network data in ways that are beyond the scope of the simple filtering functionality. By exploiting such driver we can block outbound traffic from EDR processes.
Kernel Object Tampering
EDRSandblast is a tool written in C
that weaponize a vulnerable signed driver to bypass EDR detections (Notify Routine callbacks, Object Callbacks and ETW TI
provider) and LSASS
protections. Multiple userland unhooking techniques are also implemented to evade userland monitoring.
Hijacking Valid Drivers
The technique will not work on HVCI systems due to the impossibility to change the LSTAR pointers if protected by the Hyper-V
DriverJack is a tool designed to load a vulnerable driver by abusing lesser-known NTFS techniques. These method bypass the registration of a Driver Service on the system by hijacking an existing service, and also spoof the image path presented in the Driver Load event. To further masquerade the presence of a vulnerable driver, the attack also abuses an Emulated Filesystem Read-Only bypass to swap the content of a driver file on a mounted ISO before loading it.
Resources
Last updated