arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2502.04536cs.SEcs.CR
收藏

Idioms:联合代码与类型定义预测的神经反编译

Idioms: Neural Decompilation With Joint Code and Type Definition Prediction

Luke Dramko, Claire Le Goues, Edward J. Schwartz

AI总结:

针对现有神经反编译方法无法定义复合类型、难应用于真实代码的问题,研究提出Idioms方法微调任意LLM实现代码与类型定义联合生成,构建Realtype数据集,在多个基准上取得SOTA结果。

摘要:

反编译器是逆向工程师的重要工具,可帮助他们以比汇编代码更高的抽象层级分析软件。但遗憾的是,由于编译过程存在信息损耗,确定性反编译器生成的代码会缺失许多原本让源代码具备可读性的细节,例如变量名和类型。而神经反编译器则能够通过统计方式补全这些细节。不过,现有的神经反编译研究存在诸多严重局限,无法应用于真实代码,比如无法定义复合类型——这对完整明确函数语义至关重要。本研究中,我们推出了新数据集Realtype,其包含的类型比现有神经反编译基准的类型复杂且真实得多;同时提出了新的神经反编译方法Idioms,可将任意大语言模型(LLM)微调为神经反编译器,能够在生成反编译代码的同时生成相应的用户自定义类型定义。实验表明,我们的方法在神经反编译任务上取得了当前最优结果。在现有最具挑战性的基准ExeBench上,我们的模型准确率达到54.4%,而LLM4Decompile为46.3%,Nova为37.5%;在Realtype数据集上,我们的模型性能至少提升了95%。

英文摘要:

Decompilers are important tools for reverse engineers that help them analyze software at a higher level of abstraction than assembly code. Unfortunately, because compilation is lossy, deterministic decompilers produce code that is missing many of the details that make source code readable in the first place, like variable names and types. Neural decompilers, on the other hand, offer the ability to statistically fill in these details. Existing work in neural decompilation, however, suffers from substantial limitations that preclude its use on real code, such as the inability to define composite types, which is essential to fully specify function semantics. In this work, we introduce a new dataset, Realtype, that includes substantially more complicated and realistic types than existing neural decompilation benchmarks, and Idioms, a new neural decompilation approach to finetune any LLM into a neural decompiler capable of generating the appropriate user-defined type definitions alongside the decompiled code. We show that our approach yields state-of-the-art results in neural decompilation. On the most challenging existing benchmark, ExeBench, our model achieves 54.4% accuracy vs. 46.3% for LLM4Decompile and 37.5% for Nova; on Realtype, our model performs at least 95% better.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑