Skip to main content
QUICK REVIEW

[论文解读] In Nomine Function: Naming Functions in Stripped Binaries with Neural Networks

Fiorella Artuso, Giuseppe Antonio Di Luna|arXiv (Cornell University)|Dec 17, 2019
Software Engineering Research参考文献 31被引用 12
一句话总结

本文提出一种基于神经网络的方法,利用深度学习自动为剥离的二进制可执行文件命名函数。该研究构建了一个包含880万条函数的大型公开数据集,涵盖多种软件类型,展示了基于Transformer模型的最先进性能(F1得分:0.230),并表明微调可显著提升准确率,尤其在系统工具等特定领域二进制文件中表现更优。

ABSTRACT

In this paper we investigate the problem of automatically naming pieces of assembly code. Where by naming we mean assigning to an assembly function a string of words that would likely be assigned by a human reverse engineer. We formally and precisely define the framework in which our investigation takes place. That is we define the problem, we provide reasonable justifications for the choices that we made for the design of training and the tests. We performed an analysis on a large real-world corpora constituted by nearly 9 millions of functions taken from more than 22k softwares. In such framework we test baselines coming from the field of Natural Language Processing (e.g., Seq2Seq networks and Transformer). Interestingly, our evaluation shows promising results beating the state-of-the-art and reaching good performance. We investigate the applicability of tine-tuning (i.e., taking a model already trained on a large generic corpora and retraining it for a specific task). Such technique is popular and well-known in the NLP field. Our results confirm that fine-tuning is effective even when neural networks are applied to binaries. We show that a model, pre-trained on the aforementioned corpora, when fine-tuned has higher performances on specific domains (such as predicting names in system utilites, malware, etc).

研究动机与目标

  • 解决剥离二进制文件中函数名缺失的问题,该问题阻碍恶意软件分析与软件维护。
  • 克服先前研究依赖限制性假设的局限,例如依赖动态库调用或封闭词汇命名。
  • 构建一个大规模、公开可用的真实世界二进制数据集,以支持二进制函数命名任务的可重现评估与基准测试。
  • 评估深度神经网络(特别是Seq2Seq与Transformer架构)在函数名称预测任务中的有效性。
  • 研究在特定领域二进制数据集上微调预训练模型对提升预测准确率的影响。

提出的方法

  • 构建大规模数据集UbuntuDataset,包含来自22,000个多样化软件二进制文件(涵盖系统工具、数据库、游戏等)的880万条函数。
  • 使用源代码中的函数名作为真实标签,训练并评估两种深度神经网络架构:序列到序列(Seq2Seq)与Transformer模型。
  • 通过微调在完整UbuntuDataset上预训练的模型,在较小的特定领域子集(如系统工具的busybox)上应用迁移学习。
  • 采用BLEU和F1得分作为评估指标,其中F1得分通过预测名称与参考名称之间的完全匹配与部分词重叠计算得出。
  • 在Transformer模型中利用上下文嵌入与注意力机制,更好地捕捉汇编级函数行为中的语义与句法模式。
  • 通过消融研究与定性分析评估预测结果的语义保真度及其与实际函数行为的一致性。

实验结果

研究问题

  • RQ1深度神经网络能否在无符号信息的情况下,有效学习从剥离的二进制代码中预测出有意义且类人的函数名?
  • RQ2模型性能在系统工具、恶意软件和应用库等多样化软件领域中的表现如何?
  • RQ3与通用模型相比,在特定领域子集上微调预训练模型在多大程度上能提升函数命名准确率?
  • RQ4在F1得分与预测结果的语义相关性方面,所提模型与现有最先进方法相比表现如何?
  • RQ5多参考命名方法能否通过考虑多种有效命名规范,提升评估的鲁棒性?

主要发现

  • Transformer模型在完整测试集上的F1得分为0.230,显著优于Seq2Seq基线模型(F1得分:0.122)。
  • 在特定领域子集(如busybox)上微调在UbuntuDataset上预训练的模型后,在coreutils测试集上F1得分相对提升22%。
  • 在恶意软件样本gonnacry上,Transformer模型的F1得分为0.260,优于DEBIN(F1得分:0.0825),其预测常能捕捉到功能语义,即使与真实名称不完全匹配。
  • 如将加密/解密函数命名为'copy file',将密钥生成函数命名为'random',表明预测结果在语义上与实际行为一致,即使名称与标准命名不同。
  • 研究证实微调在二进制代码分析中有效,其成功从自然语言处理扩展到了低级二进制函数命名任务。
  • UbuntuDataset(包含来自22,000个软件的880万个函数)的创建与发布,为二进制函数命名任务的可重现基准测试与未来研究提供了支持。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。