arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.01841cs.PL
收藏

BinSub:机器代码多态类型推断的简单本质

BinSub: The Simple Essence of Polymorphic Type Inference for Machine Code

Ian Smith

AI总结:

BinSub 通过代数子类型化框架实现简单、精确且高效的二进制类型推断,在保持与先前工作相似精度的同时将 1568 个函数的平均运行时间提升了 63 倍。

摘要:

在二进制文件中恢复高层类型信息是逆向工程和二进制分析中的一项关键任务。二进制文件包含的显式类型信息非常少。二进制代码的结构极其灵活,允许临时性的子类型化和多态性。先前的工作已经表明,对二进制代码进行精确的类型推断需要具备表达性的子类型化和多态性。迄今为止,在二进制类型推断算法中实现这些类型系统特性的效率太低,难以获得广泛采用。传统类型推断的最新进展通过代数子类型化框架,在一种具有子类型化和多态性的类 ML 语言中实现了简单且高效的主类型推断。BinSub 是一种新的二进制类型推断算法,它认识到代数子类型化与有效分析二进制文件所需的类型系统特性之间的联系。利用这一联系,BinSub 实现了简单、精确且高效的二进制类型推断。我们表明,BinSub 保持了与先前工作相似的精度,同时在 1568 个函数上实现了平均运行时间 63 倍的提升。我们还给出了 BinSub 的形式化描述,并证明 BinSub 的类型系统保持了先前工作的表达性。

英文摘要:

Recovering high-level type information in binaries is a key task in reverse engineering and binary analysis. Binaries contain very little explicit type information. The structure of binary code is incredibly flexible allowing for ad-hoc subtyping and polymorphism. Prior work has shown that precise type inference on binary code requires expressive subtyping and polymorphism. Implementations of these type system features in a binary type inference algorithm have thus-far been too inefficient to achieve widespread adoption. Recent advances in traditional type inference have achieved simple and efficient principal type inference in an ML like language with subtyping and polymorphism through the framework of algebraic subtyping. BinSub, a new binary type inference algorithm, recognizes the connection between algebraic subtyping and the type system features required to analyze binaries effectively. Using this connection, BinSub achieves simple, precise, and efficient binary type inference. We show that BinSub maintains a similar precision to prior work, while achieving a 63x improvement in average runtime for 1568 functions. We also present a formalization of BinSub and show that BinSub's type system maintains the expressiveness of prior work.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑