Make it work, make it right, make it fast: building a platform-neutral whole-system dynamic binary analysis platform

Andrew Henderson, Aravind Prakash, Lok Kwong Yan, Xunchao Hu, Xujiewen Wang, Rundong Zhou, Heng Yin

2014 · 97 citations · 21 references

Concepts

TL;DR

Dynamic binary analysis is essential for program analysis, yet existing tools suffer from performance loss, semantic gaps, architecture/OS specificity, user‑mode limitations, and lack of APIs. DECAF is introduced as a virtual‑machine‑based, multi‑target, whole‑system dynamic binary analysis framework built on QEMU. It combines JIT virtual‑machine introspection with novel TCG instruction‑level bit‑granularity tainting, a plugin‑based event‑driven interface, and fine control over TCG for on‑the‑fly optimizations. The implementation, comprising 9,550 C++ and 10,270 C lines, was evaluated on CPU2006 SPEC benchmarks, yielding an average overhead of 605 % for system‑wide tainting and 12 % for VMI.

Abstract

Dynamic binary analysis is a prevalent and indispensable technique in program analysis. While several dynamic binary analysis tools and frameworks have been proposed, all suffer from one or more of: prohibitive performance degradation, semantic gap between the analysis code and the program being analyzed, architecture/OS specificity, being user-mode only, lacking APIs, etc. We present DECAF, a virtual machine based, multi-target, whole-system dynamic binary analysis framework built on top of QEMU. DECAF provides Just-In-Time Virtual Machine Introspection combined with a novel TCG instruction-level tainting at bit granularity, backed by a plugin based, simple-to-use event driven programming interface. DECAF exercises fine control over the TCG instructions to accomplish on-the-fly optimizations. We present 3 platform-neutral plugins - Instruction Tracer, Keylogger Detector, and API Tracer, to demonstrate the ease of use and effectiveness of DECAF in writing cross-platform and system-wide analysis tools. Implementation of DECAF consists of 9550 lines of C++ code and 10270 lines of C code and we evaluate DECAF using CPU2006 SPEC benchmarks and show average overhead of 605% for system wide tainting and 12% for VMI.

References

21