arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2410.07573cs.CRcs.CL
收藏

RealVul:我们能用 LLM 检测 Web 应用中的漏洞吗?

RealVul: Can We Detect Vulnerabilities in Web Applications with LLM?

School of Cyber Science and Technology, University of Science and Technology of China(中国科学技术大学网络空间安全学院)

Di Cao, Yong Liao, Xiuwei Shang

AI总结:

本文提出首个用于PHP漏洞检测的LLM框架RealVul,通过规范化技术隔离漏洞触发点并改进数据合成方法扩充样本,在180个PHP项目上使用5种代码LLM验证,显著提升了漏洞检测的有效性与泛化能力。

摘要:

大型语言模型(LLMs)的最新进展激发了人们对其在软件漏洞检测方面潜力的兴趣。然而,目前缺乏专门针对 PHP 语言漏洞的研究,且在提取样本和处理方面仍存在挑战,阻碍了模型有效捕获特定漏洞特征的能力。在本文中,我们提出了 RealVul,这是首个专为 PHP 漏洞检测设计的基于 LLM 的框架,旨在解决这些问题。通过漏洞候选检测方法并采用规范化等技术,我们能够隔离潜在的漏洞触发点,同时精简代码并消除不必要的语义信息,使模型能够更好地理解和学习生成的漏洞样本。我们还通过改进数据合成方法,解决了 PHP 漏洞样本不足的问题。为了评估 RealVul 的性能,我们使用 5 种不同的代码 LLM 对来自 180 个 PHP 项目的漏洞数据进行了广泛分析。结果表明,与现有方法相比,其在有效性和泛化能力上均有显著提升,有效增强了这些模型的漏洞检测能力。

英文摘要:

The latest advancements in large language models (LLMs) have sparked interest in their potential for software vulnerability detection. However, there is currently a lack of research specifically focused on vulnerabilities in the PHP language, and challenges in extracting samples and processing persist, hindering the model's ability to effectively capture the characteristics of specific vulnerabilities. In this paper, we present RealVul, the first LLM-based framework designed for PHP vulnerability detection, addressing these issues. By vulnerability candidate detection methods and employing techniques such as normalization, we can isolate potential vulnerability triggers while streamlining the code and eliminating unnecessary semantic information, enabling the model to better understand and learn from the generated vulnerability samples. We also address the issue of insufficient PHP vulnerability samples by improving data synthesis methods. To evaluate RealVul's performance, we conduct an extensive analysis using five distinct code LLMs on vulnerability data from 180 PHP projects. The results demonstrate a significant improvement in both effectiveness and generalization compared to existing methods, effectively boosting the vulnerability detection capabilities of these models.

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

↑