用自动反馈和搜索提升神经反编译准确率
Decaf: Improving Neural Decompilation with Automatic Feedback and Search
- 利用编译器反馈引导搜索优化反编译结果
- 在Real -O2数据集上准确率从26.0%提升至83.9%
- 适合需要高语义正确性的逆向工程研究者
反编译器在逆向工程中用于理解编译后的二进制代码。将二进制文件还原为高级源代码极具挑战性,因编译过程会丢失高阶语法、标识符及自定义数据类型。确定性反编译器虽有用,但难以推断出符合习惯的语法和命名。生成式AI模型适合重建高阶结构,但仍可能产生不正确的编程构造与语义。我们提出,无需增加数据或训练,仅通过编译器反馈即可显著提升神经反编译的语义正确性。所提出的系统Decaf(DECompilation with Automated Feedback)在ExeBench上将反编译率从26.0%提升至83.9%(针对Real -O2测试集),且未牺牲与原始源码的相似性。此外,该自动反馈方法对较弱的神经反编译模型也表现出强有效性。
原文摘要 · Abstract (English)
Decompilers are useful tools used in reverse engineering to understand compiled source code. Reconstructing source code from compiled binaries is a challenging task, because high-level syntax, identifiers, and custom data types are generally lost as the compiler translates human-readable code to low-level machine code. Deterministic decompilers are useful tools for binary analysis, but can struggle to infer idiomatic syntax and identifier names. Generative AI models are a natural fit for reconstructing high-level syntax, identifiers, and types, but they can still suffer by hallucinating improper programming constructs and semantics. Instead of attempting to improve neural decompilers with more data and more training, we argue that compiler feedback can be used to dramatically improve the semantic correctness of neural decompiler outputs via search. Our system, Decaf (DECompilation with Automated Feedback), raises the neural decompilation rate from 26.0% on ExeBench to 83.9% on the Real -O2 split without sacrificing similarity to the original source code. We also find our automatic feedback methodology is highly effective for improving weaker neural decompilation models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。