Kuboid
Open Luck·Kuboid.in

Kill Chain Reloaded: Abusing Legacy Paths for Stealth Persistence

DEFCONConference716 views43:056 months ago

This talk demonstrates a novel persistence technique leveraging vulnerable signed drivers and legacy UEFI boot paths to bypass Secure Boot and EDR protections. The researchers show how to identify and weaponize signed, vulnerable drivers to gain kernel-level access and execute code before the operating system initializes. The presentation highlights the risks of outdated UEFI revocation lists and provides a proof-of-concept for achieving stealthy, persistent kernel-level control. The authors also release a tool to automate the discovery and exploitation of these vulnerable artifacts.

Bypassing Secure Boot: Weaponizing Vulnerable Drivers for Stealth Persistence

TLDR: Researchers at DEF CON 2025 demonstrated a sophisticated persistence technique that chains vulnerable, signed UEFI bootloaders with legitimate but insecure drivers to bypass Secure Boot. By weaponizing these artifacts, an attacker can achieve kernel-level execution before the OS initializes, effectively blinding EDR and forensic tools. This research highlights the critical need for organizations to maintain updated UEFI revocation lists and audit their driver supply chain for known vulnerable components.

Security researchers often treat Secure Boot as a binary state: either it is enabled, or the system is compromised. The reality is far more nuanced. Recent research presented at DEF CON 2025 exposes how attackers can maintain persistent, kernel-level control by abusing the very mechanisms designed to ensure system integrity. By chaining vulnerable, signed UEFI bootloaders with legitimate drivers that lack proper input validation, an attacker can execute code in the pre-boot environment, effectively rendering traditional EDR solutions useless because they haven't even started yet.

The Pre-Boot Persistence Chain

The core of this research centers on the fact that Secure Boot relies on a list of trusted binaries and a revocation list, known as the DBX (Revocation List), to verify the boot chain. If a bootloader is signed by a trusted authority, the firmware executes it. The vulnerability arises when an attacker identifies a signed bootloader that contains a flaw, such as CVE-2022-34302, which allows for arbitrary code execution or the loading of unsigned code.

Once the attacker gains execution in this pre-boot phase, they can manipulate the system state before the kernel or security agents load. The researchers demonstrated this by replacing the standard boot manager with a custom, signed, but vulnerable version. Because the binary is signed, the firmware accepts it. Once running, this binary acts as a staging ground to load further malicious payloads, including vulnerable drivers that provide the necessary primitives for kernel-level interaction.

Weaponizing "Bring Your Own Vulnerable Driver" (BYOVD)

The second half of the attack chain leverages the BYOVD technique. Attackers identify legitimate, signed drivers that expose dangerous IOCTLs—such as those allowing direct physical memory access or kernel-mode code execution—without implementing proper access control or input validation.

During the presentation, the researchers highlighted a specific driver from Lenovo that was originally intended for system management but could be abused to smuggle malicious code into the kernel. By interacting with the driver’s device object, an attacker can send IOCTLs to perform tasks like process injection or disabling security callbacks.

For example, a simplified interaction with a vulnerable driver might look like this:

// Example of interacting with a vulnerable driver IOCTL
HANDLE hDevice = CreateFile("\\\\.\\VulnerableDriver", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if (hDevice != INVALID_HANDLE_VALUE) {
    // Sending a malicious IOCTL to trigger a vulnerable function
    DeviceIoControl(hDevice, 0x222004, inputBuffer, inputSize, NULL, 0, &bytesReturned, NULL);
    CloseHandle(hDevice);
}

This interaction requires no special privileges if the driver’s device object has a weak DACL, which is common in many legacy or poorly implemented drivers. Once the driver is loaded, the attacker can use it to patch the kernel, disable EDR callbacks, or protect their own malicious processes from termination.

Real-World Engagement and Impact

For a pentester, this technique is a game-changer for long-term persistence. If you can drop a signed, vulnerable driver onto a target system, you can effectively "root" the machine. During an engagement, this means you can bypass standard EDR protections that rely on kernel callbacks, as you can simply use the vulnerable driver to unhook or disable those callbacks.

The impact is total system compromise. Because the persistence is established at the UEFI level or through a kernel-mode driver that survives reboots, the attacker remains present even if the OS is reinstalled or the disk is wiped, provided the firmware itself isn't reflashed. This is not a theoretical exercise; it is a practical, repeatable method for maintaining access in high-security environments where traditional malware would be detected immediately.

Defensive Considerations

Defending against this requires a shift in focus from user-land monitoring to firmware and driver supply chain integrity. Organizations must ensure that their UEFI revocation lists are up to date. Microsoft provides the Secure Boot DBX repository on GitHub, which researchers and administrators should monitor to identify if their hardware is running known-vulnerable bootloaders.

Furthermore, the driver supply chain must be audited. Tools like VirusTotal and RetroHunt can be used to scan for known vulnerable drivers within an environment. If a driver is not strictly necessary for system operation, it should be removed. For those that are required, ensure they are updated to versions where the vulnerable IOCTLs have been patched or restricted.

Ultimately, the security of the boot process is only as strong as the weakest link in the chain. As long as signed, vulnerable binaries remain in circulation, attackers will find ways to chain them into a persistent, stealthy foothold. Investigating the drivers currently loaded in your environment is no longer optional; it is a necessary step in identifying potential backdoors that exist beneath the operating system's visibility.

Talk Type
research presentation
Difficulty
expert
Category
red team
Has Demo Has Code Tool Released


DEF CON 33 Main Stage Talks

98 talks · 2025
Browse conference →
Premium Security Audit

We break your app before they do.

Professional penetration testing and vulnerability assessments by the Kuboid Secure Layer team. Securing your infrastructure at every layer.

Get in Touch
Official Security Partner
kuboid.in