The moment an adversary obtains local administrative rights on a Windows host, their priority shifts from privilege escalation to telemetry destruction. Defenders often operate under the dangerous assumption that an installed EDR agent guarantees visibility. In practice, an unhardened endpoint agent can be rendered deaf and blind in seconds while leaving the underlying operating system fully functional.
Attackers do not need to exploit zero-days in security agents to blind them. Instead, they exploit architectural assumptions about Windows permissions, kernel privilege boundaries, and user-space event tracing.
Mechanics of Telemetry Tampering: Drivers, Services, and Tracing
Blinding an EDR agent involves suppressing event generation at one of three levels: the service layer, the kernel driver level, or the user-space tracing infrastructure.
Service Termination and PPL Controls
Security software typically runs as a background service backed by a Protected Process Light (PPL) structure. If an attacker attempts to terminate an EDR process (edragent.exe) using standard process management tools (taskkill /F or TerminateProcess), the Windows kernel rejects the handle request with ERROR_ACCESS_DENIED.
To bypass this without kernel-level code execution, attackers target the underlying service configuration. If Tamper Protection is disabled or misconfigured, an administrative user can invoke the Service Control Manager (SCM) API (ControlService or ChangeServiceConfig) to alter the start type of the security service to SERVICE_DISABLED (4) and send a SERVICE_CONTROL_STOP command. The driver unloads, the user-space agent dies, and the host drops off the central management console.
Bring Your Own Vulnerable Driver (BYOVD)
When direct service modification is blocked by agent self-defense or Tamper Protection, attackers push down to Ring 0 using BYOVD.
The Windows kernel architecture requires all drivers to be digitally signed by a trusted certificate authority (or signed via WHQL). Rather than using an unsigned rootkit, an attacker drops a legitimately signed, legacy third-party driver containing a known security flaw—such as an arbitrary memory read/write primitive exposed through an insecure DeviceIoControl (IOCTL) handler. Examples include legacy versions of RTCore64.sys or gdrv.sys.
Once loaded, the attacker’s user-mode payload issues IOCTL commands to the vulnerable driver to execute arbitrary kernel memory writes. The target is typically the kernel array structures that feed EDR agents:
PspCreateProcessNotifyRoutine: An array of pointers holding callback functions executed whenever a process is created.PspCreateThreadNotifyRoutine: Callback routines for thread creation.ObRegisterCallbacks: Callback routines monitoring handle creation to sensitive processes (likelsass.exe).
By locating these array pointers in kernel memory and zeroing them out or overwriting them with a simple RET instruction, the attacker removes the kernel’s ability to inform the security driver when new processes or threads launch. The EDR driver remains loaded, but it stops receiving event streams.
[ Attacker Payload (User-Space) ]
|
| 1. Drops signed driver (e.g., vulnerable RTCore64.sys)
v
[ Kernel Mode (Ring 0) ]
├── Vulnerable Driver loaded -> Exposes IOCTL Read/Write Primitives
└── Attacker writes to kernel arrays:
├── Zeroes out PspCreateProcessNotifyRoutine ==> No Process Logs
└── Zeroes out ObRegisterCallbacks ==> No Handle Logs
User-Space Event Tracing (ETW) Tampering
Event Tracing for Windows (ETW) provides high-volume diagnostic and security events from user-space libraries. Many EDR agents rely on user-space hooks and ETW providers (such as Microsoft-Windows-Threat-Intelligence) to monitor API calls like VirtualAllocEx or WriteProcessMemory.
User-mode ETW instrumentation relies on functions exported by ntdll.dll, primarily EtwEventWrite. Because ntdll.dll is loaded directly into every user-space process’s address space, an attacker executing inside that process owns the memory space containing ntdll.dll.
An attacker calls VirtualProtect to change the protection of the memory page hosting ntdll!EtwEventWrite to PAGE_EXECUTE_READWRITE. They then patch the first byte of the function with an opcode for RET (0xC3) or XOR EAX, EAX; RET (0x31 0xC0 0xC3). When the process subsequently attempts to log an event via ETW, the API returns immediately without emitting telemetry.
Reproducing Telemetry Disruption in an Isolated Lab
To evaluate detection coverage, you must safely simulate these techniques inside an isolated lab VM running Windows 10/11 or Windows Server 2022 with Sysmon and your target telemetry pipeline installed.
Note: Never run BYOVD exploitation tools or unvalidated kernel drivers on production hosts or systems outside a explicitly scoped lab environment.
Prerequisites
- A Windows test VM isolated from production networks.
- Sysmon installed with a baseline configuration logging Process Creation (ID 1), Driver Load (ID 6), and Service State Changes (ID 4697 / System log ID 7045/7040).
- Administrator rights on the local VM.
Lab Test 1: User-Space ETW Patching Simulation
You can observe ETW suppression using a minimal C# snippet targeting the current process’s memory space without executing malicious payloads.
using System;
using System.Runtime.InteropServices;
class EtwBypassTest {
[DllImport("kernel32.dll")]
public static extern IntPtr GetProcAddress(IntPtr hModule, string procName);
[DllImport("kernel32.dll")]
public static extern IntPtr GetModuleHandle(string lpModuleName);
[DllImport("kernel32.dll")]
public static extern bool VirtualProtect(IntPtr lpAddress, UIntPtr dwSize, uint flNewProtect, out uint lpflOldProtect);
static void Main() {
IntPtr ntdll = GetModuleHandle("ntdll.dll");
IntPtr etwEventWrite = GetProcAddress(ntdll, "EtwEventWrite");
uint oldProtect;
// Grant RWX to memory page hosting EtwEventWrite
VirtualProtect(etwEventWrite, (UIntPtr)5, 0x40, out oldProtect);
// Patch EtwEventWrite with RET (0xC3)
Marshal.Copy(new byte[] { 0xC3 }, 0, etwEventWrite, 1);
// Restore original permissions
VirtualProtect(etwEventWrite, (UIntPtr)5, oldProtect, out oldProtect);
Console.WriteLine("[+] EtwEventWrite successfully patched in current process memory.");
}
}
Compile and execute this binary. Observe that standard process execution logging continues, but any ETW-dependent provider hooked inside that specific process memory space silences immediate event delivery.
Lab Test 2: Vulnerable Driver Registration
Simulate the initial phase of a BYOVD attack by registering a test service intended to load a signed driver. Using standard Windows administrative commands:
:: Create a service entry pointing to a target driver file in a test folder
sc.exe create TestVulnerableDriver binPath= "C:\TestLab\vulnerable_driver.sys" type= kernel start= demand
:: Attempt to load the driver
sc.exe start TestVulnerableDriver
This sequence triggers the driver registration events, driver load events, and service creation telemetry required to build hunting rules.
Detecting the Blind Spots: Log Sources and KQL Hunting
Detecting agent blinding requires monitoring secondary channels. When an agent is blinded, it stops reporting its own status—meaning your primary detection signal is often the absence of expected telemetry or the specific administrative actions taken to disable the sensors.
Primary Telemetry Sources
- Sysmon Event ID 6: Driver Loaded (captures hashes, image paths, and signatures of kernel drivers).
- System Event ID 7045 / Security Event ID 4697: A service was installed in the system.
- System Event ID 7040: The start type of a system service was changed.
- Central SIEM / EDR Heartbeat Logs: Gaps in device reporting streams.
Hunting Query 1: Known Vulnerable Driver Loading (KQL)
This query searches Microsoft Defender for Endpoint or Sysmon telemetry for known vulnerable drivers commonly abused in BYOVD attacks (such as variants of RTCore64.sys or gdrv.sys) using SHA256 hashes or file properties.
// Detect driver load events matching known BYOVD driver indicators
DeviceImageLoadEvents
| where ActionType == "DriverLoad"
| where SHA256 in~ (
"1a2160e0a7f141887e5399ec60b006093cb4d7ffb58cf0b4d45d376c24b22c7a", // RTCore64.sys
"1a2160e0a7f141887e5399ec60b006093cb4d7ffb58cf0b4d45d376c24b22c7b",
"f29ee873200e127276537f76395e865f8c855a8f4c4c8b209e900c7a52f939e1" // gdrv.sys
) or ImageLoaded endswith "RTCore64.sys" or ImageLoaded endswith "gdrv.sys"
| project Timestamp, DeviceName, ImageLoaded, SHA256, InitiatingProcessFileName, InitiatingProcessCommandLine
Hunting Query 2: Disabling or Modifying Security Services (KQL)
Monitor the modification of service startup types using System Event 7040 logs ingested into your Log Analytics / Sentinel workspace.
// Detect modification of service start configurations to Disabled (0x4)
Event
| where EventID == 7040
| extend EventDataParsed = parse_xml(EventData)
| extend ServiceName = tostring(EventDataParsed.DataItem.EventData.Data[0])
| extend StartType = tostring(EventDataParsed.DataItem.EventData.Data[1])
| where ServiceName in~ ("Sense", "WinDefend", "Sysmon", "CarbonBlack", "CrowdStrike")
| where StartType endswith "disabled"
| project TimeGenerated, Computer, ServiceName, StartType, RenderedDescription
Hunting Query 3: Agent Heartbeat Telemetry Gaps
To detect when an agent has been blinded at the kernel level without properly unregistering from the network, hunt for hosts actively communicating over the network whose EDR event streams abruptly cease.
// Identify hosts emitting network events but missing process creation telemetry for > 30 minutes
let ActiveHosts =
DeviceNetworkEvents
| where Timestamp > ago(30m)
| summarize LastNetwork = max(Timestamp) by DeviceName;
let ReportingProcessHosts =
DeviceProcessEvents
| where Timestamp > ago(30m)
| summarize LastProcess = max(Timestamp) by DeviceName;
ActiveHosts
| join kind=leftanti ReportingProcessHosts on DeviceName
| project DeviceName, LastNetwork
False Positive Mitigation
- Legitimate Software Drivers: System monitoring and hardware diagnostic tools (such as CPU-Z or Process Hacker) use driver mechanisms that mirror BYOVD techniques. Maintain an explicit allowlist of authorized administrative tooling tied to software distribution systems.
- Routine Service Maintenance: Configuration management tools (like Ansible, SCCM, or Microsoft Intune) may modify service parameters during software upgrades. Filter alerts by verifying whether the
InitiatingProcessParentFileNameoriginates from authorized deployment agents.
Hardening: Closing the Window of Vulnerability
Detection is essential, but preventing kernel-level tampering requires strict policy enforcement at the OS level. If an attacker can load arbitrary vulnerable drivers, detection becomes a race you will eventually lose.
1. Enable Microsoft Vulnerable Driver Blocklist and HVCI
Hypervisor-Protected Code Integrity (HVCI), also known as Memory Integrity, enforces strict validation of all drivers executing in Ring 0. When enabled, it works alongside the Microsoft Vulnerable Driver Blocklist to block known vulnerable drivers from loading entirely, eliminating standard BYOVD pathways.
To enforce this via Group Policy:
- Navigate to
Computer Configuration -> Administrative Templates -> System -> Device Guard. - Enable Turn on Virtualization Based Security.
- Set Hypervisor Enforced Code Integrity to Enabled with UEFI lock.
To enforce the Driver Blocklist via Windows Defender Application Control (WDAC) PowerShell:
# Verify HVCI status on local host
Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard | Select-Object SecurityServicesRunning
2. Lock Down EDR Tamper Protection
Tamper Protection prevents local administrative accounts, registry edits, and command-line scripts from disabling core agent components, stopping services, or deleting security definitions.
- Defender for Endpoint: Ensure Tamper Protection is set to Enabled across all platforms within the Microsoft Intune admin center (
Endpoint security -> Antivirus -> Tamper Protection). - Third-Party EDRs: Confirm that password-protected uninstallation and agent service protection features are explicitly enabled via management consoles.
3. Enforce LSA Protection (RunAsPPL)
Protect local credentials and secondary security authorization tokens by requiring Local Security Authority (LSA) processes to run as Protected Process Light. This blocks arbitrary user-mode injection into security subsystem components.
Enforce via registry deployment:
reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v "RunAsPPL" /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v "RunAsPPLBoot" /t REG_DWORD /d 1 /f
Combining system-enforced kernel driver blocklists, strict Tamper Protection, and heartbeat-gap telemetry monitoring changes the operational calculus: attackers are forced to spend high-value capabilities simply trying to hide, leaving obvious telemetry breadcrumbs the moment they attempt to blind the endpoint.
Related content
Beyond the Packer Myth: Architectural EDR Evasion and Durable Telemetry
ResearchCatching Fodhelper UAC Bypasses: Mechanics and Telemetry Engineering
ResearchWhy Per-Account Lockouts Fail Against Password Spraying (And the Math Behind It)
ResearchWhy Signatures Will Never Catch Living-off-the-Land Attacks
Want a second set of eyes on your security posture?
Let's talk about where your real exposure is.
Book an advisory call