AppDev / Advanced Malware Analysis / Christopher Elisan / 974-6 / Front Matter Blind Folio i Advanced Malware Analysis 00-FM.indd 1 02/07/15 4:42 PM AppDev / Advanced Malware Analysis / Christopher Elisan / 974-6 / Front Matter Blind Folio ii About the Author Christopher C. Elisan is a veteran of the security industry, having started his career straight out of college in the 1990s. He is a seasoned reverse engineer and malware researcher. He has seen malware develop from the DOS days to the more complicated and sophisticated malware we see today.
He is currently the Principal Malware Scientist and senior manager of the Malware Intelligence Team at RSA, The Security Division of EMC. Elisan is a pioneer of Trend Micro’s TrendLabs, where he started his career as a malware reverse engineer. There, he held multiple technical and managerial positions. After leaving Trend Micro, he joined F-Secure.
He built and established F-Secure’s Asia R&D and spearheaded multiple projects that included vulnerability discovery, web security, and mobile security. He then joined Damballa, Inc., as a senior threat analyst specializing in malware research. Elisan graduated with a Bachelor of Science Degree in Computer Engineering and holds the following industry certifications: Certified Ethical Hacker, Microsoft Certified Systems Engineer, Microsoft Certified Systems Administrator, Microsoft Certified Professional, and Certified Scrum Master. Elisan is considered one of the world’s subject-matter experts when it comes to malware, digital fraud, and cybercrime.
He lends his expertise to different law enforcement agencies, and he provides expert opinion about malware, botnets, and advanced persistent threats to leading industry and mainstream publications, including USA Today, San Francisco Chronicle, SC Magazine, InformationWeek, Fox Business, and Dark Reading. He is a frequent speaker at various security conferences around the globe, including RSA Conference, SecTor, HackerHalted, TakeDownCon, Toorcon, (ISC)² Security Congress, Rootcon, and B-Sides. He also authored Malware, Rootkits & Botnets: A Beginner’s Guide. When he is not dissecting or talking about malware, Elisan spends time with his kids playing basketball and video games.
He also enjoys watching with his family the Atlanta Hawks beat the hell out of their opponents. If time permits, he lives his rockstar dream as a vocalist/guitarist with his local rock band in Atlanta. You can follow him on Twitter: @Tophs.indd 2 02/07/15 4:42 PM AppDev / Advanced Malware Analysis / Christopher Elisan / 974-6 / Front Matter Blind Folio iii Advanced Malware Analysis Christopher C. Elisan New York Chicago San Francisco Athens London Madrid Mexico City Milan New Delhi Singapore Sydney Toronto 00-FM.indd 3 02/07/15 4:42 PM Copyright © 2015 by McGraw-Hill Education.
All rights reserved. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher, with the exception that the program listings may be entered, stored, and executed in a computer system, but they may not be reproduced for publication. ISBN: 978-0-07-181975-6 MHID: 0-07-181975-4 The material in this eBook also appears in the print version of this title: ISBN: 978-0-07-181974-9, MHID: 0-07-181974-6. eBook conversion by codeMantra Version 1.0 All trademarks are trademarks of their respective owners.
Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps. McGraw-Hill Education eBooks are available at special quantity discounts to use as premiums and sales promotions or for use in corporate training programs. To contact a representative, please visit the Contact Us page at www.
Information contained in this work has been obtained by McGraw-Hill Education from sources believed to be reliable. However, because of the possibility of human or mechanical error by our sources, McGraw-Hill Education, or others, McGraw-Hill Education does not guarantee the accuracy, adequacy, or completeness of any information and is not responsible for any errors or omissions or the results obtained from the use of such information. TERMS OF USE This is a copyrighted work and McGraw-Hill Education and its licensors reserve all rights in and to the work. Use of this work is subject to these terms.
Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill Education’s prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms. THE WORK IS PROVIDED “AS IS.” McGRAW-HILL EDUCATION AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
McGraw-Hill Education and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill Education nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill Education has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill Education and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages.
This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise. AppDev / Advanced Malware Analysis / Christopher Elisan / 974-6 / Front Matter Blind Folio v To my family, Kara, Sebastian, and Noah, for their love, support, and understanding, and to all security practitioners who always strive to be better than they currently are.indd 5 02/07/15 4:42 PM AppDev / Advanced Malware Analysis / Christopher Elisan / 974-6 / Front Matter Blind Folio xvi This page intentionally left blank 00-FM.indd 16 02/07/15 4:42 PM AppDev / Advanced Malware Analysis / Christopher Elisan / 974-6 / Front Matter Contents at a Glance Part I Malware Blueprint Chapter 1 Malware Analysis 101. 3 Chapter 2 Malware Taxonomy. 25 Chapter 3 Malware Deployment.
49 Chapter 4 Protective Mechanisms. 67 Chapter 5 Malware Dependencies. 89 Part II Malware Research Lab Chapter 6 Malware Collection. 109 Chapter 7 Static Analysis Lab.
147 Chapter 8 Dynamic Analysis Lab. 187 Part III Malware Inspection Chapter 9 The Portable Executable File. 231 Chapter 10 The Proper Way to Handle Files. 269 Chapter 11 Inspecting Static Malware.
297 Chapter 12 Inspecting Dynamic Malware. 317 Chapter 13 Tools of the Trade .indd 7 02/07/15 4:42 PM AppDev / Advanced Malware Analysis / Christopher Elisan / 974-6 / Front Matter viii Contents at a Glance Part IV Appendixes Appendix A Tools List. 487 Appendix B List of Laboratories. 495 Appendix C Volatility Framework Basic Plug-ins .indd 8 02/07/15 4:42 PM AppDev / Advanced Malware Analysis / Christopher Elisan / 974-6 / Front Matter Contents Foreword.
xix Part I Malware Blueprint Chapter 1 Malware Analysis 101. 4 Malware Analysis and Reverse Engineering. 5 Types of Malware Analysis. 5 Purpose of Malware Analysis.
8 Limitations of Malware Analysis. 11 The Malware Analysis Process. 13 The Effective Malware Analyst. 20 Familiarization with Malware.
21 Familiarization with Analysis Tools. 22 Chapter 2 Malware Taxonomy. 40 Remote-Access Trojan .indd 9 02/07/15 4:42 PM AppDev / Advanced Malware Analysis / Christopher Elisan / 974-6 / Front Matter x Contents Fakeware. 47 Chapter 3 Malware Deployment.
49 Malware Infection Vectors. 54 Types of Malware Infection Vectors. 56 Instant Messaging and Chat. 61 Potential Infection Vectors.
65 Chapter 4 Protective Mechanisms. 67 The Two States of Malware. 70 Static Malware Protective Mechanisms. 71 Dynamic Malware Protective Mechanisms.
87 Chapter 5 Malware Dependencies .indd 10 02/07/15 4:42 PM AppDev / Advanced Malware Analysis / Christopher Elisan / 974-6 / Front Matter Contents xi User Dependencies. 106 Part II Malware Research Lab Chapter 6 Malware Collection. 109 Your Own Backyard. 111 Scan for Malicious Files.
112 Look for Active Rootkits. 113 Inspect Startup Programs. 114 Inspect Running Processes. 117 Extract Suspicious Files.
134 Research Mailing Lists. 145 Chapter 7 Static Analysis Lab. 147 The Static Analysis Lab. 148 Host File Inspection Tools.
149 Mitigate Possible Infection .indd 11 02/07/15 4:42 PM AppDev / Advanced Malware Analysis / Christopher Elisan / 974-6 / Front Matter xii Contents Mitigate Becoming a Malware Staging Point. 150 Setting Up the Lab. 151 Choose the Hardware. 151 Install the Operating System.
152 Harden the Lab. 163 Anonymize the Lab. 172 Isolate the Lab. 178 The Virtualized Static Analysis Lab.
178 Backing Up and Restoring. 184 Chapter 8 Dynamic Analysis Lab. 187 Setting Up the Lab. 188 Choose the Hardware.
189 Install the Operating System. 190 Make the Lab Malware Friendly. 198 Anonymize the Lab. 214 Isolate the Lab.
214 Restoring to a Clean State. 215 Virtualized Environment Clean State Restoration. 215 Bare-Metal Environment Clean State Restoration. 217 Backing Up and Restoring.
218 The Golden Image. 219 Other Systems Supporting the Lab. 226 Part III Malware Inspection Chapter 9 The Portable Executable File. 231 The Windows Portable Executable File.
233 The PE File Format. 235 Relative Virtual Address. 259 PE Import Functions .indd 12 02/07/15 4:42 PM AppDev / Advanced Malware Analysis / Christopher Elisan / 974-6 / Front Matter Contents xiii PE Export Functions. 263 64-Bit PE File Format.
268 Chapter 10 The Proper Way to Handle Files. 269 File’s Analysis Life Cycle. 295 Chapter 11 Inspecting Static Malware. 297 Static Analysis Techniques.
299 File Type Identification. 303 Protective Mechanisms Identification. 310 PE Structure Verification. 315 Chapter 12 Inspecting Dynamic Malware.
319 Analyzing Host Behavior. 319 Analyzing Network Behavior. 348 Dynamic Analysis Limitations. 353 Chapter 13 Tools of the Trade.
355 Malware Analysis Use Cases. 356 Malware Analyst Toolbox .indd 13 02/07/15 4:42 PM AppDev / Advanced Malware Analysis / Christopher Elisan / 974-6 / Front Matter xiv Contents Tools of the Trade. 371 Malcode Analyst Pack. 406 Network Capturing Tools.
469 Free Online Automated Sandbox Services. 483 Part IV Appendixes Appendix A Tools List. 487 Appendix B List of Laboratories. 495 Appendix C Volatility Framework Basic Plug-ins .indd 14 02/07/15 4:42 PM AppDev / Advanced Malware Analysis / Christopher Elisan / 974-6 / Front Matter Foreword T he threat of malware is everywhere.
Individuals, organizations, businesses, and governments are being targeted. The motivation of these threats has evolved from simple nuisance to information theft and espionage. Because of this, the role of malware in cybercrime and digital fraud is bigger than ever. Malware has become a standard part of the arsenal an attacker deploys for malicious campaigns against targeted entities.
The consequences of these attacks are not confined to the destruction of digital assets alone.