Files
Whitecat18 28e7fac1d3 Upload
Rust-for-Malware-Development is an collection of proof of concepts with techniques and advanced evasion methods
2026-06-06 14:53:10 +05:30
..
2026-06-06 14:53:10 +05:30
2026-06-06 14:53:10 +05:30
2026-06-06 14:53:10 +05:30
2026-06-06 14:53:10 +05:30
2026-06-06 14:53:10 +05:30

Bypassing EDR Syscall Hooks with a Early Exception Handler

The problem with the (VEH, SEH, etc..) are themselves hooked and monitored heavily by modern EDRs

  • AddVectoredExceptionHandler → EDR adds its own VEH before yours.
  • SEH frames are scanned by the EDR at process start-up.

Modern EDRs monitor syscalls by placing inline hooks (usually a jmp at offset +3) inside the Nt* functions in ntdll.dll.

so when you call hooked funcitons like NtAllocateVirtualMemory, NtProtectVirtualMemory, … the EDR gets the first chance to inspect the arguments and block the call.

So to avoid detection, we can develop our own exception handler without relying on VEH or SEH to manipulate exception handling before the VEH is called.

To know more about this, the Example poc has been described in detail in this blog: Early Exception Handling

Note: Please note that this poc uses hardcoded SSN just for demonstration of the PoC. in your practices you can extract and use SSN using syscall techniques using Hells/halos/tartarus gate: For Syscall technique you can visit this seciton: Syscalls

PoC

We are going to test it on EDR Products. [Release Mode]

image_1

image_2

Debug print that explains how this PoC works step by step [Debug Mode]

image_3

Usage

To compile and run in debug mode. [To understand How this works]

cargo -r r --features debug

To compile and run it on release mode [Final]:

cargo r -r 

To compile on release mode [Final]:

cargo b -r 

Credits / Resoucres