CRCLPLDec 17, 2022

Beyond the C: Retargetable Decompilation using Neural Machine Translation

arXiv:2212.08950v136 citationsh-index: 2
Originality Incremental advance
AI Analysis

This work addresses the challenge of reverse engineering software by making decompilation more easily retargetable to new languages, though it is incremental as it builds on existing neural machine translation techniques.

The authors tackled the problem of decompiling assembly code to source code by proposing a neural decompiler that treats both assembly and source languages as plain text, achieving comparable results to prior work with significantly less language-specific domain knowledge.

The problem of reversing the compilation process, decompilation, is an important tool in reverse engineering of computer software. Recently, researchers have proposed using techniques from neural machine translation to automate the process in decompilation. Although such techniques hold the promise of targeting a wider range of source and assembly languages, to date they have primarily targeted C code. In this paper we argue that existing neural decompilers have achieved higher accuracy at the cost of requiring language-specific domain knowledge such as tokenizers and parsers to build an abstract syntax tree (AST) for the source language, which increases the overhead of supporting new languages. We explore a different tradeoff that, to the extent possible, treats the assembly and source languages as plain text, and show that this allows us to build a decompiler that is easily retargetable to new languages. We evaluate our prototype decompiler, Beyond The C (BTC), on Go, Fortran, OCaml, and C, and examine the impact of parameters such as tokenization and training data selection on the quality of decompilation, finding that it achieves comparable decompilation results to prior work in neural decompilation with significantly less domain knowledge. We will release our training data, trained decompilation models, and code to help encourage future research into language-agnostic decompilation.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes