Shellcode Obfuscation — Hiding Payloads from Static Detection
Why Shellcode Needs Obfuscation
┌──────────────────────────────────────────────────────────────────────┐
│ Static Detection vs. Obfuscated Shellcode │
│ │
│ Raw shellcode: │
│ FC 48 83 E4 F0 E8 C0 00 00 00 41 51 41 50 52 51 56 48 31 D2... │
│ ↳ Windows Defender detects in < 1 second │
│ │
│ XOR shellcode with key 0x41: │
│ BD 09 C2 A5 B1 A9 81 41 41 41 00 10 00 11 13 10 17 09 70 93... │
│ ↳ Static signature doesn't match │
│ │
│ At runtime, decodes and executes — AMSI and EDR can still │
│ detect via memory scan and behavioral analysis. │
└──────────────────────────────────────────────────────────────────────┘Technique 1: Simple XOR Cipher
Technique 2: Rolling XOR Key
Technique 3: UUID Encoding
Technique 4: MAC/IPv4 Address Encoding
Technique 5: Sleep-Based Deobfuscation and Timing Evasion
Technique 6: Environment-Derived Key
Technique 7: Shellcode in PE Resources
Technique Comparison
References
PreviousToken Impersonation — Identity Theft on WindowsNextAPC Injection — Execution via Asynchronous Procedure Call Queues
Last updated