Binary reverse engineering is a challenging task because it often necessitates reasoning using both domain-specific knowledge (e.g., understanding entrypoint idioms common to an ABI) and logical inference (e.g., reconstructing interprocedural control flow). To help perform these tasks, reverse engineers often use toolkits (such as IDA Pro or Ghidra) that allow them to interactively explicate properties of binaries. We argue that deductive databases serve as a natural abstraction for interfacing between visualization-based binary analysis tools and high-performance logical inference engines that compute facts about binaries. In this paper, we present a vision for the future in which reverse engineers use a visualization-based tool to understand binaries while simultaneously querying a logical-inference engine to perform arbitrarily-complex deductive inference tasks. We call our vision declarative demand-driven reverse engineering (D^3RE for short), and sketch a formal semantics whose goal is to mediate interaction between a logical-inference engine (such Souffle) and a reverse engineering tool. We describe aprototype tool, d3re, which are using to explore the D^3RE vision. While still a prototype, we have used d3re to reimplement several common querying tasks on binaries. Our evaluation demonstrates that d3re enables both better performance and more succinct implementation of these common RE tasks.
翻译:二进制反向反向工程是一项具有挑战性的任务,因为它往往需要使用特定领域知识(例如,理解ABI所共有的切入点直径)和逻辑推理(例如,重建程序间控制流程)进行推理。为了帮助完成这些任务,反向工程师经常使用工具(如IDA Pro 或 Ghidra),以便他们能够交互解释二进制特性。我们争辩说,推论数据库是利用基于视觉的二进制分析工具和高性能逻辑推理引擎(即,理解ABI所共有的事实)和逻辑推理高性能引擎(例如,理解ABI所共有的切入点)和逻辑推理引擎(例如,理解ABI)和逻辑推论逻辑推理(例如,重建程序间控制流程流程流程)的推理。为了帮助完成这些任务,反向反向工程工程工程,工程师常常使用一个逻辑推理的推理引擎(D3),我们用一个共同的推理模型来进行推理,我们用一个共同的推理工具来进行推理。