Microsoft Defender RedSun Elevation of Privilege Vulnerability Exploit

This module exploits a Time-Of-Check Time-Of-Use (TOCTOU) race condition within the Windows Defender remediation process to achieve arbitrary code execution with SYSTEM privileges. The exploit chain leverages the Windows Cloud Files API (cfapi) and an EICAR test string to purposely pause the antivirus engine's remediation thread using a Batch Oplock. During this suspended state, the module uses NTFS mount points (directory junctions) to redirect the highly privileged antivirus file operations from a temporary directory to a protected system folder (C:\Windows\System32). When the oplock is released, the antivirus mistakenly overwrites a legitimate system binary (TieringEngineService.exe) during its cleanup routine. The module then replaces this corrupted binary with a malicious payload and triggers a specific COM object to start the service, yielding a SYSTEM agent. The steps performed by the exploit are: Creates a decoy executable containing a dynamically generated EICAR test string within a temporary directory to trigger an immediate antimalware response. Registers the temporary directory as a Cloud Sync Root and converts the decoy file into a cloud placeholder to intercept system interactions. Freezes the highly privileged antivirus remediation thread at a precise moment by requesting a Batch Oplock that trips when the engine scans the placeholder file. Executes a TOCTOU race condition by renaming the original directory and replacing it with an NTFS mount point targeting C:\Windows\System32. Releases the oplock, tricking the antivirus engine into blindly overwriting the target service binary (TieringEngineService.exe) as part of its automated threat remediation. Replaces the overwritten service binary with the exploit payload and invokes the Tiering Management Engine COM object to start the service as NT AUTHORITY\SYSTEM. Creates a named pipe to get the current session id and executes an interactive CORE Impact agent directly into the target user's desktop session.
Exploit Platform
Product Name