BLens: Contrastive Captioning of Binary Functions using Ensemble Embedding

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Benoit, Tristan, Wang, Yunru, Dannehl, Moritz, Kinder, Johannes
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866917909300772864
author Benoit, Tristan
Wang, Yunru
Dannehl, Moritz
Kinder, Johannes
author_facet Benoit, Tristan
Wang, Yunru
Dannehl, Moritz
Kinder, Johannes
contents Function names can greatly aid human reverse engineers, which has spurred the development of machine learning-based approaches to predicting function names in stripped binaries. Much current work in this area now uses transformers, applying a metaphor of machine translation from code to function names. Still, function naming models face challenges in generalizing to projects unrelated to the training set. In this paper, we take a completely new approach by transferring advances in automated image captioning to the domain of binary reverse engineering, such that different parts of a binary function can be associated with parts of its name. We propose BLens, which combines multiple binary function embeddings into a new ensemble representation, aligns it with the name representation latent space via a contrastive learning approach, and generates function names with a transformer architecture tailored for function names. Our experiments demonstrate that BLens significantly outperforms the state of the art. In the usual setting of splitting per binary, we achieve an $F_1$ score of 0.79 compared to 0.70. In the cross-project setting, which emphasizes generalizability, we achieve an $F_1$ score of 0.46 compared to 0.29. Finally, in an experimental setting reducing shared components across projects, we achieve an $F_1$ score of $0.32$ compared to $0.19$.
format Preprint
id arxiv_https___arxiv_org_abs_2409_07889
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle BLens: Contrastive Captioning of Binary Functions using Ensemble Embedding
Benoit, Tristan
Wang, Yunru
Dannehl, Moritz
Kinder, Johannes
Machine Learning
Cryptography and Security
Function names can greatly aid human reverse engineers, which has spurred the development of machine learning-based approaches to predicting function names in stripped binaries. Much current work in this area now uses transformers, applying a metaphor of machine translation from code to function names. Still, function naming models face challenges in generalizing to projects unrelated to the training set. In this paper, we take a completely new approach by transferring advances in automated image captioning to the domain of binary reverse engineering, such that different parts of a binary function can be associated with parts of its name. We propose BLens, which combines multiple binary function embeddings into a new ensemble representation, aligns it with the name representation latent space via a contrastive learning approach, and generates function names with a transformer architecture tailored for function names. Our experiments demonstrate that BLens significantly outperforms the state of the art. In the usual setting of splitting per binary, we achieve an $F_1$ score of 0.79 compared to 0.70. In the cross-project setting, which emphasizes generalizability, we achieve an $F_1$ score of 0.46 compared to 0.29. Finally, in an experimental setting reducing shared components across projects, we achieve an $F_1$ score of $0.32$ compared to $0.19$.
title BLens: Contrastive Captioning of Binary Functions using Ensemble Embedding
topic Machine Learning
Cryptography and Security
url https://arxiv.org/abs/2409.07889