Automatic Reverse Engineering of Malware Emulators

Monirul Sharif, Andrea Lanzi, Jonathon Giffin, Wenke Lee

2009 · 205 citations · 27 references

Concepts

TL;DR

Malware authors increasingly obfuscate code by converting native binaries into bytecode for a randomly generated instruction set and interpreting it with a native emulator, a technique that current analysis tools cannot reliably reverse. This work introduces the first automatic reverse‑engineering approach for malware emulators. By dynamically executing the emulated malware in a protected environment, recording the full x86 trace, and applying data‑flow and taint analysis, the authors identify bytecode buffers and recover the instruction set’s syntax and semantics, implemented in the Rotalume prototype. Rotalume accurately reconstructs emulated instruction sets and the original programs’ execution paths, producing control‑flow graphs that enable subsequent malware analysis.

Abstract

Malware authors have recently begun using emulation technology to obfuscate their code. They convert native malware binaries into bytecode programs written in a randomly generated instruction set and paired with a native binary emulator that interprets the bytecode. No existing malware analysis can reliably reverse this obfuscation technique. In this paper, we present the first work in automatic reverse engineering of malware emulators. Our algorithms are based on dynamic analysis. We execute the emulated malware in a protected environment and record the entire x86 instruction trace generated by the emulator. We then use dynamic data-flow and taint analysis over the trace to identify data buffers containing the bytecode program and extract the syntactic and semantic information about the bytecode instruction set. With these analysis outputs, we are able to generate data structures, such as control-flow graphs, that provide the foundation for subsequent malware analysis. We implemented a proof-of-concept system called Rotalume and evaluated it using both legitimate programs and malware emulated by VMProtect and code virtualizer. The results show that Rotalume accurately reveals the syntax and semantics of emulated instruction sets and reconstructs execution paths of original programs from their bytecode representations.

References

27