Evasion techniques

AV/EDR Evasion Techniques Comparison Table

Technique

How It Works

Detection Risk

When to Use

Why It’s Effective

Direct Syscalls

Bypasses user-mode hooks by calling kernel APIs via Nt*/Zw* from ntdll.dll.

🔴 Low

When EDRs hook Win32 APIs (e.g., VirtualAlloc, CreateThread).

EDR can’t monitor syscalls without kernel drivers.

API Unhooking

Replaces hooked DLLs in memory with clean copies from disk.

🟠 Medium

Targeting EDRs like CrowdStrike/SentinelOne that heavily hook user-mode APIs.

Restores original API behavior, evading inline hooks.

AMSI Bypass

Patches amsi.dll in memory (e.g., disabling AmsiScanBuffer).

🔴 Low

When executing PowerShell/C# in memory.

Kills Microsoft’s script/assembly scanning.

ETW Patching

Disables Event Tracing for Windows (e.g., patching EtwEventWrite).

🔴 Low

Hiding .NET/PowerShell activity from EDR telemetry.

Stops EDRs from collecting process execution logs.

Process Hollowing

Replaces legitimate process memory (e.g., explorer.exe) with malicious code.

🟠 Medium

Post-exploitation to blend into trusted processes.

Appears as a signed process, bypassing process-based detections.

Process Injection

Injects shellcode into a living process (e.g., via CreateRemoteThread).

🟡 High

Quick execution in a semi-trusted process.

Leverages process reputation but leaves memory artifacts.

Reflective DLL Loading

Loads DLLs directly from memory (no disk writes).

🔴 Low

Avoiding LoadLibrary hooks and file-based scans.

No disk I/O = fewer IoC triggers.

Environmental Keying

Executes only if specific conditions are met (e.g., hostname, domain join).

🔴 Low

Targeted attacks where the victim environment is known.

Reduces accidental sandbox execution.

Sleep Obfuscation

Hides sleep patterns (e.g., via TimerQueue or indirect syscalls).

🟠 Medium

Evading sandbox timeout checks or EDR timing analysis.

Makes sleep-based detections (e.g., "10m sleep") unreliable.

Polymorphic Code

Changes code structure/strings per compilation.

🔴 Low

Avoiding static signature detection (YARA, hash-based AV).

No fixed patterns to scan for.

Module Stomping

Overwrites benign DLLs (e.g., winhttp.dll) with malicious code.

🟠 Medium

When EDRs monitor CreateThread in unexpected memory regions.

Executes from "trusted" memory regions.

Callback Execution

Runs shellcode via OS callbacks (e.g., EnumChildWindows).

🔴 Low

Avoiding thread creation alerts.

No new threads = stealthier than CreateThread.

Hardware Breakpoints

Uses CPU debug registers to execute shellcode.

🟢 Very Low

Extreme scenarios where memory scanning is expected.

Rarely monitored by EDRs.


Loaders

Shellcode (Syscalls + AMSI Bypass)

Loads .rev.bin (HTTPS + XOR Decrypt)

Last updated