Fun2Vec: a contrastive learning framework of function-level representation for binary

S RuiJin, G ShiZe, G JinHong, S Meng… - arXiv preprint arXiv …, 2022 - arxiv.org
S RuiJin, G ShiZe, G JinHong, S Meng, P ZhiSong
arXiv preprint arXiv:2209.02442, 2022arxiv.org
Function-level binary code similarity detection is essential in the field of cyberspace security.
It helps us find bugs and detect patent infringements in released software and plays a key
role in the prevention of supply chain attacks. A practical embedding learning framework
relies on the robustness of vector representation system of assembly code and the accuracy
of the annotation of function pairs. Supervised learning based methods are traditionally
emploied. But annotating different function pairs with accurate labels is very difficult. These …
Function-level binary code similarity detection is essential in the field of cyberspace security. It helps us find bugs and detect patent infringements in released software and plays a key role in the prevention of supply chain attacks. A practical embedding learning framework relies on the robustness of vector representation system of assembly code and the accuracy of the annotation of function pairs. Supervised learning based methods are traditionally emploied. But annotating different function pairs with accurate labels is very difficult. These supervised learning methods are easily overtrained and suffer from vector robustness issues. To mitigate these problems, we propose Fun2Vec: a contrastive learning framework of function-level representation for binary. We take an unsupervised learning approach and formulate the binary code similarity detection as instance discrimination. Fun2Vec works directly on disassembled binary functions, and could be implemented with any encoder. It does not require manual labeled similar or dissimilar information. We use the compiler optimization options and code obfuscation techniques to generate augmented data. Our experimental results demonstrate that our method surpasses the state-of-the-art in accuracy and have great advantage in few-shot settings.
arxiv.org
Showing the best result for this search. See all results