Practical Binary Code Similarity Detection with BERT-based Transferable Similarity Learning
Open Access
- 5 December 2022
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 361-374
Abstract
Binary code similarity detection (BCSD) serves as a basis for a wide spectrum of applications, including software plagiarism, malware classification, and known vulnerability discovery. However, the inference of contextual meanings of a binary is challenging due to the absence of semantic information available in source codes. Recent advances leverage the benefits of a deep learning architecture into a better understanding of underlying code semantics and the advantages of the Siamese architecture into better BCSD. In this paper, we propose BinShot, a BERT-based similarity learning architecture that is highly transferable for effective BCSD. We tackle the problem of detecting code similarity with one-shot learning (a special case of few-shot learning). To this end, we adopt a weighted distance vector with a binary cross entropy as a loss function on top of BERT. With the prototype of BinShot, our experimental results demonstrate the effectiveness, transferability, and practicality of BinShot, which is robust to detecting the similarity of previously unseen functions. We show that BinShot outperforms the previous state-of-the-art approaches for BCSD.Keywords
This publication has 45 references indexed in Scilit:
- Cross-Architecture Bug Search in Binary Executables2015
- Semantics-based obfuscation-resilient binary code similarity comparison with applications to software plagiarism detection2014
- Control Flow-Based Malware VariantDetectionIEEE Transactions on Dependable and Secure Computing, 2014
- Tracelet-based code search in executablesACM SIGPLAN Notices, 2014
- BinSlayer2013
- BinHunt: Automatically Finding Semantic Differences in Binary Programs2008
- Detecting Self-mutating Malware Using Control-Flow Graph Matching2006
- Learning a Similarity Metric Discriminatively, with Application to Face Verification2005
- Long Short-Term MemoryNeural Computation, 1997
- An Unsolvable Problem of Elementary Number TheoryAmerican Journal of Mathematics, 1936