CodeCMR: Cross-Modal Retrieval For Function-Level Binary Source Code Matching
Zeping Yu, Wenxin Zheng, Jiaqi Wang, Qiyi Tang, Sen Nie, Shi Wu
Abstract
Binary source code matching, especially on function-level, has a critical role in the field of computer security. Given binary code only, finding the corresponding source code improves the accuracy and efficiency in reverse engineering. Given source code only, related binary code retrieval contributes to known vulnerabilities confirmation. However, due to the vast difference between source and binary code, few studies have investigated binary source code matching. Previously published studies focus on code literals extraction such as strings and integers, then utilize traditional matching algorithms such as the Hungarian algorithm for code matching. Nevertheless, these methods have limitations on function-level, because they ignore the potential semantic features of code and a lot of code lacks sufficient code literals. Also, these methods indicate a need for expert experience for useful feature identification and feature engineering, which is timeconsuming. This paper proposes an end-to-end cross-modal retrieval network for binary source code matching, which achieves higher accuracy and requires less expert experience. We adopt Deep Pyramid Convolutional Neural Network (DPCNN) for source code feature extraction and Graph Neural Network (GNN) for binary code feature extraction. We also exploit neural network-based models to capture code literals, including strings and integers. Furthermore, we implement "norm weighted sampling" for negative sampling. We evaluate our model on two datasets, where it outperforms other methods significantly.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
23 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Code is not Natural Language: Unlock the Power of Semantics-Oriented Graph Representation for Binary Code Similarity Detection cites Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity Detection
- Code is not Natural Language: Unlock the Power of Semantics-Oriented Graph Representation for Binary Code Similarity Detection cites Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detection
- Code is not Natural Language: Unlock the Power of Semantics-Oriented Graph Representation for Binary Code Similarity Detection cites Neural Machine Translation Inspired Binary Code Similarity Comparison beyond Function Pairs
- Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity Detection cites Neural Machine Translation Inspired Binary Code Similarity Comparison beyond Function Pairs
- BinaryAI: Binary Software Composition Analysis via Intelligent Binary Source Code Matching cites Identifying Open-Source License Violation and 1-day Security Risk at Large Scale
- BinaryAI: Binary Software Composition Analysis via Intelligent Binary Source Code Matching cites Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detection
- BinaryAI: Binary Software Composition Analysis via Intelligent Binary Source Code Matching cites Neural Machine Translation Inspired Binary Code Similarity Comparison beyond Function Pairs
- Neural Machine Translation Inspired Binary Code Similarity Comparison beyond Function Pairs cites Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detection
- Automated Detection of Password Leakage from Public GitHub Repositories cites Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity Detection
- CLAP: Learning Transferable Binary Code Representations with Natural Language Supervision cites Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity Detection
- CLAP: Learning Transferable Binary Code Representations with Natural Language Supervision cites Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detection
Cited by top-tier papers23
- Code is not Natural Language: Unlock the Power of Semantics-Oriented Graph Representation for Binary Code Similarity DetectionHaojie He, Xingwei Lin, Ziang Weng, Ruijie Zhao et al.USENIX Security 2024 · 66 citations
- CCTEST: Testing and Repairing Code Completion SystemsZongjie Li, Chaozheng Wang, Zhibo Liu, Haoxuan Wang et al.ICSE 2023 · 49 citations
- BinaryAI: Binary Software Composition Analysis via Intelligent Binary Source Code MatchingLing Jiang, Junwen An, Huihui Huang, Qiyi Tang et al.ICSE 2024 · 43 citations
- Automated Detection of Password Leakage from Public GitHub RepositoriesRunhan Feng, Ziyang Yan, Shiyan Peng, Yuanyuan ZhangICSE 2022 · 36 citations
- CLAP: Learning Transferable Binary Code Representations with Natural Language SupervisionHao Wang, Zeyu Gao, Chao Zhang, Zihan Sha et al.ISSTA 2024 · 32 citations
Builds on6
- Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity DetectionXiaojun Xu, Chang Liu, Qian Feng, Heng Yin et al.CCS 2017 · 682 citations
- Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity DetectionZeping Yu, Rui Cao, Qiyi Tang, Sen Nie et al.AAAI 2020 · 265 citations
- Neural Machine Translation Inspired Binary Code Similarity Comparison beyond Function PairsFei Zuo, Xiaopeng Li, Patrick Young, Lannan Luo et al.NDSS 2019 · 262 citations
- Identifying Open-Source License Violation and 1-day Security Risk at Large ScaleRuian Duan, Ashish Bijlani, Meng Xu, Taesoo Kim et al.CCS 2017 · 126 citations
- Cross-Batch Memory for Embedding LearningXun Wang, Haozhi Zhang, Weilin Huang, Matthew R. ScottCVPR 2020
Related papers
- SigmaDiff: Semantics-Aware Deep Graph Matching for Pseudocode DiffingLian Gao, Yu Qu, Sheng Yu, Yue Duan et al.NDSS 2024
- VulHawk: Cross-architecture Vulnerability Detection with Entropy-based Binary Code SearchZhenhao Luo, Pengfei Wang, Baosheng Wang, Yong Tang et al.NDSS 2023
- VulCNN: An Image-inspired Scalable Vulnerability Detection SystemYueming Wu, Deqing Zou, Shihan Dou, Wei Yang et al.ICSE 2022 · 141 citations
- REVDECODE: Enhancing Binary Function Matching with Context-Aware Graph Representations and Relevance DecodingTongwei Ren, Ronghan Che, Guin Gilman, Lorenzo De Carli et al.USENIX Security 2025
- BinAug: Enhancing Binary Similarity Analysis with Low-Cost Input RepairingWai Kin Wong, Huaijin Wang, Zongjie Li, Shuai WangICSE 2024 · 4 citations
