UniASM: Binary Code Similarity Detection without Fine-tuning
Authors:
Preprint
Abstract
Binary code similarity detection (BCSD) is widely used in various binary analysis tasks such as vulnerability search, malware detection, clone detection, and patch analysis. Recent studies have shown that the learning-based binary code embedding models perform better than the traditional feature-based approaches. In this paper, we propose a novel transformer-based binary code embedding model named UniASM to learn representations of the binary functions. We design two new training tasks to make the spatial distribution of the generated vectors more uniform, which can be used directly in BCSD without any fine-tuning. In addition, we present a new tokenization approach for binary functions, which increases the token's semantic information and mitigates the out-of-vocabulary (OOV) problem. We conduct an in-depth analysis of the factors affecting model performance through ablation experiments and obtain some new and valuable findings. The experimental results show that UniASM outperforms the state-of-the-art (SOTA) approach on the evaluation dataset. The average scores of Recall@1 on cross-compilers, cross-optimization levels, and cross-obfuscations are 0.77, 0.72, and 0.72. Besides, in the real-world task of known vulnerability search, UniASM outperforms all the current baselines.Keywords
All Related Versions
This publication has 10 references indexed in Scilit:
- Binary Code Similarity Detection through LSTM and Siamese Neural NetworkICST Transactions on Security and Safety, 2021
- Hierarchical Attention Graph Embedding Networks for Binary Code Similarity against Compilation DiversitySecurity and Communication Networks, 2021
- Bin2vec: learning representations of binary executable programs for security tasksCybersecurity, 2021
- BEDetector: A Two-Channel Encoding Method to Detect Vulnerabilities Based on Binary SimilarityIEEE Access, 2021
- Codee: A Tensor Embedding Scheme for Binary Code SearchIEEE Transactions on Software Engineering, 2021
- A Semantics-Based Hybrid Approach on Binary Code Similarity ComparisonIEEE Transactions on Software Engineering, 2019
- Accurate and Scalable Cross-Architecture Cross-OS Binary Code Search with EmulationIEEE Transactions on Software Engineering, 2018
- Cross-architecture bug search in binary executablesit - Information Technology, 2017
- Obfuscator-LLVM -- Software Protection for the Masses2015
- Control Flow-Based Malware VariantDetectionIEEE Transactions on Dependable and Secure Computing, 2014