N-version disassembly: differential testing of x86 disassemblers

  • Authors:
  • Roberto Paleari;Lorenzo Martignoni;Giampaolo Fresi Roglia;Danilo Bruschi

  • Affiliations:
  • Università degli Studi di Milano, Milano, Italy;Università degli Studi di Udine, Udine, Italy;Università degli Studi di Milano, Milano, Italy;Università degli Studi di Milano, Milano, Italy

  • Venue:
  • Proceedings of the 19th international symposium on Software testing and analysis
  • Year:
  • 2010
  • A methodology for testing CPU emulators

    ACM Transactions on Software Engineering and Methodology (TOSEM) - Testing, debugging, and error handling, formal methods, lifecycle concerns, evolution and maintenance

Quantified Score

Hi-index 0.00

Visualization

Abstract

The output of a disassembler is used for many different purposes (e.g., debugging and reverse engineering). Therefore, disassemblers represent the first link of a long chain of stages on which any high-level analysis of machine code depends upon. In this paper we demonstrate that many disassemblers fail to decode certain instructions and thus that the first link of the chain is very weak. We present a methodology, called N-version disassembly, to verify the correctness of disassemblers, based on differential analysis. Given a set of n - 1 disassemblers, we use them to decode fragments of machine code and we compare their output against each other. To further corroborate the output of these disassemblers, we developed a special instruction decoder, the nth, that delegates the decoding to the CPU, the ideal decoder. We tested eight of the most popular disassemblers for Intel x86, and found bugs in each of them.