Bypassing Anti-Analysis Measures
Discover practical techniques and tools to defeat anti-reverse engineering tricks and analyze protected code.
Defeating Anti-Analysis
Welcome! In the previous lesson, we learned about various anti-reverse engineering (anti-RE) techniques. Now, it's time to fight back!
Anti-analysis measures are tricks used by developers (often malware authors) to make it harder for reverse engineers to understand their code. They aim to:
- Hide true program logic.
- Detect debuggers or virtual machines.
- Prevent static analysis.
Our goal is to discover practical methods to bypass these protections and reveal the underlying functionality.
Spotting Debugger Presence
One of the most common anti-analysis tricks is anti-debugging. Programs check if they are running under a debugger.
How do they do this? They look for specific indicators:
- API calls: Functions like
IsDebuggerPresent()(Windows) or checking process status flags. - Timing checks: Debugged code often runs slower, so they might measure execution time.
- Process Environment Block (PEB): A structure in memory containing flags like
BeingDebugged.
Understanding these checks is the first step to bypassing them.
All lessons in this course
- Understanding Obfuscation Techniques
- Bypassing Anti-Analysis Measures
- Kernel-Mode Debugging Concepts
- Defeating Packers & Achieving the OEP