基于中间表示图对比学习的二进制代码相似度检测
Binary Code Similarity Detection via Graph Contrastive Learning on Intermediate Representations
AI总结:
针对异构架构和复杂编译下的大规模二进制函数检索问题,提出 IRBinDiff,融合 LLVM-IR、预训练语言模型、图神经网络与动量对比学习,在两类检测场景中优于现有领先方法。
摘要:
二进制代码相似度检测(BCSD)在漏洞检测、恶意软件分析和代码复用识别等众多领域发挥着关键作用。随着物联网设备的普及和快速演进,其高度异构的硬件架构与复杂的编译设置,加上实际应用中对大规模函数检索的需求,对 BCSD 方法提出了更高要求。本文提出 IRBinDiff,通过利用具有更高层语义抽象的 LLVM-IR 缓解编译差异,并将预训练语言模型与图神经网络相结合,从不同视角捕获语义和结构信息。通过引入动量对比学习,该方法有效增强了在大规模候选函数集中的检索能力,能够区分细微的函数相似性与差异。我们在多种编译设置下开展了大量实验,结果表明 IRBinDiff 在一对一比较和一对多搜索场景中均优于其他领先的 BCSD 方法。
英文摘要:
Binary Code Similarity Detection (BCSD) plays a crucial role in numerous fields, including vulnerability detection, malware analysis, and code reuse identification. As IoT devices proliferate and rapidly evolve, their highly heterogeneous hardware architectures and complex compilation settings, coupled with the demand for large-scale function retrieval in practical applications, put forward higher requirements for BCSD methods. In this paper, we propose IRBinDiff, which mitigates compilation differences by leveraging LLVM-IR with higher-level semantic abstraction, and integrates a pre-trained language model with a graph neural network to capture both semantic and structural information from different perspectives. By introducing momentum contrastive learning, it effectively enhances retrieval capabilities in large-scale candidate function sets, distinguishing between subtle function similarities and differences. Our extensive experiments, conducted under varied compilation settings, demonstrate that IRBinDiff outperforms other leading BCSD methods in both One-to-one comparison and One-to-many search scenarios.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。