SimCLF: A Simple Contrastive Learning Framework for Function-level Binary Embeddings

Sun RuiJin, Guo Shize, Guo Jinhong, Li Wei, Zhan Dazhi +2 more
9/6/2022
cs.CRcs.AIcs.LG
contrastive-ssl

Official code: iamawhalez/Fun2Vec (0 stars, Python, last commit 2023-05-28).

Abstract

Function-level binary code similarity detection is a crucial aspect of cybersecurity. It enables the detection of bugs and patent infringements in released software and plays a pivotal role in preventing supply chain attacks.

Show full abstract

A practical embedding learning framework relies on the robustness of the assembly code representation and the accuracy of function-pair annotation, which is traditionally accomplished using supervised learning-based frameworks. However, annotating different function pairs with accurate labels poses considerable challenges. These supervised learning methods can be easily overtrained and suffer from representation robustness problems. To address these challenges, we propose SimCLF: A Simple Contrastive Learning Framework for Function-level Binary Embeddings. We take an unsupervised learning approach and formulate binary code similarity detection as instance discrimination. SimCLF directly operates on disassembled binary functions and could be implemented with any encoder. It does not require manually annotated information but only augmented data. Augmented data is generated using compiler optimization options and code obfuscation techniques. The experimental results demonstrate that SimCLF surpasses the state-of-the-art in accuracy and has a significant advantage in few-shot settings.

View on arXivView PDF

Code Implementations(1)

iamawhalez/Fun2VecOfficial100%
00PythonAug 24, 20223 years ago

Similar Papers

Cite this paper

@article{ruijin2022simclf,
  title  = {SimCLF: A Simple Contrastive Learning Framework for Function-level Binary Embeddings},
  author = {Sun RuiJin and Guo Shize and Guo Jinhong and Li Wei and Zhan Dazhi and Sun Meng and Pan Zhisong},
  year   = {2022},
  eprint = {2209.02442},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2209.02442}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2209.02442.svg)](https://codeofpaper.com/paper/2209.02442)

Discussion