表面可编译与行为失真:大模型反编译器的隐形代价
原标题:When LLM Decompilers Recompile More and Preserve Less
Summary of Thought Process
Alright, let's get this translation right. The source describes a computer science paper on decompilation, and my task is to produce a Simplified Chinese version. I need to be precise, professional, and stick to the text without adding my own opinions. The text is straightforward, so I'll first break it down sentence by sentence. I'll translate the core technical terms accurately, especially those specific to decompilation and LLMs. I'll need to pay close attention to terms like "recompilability," "re-executability," and "behavioral comparison oracle," and make sure the Chinese equivalents are used consistently. "Driver," "fuzzing corpus," and the nuances of phrases like "reward the wrong path" and "come apart" also need careful consideration. I have to make sure my translations reflect the technical and academic rigor of the original content. Lastly, I'll review my translation to ensure the flow is smooth and natural and that no meaning is lost in translation.
反编译从编译后的机器码中恢复高级源代码,是漏洞检测和恶意软件分析等安全任务的基础。像 Ghidra 和 Hex-Rays 这样的传统反编译器会将无法解析的内容直接作为可见的占位符暴露出来,且通常生成无法编译或执行的伪代码;而基于大语言模型(LLM)的反编译器能生成整洁、规范的 C 代码,目前对其评估几乎完全依赖于可重编译性与可重执行性:即输出能否成功构建并通过其自带的输入/输出测试。我们证明了这些指标可能会助长错误的方向:一个函数可能能够成功重编译并通过所有自带测试,但在其他合法输入上却出现行为分歧;已披露的漏洞也可能会从重编译后的代码中消失,且不留下任何可见的崩溃痕迹。现有的测试套件均无法捕获这两种缺陷。为填补这一空白,我们提出了 Decompile-Diverge,一种不依赖固定或手工编写测试的行为比对预言机:它为每个函数合成驱动程序,基于基准实现扩充模糊测试语料库,并在相同输入下重新运行反编译代码,以检测函数行为的变化。在成熟的 LLM 反编译语料库上对 8 个系统的 9 种配置进行评估,结果显示,即使通过了所有自带测试的候选代码,在我们的输入语料库上仍与原代码存在行为分歧:总体分歧率为 4.9%,单一系统最高可达 13%。在 300 个真实的 GitHub 库函数和 287 个基于 CVE 的函数上,可重编译性与行为一致性甚至可能发生脱节:性能最强的优化 LLM 将 Ghidra 的构建成功率从 75% 提升至 90%,但其匹配率(Matched rate)却从 74% 降至 62%;在已披露的漏洞中,其输出有多达十分之一表现出“崩溃缺失”(Crash Absence)。源码级分析表明,这种分歧归因于模型引入了新的字段、类型、被调用函数和守卫条件,以此替换了传统工具所留下的可见未知项。
为什么值得读
揭示了代码大模型以“可运行”替代“语义保真”的度量陷阱,对依赖 AI 进行逆向工程和漏洞审计的安全从业者尤为关键。