Next-Generation Intermediate Representations for Binary Code Analysis


如何引用文章

全文:

开放存取 开放存取
受限制的访问 ##reader.subscriptionAccessGranted##
受限制的访问 订阅存取

详细

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.

作者简介

M. Solovev

Ivannikov Institute for System Programming, Russian Academy of Sciences; Moscow State University

编辑信件的主要联系方式.
Email: icee@ispras.ru
俄罗斯联邦, ul. Solzhenitsyna 25, Moscow, 109004; Moscow, 119991

M. Bakulin

Ivannikov Institute for System Programming, Russian Academy of Sciences

编辑信件的主要联系方式.
Email: bakulinm@ispras.ru
俄罗斯联邦, ul. Solzhenitsyna 25, Moscow, 109004

M. Gorbachev

Ivannikov Institute for System Programming, Russian Academy of Sciences

编辑信件的主要联系方式.
Email: sadbear@ispras.ru
俄罗斯联邦, ul. Solzhenitsyna 25, Moscow, 109004

D. Manushin

Ivannikov Institute for System Programming, Russian Academy of Sciences; Moscow State University

编辑信件的主要联系方式.
Email: dman95@ispras.ru
俄罗斯联邦, ul. Solzhenitsyna 25, Moscow, 109004; Moscow, 119991

V. Padaryan

Ivannikov Institute for System Programming, Russian Academy of Sciences; Moscow State University

编辑信件的主要联系方式.
Email: vartan@ispras.ru
俄罗斯联邦, ul. Solzhenitsyna 25, Moscow, 109004; Moscow, 119991

S. Panasenko

Ivannikov Institute for System Programming, Russian Academy of Sciences

编辑信件的主要联系方式.
Email: spanasenko@ispras.ru
俄罗斯联邦, ul. Solzhenitsyna 25, Moscow, 109004

补充文件

附件文件
动作
1. JATS XML

版权所有 © Pleiades Publishing, Ltd., 2019