Bring Your Own Vulnerable Driver (BYOVD) is an attack technique that exploits vulnerabilities in legitimate drivers. In BYOVD attacks, attackers abuse vulnerable kernel-mode drivers to execute code with kernel-level privileges. A valid digital signature does not guarantee that a driver is free of vulnerabilities.
Attackers with administrator access to a Windows endpoint can abuse a vulnerable signed driver to tamper with security controls, evade control or hide malicious activity. This tampering reduces the likelihood of detecting malicious activity such as ransomware deployment, credential theft, and lateral movement.
Tools that use this technique to disable security software are known as Endpoint Detection and Response (EDR) killers. In 2026, Huntress and the Cloud Security Alliance (CSA) reported BYOVD attacks that used EDR killers in real intrusions. These tools exploit vulnerable, signed kernel drivers to terminate security processes and disable endpoint protection, including drivers with revoked certificates.
The Wazuh unified XDR and SIEM platform helps detect this driver abuse by monitoring suspicious driver activity and unexpected security service termination. This blog post demonstrates how to detect BYOVD activity on Windows endpoints using System Monitor (Sysmon), Windows System events, and custom Wazuh rules.
Infrastructure
We use the following infrastructure to demonstrate BYOVD detection with Wazuh:
- A prebuilt, ready-to-use Wazuh 4.14.11 open virtual appliance (OVA), which includes the Wazuh central components (Wazuh server, Wazuh indexer, and Wazuh dashboard). Follow the Wazuh virtual machine guide to download and set up the Wazuh virtual machine.
- A Windows 11 endpoint with the Wazuh agent 4.14.11 installed and enrolled in the Wazuh server.
BYOVD attack overview
Attackers follow a predictable sequence to load a vulnerable driver into the kernel.
A BYOVD attack commonly follows these steps:
- Drop a vulnerable driver: Place a legitimate but vulnerable signed driver on disk, often in a user-writable directory, using a filename that disguises its purpose.
- Create a kernel driver service: Register the driver as a service so Windows can load it into the kernel.
- Load the driver: Start the service to load the driver into kernel memory.
- Abuse the driver: Exploit the driver’s privileged operations to terminate security processes from kernel mode, bypassing user-mode protections.
- Maintain the disruption: Repeatedly terminate security processes or services if they restart, preventing endpoint protection from resuming.
Configuration
We configure the Windows endpoint to log every driver load and forward the events to the Wazuh server. We then add Constant Database (CDB) lists and custom rules on the Wazuh server.
Windows endpoint
We collect Sysmon events on the Windows endpoint. Sysmon is a Windows system service that logs process creation, network connections, registry changes, and other system events.
Perform the following steps on the Windows endpoint to configure Sysmon and forward its event logs to the Wazuh server for analysis. The last two steps collect the test driver hash and security service display names for the CDB lists on the Wazuh server.
- Download Sysmon from the Microsoft Sysinternals page.
- Extract the compressed Sysmon file to your preferred location.
- Run the following command in an elevated PowerShell to download the Sysmon configuration file (sysmonconfig.xml). Replace
<SYSMON_FOLDER>with the folder you extracted Sysmon to:
> Invoke-WebRequest -Uri https://wazuh.com/resources/blog/emulation-of-attack-techniques-and-detection-with-wazuh/sysmonconfig.xml -OutFile <SYSMON_FOLDER>\sysmonconfig.xml
- Replace the
DriverLoadrule group in the<SYSMON_FOLDER>\sysmonconfig.xmlfile with the followingexcludeblock. The defaultDriverLoadsection excludes validly signed drivers whose signer containsMicrosoftor begins withIntel, and the new block logs every driver load:
<!-- Event ID 6 == Driver Loaded - Excludes --> <RuleGroup groupRelation="or"> <DriverLoad onmatch="exclude"> </DriverLoad> </RuleGroup>
- Replace
<HashAlgorithms>*</HashAlgorithms>with<HashAlgorithms>SHA256</HashAlgorithms>in the<SYSMON_FOLDER>\sysmonconfig.xmlfile to record only SHA256 hashes. The downloaded configuration records every hash algorithm in oneHashesfield, and rule 100801 matches only when the field holds the SHA256 hash alone.
Note
HashAlgorithms is a global Sysmon setting. Other events that include hashes, such as process creation (Event ID 1) and image load (Event ID 7), also record only the SHA256 hash. If other detections on your endpoint rely on MD5, SHA1, or IMPHASH values, check them before you apply this change.
- Navigate to the folder containing the Sysmon executable and run the following command to install and start Sysmon:
> .\Sysmon64.exe -accepteula -i sysmonconfig.xml
Note
If Sysmon is already installed on the endpoint, apply the updated configuration with .\Sysmon64.exe -c sysmonconfig.xml instead.
- Add the following configuration within the
<ossec_config>block of theC:\Program Files (x86)\ossec-agent\ossec.conffile to forward Sysmon events to the Wazuh server for analysis:
<localfile>
<location>Microsoft-Windows-Sysmon/Operational</location>
<log_format>eventchannel</log_format>
</localfile>
- Restart the Wazuh agent to apply the changes:
> Restart-Service -Name WazuhSvc
- Run the following command to get the SHA256 hash of the
beep.sysdriver for testing known vulnerable driver detection. Use the returned hash when configuring thevulnerable-driversCDB list in the next section:
> (Get-FileHash -Path C:\Windows\System32\drivers\beep.sys -Algorithm SHA256).Hash
98CDBD998CF136FBBB9ECCE829717B917374D0AF20780BFD02767303C2756D85
Note
The beep.sys hash differs between Windows builds. Use the hash that the command returns on your endpoint.
- Run the following command to get the display names of the services you want to monitor for termination:
> Get-Service -Name WinDefend, WdNisSvc, WazuhSvc, Sysmon64, Spooler | Select-Object Name, DisplayName
Name DisplayName ---- ----------- Spooler Print Spooler Sysmon64 Sysmon64 WazuhSvc Wazuh WdNisSvc Microsoft Defender Antivirus Network Inspection Service WinDefend Microsoft Defender Antivirus Service
Note
To monitor other services, add their service names to the -Name parameter of the command.
Wazuh server
We create Constant Database (CDB) lists to identify known vulnerable drivers, known malicious drivers, and the security services to monitor.
The driver hashes come from the LOLDrivers project, which sorts drivers into vulnerable and malicious categories and publishes hash lists for each. The vulnerable-drivers list holds legitimate drivers with a flaw that attackers exploit, such as the ThrottleStop driver. The malicious-drivers list holds the drivers that LOLDrivers classifies as malicious.
Perform the following steps on the Wazuh server to create the CDB lists:
- Run the following command to create the
vulnerable-driversCDB list in/var/ossec/etc/lists/using SHA256 hashes from the LOLDrivers project:
# curl -s https://raw.githubusercontent.com/magicsword-io/LOLDrivers/main/detections/hashes/samples_vulnerable.sha256 | awk '{print "SHA256=" toupper($1) ":loldrivers"}' > /var/ossec/etc/lists/vulnerable-drivers
- Run the following command to add the test driver hash to the
vulnerable-driversCDB list. Replace<TEST_DRIVER_SHA256>with the SHA256 hash ofbeep.sysobtained on the Windows endpoint:
# echo "SHA256=<TEST_DRIVER_SHA256>:test" >> /var/ossec/etc/lists/vulnerable-drivers
- Run the following command to create the
malicious-driversCDB list in/var/ossec/etc/lists/using SHA256 hashes from the LOLDrivers project:
# curl -s https://raw.githubusercontent.com/magicsword-io/LOLDrivers/main/detections/hashes/samples_malicious.sha256 | awk '{print "SHA256=" toupper($1) ":loldrivers"}' > /var/ossec/etc/lists/malicious-drivers
- Create a file named
security-servicesin the/var/ossec/etc/lists/directory and insert the service display names obtained from the Windows endpoint. Each entry maps a service display name to a label:
"Microsoft Defender Antivirus Service":defender "Microsoft Defender Antivirus Network Inspection Service":defender Wazuh:wazuh Sysmon64:sysmon "Print Spooler":test
Note
The Print Spooler entry is for testing only. We terminate this service in the test section to trigger the detection.
- Add the following configuration within the
<ruleset>block of the/var/ossec/etc/ossec.conffile to load the CDB lists:
<list>etc/lists/vulnerable-drivers</list> <list>etc/lists/malicious-drivers</list> <list>etc/lists/security-services</list>
- Restart the Wazuh manager to apply the changes:
# systemctl restart wazuh-manager.service
Wazuh dashboard
The following rules detect suspicious driver loads, kernel driver service creation, and unexpected security service termination. They also correlate suspicious driver activity with security service termination on the same endpoint.
Windows stores drivers in C:\Windows\System32\drivers and stages driver packages in C:\Windows\System32\DriverStore. Standard users cannot write to these folders. Attackers can load drivers from other locations, including user-writable folders.
The custom rules use driver hashes, signature statuses, file paths, and service events to identify suspicious activity.
Perform the following steps on the Wazuh dashboard to configure the custom rules:
- Navigate to Server management > Rules and click Add new rules file.
- Copy and paste the following rules and name the file
windows_byovd_rules.xml. Click Save, then Reload to apply the changes.
<group name="windows_byovd,">
<!-- Known vulnerable driver detection -->
<rule id="100801" level="14">
<if_group>sysmon_event6</if_group>
<list field="win.eventdata.hashes" lookup="match_key">etc/lists/vulnerable-drivers</list>
<description>Known vulnerable driver $(win.eventdata.imageLoaded) loaded. Possible BYOVD attack.</description>
<mitre>
<id>T1068</id>
</mitre>
<group>byovd_driver,</group>
</rule>
<!-- Suspicious driver location detection -->
<rule id="100802" level="10">
<if_group>sysmon_event6</if_group>
<field name="win.eventdata.imageLoaded" type="pcre2" negate="yes">(?i)^[a-z]:\\\\(?:windows\\\\(?!temp\\\\)|program files(?: \(x86\))?\\\\)</field>
<description>Driver $(win.eventdata.imageLoaded) loaded from outside the Windows and Program Files folders. Signer: $(win.eventdata.signature).</description>
<mitre>
<id>T1068</id>
</mitre>
<group>byovd_driver,</group>
</rule>
<!-- Allowlist trusted Microsoft Defender drivers -->
<rule id="100803" level="0">
<if_sid>100802</if_sid>
<field name="win.eventdata.imageLoaded" type="pcre2">(?i)^c:\\\\programdata\\\\microsoft\\\\windows defender\\\\platform\\\\</field>
<field name="win.eventdata.signature">^Microsoft Windows$</field>
<field name="win.eventdata.signatureStatus">^Valid$</field>
<description>Allowlisted driver $(win.eventdata.imageLoaded) loaded from ProgramData.</description>
</rule>
<!-- Suspicious driver signature detection -->
<rule id="100804" level="10">
<if_group>sysmon_event6</if_group>
<field name="win.eventdata.signatureStatus" negate="yes">^Valid$</field>
<description>Suspicious driver $(win.eventdata.imageLoaded) loaded with signature status $(win.eventdata.signatureStatus).</description>
<mitre>
<id>T1068</id>
</mitre>
<group>byovd_driver,</group>
</rule>
<!-- Kernel driver service detection -->
<rule id="100805" level="12">
<if_sid>61138</if_sid>
<field name="win.eventdata.serviceType" type="pcre2">(?i)^(?:kernel mode|file system) driver$</field>
<field name="win.eventdata.imagePath" type="pcre2" negate="yes">(?i)^(?:\\\\systemroot\\\\|(?:\\\\\?\?\\\\)?[a-z]:\\\\windows\\\\)?system32\\\\(?:drivers|driverstore)\\\\</field>
<description>Kernel driver service $(win.eventdata.serviceName) created with image path $(win.eventdata.imagePath) outside the System32 driver folders.</description>
<mitre>
<id>T1543.003</id>
<id>T1068</id>
</mitre>
<group>byovd_driver,</group>
</rule>
<rule id="100806" level="13">
<if_sid>100805</if_sid>
<field name="win.eventdata.serviceName" type="pcre2">(?i)(?:upd|firmware|oem|microsoft|windows|defender)</field>
<description>Kernel driver service $(win.eventdata.serviceName) imitates an update or vendor component. Image path: $(win.eventdata.imagePath).</description>
<mitre>
<id>T1543.003</id>
<id>T1036.004</id>
</mitre>
<group>byovd_driver,</group>
</rule>
<!-- Security service termination detection -->
<rule id="100807" level="8">
<if_sid>61102</if_sid>
<field name="win.system.eventID" type="pcre2">^(?:7031|7034)$</field>
<field name="win.system.providerName">^Service Control Manager$</field>
<list field="win.eventdata.param1" lookup="match_key">etc/lists/security-services</list>
<description>Security service $(win.eventdata.param1) terminated unexpectedly.</description>
<mitre>
<id>T1562.001</id>
</mitre>
<group>security_service_stopped,</group>
</rule>
<!-- Known malicious driver detection -->
<rule id="100808" level="15">
<if_group>sysmon_event6</if_group>
<list field="win.eventdata.hashes" lookup="match_key">etc/lists/malicious-drivers</list>
<description>Known malicious driver $(win.eventdata.imageLoaded) loaded. Possible BYOVD attack.</description>
<mitre>
<id>T1068</id>
</mitre>
<group>byovd_driver,</group>
</rule>
<!-- BYOVD activity correlation -->
<rule id="100809" level="14" timeframe="300">
<if_group>security_service_stopped</if_group>
<if_matched_group>byovd_driver</if_matched_group>
<same_location />
<description>Security service $(win.eventdata.param1) terminated within 5 minutes of suspicious driver activity. Possible BYOVD tool tampering.</description>
<mitre>
<id>T1562.001</id>
<id>T1068</id>
</mitre>
</rule>
</group>
Where:
- Rule ID
100801detects driver loads with SHA256 hashes that match entries in thevulnerable-driversCDB list. - Rule ID
100802detects driver loads from any folder outsideC:\WindowsandC:\Program Files(orC:\Program Files (x86)), and fromC:\Windows\Temp. Examples includeC:\ProgramData,C:\Users,C:\PerfLogs, andC:\Tools. - Rule ID
100803suppresses rule100802for Microsoft Defender platform drivers that match the specified path, signer, and signature status. Microsoft Defender loads these drivers fromC:\ProgramData\Microsoft\Windows Defender\Platformduring normal operation. - Rule ID
100804detects driver loads with a signature status other thanValid. Sysmon checks the signature of each loaded driver and records the result in theSignatureStatusfield. Any other value means that the driver is unsigned or its signature is no longer trusted. - Rule ID
100805detects new kernel-mode or file system driver services with image paths outside theC:\Windows\System32\driversandC:\Windows\System32\DriverStorefolders. - Rule ID
100806raises the alert level when a suspicious driver service name contains terms associated with updates or vendor components. - Rule ID
100807detects unexpected termination of services in thesecurity-servicesCDB list using Windows System Event ID7031or7034. - Rule ID
100808detects driver loads whose SHA256 hash is in themalicious-driversCDB list. - Rule ID
100809correlates unexpected security service termination with suspicious driver activity within 5 minutes on the same endpoint. Windows events don’t show what terminated a service, so the timing of the driver activity is the link to a possible BYOVD attack.
Test the BYOVD detections
Use copies of the legitimate null.sys and beep.sys drivers to test the BYOVD detections. The service termination test uses the Windows Print Spooler service.
| Warning: These tests load kernel drivers and terminate the Print Spooler service. Run these tests only on an isolated, disposable test endpoint, and revert the virtual machine snapshot afterwards. |
We run the following tests.
| Test | Objective | Expected rule IDs |
| Suspicious driver and service creation | Detect a suspicious driver location and service | 100802, 100806 |
| Service termination | Detect unexpected service termination | 100809 |
| Known vulnerable driver | Detect a matching driver hash | 100801, 100805 |
| Known malicious driver | Detect a malicious driver hash | 100805, 100808 |
| Signature status | Detect a non-valid driver signature status | 100804 |
Suspicious driver and service creation
This test uses a copy of null.sys to simulate a suspicious driver load and kernel driver service creation. The null.sys hash is not in the vulnerable-drivers CDB list.
Run the following commands in an elevated PowerShell session to test suspicious driver location and service name detection:
> New-Item -ItemType Directory -Force C:\ProgramData\OEM\Firmware | Out-Null > Copy-Item C:\Windows\System32\drivers\null.sys C:\ProgramData\OEM\Firmware\OemHwUpd.sys -Force > sc.exe create OemHwUpd type= kernel start= demand binPath= C:\ProgramData\OEM\Firmware\OemHwUpd.sys > sc.exe start OemHwUpd > sc.exe delete OemHwUpd > Remove-Item C:\ProgramData\OEM -Recurse -Force
[SC] CreateService SUCCESS [SC] StartService FAILED 183: Cannot create a file when that file already exists. [SC] DeleteService SUCCESS
Note
The StartService FAILED error is expected. Sysmon logs Event ID 6 when Windows maps the driver into kernel memory, then fails to start.
Rule 100802 is triggered due to the driver load from a suspicious location, and rule 100806 is triggered due to the service created for it.
Service termination
This test terminates a listed service shortly after suspicious driver activity.
Run the following command in an elevated PowerShell session within 5 minutes of the previous test to terminate the Print Spooler process:
> Stop-Process -Name spoolsv -Force
Note
Print Spooler has recovery actions configured by default, so Windows logs Event ID 7031.
Rule 100809 is triggered due to the Print Spooler termination shortly after the suspicious driver activity. Rule 100809 builds on rule 100807, which matches the termination first.
Known vulnerable driver detection
This test uses a copy of beep.sys to test known vulnerable driver detection. The driver hash is in the vulnerable-drivers CDB list.
Run the following commands in an elevated PowerShell session to create the ByovdTest kernel driver service, testing both driver hash matching and suspicious service detection:
> New-Item -ItemType Directory -Force C:\Users\Public\drv | Out-Null > Copy-Item C:\Windows\System32\drivers\beep.sys C:\Users\Public\drv\ByovdTest.sys > sc.exe create ByovdTest type= kernel start= demand binPath= C:\Users\Public\drv\ByovdTest.sys > sc.exe start ByovdTest > sc.exe stop ByovdTest > sc.exe delete ByovdTest > Remove-Item C:\Users\Public\drv -Recurse -Force
Rule 100801 is triggered due to the matching driver hash, and rule 100805 is triggered due to the service created for the driver.
Known malicious driver detection
This test loads a driver whose SHA256 hash is an entry in the malicious-drivers CDB list. We use the gmer64.sys driver with the hash from the CDB list.
| Warning: This test loads a driver listed as malicious, which can execute code in the Windows kernel and compromise or crash the endpoint. Run it only in an isolated, disposable virtual machine with a snapshot, and revert the snapshot immediately after testing. |
- Copy the driver with this hash to the
C:\Toolsfolder on the Windows endpoint, and rename itmalicious_test.sys. - Run the following command in an elevated PowerShell session to compute the hash of the file. Confirm that the SHA256 value matches the hash above:
> Get-FileHash C:\Tools\malicious_test.sys
- Load the driver under the service name
MalDrvTestby running the following commands in an elevated PowerShell session:
> sc.exe create MalDrvTest type= kernel start= demand binPath= C:\Tools\malicious_test.sys > sc.exe start MalDrvTest > sc.exe stop MalDrvTest > sc.exe delete MalDrvTest
Signature status detection
With Secure Boot on and test signing off, Windows refuses to load an unsigned driver. A blocked load produces no Event ID 6, so this test writes a synthetic Sysmon event instead.
Run the following commands in an elevated PowerShell session to write the synthetic event without loading a driver:
> $utc = (Get-Date).ToUniversalTime().ToString('yyyy-MM-dd HH:mm:ss.fff')
> New-WinEvent -ProviderName Microsoft-Windows-Sysmon -Id 6 -Payload @('-', $utc, 'C:\Windows\System32\drivers\unsigned_test.sys', 'SHA256=0000000000000000000000000000000000000000000000000000000000000000', 'false', '', 'Unavailable')
Rule 100804 is triggered due to the invalid signature status in the synthetic Sysmon event.
Visualizing the alerts
Perform the following steps on the Wazuh dashboard to view the alerts.
- Navigate to Threat intelligence > Threat Hunting.
- Click the Events tab.
- Enter
rule.groups:windows_byovdin the search bar.

Conclusion
In this blog post, we demonstrate how to detect BYOVD activity on Windows endpoints with Wazuh. Custom Wazuh rules analyze Sysmon and Windows System events to identify suspicious driver activity and unexpected security service termination.
Wazuh also correlates these events to help security teams identify possible BYOVD attacks. These detections complement Windows security controls and provide additional visibility into suspicious endpoint activity.
Wazuh is a free and open source security platform. Check out our documentation to learn more, and join our community for help and discussion.
References
- Huntress: They Got In Through SonicWall. Then They Tried to Kill Every Security Tool
- Cloud Security Alliance: HwAudKiller: BYOVD EDR Bypass via Vulnerable Huawei Driver
- LOLDrivers
- Microsoft recommended driver block rules
- Microsoft attack surface reduction rules reference
- Sysmon
- sysmon-modular
- Wazuh documentation: CDB lists
- Wazuh documentation: Rules syntax
- MITRE ATT&CK: T1068 Exploitation for Privilege Escalation
- MITRE ATT&CK: T1543.003 Windows Service
- MITRE ATT&CK: T1036.004 Masquerade Task or Service
- MITRE ATT&CK: T1685 Disable or Modify Tools, formerly T1562.001