Exploiting truesight.sys to kill AVs
The truesight.sys driver exposes an IOCTL that allows any user-mode process to terminate arbitrary processes by PID, without access control. An attacker can load this signed driver and use it to kill antivirus and EDR processes such as Windows Defender.
medium.com
Published on medium.com
In this article we will exploit the truesight.sys driver to kill AVs and EDR processes. We will use a Technique called byovd (Bring Your Own Vulnerable Driver) to load the truesight.sys and exploit a vulnerability in it to kill processes in the Windows.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker can terminate antivirus and EDR processes, disabling security controls and enabling further attacks.
What the attacker needed
Ability to load a signed driver; local user access
The fix
The driver should be updated to restrict IOCTL access and validate the caller, or be added to the Windows blocklist to prevent loading.
How it was found
- Download the vulnerable truesight.sys driver.
- Load the driver on the target machine using sc.exe create and sc.exe start.
- Write a user-mode program that opens a handle to the driver device with CreateFileA.
- Send an IOCTL with code 0x22E044 and the target process ID as data using DeviceIoControl.
- The driver terminates the specified process.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A Windows driver runs with the highest privileges (ring 0), so a bug in a driver can let a normal program do things it should not. Here, the driver accepts a command from any user that says 'kill the process with this ID', and it does so without checking who is asking. Because the driver is signed and trusted by Windows, an attacker can load it and use it to disable security software.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.