Evasive Malware Cover

Evasive Malware

Understanding Deceptive and Self-Defending Threats
by Kyle Cucci
July 2024, 488 pp.
Use coupon code PREORDER to get 25% off!

Download Chapter 8: Evading Sandboxes and Disrupting Analysis

Look Inside!

Evasive Malware backcover

Evasive Malware pages 6-7Evasive Malware pages 46-47Evasive Malware pages 130-131

We’re all aware of Stuxnet, ShadowHammer, Sunburst, and similar attacks that use evasion to remain hidden while defending themselves from detection and analysis. Because advanced threats like these can adapt and, in some cases, self-destruct to evade detection, even the most seasoned investigators can use a little help with analysis now and then. Evasive Malware will introduce you to the evasion techniques used by today’s malicious software and show you how to defeat them.

Following a crash course on using static and dynamic code analysis to uncover malware’s true intentions, you’ll learn how malware weaponizes context awareness to detect and skirt virtual machines and sandboxes, plus the various tricks it uses to thwart analysis tools. You’ll explore the world of anti-reversing, from anti-disassembly methods and debugging interference to covert code execution and misdirection tactics. You’ll also delve into defense evasion, from process injection and rootkits to fileless malware. Finally, you’ll dissect encoding, encryption, and the complexities of malware obfuscators and packers to uncover the evil within.

You’ll learn how malware:

  • Abuses legitimate components of Windows, like the Windows API and LOLBins, to run undetected  
  • Uses environmental quirks and context awareness, like CPU timing and hypervisor enumeration, to detect attempts at analysis
  • Bypasses network and endpoint defenses using passive circumvention techniques, like obfuscation and mutation, and active techniques, like unhooking and tampering
  • Detects debuggers and circumvents dynamic and static code analysis

You’ll also find tips for building a malware analysis lab and tuning it to better counter anti-analysis techniques in malware. Whether you’re a frontline defender, a forensic analyst, a detection engineer, or a researcher, Evasive Malware will arm you with the knowledge and skills you need to outmaneuver the stealthiest of today’s cyber adversaries.

Author Bio 

Kyle Cucci has over 17 years in cybersecurity and IT, including roles as a malware analyst and detection engineer with Proofpoint’s Threat Research team and leader of the forensic investigations and malware research teams at Deutsche Bank. Cucci regularly speaks at security conferences and has led international trainings and workshops on topics such as malware analysis and security engineering. In his free time, Cucci enjoys contributing to the community via open source tooling, research, and blogging.

Table of contents 

Part I: The Fundamentals
Chapter 1: Windows Foundational Concepts
Chapter 2: A Crash Course in Malware Triage and Behavioral Analysis
Chapter 3: A Crash Course in Static and Dynamic Code Analysis
Part II: Context Awareness and Sandbox Evasion
Chapter 4: Enumerating Operating System Artifacts
Chapter 5: User Environment and Interaction Detection
Chapter 6: Enumerating Hardware and Network Configurations
Chapter 7: Runtime Environment and Virtual Processor Anomalies

Chapter 8: Evading Sandboxes and Disrupting Analysis
Part III: Anti-reversing
Chapter 9: Anti-disassembly
Chapter 10: Anti-debugging
Chapter 11: Covert Code Execution and Misdirection
Part IV: Defense Evasion
Chapter 12: Process Injection, Manipulation, and Hooking
Chapter 13: Evading Network and Endpoint Defenses
Chapter 14: An Introduction to Rootkits
Chapter 15: Fileless Malware and Anti-forensics
Part V: Other Topics
Chapter 16: Encoding and Encryption
Chapter 17: Packers and Unpacking Malware
Chapter 18: Tips for Building an Anti-evasion Analysis Lab
Appendix A: Evasion-Related Windows API Functions
Appendix B: Windows LOLbins and Example Usage
Appendix C: Further Reading

The chapters in red are included in this Early Access PDF.

View the Copyright page
View the detailed Table of Contents
View the Index


"A friendly and up-to-date compendium of common techniques that malware can use to evade detection and make the analysis harder. Reading this book can help everyone who starts their adventure with malware analysis avoid a lot of confusion and quickly recognize the common evasion patterns they are dealing with."
Aleksandra “Hasherezade” Doniec, malware analyst and open source developer; author of PE-sieve memory scanner

Evasive Malware delivers an in-depth exploration of malware evasion tactics. Beyond catering to seasoned analysts, the author extends a helping hand to beginners, briefly covering fundamental skills to ensure the material is accessible and relevant to all. With included file hashes for hands-on learning, it's a must-have for anyone who needs to identify, investigate, and analyze modern malware.”
—Anuj Soni, Malware Reverse Engineer; SANS Certified Instructor, author of SANS FOR710

"A complete compendium of countermeasures used by malware to avoid detection, useful to anyone implementing defensive technologies." 
—Ivan Kwiatkowski, Lead Threat Researcher at Harfang Lab

“Malware analysts looking to expand their reverse engineering skills will learn many practical techniques from this book, [along with] insightful explanations of common ways in which malware evades detection and confuses analysts. . . If you're looking to continue your journey through the world of malware analysis, you'll find many learning opportunities in this delightful and technical read!”
—Lenny Zeltser, Faculty Fellow, SANS Institute