An Analytical Approach to Modern Binary Deobfuscation
For Reverse Engineers and Malware Analysts
August 2022
PROJECT: Manually craft a custom obfuscation VM ## Day 2 #### SMT-BASED ANALYSIS - A primer on SMT solvers - Translate code conditions into SMT solver constraints - Program analysis with SMT solvers #### MIXED BOOLEAN-ARITHMETIC - Preliminary concepts - MBA rewriting - Insertion of identities - Opaque constants EXERCISES
PROJECT: Applied MBA to obfuscate the semantics of VM-handlers ## Day 3 #### SYMBOLIC EXECUTION - Reasoning about code in a symbolic way - Working with native code - Working with intermediate representations - Data-flow analysis and compiler optimizations - Extract symbolic formulas - Extract path constraints - Plugging an SMT solver - Attacking obfuscation schemes GUIDED PROJECT: Build your own (toy) symbolic execution engine
EXERCISES
PROJECT: Attack obfuscated VM and explore symbolic execution limits ## Day 4 #### PROGRAM SYNTHESIS - Code syntax VS Code semantics - Specifying program behavior - Oracle-based program synthesis - Describing semantics through I/O behavior - Generating I/O pairs - Different synthesis flavors - Practical considerations - Attacking obfuscation schemes #### CONCLUSIONS AND RESEARCH DIRECTIONS GUIDED PROJECT: Build your own code semantics synthesizer EXERCISES PROJECT: Recover the semantics of MBA-obfuscated VM-handlers ## Tools used * Disassemblers - IDA Free/Home/Pro - Ghidra - radare2 * Obfuscation - Manual obfuscation - O-LLVM - Tigress * Symbolic execution - Miasm - Triton * Program synthesis - Syntia - Msynth - Custom tooling * Other tools - Z3 - Custom tooling ## Teaching methodology Live classes are designed to be dynamic and engaging, making the students get the most out of the training materials and instructor expertise. A clear presentation of the concepts, accompanied by illustrative examples and demos. For each section, there will be practice time allocated. The students will be provided with several exercises to work on, with the continuous support of the instructor. ## Who should attend Reverse engineers, malware analysts and folks within the anti-cheating and software protection industry. It can also be really beneficial for bug hunters, vulnerability researchers, exploit developers and enthusiast security researchers in general. ## Prerequisites - Understanding of basic programming concepts - Familiarity with x86 assembly, C and Python - Knowledge of reverse engineering fundamentals ## System requirements - A working desktop/laptop capable of running virtual machines - 40 GB free hard disk space ## Students will be provided with - A Virtual Machine with all tools, examples and exercises - Access to a private chat with instructor and other students