A Neural-based Program Decompiler

06/28/2019
by   Cheng Fu, et al.
0

Reverse engineering of binary executables is a critical problem in the computer security domain. On the one hand, malicious parties may recover interpretable source codes from the software products to gain commercial advantages. On the other hand, binary decompilation can be leveraged for code vulnerability analysis and malware detection. However, efficient binary decompilation is challenging. Conventional decompilers have the following major limitations: (i) they are only applicable to specific source-target language pair, hence incurs undesired development cost for new language tasks; (ii) their output high-level code cannot effectively preserve the correct functionality of the input binary; (iii) their output program does not capture the semantics of the input and the reversed program is hard to interpret. To address the above problems, we propose Coda, the first end-to-end neural-based framework for code decompilation. Coda decomposes the decompilation task into two key phases: First, Coda employs an instruction type-aware encoder and a tree decoder for generating an abstract syntax tree (AST) with attention feeding during the code sketch generation stage. Second, Coda then updates the code sketch using an iterative error correction machine guided by an ensembled neural error predictor. By finding a good approximate candidate and then fixing it towards perfect, Coda achieves superior performance compared to baseline approaches. We assess Coda's performance with extensive experiments on various benchmarks. Evaluation results show that Coda achieves an average of 82% program recovery accuracy on unseen binary samples, where the state-of-the-art decompilers yield 0% accuracy. Furthermore, Coda outperforms the sequence-to-sequence model with attention by a margin of 70% program accuracy.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/10/2022

StructCoder: Structure-Aware Transformer for Code Generation

There has been a recent surge of interest in automating software enginee...
research
12/22/2021

Semantics-Recovering Decompilation through Neural Machine Translation

Decompilation transforms low-level program languages (PL) (e.g., binary ...
research
06/05/2023

LmPa: Improving Decompilation by Synergy of Large Language Model and Program Analysis

Decompilation aims to recover the source code form of a binary executabl...
research
01/29/2019

DeClassifier: Class-Inheritance Inference Engine for Optimized C++ Binaries

Recovering class inheritance from C++ binaries has several security bene...
research
02/11/2018

Tree-to-tree Neural Networks for Program Translation

Program translation is an important tool to migrate legacy code in one l...
research
06/25/2023

FastBCSD: Fast and Efficient Neural Network for Binary Code Similarity Detection

Binary code similarity detection (BCSD) has various applications, includ...
research
05/22/2018

EgoCoder: Intelligent Program Synthesis with Hierarchical Sequential Neural Network Model

Programming has been an important skill for researchers and practitioner...

Please sign up or login with your details

Forgot password? Click here to reset