REPICA: Rewriting Position Independent Code of ARM
Authors:
Open Access
- 3 September 2018
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 6, 50488-50509
Abstract
Binary rewriting techniques are widely used in program vulnerability fixing, obfuscation, security-oriented transforming, and other purposes, such as binary profiling and optimization. Over the past decade, most binary instrumentation techniques have been studied on ×86 architecture, specifically focusing on the challenges of instrumenting non-PIC. In contrast, ARM architecture has received little attention, and statically instrumenting PIC has not been studied in depth. In ARM, owing to its fixed-length instructions, addresses are frequently computed via multiple stages, making it difficult to handle all relative addresses, especially the relative address of base-plus-offset and base-plus-index addressing. In this paper, we present REPICA, a static binary instrumentation technique which can rewrite ARM binaries compiled in a position-independent fashion. REPICA can instrument at anywhere without symbolic information. With the aim of identifying and processing relative-addresses accurately, we designed a value-set analysis specialized for PIC of which the domain is in symbolic format. We also identified a new challenge for situations all relative addresses cannot be corrected in an optimized way and solved this problem efficiently by the stepwise correction of each relative address. We implemented a prototype of REPICA and experimented with approximately 1200 COTS binaries and SPECint2006 benchmarks. The experiment showed that all binaries rewritten by REPICA maintain relative addresses correctly with negligible execution and space overhead. Finally, we exhibit the effectiveness of REPICA by using it to implement a shadow stack.Keywords
Funding Information
- Ministry of Science, ICT and Future Planning (IITP-2018-2014-0-00636)
- National Research Foundation of Korea (NRF-2015R1D1A1A09058200)
This publication has 33 references indexed in Scilit:
- BISTRO: Binary Component Extraction and Embedding for Software Security Applications2013
- Binary stirring2012
- Efficient, sensitivity resistant binary instrumentation2011
- Retrofitting Security in COTS Software with Binary Rewriting2011
- Link-time binary rewriting techniques for program compactionACM Transactions on Programming Languages and Systems, 2005
- Comparing the Galois connection and widening/narrowing approaches to abstract interpretation2005
- ValgrindElectronic Notes in Theoretical Computer Science, 2003
- An API for Runtime Code PatchingThe International Journal of High Performance Computing Applications, 2000
- Rewriting executable files to measure program behaviorSoftware: Practice and Experience, 1994
- Abstract Interpretation FrameworksJournal of Logic and Computation, 1992