Course contentsShow
← Security
Lesson 2222 of 3,05243. Offensive Security ToolingFree lesson

Framework Evasion Techniques

Techniques for evading detection when using exploitation frameworks including obfuscation and OPSEC considerations.

Framework Evasion Techniques

What you'll learn: How to make exploitation frameworks like Metasploit and Cobalt Strike harder for defenders to detect through obfuscation and operational security practices.

The Challenge of Framework Detection

When you use popular offensive frameworks, you face a significant problem: defenders know their signatures. Security tools maintain databases of known Metasploit payloads, Empire scripts, and C2 traffic patterns. Using a framework "out of the box" is like wearing a name tag during a break-in—you're announcing exactly who you are and what you're doing.

Think of it like this: If every burglar in town drives a bright red van with "BURGLAR" painted on the side, police will notice. Evasion is about changing the vehicle's appearance while keeping its functionality.

Core Evasion Strategies

Payload Obfuscation

Modify your payloads to avoid signature-based detection. This includes changing identifiable strings, encoding the payload multiple times (beyond basic msfvenom encoders), and using custom crypters that AV vendors haven't cataloged yet.

OPSEC Considerations

  • Customize everything: Change default port numbers, user agents, URIs, and staging paths
  • Blend in: Make your C2 traffic look like legitimate business applications (HTTPS to popular CDNs, DNS over trusted domains)
  • Timing matters: Avoid predictable beaconing intervals; use jitter to randomize callback timing
  • Clean your artifacts: Remove default framework strings from binaries and scripts

Infrastructure Hygiene

Use redirectors and domain fronting to hide your true C2 infrastructure. Never operate directly from your attack server—defenders will fingerprint and block it immediately.

Key Takeaway: Framework evasion requires layering multiple techniques—obfuscating payloads, customizing infrastructure, and maintaining operational discipline—to avoid the signatures and behaviors that defenders actively hunt for.