arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.13597cs.CRcs.SE
收藏

APPATCH:用于真实世界软件漏洞修补的自动化自适应提示大型语言模型

APPATCH: Automated Adaptive Prompting Large Language Models for Real-World Software Vulnerability Patching

Yu Nong, Haoran Yang, Long Cheng, Hongxin Hu, Haipeng Cai

AI总结:

本文提出基于LLM的自动化漏洞补丁系统APPATCH,通过漏洞语义推理和自适应提示技术,在无需测试输入和模型微调的情况下生成补丁,在多个漏洞数据集上表现优于现有方法。

摘要:

及时有效的漏洞修补对网络安全防御至关重要,尽管已提出多种方法,但它们在为真实世界漏洞生成有效且正确的补丁方面仍存在困难。本文利用预训练大型语言模型(LLMs)的能力与优势,在无需测试输入/漏洞利用证据且无需模型训练/微调的情况下,实现自动化漏洞修补。为促使LLMs有效地对漏洞代码行为进行推理(这对生成高质量补丁至关重要),我们引入了漏洞语义推理和自适应提示技术,并将该方法具体化为一个基于LLM的自动化补丁系统APPATCH。我们在97个零日漏洞和20个现有漏洞上对APPATCH进行了评估,结果表明其性能优于现有的提示方法和最先进的非基于LLM的技术(与最佳基线相比,F1最高提升28.33%,召回率最高提升182.26%)。通过APPATCH,我们展示了哪些因素有助于基于LLM的修补及其原理,并讨论了当前仍缺乏的内容及原因。

英文摘要:

Timely and effective vulnerability patching is essential for cybersecurity defense, for which various approaches have been proposed yet still struggle to generate valid and correct patches for real-world vulnerabilities. In this paper, we leverage the power and merits of pre-trained language language models (LLMs) to enable automated vulnerability patching using no test input/exploit evidence and without model training/fine-tuning. To elicit LLMs to effectively reason about vulnerable code behaviors, which is essential for quality patch generation, we introduce vulnerability semantics reasoning and adaptive prompting on LLMs and instantiate the methodology as APPATCH, an automated LLM-based patching system. Our evaluation of APPATCH on 97 zero-day vulnerabilities and 20 existing vulnerabilities demonstrates its superior performance to both existing prompting methods and state-of-the-art non-LLM-based techniques (by up to 28.33% in F1 and 182.26% in recall over the best baseline). Through APPATCH, we demonstrate what helps for LLM-based patching and how, as well as discussing what still lacks and why.

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

↑