{'fraction_non_alphanumeric': 0.017609391675560297, 'fraction_numerical': 0.0, 'mean_word_length': 5.720430107526882, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Approaches for Universal Static Binary Translation

Binary translation is the process of converting machine code created for one architecture to semantically equivalent machine code for another architecture. Static binary translation in particular is one of many ways to achieve Architecture-Independent Computing (AIC). AIC aims to provide the ability to execute code on any machine regardless of the original target. Unlike other solutions for AIC, such as portable virtual machines, emulators, or interpreters, static binary translation presents the possibility to create a framework that can translate code between any two machine code languages and provide results at near native speeds. In this thesis we present the Binary Translation System (BTS), a new static binary translator that can retarget machine code for arbitrary computing architectures. This thesis presents the extensible BTS framework that can be used to create translators for any common instruction set architecture. We also present our architecture-independent code representation and manipulations that we used to face some of the common problems with binary translation. Our prototype BTS implements a RISC-like, architecture-independent code representation, a PowerPC decoder, and a SPARC encoder to demonstrate the feasibility and problems of static binary translation. The PowerPC decoder in particular, exemplifies many decompilation problems that must be dealt with when converting machine code to an architecture-independent code representation. Our test results show that our prototype can achieve comparable performance and compatiblilty to other AIC solutions. Our methods and approaches presented in this thesis may be of interest to binary translation writers, reverse engineers, decompiler/compiler designers, and engineers wanting to do binary program manipulation or instrumentation.