Accurate and Extensible Symbolic Execution of Binary Code based on Formal ISA Semantics

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Tempel, Sören, Brandt, Tobias, Lüth, Christoph, Dietrich, Christian, Drechsler, Rolf
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909622587097088
author Tempel, Sören
Brandt, Tobias
Lüth, Christoph
Dietrich, Christian
Drechsler, Rolf
author_facet Tempel, Sören
Brandt, Tobias
Lüth, Christoph
Dietrich, Christian
Drechsler, Rolf
contents Symbolic execution is an SMT-based software verification and testing technique. Symbolic execution requires tracking performed computations during software simulation to reason about branches in the software under test. The prevailing approach on symbolic execution of binary code tracks computations by transforming the code to be tested to an architecture-independent IR and then symbolically executes this IR. However, the resulting IR must be semantically equivalent to the binary code, making this process complex and error-prone. The semantics of the binary code are specified by the targeted ISA, commonly given in natural language and requiring a manual implementation of the transformation to an IR. In recent years, the use of formal languages to describe ISA semantics in a machine-readable way has gained increased popularity. We investigate the utilization of such formal semantics for symbolic execution of binary code, achieving an accurate representation of instruction semantics. We present a prototype for the RISC-V ISA and conduct a case study to demonstrate that it can be easily extended to additional instructions. Furthermore, we perform an experimental comparison with prior work which resulted in the discovery of five previously unknown bugs in the ISA implementation of the popular IR-based symbolic executor angr.
format Preprint
id arxiv_https___arxiv_org_abs_2404_04132
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Accurate and Extensible Symbolic Execution of Binary Code based on Formal ISA Semantics
Tempel, Sören
Brandt, Tobias
Lüth, Christoph
Dietrich, Christian
Drechsler, Rolf
Software Engineering
Cryptography and Security
Programming Languages
Symbolic execution is an SMT-based software verification and testing technique. Symbolic execution requires tracking performed computations during software simulation to reason about branches in the software under test. The prevailing approach on symbolic execution of binary code tracks computations by transforming the code to be tested to an architecture-independent IR and then symbolically executes this IR. However, the resulting IR must be semantically equivalent to the binary code, making this process complex and error-prone. The semantics of the binary code are specified by the targeted ISA, commonly given in natural language and requiring a manual implementation of the transformation to an IR. In recent years, the use of formal languages to describe ISA semantics in a machine-readable way has gained increased popularity. We investigate the utilization of such formal semantics for symbolic execution of binary code, achieving an accurate representation of instruction semantics. We present a prototype for the RISC-V ISA and conduct a case study to demonstrate that it can be easily extended to additional instructions. Furthermore, we perform an experimental comparison with prior work which resulted in the discovery of five previously unknown bugs in the ISA implementation of the popular IR-based symbolic executor angr.
title Accurate and Extensible Symbolic Execution of Binary Code based on Formal ISA Semantics
topic Software Engineering
Cryptography and Security
Programming Languages
url https://arxiv.org/abs/2404.04132