Macaw:面向忙碌二进制分析师的机器代码工具箱
Macaw: A Machine Code Toolbox for the Busy Binary Analyst
AI总结:
本文介绍模块化二进制分析框架 Macaw,利用静态类型函数式编程和基于 SMT 的符号执行,支持快速构建可靠的机器代码静态与动态分析工具。
摘要:
在尝试理解一个可执行文件的行为时,二进制分析师可以使用许多不同的技术。这些技术包括程序切片、动态插桩、二进制级重写、符号执行和形式化验证,所有这些都能够揭示关于一段机器代码如何行为的洞见。因此,并不存在一种适用于所有情况的二进制分析工具,所以二进制分析研究人员通常会组合使用几种不同的工具。有时,研究人员甚至需要设计新的工具,以研究现有框架不能很好处理的问题。然而,鉴于现代指令集架构(ISA)的规模和复杂性,完全从零开始设计此类工具很少具有时间或成本效益。我们提出了 Macaw,这是一个模块化框架,使得在一系列用例中快速构建可靠的二进制分析工具成为可能。Macaw 全面采用静态类型的函数式编程技术——这些技术涵盖从使用函数式优化遍,到在类型层面编码棘手的架构不变量,以静态检查正确性属性。函数式编程思想所提供的保证水平,使我们能够快速迭代 Macaw,同时仍然确信底层语义是正确的。在十多年的开发过程中,我们使用 Macaw 支持一个工业研究团队构建用于机器代码相关任务的工具。因此,“Macaw”这一名称不仅指该框架,也指构建在其之上的一套工具。我们深入描述了 Macaw,并介绍了它执行的不同静态和动态分析,其中许多分析由基于 SMT 的符号执行引擎提供支持。我们特别关注机器代码与高级语言之间的互操作性,包括从 x86 到 LLVM 的二进制提升,以及验证混合 C 和汇编代码的正确性。
英文摘要:
When attempting to understand the behavior of an executable, a binary analyst can make use of many different techniques. These include program slicing, dynamic instrumentation, binary-level rewriting, symbolic execution, and formal verification, all of which can uncover insights into how a piece of machine code behaves. As a result, there is no one-size-fits-all binary analysis tool, so a binary analysis researcher will often combine several different tools. Sometimes, a researcher will even need to design new tools to study problems that existing frameworks are not well equipped to handle. Designing such tools from complete scratch is rarely time- or cost-effective, however, given the scale and complexity of modern ISAs. We present Macaw, a modular framework that makes it possible to rapidly build reliable binary analysis tools across a range of use cases. Statically typed functional programming techniques are used pervasively throughout Macaw -- these range from using functional optimization passes to encoding tricky architectural invariants at the type level to statically check correctness properties. The level of assurance that functional programming ideas afford us allow us to iterate rapidly on Macaw while still having confidence that the underlying semantics are correct. Over a decade of development, we have used Macaw to support an industrial research team in building tools for machine code-related tasks. As such, the name 'Macaw' refers not just to the framework, but also a suite of tools that are built on top of it. We describe Macaw in depth and describe the different static and dynamic analyses that it performs, many powered by an SMT-based symbolic execution engine. We put a particular focus on interoperability between machine code and higher-level languages, including binary lifting from x86 to LLVM, as well verifying the correctness of mixed C and assembly code.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。