LibraryEvasion Techniques

Evasion Techniques

Learn about Evasion Techniques as part of SANS GIAC Security Expert (GSE) Certification

Mastering Evasion Techniques for Advanced Penetration Testing & Red Teaming

In the realm of advanced penetration testing and red teaming, simply identifying vulnerabilities is not enough. The true challenge lies in bypassing security controls and operating undetected. This module delves into the sophisticated world of evasion techniques, crucial for achieving objectives in realistic adversarial simulations and for the demanding SANS GIAC Security Expert (GSE) certification.

The Importance of Evasion

Modern security systems are designed to detect and block malicious activity. Evasion techniques are the art and science of circumventing these defenses, allowing red teams to achieve their objectives without triggering alarms. This is vital for realistic assessments, as it mirrors the tactics employed by advanced persistent threats (APTs).

Core Evasion Categories

Evasion techniques can be broadly categorized based on the layer of security they aim to bypass. Understanding these categories helps in developing a comprehensive evasion strategy.

CategoryObjectiveKey Tactics
Network EvasionBypass network-based defenses (firewalls, IDS/IPS, network segmentation)Traffic obfuscation, tunneling, fragmentation, port hopping, encrypted C2
Endpoint EvasionEvade host-based defenses (antivirus, EDR, host firewalls)Fileless malware, process injection, memory manipulation, code obfuscation, living-off-the-land binaries (LOLBins)
Authentication EvasionBypass or misuse authentication mechanismsCredential stuffing, pass-the-hash, pass-the-ticket, Kerberoasting, golden tickets
Persistence EvasionMaintain access without detectionRegistry run keys, scheduled tasks, WMI persistence, service creation, rootkits

Network Evasion Techniques

Network evasion focuses on making command and control (C2) traffic and data exfiltration indistinguishable from legitimate network activity.

Traffic obfuscation involves altering the appearance of network packets to hide their malicious intent. This can include encrypting C2 communications using standard protocols like HTTPS, DNS tunneling to embed data within DNS queries, or using techniques like fragmentation to break up packets and evade signature-based detection. Another common method is port hopping, where C2 communication switches between different ports to avoid static firewall rules. Advanced techniques might involve mimicking legitimate application traffic patterns.

📚

Text-based content

Library pages focus on text content

Endpoint Evasion Techniques

Endpoint evasion is critical for operating on compromised hosts without being detected by antivirus or EDR solutions.

Authentication and Persistence Evasion

Maintaining access and bypassing authentication are crucial for long-term compromise and achieving objectives.

What is the primary goal of 'living-off-the-land' techniques?

To use legitimate system utilities for malicious purposes, making detection more difficult.

Credential theft and misuse are central to bypassing authentication. Techniques like Pass-the-Hash (PtH) and Pass-the-Ticket (PtT) allow attackers to authenticate to systems using stolen password hashes or Kerberos tickets without needing the actual password. Kerberoasting targets service accounts by requesting Kerberos tickets for services and then cracking the service account's password hash offline. For persistence, attackers might leverage common Windows mechanisms like scheduled tasks, registry run keys, or create new services, all while attempting to disguise their presence.

Advanced Evasion Strategies for GSE

The GSE certification demands a deep understanding of how to operate undetected in complex, multi-layered environments. This involves not just knowing individual techniques but understanding how they integrate and adapt to different defensive postures.

For the GSE, think like a ghost. Your goal is to achieve objectives without leaving a trace, making defenders question if anything even happened.

This often involves custom tool development, understanding kernel-level operations, and mastering techniques that are not commonly found in off-the-shelf exploit kits. It requires a proactive approach to threat modeling and a continuous learning mindset to keep pace with evolving defensive technologies.

Key Takeaways

Mastering evasion techniques is a cornerstone of advanced penetration testing and red teaming. It requires a blend of technical skill, creative problem-solving, and a deep understanding of security controls. Continuous learning and practice are essential to stay ahead of defenders.

Learning Resources

MITRE ATT&CK Framework(documentation)

A globally-accessible knowledge base of adversary tactics and techniques based on real-world observations. Essential for understanding evasion tactics.

Living Off The Land Binaries (LOLBins) Project(documentation)

A curated list of LOLBins, scripts, and macros that can be used for offensive purposes, detailing their usage and evasion potential.

Cobalt Strike Documentation - Evasion(documentation)

Official documentation for Cobalt Strike, a popular adversary simulation tool, which includes extensive sections on evasion techniques and C2.

The Hacker Recipes - Evasion Techniques(blog)

A collection of practical recipes and guides for various hacking techniques, including detailed explanations of evasion methods.

Windows Sysinternals Suite(documentation)

A suite of advanced Windows utilities for managing, troubleshooting, and understanding system behavior, often used to analyze and bypass endpoint defenses.

Red Team Field Manual (RTFM)(book)

A pocket guide for red team operations, containing commands and techniques for various offensive tasks, including evasion.

Offensive Security - Kali Linux Documentation(documentation)

Official documentation for Kali Linux, a popular distribution for penetration testing, which includes tools and guides relevant to evasion.

SANS Institute - GIAC Security Expert (GSE) Certification(documentation)

The official page for the GSE certification, outlining the advanced skills and knowledge required, including sophisticated evasion techniques.

Black Hat USA - Past Presentations(video)

Access to past Black Hat USA conference presentations, many of which cover cutting-edge evasion techniques and research.

Practical Malware Analysis: The Hands-On Guide to Dissecting Malicious Software(book)

A comprehensive guide to analyzing malware, which inherently involves understanding how malware evades detection and how to reverse-engineer such techniques.