Bin2Summary: Beyond Function Name Prediction in Stripped Binaries with Functionality-Specific Code Embeddings
Open Access
- 12 July 2024
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 1 (FSE) , 47-69
Abstract
Nowadays, closed-source software only with stripped binaries still dominates the ecosystem, which brings obstacles to understanding the functionalities of the software and further conducting the security analysis. With such an urgent need, research has traditionally focused on predicting function names, which can only provide fragmented and abbreviated information about functionality. To advance the state-of-the-art, this paper presents B in 2S ummary to automatically summarize the functionality of the function in stripped binaries with natural language sentences. Specifically, the proposed framework includes a functionality-specific code embedding module to facilitate fine-grained similarity detection and an attention-based seq2seq model to generate summaries in natural language. Based on 16 widely-used projects ( e.g ., Coreutils ), we have evaluated B in 2S ummary with 38 , 167 functions, which are filtered from 162 , 406 functions, and all of them have a high-quality comment. B in 2S ummary achieves 0.728 in precision and 0.729 in recall on our datasets, and the functionality-specific embedding module can improve the existing assembly language model by up to 109.5 % and 109.9 % in precision and recall. Meanwhile, the experiments demonstrated that B in 2S ummary has outstanding transferability in analyzing the cross-architecture ( i.e ., in x64 and x86) and cross-environment ( i.e ., in Cygwin and MSYS2 ) binaries. Finally, the case study illustrates how B in 2S ummary outperforms the existing works in providing functionality summaries with abundant semantics beyond function names.Keywords
Funding Information
- Hong Kong S.A.R. Research Grants Council (RGC) General Research (14209720)
This publication has 46 references indexed in Scilit:
- Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Tasks2021
- How to Make Attention Mechanisms More Practical in Malware ClassificationIEEE Access, 2019
- SpotTune: Transfer Learning Through Adaptive Fine-Tuning2019
- Asm2Vec: Boosting Static Representation Robustness for Binary Clone Search against Code Obfuscation and Compiler Optimization2019
- A Neural Model for Generating Natural Language Summaries of Program Subroutines2019
- A deep Recurrent Neural Network based approach for Internet of Things malware threat huntingFuture Generation Computer Systems, 2018
- Automatically generating commit messages from diffs using neural machine translation2017
- CloCom: Mining existing source code for automatic comment generation2015
- Program Logic Based Software Plagiarism Detection2014
- Automatic generation of natural language summaries for Java classes2013