ReSMT: An SMT-Based Tool for Reverse Engineering
Nir Somech, Guy Katz
TL;DR
This paper introduces ReSMT, an automated SMT-based framework for reverse engineering obfuscated binaries. It converts obfuscated assembly to a platform-independent intermediate language (REIL), encodes semantics and a reverse-engineering goal into SMT constraints, and solves them with an SMT backend to recover inputs that reveal intended behavior. The approach targets layered and customized obfuscation, demonstrated through a case study where increasingly complex PELOCK obfuscations are automatically resolved to reveal a hidden key. Results show ReSMT outperforms manual analysis and a contemporary AI model in finding the key within minutes for heavily obfuscated variants, underscoring its potential for malware analysis and automated RE workflows.
Abstract
Software obfuscation techniques make code more difficult to understand, without changing its functionality. Such techniques are often used by authors of malicious software to avoid detection. Reverse Engineering of obfuscated code, i.e., the process of overcoming obfuscation and answering questions about the functionality of the code, is notoriously difficult; and while various tools and methods exist for this purpose, the process remains complex and slow, especially when dealing with layered or customized obfuscation techniques. Here, we present a novel, automated tool for addressing some of the challenges in reverse engineering of obfuscated code. Our tool, called ReSMT, converts the obfuscated assembly code into a complex system of logical assertions that represent the code functionality, and then applies SMT solving and simulation tools to inspect the obfuscated code's execution. The approach is mostly automatic, alleviating the need for highly specialized deobfuscation skills. In an elaborate case study that we conducted, ReSMT successfully tackled complex obfuscated code, and was able to solve reverse-engineering queries about it. We believe that these results showcase the potential and usefulness of our proposed approach.
