|
This article is cited in 2 scientific papers (total in 2 papers)
Dynamic analysis of ARM ELF shared libraries using static binary instrumentation
M. K. Ermakov, S. P. Vartanov Institute for System Programming of the Russian Academy of Sciences
Abstract:
Dynamic program analysis is a prominent approach towards software quality control allowing to perform automatic profiling, defect detection and other activities during software development. In this paper we focus on static binary code instrumentation – a technique to automatically modify program executable code in order to extract data necessary for dynamic analysis. We discuss the key features of this technique within context of dynamic analysis and propose a method to perform static binary code instrumentation for ELF executable and shared library files specifically targeting the ARM architecture.
We describe the main steps of the proposed method including the following: instrumentation specification and target code parsing, executable instrumentation code generation and finally target executable code file modification in order to insert instrumentation code and ensure that control transfer from original code to instrumentation code and vice versa will happen at runtime.
Executable code file modification is performed within bounds of ARM ELF specifications and is designed to minimize the changes introduced in actual executable code blocks. Instrumentation code is appended to target files as a set of separate sections; we implement control transfer to instrumentation code through unconditional jump instructions which replace small blocks of original instructions at instrumentation points. In order to preserve the original functionality we wrap instrumentation code blocks with instructions that save and restore program state; additionally, instructions replaced at instrumentation points are transferred to the instrumentation code blocks. We also describe a set of modifications performed in order to introduce instrumentation code external dependencies to the target executable files.
The proposed method was implemented in an instrumentation framework. We provide a brief overview of practical experiments using basic block counting and function entry/exit tracing as base instrumentation applications. The results show better performance in comparison to popular dynamic instrumentation framework Valgrind and low overhead for system-wide tracking of native Android libraries.
Keywords:
static binary instrumentation, dynamic analysis, ARM architecture, ELF format, Android.
Citation:
M. K. Ermakov, S. P. Vartanov, “Dynamic analysis of ARM ELF shared libraries using static binary instrumentation”, Proceedings of ISP RAS, 27:1 (2015), 5–24
Linking options:
https://www.mathnet.ru/eng/tisp110 https://www.mathnet.ru/eng/tisp/v27/i1/p5
|
Statistics & downloads: |
Abstract page: | 319 | Full-text PDF : | 206 | References: | 33 |
|