English

Binary Code Similarity Detection via Graph Contrastive Learning on Intermediate Representations

Software Engineering 2024-10-25 v1

Abstract

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.

Keywords

Cite

@article{arxiv.2410.18561,
  title  = {Binary Code Similarity Detection via Graph Contrastive Learning on Intermediate Representations},
  author = {Xiuwei Shang and Li Hu and Shaoyin Cheng and Guoqiang Chen and Benlong Wu and Weiming Zhang and Nenghai Yu},
  journal= {arXiv preprint arXiv:2410.18561},
  year   = {2024}
}

Comments

13 pages, 10 figures