arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1808.04706cs.SEcs.CLcs.CRcs.PL
收藏

基于神经机器翻译的函数对之外的二进制代码相似性比较

Neural Machine Translation Inspired Binary Code Similarity Comparison beyond Function Pairs

University of South Carolina(南卡罗来纳大学);Temple University(天普大学)

Fei Zuo, Xiaopeng Li, Patrick Young, Lannan Luo, Qiang Zeng, Zhexin Zhang

摘要:

二进制代码分析允许分析二进制代码,而无需访问相应的源代码。二进制文件在反汇编后,用汇编语言表示。这启发我们利用自然语言处理(NLP)的思想和技术来处理二进制分析,NLP是一个专注于处理各种自然语言文本的丰富领域。我们注意到,二进制代码分析和NLP共享了许多类似的主题,例如语义提取,摘要和分类。这项工作利用这些想法来解决两个重要的代码相似性比较问题。(I)给定用于不同指令集体系结构(ISA)的一对基本块,确定它们的语义是否相似;以及(II)给定感兴趣的一段代码,确定它是否包含在用于不同ISA的另一段汇编代码中。这两个问题的解决方案有很多应用,如跨架构漏洞发现和代码剽窃检测。我们实现了一个原型系统INNEREYE,并进行了全面的评估。我们的方法和现有的方法问题I之间的比较表明,我们的系统优于他们的准确性,效率和可扩展性。利用该系统进行的案例研究表明,我们对问题II的解决方案是有效的。此外,本研究展示了如何将NLP的思想和技术应用于大规模二进制代码分析。

英文摘要:

Binary code analysis allows analyzing binary code without having access to the corresponding source code. A binary, after disassembly, is expressed in an assembly language. This inspires us to approach binary analysis by leveraging ideas and techniques from Natural Language Processing (NLP), a rich area focused on processing text of various natural languages. We notice that binary code analysis and NLP share a lot of analogical topics, such as semantics extraction, summarization, and classification. This work utilizes these ideas to address two important code similarity comparison problems. (I) Given a pair of basic blocks for different instruction set architectures (ISAs), determining whether their semantics is similar or not; and (II) given a piece of code of interest, determining if it is contained in another piece of assembly code for a different ISA. The solutions to these two problems have many applications, such as cross-architecture vulnerability discovery and code plagiarism detection. We implement a prototype system INNEREYE and perform a comprehensive evaluation. A comparison between our approach and existing approaches to Problem I shows that our system outperforms them in terms of accuracy, efficiency and scalability. And the case studies utilizing the system demonstrate that our solution to Problem II is effective. Moreover, this research showcases how to apply ideas and techniques from NLP to large-scale binary code analysis.

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

↑