Extending Source Code Pre-Trained Language Models to Summarise Decompiled Binaries
Authors:
- 1 March 2023
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 260-271
Abstract
Binary reverse engineering is used to understand and analyse programs for which the source code is unavailable. Decompilers can help, transforming opaque binaries into a more readable source code-like representation. Still, reverse engineering is difficult and costly, involving considering effort in labelling code with helpful summaries. While the automated summarisation of decompiled code can help reverse engineers understand and analyse binaries, current work mainly focuses on summarising source code, and no suitable dataset exists for this task. In this work, we extend large pre-trained language models of source code to summarise de-compiled binary functions. Further-more, we investigate the impact of input and data properties on the performance of such models. Our approach consists of two main components; the data and the model. We first build CAPYBARA, a dataset of 214K decompiled function-documentation pairs across various compiler optimisations. We extend CAPYBARA further by removing identifiers, and deduplicating the data. Next, we fine-tune the CodeT5 base model with CAPYBARA to create BinT5. BinT5 achieves the state-of-the-art BLEU-4 score of 60.83, 58.82 and, 44.21 for summarising source, decompiled, and obfuscated decompiled code, respectively. This indicates that these models can be extended to decompiled binaries successfully. Finally, we found that the performance of BinT5 is not heavily dependent on the dataset size and compiler optimisation level. We recommend future research to further investigate transferring knowledge when working with less expressive input formats such as stripped binaries.Keywords
All Related Versions
This publication has 25 references indexed in Scilit:
- Type Inference on ExecutablesACM Computing Surveys, 2016
- On the naturalness of softwareCommunications of the ACM, 2016
- Measuring the robustness of source program obfuscation2014
- A Systematic Comparison of Smoothing Techniques for Sentence-Level BLEU2014
- Towards automatically generating summary comments for Java methods2010
- The Meteor metric for automatic evaluation of machine translationMachine Translation, 2009
- Cole2008
- Design of the moses decoder for statistical machine translation2008
- Long Short-Term MemoryNeural Computation, 1997
- Backpropagation Applied to Handwritten Zip Code RecognitionNeural Computation, 1989