Ding Dong The EDR is DEAD
Ayman Sagy (Principal Consultant · CyberCX)
BSides Canberra VIII (2025) · Day 2 · Main Track
Overview
In his captivating talk "Ding Dong The EDR is DEAD" at BSides Canberra, Ayman Sagy, a Principal Consultant at CyberCX, unveiled a sophisticated bypass technique against Endpoint Detection and Response (EDR) solutions. Drawing inspiration from the classic tale of The Wizard of Oz, Sagy metaphorically positioned EDR as the "wicked witch" and demonstrated how it could be "killed" even when operating with Microsoft's advanced process protection mechanisms. The presentation detailed a method to disable a prominent EDR agent, Cortex XDR, by leveraging vulnerable, signed drivers and exploiting a window of opportunity during system boot.

Key moments
- 0:00 Introduction: Why EDR is 'Dead'
- 5:00 EDR Protection: Kernel, User Mode, and Protected Processes
- 7:00 Understanding Windows Protected Processes (PPL)
- 11:00 Attacker's Goal: Modifying Kernel Memory
- 13:00 Abusing Vulnerable Drivers for Kernel Access
- 16:00 The 'Simple' Bypass: Loading Driver on Boot
- 17:00 Proof of Concept and Vendor Fix
Ding Dong The EDR is DEAD
Speakers: Ayman Sagy, Principal Consultant, CyberCX
Conference: BSides Canberra
YouTube: https://www.youtube.com/watch?v=kMENCPnpve8
Overview
In his captivating talk "Ding Dong The EDR is DEAD" at BSides Canberra, Ayman Sagy, a Principal Consultant at CyberCX, unveiled a sophisticated bypass technique against Endpoint Detection and Response (EDR) solutions. Drawing inspiration from the classic tale of The Wizard of Oz, Sagy metaphorically positioned EDR as the "wicked witch" and demonstrated how it could be "killed" even when operating with Microsoft's advanced process protection mechanisms. The presentation detailed a method to disable a prominent EDR agent, Cortex XDR, by leveraging vulnerable, signed drivers and exploiting a window of opportunity during system boot.
This talk is crucial for understanding the evolving cat-and-mouse game between attackers and defenders in the endpoint security landscape. Sagy's research highlights a critical vulnerability class: the "Bring Your Own Vulnerable Driver" (BYOVD) attack, combined with an early-load strategy, to circumvent modern EDR protections. By demonstrating how a local administrator can gain kernel-level privileges to disable an EDR, Sagy underscores the persistent challenge of securing the kernel and the need for EDR vendors to implement robust early-launch anti-malware (ELAM) capabilities.
His work, which earned him a CVE and a bounty from Palo Alto Networks (the vendor of Cortex XDR), provides invaluable insights for security professionals, EDR developers, and red teamers alike. It dissects the underlying Windows security mechanisms, such as Protected Processes and kernel-mode operations, to illustrate how these protections, while robust, can be undermined by clever exploitation of third-party software vulnerabilities.
Background
▶ Watch: Introduction: Why EDR is 'Dead' (0:00)
The premise of Sagy's research stems from a common frustration among security testers and even legitimate administrators: the inability to terminate an EDR or antivirus process, such as Windows Defender, even with elevated administrative privileges. This seemingly impenetrable protection often leads to the mistaken assumption that running as the SYSTEM user is sufficient to overcome EDR defenses. However, as Sagy meticulously explained, the reality is far more complex, rooted in fundamental operating system design and Microsoft's specific security features.
At the heart of this protection lies the concept of CPU protection rings, a hardware-level security boundary implemented by modern processors. These rings define different privilege levels for executing instructions. The innermost ring, Ring 0, is the most privileged and is reserved for the operating system's kernel. The kernel is the core component of the OS, responsible for managing system resources, CPU scheduling, memory, and hardware access. User applications, such as web browsers, office suites, or even malware, operate in less privileged rings, typically Ring 3. When a user application needs to perform a privileged operation (e.g., accessing hardware or creating a new process), it makes a system call or API request to the kernel, which then performs the operation in Ring 0 and returns the result.
Historically, antivirus and early EDR solutions often operated directly within the kernel (Ring 0) to gain superior visibility and control over the system, placing them above potential threats. However, Microsoft introduced PatchGuard in Windows Vista, a security feature designed to prevent unauthorized modification of the kernel. This move effectively "kicked antivirus out of the kernel," forcing vendors to redesign their security software to primarily run in user mode (Ring 3). While PatchGuard enhanced kernel integrity, it also presented a challenge for security vendors, as their software now ran at the same privilege level as the malware they aimed to combat, making them more susceptible to attack.
To address this, Microsoft later introduced Protected Process (PP) and its evolution, Protected Process Light (PPL), starting with Windows Vista (for DRM) and expanding to anti-malware in Windows 8.1. The initial intent of Protected Process was to safeguard digital copyrights by preventing unauthorized software from interacting with protected media content players. This mechanism was later extended to anti-malware software, allowing EDR agents to run as protected processes. A protected process can only run trusted code signed by Microsoft, and crucially, the kernel will actively deny access from regular or third-party processes, even those running as SYSTEM. This explains why a user cannot simply terminate an EDR process via Task Manager or even elevated command prompts; the kernel explicitly enforces its protection.
PPL further refined this concept by introducing multiple levels of protection, determined by a combination of a signer (e.g., anti-malware) and a type. For instance, the Windows Defender process MsMpEng.exe is typically protected with "anti-malware light," represented by a kernel-level protection value of 31 (signer 3 for anti-malware, type 1 for protected light). This protection extends to critical system components like the Local Security Authority Subsystem Service (LSASS), which stores sensitive credentials. Tools like Mimikatz, designed to extract these secrets, often fail with an "access denied" error (code 5) when LSASS is running in PPL mode (e.g., level 41). With Windows 10, Microsoft further enhanced this with Virtualization-Based Security (VBS) and Credential Guard, leveraging a hypervisor (running in Ring -1) to isolate LSASS secrets in a separate, secure virtual environment (lsao.exe), making them even harder to access from the main Windows OS kernel.
Key Findings
▶ Watch: Understanding Windows Protected Processes (PPL) (7:00)
Ayman Sagy's core discovery centered on the understanding that despite the layers of protection, the security status of a protected process is ultimately represented by a specific field within its kernel object – essentially, a single byte in kernel memory. For instance, the protection level 31 for an anti-malware light process is merely a value. The fundamental insight was: if this specific byte in kernel memory could be zeroed out, the process protection would effectively be removed.
The challenge, however, is that modifying kernel memory directly from user mode is strictly prohibited by design. This necessitates code execution within the kernel itself. Sagy then explored the legitimate mechanism for kernel extensibility: drivers. In Windows, drivers are loadable modules that can be dynamically loaded or unloaded into the kernel during runtime, akin to kernel modules in Linux. While developing custom malicious drivers (rootkits) is possible, deploying them in a production environment is blocked by Microsoft's driver signing policy, which requires drivers to be vetted and signed by Microsoft. Attackers can bypass this by enabling Windows in test mode (which requires disabling Secure Boot), but this is not a practical approach for stealthy, widespread compromise.
This led to the pivotal finding: abusing existing, previously signed, but vulnerable drivers. This technique is known as Bring Your Own Vulnerable Driver (BYOVD). Many legitimate third-party drivers, while signed by Microsoft, are poorly written from a security perspective. They may accidentally expose powerful functions to user mode, such as the ability to perform arbitrary reads and writes to kernel memory or execute privileged code. Lists of such "notorious known bad drivers" are publicly available (e.g., LOLdrivers.io).
Sagy identified two specific drivers as potential candidates for his attack:
- MSI Afterburner's
articore64.sys: A graphics overclocking utility driver, notorious for exposing direct arbitrary kernel read/write capabilities to user mode. - Process Explorer's
procxpa.sys: Part of the Sysinternals suite, this Microsoft-signed driver is used by Process Explorer to close process handles. While not directly offering arbitrary kernel write, the idea was that if an EDR's handles could be closed, it would destabilize and crash.
The critical breakthrough came when initial attempts to load these known vulnerable drivers were blocked by Cortex XDR, which already had signatures for them. Sagy's key finding was that by configuring the vulnerable driver (articore64.sys) to load automatically as a service during system boot, it could be loaded early enough before Cortex XDR's blocking mechanisms became fully active. This "early load" bypass allowed the vulnerable driver to run in Ring 0, providing the necessary kernel-level access to manipulate the EDR process's protection status. Once articore64.sys was loaded, Sagy could then use its arbitrary kernel write primitive to zero out the protection byte of the target EDR process (cyerver.exe), effectively removing its PPL protection. Following this, the procxpa.sys driver could be used to close the now unprotected EDR process's handles, leading to its instability and eventual crash.
Technical Deep Dive
▶ Watch: Attacker's Goal: Modifying Kernel Memory (11:00)
The technical underpinnings of Sagy's attack exploit the hierarchical nature of Windows security and the potential for legitimate, yet flawed, components to undermine it. Understanding the distinction between kernel mode (Ring 0) and user mode (Ring 3) is paramount. The kernel, running in Ring 0, possesses absolute control over the system, including direct access to hardware and memory. User applications in Ring 3 are restricted and must request kernel services via system calls for any privileged operations.
Protected Processes (PP) and Protected Process Light (PPL) are Microsoft's mechanisms to elevate the security posture of critical processes, including EDR agents. When an EDR, such as Cortex XDR's cyerver.exe or Windows Defender's MsMpEng.exe, runs as a PPL process (e.g., anti-malware light, which Sagy observed as kernel protection level 31), the Windows kernel actively prevents other processes, even those running as SYSTEM, from interacting with it in ways that could compromise its integrity. This means attempts to terminate the process, inject code, or read/write its memory are blocked by the kernel. Sagy demonstrated this by showing Mimikatz failing to open the LSASS process (error code 5, access denied) when LSASS was running in PPL mode (level 41). This protection is enforced by a specific protection member field within the EPROCESS kernel object that represents the running process.
The core of the attack revolves around modifying this protection member field. Sagy identified that this field, essentially a single byte value (e.g., 31 for anti-malware light), dictates the process's protected status. To remove protection, this value needs to be set to zero. However, directly writing to kernel memory from user mode is prevented by the CPU's protection rings. This is where kernel drivers come into play. Drivers are privileged executables that run in Ring 0 and have the necessary permissions to access and modify kernel data structures.
The challenge for an attacker is loading a malicious driver. Microsoft enforces driver signing, requiring all production drivers to be digitally signed, preventing arbitrary rootkits from being loaded. This led Sagy to the Bring Your Own Vulnerable Driver (BYOVD) technique. The idea is to exploit a legitimate, signed, third-party driver that contains a security flaw, often exposing a primitive for arbitrary kernel memory read/write or arbitrary code execution from user mode.
Sagy initially targeted two specific vulnerable drivers:
articore64.sys(MSI Afterburner driver): This driver is well-documented in the security community for its arbitrary kernel read/write primitive. An attacker can make specificDeviceIoControlcalls to this driver from user mode, providing it with a kernel address and a value, and the driver will write that value to the specified kernel address. This is the "arbitrary kernel write" primitive needed to zero out the EDR's protection byte.procxpa.sys(Process Explorer driver): This driver, part of Microsoft's Sysinternals suite, is used by Process Explorer to perform privileged operations like closing process handles. While not providing direct kernel write, the ability to close arbitrary handles of a process can destabilize it, leading to a crash. Sagy noted theprocxpa.sysdriver exposes its API functions transparently, unlike malware which often obscures them.
The crucial bypass for Cortex XDR's defenses against these known vulnerable drivers was the early load mechanism. Cortex XDR, like many EDRs, maintains a blacklist of known vulnerable drivers and prevents their loading. However, Sagy discovered that if articore64.sys was configured as a service set to auto-start on boot, it would be loaded by the Windows Service Control Manager before Cortex XDR's full protection suite, including its vulnerable driver blocking module, was initialized. This created a critical window of opportunity. Upon reboot, the articore64.sys driver would be loaded and running in Ring 0, granting the attacker arbitrary kernel write capabilities.
With articore64.sys loaded, the attack proceeded in two phases:
- Process Protection Removal: The attacker used the arbitrary kernel write primitive provided by
articore64.systo locate theEPROCESSobject of the target EDR process (cyerver.exe). They then identified the offset of theprotection memberfield within this object and wrote a0(zero) byte to that specific kernel memory address. This action effectively strippedcyerver.exeof its PPL protection, making it a regular, unprotected process. - Process Termination (Crash): Once unprotected, the
cyerver.exeprocess became vulnerable to standard attacks. Sagy chose a more subtle approach by then leveraging theprocxpa.sysdriver to systematically close various handles held bycyerver.exe. By invalidating critical handles (e.g., to files, devices, or other processes), the EDR agent, when attempting to use these now-invalid handles, would encounter errors, become unstable, consume excessive CPU resources, and eventually crash, appearing as a system instability rather than a direct termination.
This two-stage attack, combining BYOVD with an early-load strategy, successfully circumvented Cortex XDR's defenses, demonstrating a powerful method for disabling EDR agents.
Demo / Proof of Concept
▶ Watch: The 'Simple' Bypass: Loading Driver on Boot (16:00)
Ayman Sagy developed a Proof of Concept (PoC) to demonstrate the bypass against Cortex XDR. The PoC was a combined effort, merging functionalities from two existing public open-source tools:
backstab: This tool automates the process of closing handles of a target process, primarily by leveraging theprocxpa.sysdriver from Process Explorer.pcontrol: This tool is designed to implement process protection removal, specifically using thearticore64.sysdriver to patch theEPROCESSobject's protection member.
The PoC, likely implemented in a mix of C and C++ as Sagy noted the original tools were, followed these high-level steps:
- Driver Communication Check: The PoC first attempts to communicate with both the
articore64.sysandprocxpa.sysdrivers. This step determines if the vulnerable drivers are already loaded in the system. - Driver Installation and Reboot Request: If the drivers are not found to be loaded, the PoC proceeds to install them. Crucially, it creates the necessary Windows services and configures them to auto-start the
articore64.sysdriver (and potentiallyprocxpa.sys) on system boot. The user is then prompted to reboot the system. This step ensures that thearticore64.sysdriver loads early, before the EDR's blocking mechanisms are fully operational. - Process Protection Removal: Assuming the system has rebooted and
articore64.sysis now loaded, the PoC utilizes its arbitrary kernel write primitive. It identifies the target EDR process (cyerver.exefor Cortex XDR) and then patches theprotection memberwithin itsEPROCESSkernel object, setting its value to zero. This action effectively removes the PPL protection from the EDR agent. - Process Instability and Crash: Finally, with the EDR process now unprotected, the PoC employs the
procxpa.sysdriver (via thebackstabfunctionality) to systematically close a significant number ofcyerver.exe's internal handles. As the EDR agent attempts to use these invalidated handles, it becomes unstable, often spiking CPU usage, and eventually crashes.
Sagy successfully demonstrated this sequence, showing cyerver.exe becoming unstable, consuming CPU, and ultimately crashing, confirming the bypass. The careful staging of driver loading, followed by protection removal and then handle invalidation, showcased a complete and effective method to neutralize the EDR.
Defensive Implications
▶ Watch: Proof of Concept and Vendor Fix (17:00)
Ayman Sagy's research provides critical insights for defenders and EDR vendors. The primary defensive implication revolves around the need for robust Early Launch Anti-Malware (ELAM) capabilities. Microsoft defines ELAM drivers as those initialized before other boot-start drivers, ensuring that subsequent drivers loaded during the boot process do not contain malware. The success of Sagy's early-load bypass highlights that if an EDR's protection against vulnerable drivers isn't active early enough in the boot sequence, it creates a critical window of vulnerability.
Palo Alto Networks, the vendor of Cortex XDR, acknowledged and addressed this vulnerability. In their June 2024 release notes for Cortex XDR Agent 8.5, they announced a "dynamic kernel protection module implemented at the kernel level which loads during the boot process to protect against kernel level threats like boot kits, rootkits, and susceptible drivers." This indicates that Cortex XDR has implemented an ELAM-like mechanism or significantly enhanced its early-boot protection to detect and block vulnerable drivers like articore64.sys before they can be leveraged by an attacker. This fix directly counters the early-load bypass technique Sagy demonstrated.
For defenders, several key actions arise from this research:
- Patching and Inventory: Organizations must maintain a strict inventory of all installed drivers and ensure that known vulnerable drivers (as listed on resources like LOLdrivers.io) are either removed, updated, or blocked. Regular patching of third-party software is crucial, as vulnerable drivers often come bundled with legitimate applications.
- Driver Signing Enforcement: While driver signing is a core security feature, BYOVD attacks exploit signed but vulnerable drivers. Defenders should consider advanced policies that restrict driver loading to only those explicitly approved and continuously monitor for the presence of unusual or known-bad drivers.
- Enhanced Early-Boot Monitoring: EDRs and other security solutions need to strengthen their protection during the early boot phase. This includes monitoring driver load order, integrity checks of kernel modules, and behavioral analysis of driver activity immediately post-boot.
- Proactive Threat Hunting: Security teams should proactively hunt for indicators of BYOVD attacks, such as attempts to install new services for known vulnerable drivers, unusual kernel memory access patterns, or sudden crashes/disabling of EDR processes without legitimate cause.
- Understanding PPL and Kernel Security: Security professionals should have a deep understanding of Windows' Protected Process Light (PPL) mechanisms and overall kernel security to better assess the resilience of their EDR solutions and identify potential weak points.
Sagy's talk serves as a stark reminder that even with advanced protections like PPL, the security of the kernel remains a high-stakes battleground. EDRs must continually evolve their defenses, particularly in the critical early-boot phase, to stay ahead of sophisticated attackers leveraging BYOVD techniques.
Key Takeaways
- EDR protection relies heavily on kernel-level mechanisms like Protected Process Light (PPL) to prevent tampering, but this protection is ultimately a configurable flag in kernel memory.
- Bring Your Own Vulnerable Driver (BYOVD) attacks are potent: Legitimate, signed, but flawed third-party drivers can expose kernel-level primitives (e.g., arbitrary kernel read/write) that attackers can abuse.
- Early-boot loading can bypass EDR blocking: If a vulnerable driver is configured to auto-start as a service, it can load into the kernel before the EDR's vulnerable driver blocking mechanisms are fully active, creating a window of opportunity for compromise.
- Kernel memory modification is a powerful attack primitive: Once kernel-level write access is achieved (e.g., via BYOVD), attackers can directly modify critical kernel data structures, such as the
EPROCESSobject's protection member, to disable EDR defenses. - Disabling EDRs can be multi-staged: The attack can involve first removing process protection and then using another method (like closing handles via a second driver) to destabilize and crash the now-unprotected EDR.
- EDRs are adapting with ELAM-like defenses: Vendors like Palo Alto Networks are implementing enhanced early-launch kernel protection modules to counter these BYOVD and early-load bypass techniques.
About the Speaker(s)
Ayman Sagy is a Principal Consultant at CyberCX, based in Sydney, New South Wales. He is an accomplished security researcher with a focus on offensive security, evident from his past work reporting several CVEs related to security vulnerabilities. His research, as showcased in this talk, specifically includes a bug from the previous year that allowed a local administrator to disable an EDR agent, highlighting his expertise in bypassing endpoint protection mechanisms.