Course contentsShow
← Security
Lesson 1570 of 3,05232. Operating System Security - Endpoint ProtectionFree lesson

Antivirus Evasion Techniques

Common methods attackers use to bypass AV including obfuscation, packing, and in-memory execution.

Antivirus Evasion Techniques

What you'll learn: How attackers bypass antivirus defenses using obfuscation, packing, and in-memory execution to evade detection.

Understanding the Evasion Challenge

Even with advanced detection methods (signature-based, heuristic, behavioral, and machine learning), attackers constantly develop techniques to slip past antivirus software. Think of it like a burglar studying alarm systems to find blind spots—malware authors analyze how AV products work, then craft their code to avoid triggering alerts.

Common Evasion Methods

Obfuscation scrambles malicious code to hide recognizable patterns. This includes encrypting strings, renaming functions, inserting junk instructions, and reordering code blocks. The malware still performs the same actions, but its signature looks completely different—like wearing a disguise that changes your appearance without changing who you are.

Packing and Crypting compress and encrypt the entire malware payload. The AV scans the outer "wrapper," which appears benign, while the actual malicious code only reveals itself after unpacking in memory at runtime. Modern packers use custom algorithms and polymorphic techniques that generate unique wrappers for each infection.

In-Memory Execution (fileless malware) is particularly effective. Instead of writing malicious executables to disk where AV scanners look, attackers inject code directly into legitimate running processes or execute scripts (like PowerShell) that live only in RAM. Since many AV products primarily scan files, memory-resident threats can operate undetected.

Why This Matters

These techniques exploit the fundamental limitation of AV software: it must recognize threats. By constantly changing appearance, hiding payloads, and avoiding disk writes, malware can operate in the gaps between detection mechanisms. Defenders must layer multiple detection strategies and monitor runtime behavior, not just static files.

Key Takeaway: Attackers evade antivirus through obfuscation (disguising code patterns), packing (encrypting payloads until runtime), and in-memory execution (avoiding disk-based scanning)—forcing defenders to implement behavioral monitoring and multi-layered detection.