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

Ian Smith
{"title":"BinSub: The Simple Essence of Polymorphic Type Inference for Machine Code","authors":"Ian Smith","doi":"arxiv-2409.01841","DOIUrl":null,"url":null,"abstract":"Recovering high-level type information in binaries is a key task in reverse\nengineering and binary analysis. Binaries contain very little explicit type\ninformation. The structure of binary code is incredibly flexible allowing for\nad-hoc subtyping and polymorphism. Prior work has shown that precise type\ninference on binary code requires expressive subtyping and polymorphism. Implementations of these type system features in a binary type inference\nalgorithm have thus-far been too inefficient to achieve widespread adoption.\nRecent advances in traditional type inference have achieved simple and\nefficient principal type inference in an ML like language with subtyping and\npolymorphism through the framework of algebraic subtyping. BinSub, a new binary\ntype inference algorithm, recognizes the connection between algebraic subtyping\nand the type system features required to analyze binaries effectively. Using\nthis connection, BinSub achieves simple, precise, and efficient binary type\ninference. We show that BinSub maintains a similar precision to prior work,\nwhile achieving a 63x improvement in average runtime for 1568 functions. We\nalso present a formalization of BinSub and show that BinSub's type system\nmaintains the expressiveness of prior work.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2409.01841","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

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.
BinSub:机器码多态类型推断的简单精髓
恢复二进制文件中的高级类型信息是逆向工程和二进制分析中的一项关键任务。二进制文件几乎不包含显式类型信息。二进制代码的结构非常灵活,允许临时的子类型和多态性。先前的工作表明,要对二进制代码进行精确的类型推断,就需要具有表现力的子类型和多态性。传统类型推断的最新进展是通过代数子类型框架,在具有子类型和多态性的类似 ML 语言中实现了简单高效的主类型推断。BinSub 是一种新的二进制类型推断算法,它认识到代数子类型和有效分析二进制所需的类型系统特征之间的联系。利用这种联系,BinSub 实现了简单、精确和高效的二进制类型推断。我们的研究表明,BinSub 与之前的工作保持了类似的精度,同时在 1568 个函数的平均运行时间上提高了 63 倍。我们还介绍了 BinSub 的形式化,并证明 BinSub 的类型系统保持了之前工作的表现力。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信