arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2106.05478cs.CRcs.LG
收藏

基于BERT的语义感知二进制码表示

Semantic-aware Binary Code Representation with BERT

Sungkyunkwan University(成均馆大学);Georgia Institute of Technology(佐治亚理工学院);Incheon National University(仁川国立大学)

Hyungjoon Koo, Soyeon Park, Daejin Choi, Taesoo Kim

摘要:

广泛的二进制分析应用,如错误发现、恶意软件分析和代码克隆检测,需要恢复二进制代码的上下文含义。最近,已经提出了基于机器学习的二进制分析技术,以自动重构二进制的代码表示,而不是手动制作分析算法的细节。然而,利用机器学习的现有方法仍然专门用于解决一个领域的问题,为不同类型的二进制分析再现模型。在本文中,我们提出DeepSemantic利用BERT来产生二进制代码的语义感知代码表示。为此,我们引入了平衡良好的指令规范化,为每个指令保持丰富的信息,但最大限度地减少了词汇表(OOV)问题。DeepSemantic是根据我们对大量二进制文件的研究精心设计的。此外,DeepSemantic利用BERT架构的本质来重新利用预先训练的通用模型,该模型可以作为一次性处理,然后通过微调过程快速应用特定的下游任务。我们用两个下游任务来演示DeepSemantic,即二进制相似性比较和编译器出处(即,编译器和优化级)预测。我们的实验结果表明,二进制相似性模型优于两个最先进的二进制相似性工具,DeepBinDiff和SAFE,平均分别为49.84%和15.83%。

英文摘要:

A wide range of binary analysis applications, such as bug discovery, malware analysis and code clone detection, require recovery of contextual meanings on a binary code. Recently, binary analysis techniques based on machine learning have been proposed to automatically reconstruct the code representation of a binary instead of manually crafting specifics of the analysis algorithm. However, the existing approaches utilizing machine learning are still specialized to solve one domain of problems, rendering recreation of models for different types of binary analysis. In this paper, we propose DeepSemantic utilizing BERT in producing the semantic-aware code representation of a binary code. To this end, we introduce well-balanced instruction normalization that holds rich information for each of instructions yet minimizing an out-of-vocabulary (OOV) problem. DeepSemantic has been carefully designed based on our study with large swaths of binaries. Besides, DeepSemantic leverages the essence of the BERT architecture into re-purposing a pre-trained generic model that is readily available as a one-time processing, followed by quickly applying specific downstream tasks with a fine-tuning process. We demonstrate DeepSemantic with two downstream tasks, namely, binary similarity comparison and compiler provenance (i.e., compiler and optimization level) prediction. Our experimental results show that the binary similarity model outperforms two state-of-the-art binary similarity tools, DeepBinDiff and SAFE, 49.84% and 15.83% on average, respectively.

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

↑