Recovery of jump table case statements from binary code
- 20 January 2003
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 192-199
- https://doi.org/10.1109/wpc.1999.777758
Abstract
One of the fundamental problems with the analysis of binary (executable) code is that of recognizing, in a machine-independent way, the target addresses of n-conditional branches implemented via a jump table. Without these addresses, the decoding of the machine instructions for a given procedure is incomplete, as well as any analysis on that procedure. We present a technique for recovering jump tables and their target addresses in a machine and compiler independent way. The technique is based on slicing and expression substitution. The assembly code of a procedure that contains an indexed jump is transformed into a normal form which allows us to determine where the jump table is located and what information it contains (e.g. offsets from the table or absolute addresses). The technique has been tested on SPARC and Pentium code generated by C, C++, Fortran and Pascal compilers. Our tests show that up to 90% more of the code in a text segment can be found by using this technique.Keywords
This publication has 16 references indexed in Scilit:
- Assembly to high-level language translationPublished by Institute of Electrical and Electronics Engineers (IEEE) ,1998
- Business rule extraction techniques for COBOL programsJournal of Software Maintenance: Research and Practice, 1998
- Decompilation of binary programsSoftware: Practice and Experience, 1995
- EELPublished by Association for Computing Machinery (ACM) ,1995
- Optimally profiling and tracing programsACM Transactions on Programming Languages and Systems, 1994
- Shade: a fast instruction-set simulator for execution profilingPublished by Association for Computing Machinery (ACM) ,1994
- Rewriting executable files to measure program behaviorSoftware: Practice and Experience, 1994
- A retargetable compiler for ANSI CACM SIGPLAN Notices, 1991
- Producing good code for the case statementSoftware: Practice and Experience, 1985
- Compilation of the Pascal case statementSoftware: Practice and Experience, 1982