Binary Code Similarity Detection via Graph Contrastive Learning on Intermediate Representations

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Shang, Xiuwei, Hu, Li, Cheng, Shaoyin, Chen, Guoqiang, Wu, Benlong, Zhang, Weiming, Yu, Nenghai
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914986978181120
author Shang, Xiuwei
Hu, Li
Cheng, Shaoyin
Chen, Guoqiang
Wu, Benlong
Zhang, Weiming
Yu, Nenghai
author_facet Shang, Xiuwei
Hu, Li
Cheng, Shaoyin
Chen, Guoqiang
Wu, Benlong
Zhang, Weiming
Yu, Nenghai
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_18561
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Binary Code Similarity Detection via Graph Contrastive Learning on Intermediate Representations
Shang, Xiuwei
Hu, Li
Cheng, Shaoyin
Chen, Guoqiang
Wu, Benlong
Zhang, Weiming
Yu, Nenghai
Software Engineering
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.
title Binary Code Similarity Detection via Graph Contrastive Learning on Intermediate Representations
topic Software Engineering
url https://arxiv.org/abs/2410.18561