StackSight:通过大语言模型与神经符号链式思维反编译揭示 WebAssembly
StackSight: Unveiling WebAssembly through Large Language Models and Neurosymbolic Chain-of-Thought Decompilation
AI总结:
StackSight 结合大语言模型与静态程序分析,通过跟踪虚拟栈变化和链式思维提示,将复杂 WebAssembly 代码反编译为可读 C++ 片段,显著提升反编译质量和代码语义理解。
摘要:
WebAssembly 能够在 Web 应用中实现接近原生的执行性能,并越来越多地被用于对高性能和强安全性有要求的任务。然而,其类似汇编的语法、隐式栈机以及低级数据类型使得人类开发者极难理解,从而催生了对有效 WebAssembly 逆向工程技术的需求。在本文中,我们提出 StackSight,这是一种新颖的神经符号方法,它将大语言模型(LLMs)与高级程序分析相结合,将复杂的 WebAssembly 代码反编译为可读的 C++ 代码片段。StackSight 通过静态分析算法可视化并跟踪虚拟栈的变化,然后应用链式思维提示来利用 LLM 的复杂推理能力。评估结果表明,StackSight 显著改善了 WebAssembly 反编译效果。我们的用户研究还表明,由 StackSight 生成的代码片段具有显著更高的胜率,并且能够帮助用户更好地把握代码语义。
英文摘要:
WebAssembly enables near-native execution in web applications and is increasingly adopted for tasks that demand high performance and robust security. However, its assembly-like syntax, implicit stack machine, and low-level data types make it extremely difficult for human developers to understand, spurring the need for effective WebAssembly reverse engineering techniques. In this paper, we propose StackSight, a novel neurosymbolic approach that combines Large Language Models (LLMs) with advanced program analysis to decompile complex WebAssembly code into readable C++ snippets. StackSight visualizes and tracks virtual stack alterations via a static analysis algorithm and then applies chain-of-thought prompting to harness LLM's complex reasoning capabilities. Evaluation results show that StackSight significantly improves WebAssembly decompilation. Our user study also demonstrates that code snippets generated by StackSight have significantly higher win rates and enable a better grasp of code semantics.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。