Augmenting Decompiler Output with Learned Variable Names and Types
arXiv:2108.06363
Abstract
A common tool used by security professionals for reverse-engineering binaries found in the wild is the decompiler. A decompiler attempts to reverse compilation, transforming a binary to a higher-level language such as C. High-level languages ease reasoning about programs by providing useful abstractions such as loops, typed variables, and comments, but these abstractions are lost during compilation. Decompilers are able to deterministically reconstruct structural properties of code, but comments, variable names, and custom variable types are technically impossible to recover. In this paper we present DIRTY (DecompIled variable ReTYper), a novel technique for improving the quality of decompiler output that automatically generates meaningful variable names and types. Empirical evaluation on a novel dataset of C code mined from GitHub shows that DIRTY outperforms prior work approaches by a sizable margin, recovering the original names written by developers 66.4% of the time and the original types 75.8% of the time.
arXiv comment17 pages to be published in USENIX Security '22
References in corpus (15)
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- PyTorch: An Imperative Style, High-Performance Deep Learning Library
- Show, Attend and Tell: Neural Image Caption Generation with Visual Attention
- Gaussian Error Linear Units (GELUs)
- Language Models are Few-Shot Learners
- Generating Long Sequences with Sparse Transformers
- Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity
- Big Bird: Transformers for Longer Sequences
- Towards a Human-like Open-Domain Chatbot
- Neural Reverse Engineering of Stripped Binaries using Augmented Control Flow Graphs
- LambdaNet: Probabilistic Type Inference using Graph Neural Networks
- OptTyper: Probabilistic Type Inference by Optimising Logical and Natural Constraints
- Towards Neural Decompilation
- Advanced Graph-Based Deep Learning for Probabilistic Type Inference
- Improving type information inferred by decompilers with supervised machine learning