Content area

Abstract

Many binary code analysis tools rely on intermediate representation (IR) derived from a binary code, instead of working directly with machine instructions. In this paper, we first consider binary code analysis problems that benefit from IR and compile a list of requirements that the IR suitable for solving these problems should meet. Generally speaking, a universal binary analysis platform requires two principal components. The first component is a retargetable instruction decoder that utilizes external specifications to describe target instruction sets. External specifications facilitate maintenance and allow one to quickly implement support for new instruction sets. We analyze some of the most popular instruction set architectures (ISAs), including those used in microcontrollers, and from that compile a list of requirements for the retargetable decoder. We then overview existing multi-ISA decoders and propose our vision of a more generic approach, based on a multi-layer directed acyclic graph that describes the decoding process in universal terms. The second component of the analysis platform is the actual architecture-neutral IR. In this paper, we describe such IRs and propose Pivot 2, an IR that is low-level enough to be easily constructed from decoded machine instructions, also being easy to analyze. The main features of Pivot 2 are explicit side effects, SSA variables, simpler alternative to phi-functions, and extensible elementary operation set at the core. This IR also supports machines that have multiple memory address spaces. Finally, we propose a way to tie the decoder and the IR together to fit them to most of the binary code analysis tasks through abstract interpretation on top of the IR. The proposed scheme takes into account various aspects of target architectures that are overlooked in many other works, including pipeline specifics (handling of delay slots, hardware loop support, etc.), exception and interrupt management, and generic address space model, in which accesses may have arbitrary side effects due to memory-mapped devices or other non-trivial behavior of the memory system.

Details

Business indexing term
Title
Next-Generation Intermediate Representations for Binary Code Analysis
Author
Solovev, M. A. 1 ; Bakulin, M. G. 2 ; Gorbachev, M. S. 2 ; Manushin, D. V. 1 ; Padaryan, V. A. 1 ; Panasenko, S. S. 2 

 Ivannikov Institute for System Programming, Russian Academy of Sciences, Moscow, Russia (GRID:grid.4886.2) (ISNI:0000 0001 2192 9124); Moscow State University, Moscow, Russia (GRID:grid.14476.30) (ISNI:0000 0001 2342 9668) 
 Ivannikov Institute for System Programming, Russian Academy of Sciences, Moscow, Russia (GRID:grid.4886.2) (ISNI:0000 0001 2192 9124) 
Publication title
Volume
45
Issue
7
Pages
424-437
Publication year
2019
Publication date
Dec 2019
Publisher
Springer Nature B.V.
Place of publication
New York
Country of publication
Netherlands
ISSN
03617688
e-ISSN
16083261
Source type
Scholarly Journal
Language of publication
English
Document type
Journal Article
Publication history
 
 
Online publication date
2019-12-16
Milestone dates
2019-12-11 (Registration); 2019-02-13 (Received); 2019-02-15 (Accepted); 2019-02-13 (Rev-Recd)
Publication history
 
 
   First posting date
16 Dec 2019
ProQuest document ID
2918495808
Document URL
https://www.proquest.com/scholarly-journals/next-generation-intermediate-representations/docview/2918495808/se-2?accountid=208611
Copyright
© Pleiades Publishing, Ltd. 2019.
Last updated
2024-08-27
Database
2 databases
  • ProQuest One Academic
  • ProQuest One Academic