Backstab : A Tool To Kill Antimalware Protected Processes

Backstab is a tool to Kill Antimalware Protected Processes.

Kill EDR Protected Processes

Have these local admin credentials but the EDR is standing in the way? Unhooking or direct syscalls are not working against the EDR? Well, why not just kill it? Backstab is a tool capable of killing antimalware protected processes by leveraging sysinternals’ Process Explorer (ProcExp) driver, which is signed by Microsoft.

What can it do?

Usage: backstab.exe <-n name || -p PID> [options]
-n, Choose process by name, including the .exe suffix
-p, Choose process by PID
-l, List handles of protected process
-k, Kill the protected process by closing its handles
-x, Close a specific handle
-d, Specify path to where ProcExp will be extracted
-s, Specify service name registry key
-u, Unload ProcExp driver
-a, adds SeDebugPrivilege
-h, Print this menu
Examples:
backstab.exe -n cyserver.exe -k [kill cyserver]
backstab.exe -n cyserver.exe -x E4C [Close handle E4C of cyserver]
backstab.exe -n cyserver.exe -l [list all handles of cyserver]
backstab.exe -p 4326 -k -d c:\driver.sys [kill protected process with PID 4326, extract ProcExp driver to C:\ drive]

How is that possible?

ProcExp has a signed kernel driver that it loads on startup, which allows it to kill handles that cannot be killed even as an administrator. When you use the UI, you cannot kill a protected process, but you can kill it handles because ProcExp UI instructs the kernel driver to kill those handles. Backstab does the same thing but without the UI element.

OpSec

Here is a quick rundown of what happens

  • Embedded driver is dropped to disk
  • Registry key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services is created
  • The privilege SE_PRIVILEGE_ENABLED is acquired because it is necessary to load the driver
  • Driver is loaded using NtLoadDriver to avoid creating a service
  • The created Registry key is deleted (service not visible during execution)
  • Communication with the driver is via using DeviceIoControl
  • For handle enumeration, NtQuerySystemInformation is called

What you should also know

  • The behavior of the tool mimics that of ProcExp. ProcExp drops the driver to the disk, create registry key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services, calls NtLoadDriver, and then delete the registry key
  • You can specify the location to which the driver is dropped and the service name
  • When done, the app will unload the driver. The driver is unloaded by first re-creating the registry keys and then calling NtUnloadDriver
  • The loaded driver is signed by MS
  • The process does not attempt to directly kill protected processes handles, it instructs ProcExp driver to kill them. You won’t be accused of attempting to tamper with any processes
R K

Recent Posts

Kali Linux 2024.4 Released, What’s New?

Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…

19 hours ago

Lifetime-Amsi-EtwPatch : Disabling PowerShell’s AMSI And ETW Protections

This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…

19 hours ago

GPOHunter – Active Directory Group Policy Security Analyzer

GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…

3 days ago

2024 MITRE ATT&CK Evaluation Results – Cynet Became a Leader With 100% Detection & Protection

Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…

5 days ago

SecHub : Streamlining Security Across Software Development Lifecycles

The free and open-source security platform SecHub, provides a central API to test software with…

1 week ago

Hawker : The Comprehensive OSINT Toolkit For Cybersecurity Professionals

Don't worry if there are any bugs in the tool, we will try to fix…

1 week ago