NeuDep:神经二进制记忆依赖分析
NeuDep: Neural Binary Memory Dependence Analysis
摘要:
确定多个指令是否可以访问同一个内存位置是二进制分析中的一项关键任务。由于理论上静态计算精确的别名信息是不可判定的,因此具有挑战性。由于编译器优化的存在以及符号和类型的缺失,问题在二进制级别出现。现有的方法要么产生显着虚假的依赖关系,由于保守的分析或规模不佳,复杂的二进制文件。我们提出了一种新的基于机器学习的方法来预测内存依赖性,利用模型的学习知识,二进制程序如何执行。我们的方法的特点是(i)一个自我监督的过程,预训练神经网络对二进制代码进行推理,其动态值流经内存地址,然后(ii)监督微调以静态推断内存依赖关系。为了促进有效的学习,我们开发了专用的神经架构来编码异构输入(即,代码、数据值和来自跟踪的内存地址)与特定模块相结合,并将它们与组合学习策略相融合。我们在NeuDep中实现了我们的方法,并在由2个编译器,4个优化和4个混淆通道编译的41个流行软件项目上进行了评估。我们证明,NeuDep是更精确(1.5倍)和更快(3.5倍)比当前国家的最先进的。广泛的探测研究安全关键的逆向工程任务表明,NeuDep了解内存访问模式,学习函数签名,并能够匹配间接调用。所有这些任务都有助于或受益于推断内存依赖性。值得注意的是,NeuDep在这些任务上的表现也优于当前最先进的技术。
英文摘要:
Determining whether multiple instructions can access the same memory location is a critical task in binary analysis. It is challenging as statically computing precise alias information is undecidable in theory. The problem aggravates at the binary level due to the presence of compiler optimizations and the absence of symbols and types. Existing approaches either produce significant spurious dependencies due to conservative analysis or scale poorly to complex binaries. We present a new machine-learning-based approach to predict memory dependencies by exploiting the model's learned knowledge about how binary programs execute. Our approach features (i) a self-supervised procedure that pretrains a neural net to reason over binary code and its dynamic value flows through memory addresses, followed by (ii) supervised finetuning to infer the memory dependencies statically. To facilitate efficient learning, we develop dedicated neural architectures to encode the heterogeneous inputs (i.e., code, data values, and memory addresses from traces) with specific modules and fuse them with a composition learning strategy. We implement our approach in NeuDep and evaluate it on 41 popular software projects compiled by 2 compilers, 4 optimizations, and 4 obfuscation passes. We demonstrate that NeuDep is more precise (1.5x) and faster (3.5x) than the current state-of-the-art. Extensive probing studies on security-critical reverse engineering tasks suggest that NeuDep understands memory access patterns, learns function signatures, and is able to match indirect calls. All these tasks either assist or benefit from inferring memory dependencies. Notably, NeuDep also outperforms the current state-of-the-art on these tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。