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

大型语言模型在二进制代码理解中的有效性实证研究

An Empirical Study on the Effectiveness of Large Language Models for Binary Code Understanding

Xiuwei Shang, Zhenkan Fu, Shaoyin Cheng, Guoqiang Chen, Gangyang Li, Li Hu, Weiming Zhang, Nenghai Yu

AI总结:

本研究提出了一个评估大型语言模型在真实逆向工程场景中理解二进制代码有效性的基准,涵盖函数名恢复和代码摘要任务,实验表明LLMs能一定程度提升分析效率并具有巨大潜力。

摘要:

二进制代码分析在软件安全领域起着关键作用,被广泛应用于软件维护、恶意软件检测、软件漏洞发现、补丁分析等任务中。然而,与源代码不同,由于缺乏直观的语义信息,逆向工程师在理解二进制代码时面临重大挑战。尽管传统的逆向工具可以将二进制代码转换为类C伪代码,但缺乏代码注释和函数名等符号信息仍然使得代码理解变得困难。近年来,两组技术展现了令人瞩目的前景:(1)基于深度学习的技术在与二进制代码理解相关的任务中展示了具有竞争力的结果,此外,(2)大型语言模型(LLMs)已在源代码级别进行了广泛预训练,用于代码理解和生成等任务。这让参与者对LLMs在二进制代码理解方面的能力产生了疑问。为此,本研究提出了一个基准,用于评估LLMs在真实逆向工程场景中的有效性,该基准涵盖两个关键的二进制代码理解任务,即函数名恢复和二进制代码摘要。为了更全面地评估,我们包含了具有多种目标架构以及不同优化选项的二进制文件。通过使用我们的基准对流行的LLMs进行广泛的实证研究,我们获得了关于其能力和局限性的宝贵见解。我们的评估表明,现有的LLMs能够在一定程度上理解二进制代码,从而提高二进制代码分析的效率。我们的结果突出了LLMs在推动二进制代码理解领域发展方面的巨大潜力,并为二进制代码分析技术提供了新的方向。

英文摘要:

Binary code analysis plays a pivotal role in the field of software security and is widely used in tasks such as software maintenance, malware detection, software vulnerability discovery, patch analysis, etc. However, unlike source code, reverse engineers face significant challenges in understanding binary code due to the lack of intuitive semantic information. Although traditional reverse tools can convert binary code into C-like pseudo code, the lack of code comments and symbolic information such as function names still makes code understanding difficult. In recent years, two groups of techniques have shown promising prospects: (1) Deep learning-based techniques have demonstrated competitive results in tasks related to binary code understanding, furthermore, (2) Large Language Models (LLMs) have been extensively pre-trained at the source-code level for tasks such as code understanding and generation. This has left participants wondering about the capabilities of LLMs in binary code understanding. To this end, this work proposes a benchmark to evaluate the effectiveness of LLMs in real-world reverse engineering scenarios, which covers two key binary code understanding tasks, i.e., function name recovery and binary code summarization. To more comprehensively evaluate, we include binaries with multiple target architectures as well as different optimization options. We gain valuable insights into the capabilities and limitations through extensive empirical studies of popular LLMs using our benchmark. Our evaluations reveal that existing LLMs can understand binary code to a certain extent, thereby improving the efficiency of binary code analysis. Our results highlight the great potential of the LLMs in advancing the field of binary code understanding, and provide new directions for binary code analysis techniques.

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

↑