Challenge 37: BYOVD — Kill the EDR Agent
Challenge 37: BYOVD — Kill the EDR Agent
| Difficulty: Hard | Category: BYOVD / Kernel Attacks | Target: Agent Process |
Objective
Use a vulnerable signed driver to terminate the EDR agent process from kernel level — even if it’s running with --driver mode.
Background
The MostShittyEDR agent (edr_agent.exe) runs as a user-mode process. Even in --driver mode, the agent itself is not a protected process (no PPL, no handle guard on its own PID). Any technique that can terminate an arbitrary process from kernel level will kill it instantly.
BYOVD (Bring Your Own Vulnerable Driver) exploits legitimately signed drivers that expose dangerous kernel primitives to user-mode callers. Several well-known drivers can terminate any process via IOCTL:
- PROCEXP152.sys (Process Explorer) — has a process-kill IOCTL
- Blackout.sys (gmer driver) —
0x9876C004(init) +0x9876C094(kill) - Terminator.sys — similar kill-by-PID interface
Tools like NimBlackout implement this attack in Nim. See BYOVD & IOCTL EDR Killer for a deep dive into the IOCTL-based attack chain.
Weakness Exploited
- The EDR agent has no self-protection — it doesn’t monitor or protect its own process
- The kernel driver doesn’t guard the agent’s process handle (ObRegisterCallbacks only protects LSASS)
- Windows does not treat loading a signed driver as a security boundary — Administrator can load any signed
.sys - The agent does not detect vulnerable driver loads (no
PsSetLoadImageNotifyRoutinemonitoring in user-mode)
Hints
- The agent process name is
edr_agent.exe— find its PID withtasklistor Toolhelp32 - You need Administrator privileges to load a kernel driver
- The driver must be validly signed (test-signed or production-signed)
sc.exe create+sc.exe startloads any kernel driver- After loading the vulnerable driver, open its device and send the kill IOCTL
- The agent’s
--drivermode doesn’t help — the kernel driver continues running but the agent (which reads events) is dead
Success Criteria
- The
edr_agent.exeprocess is terminated - No detection is logged (the agent is dead before it can react)
- The kill works even if the agent was started with
--driver
MostShittyEDR