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

LLM4Vuln:一个用于解耦并增强大语言模型漏洞推理能力的统一评估框架

LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoning

Nanyang Technological University, Singapore(南洋理工大学);The Hong Kong University of Science(香港科学与技术大学);MetaTrust Labs(MetaTrust实验室);Singapore Management University, Singapore(新加坡管理学院);University of Oregon, Eugene, OR, USA(俄勒冈大学)

Yuqiang Sun, Daoyuan Wu, Yue Xue, Han Liu, Wei Ma, Lyuye Zhang, Yang Liu, Yingjiu Li

AI总结:

本文提出LLM4Vuln框架与UniVul基准,通过3,528个受控场景解耦并评估六款LLM的漏洞推理能力,揭示各类增强手段的影响并发现14个零日漏洞。

摘要:

大语言模型(LLM)已在包括漏洞检测等需要人类水平智能的各类任务中展现出巨大潜力。然而,近期利用LLM进行漏洞检测的工作仍处于初步阶段,因为这些工作未能深入理解受测LLM的漏洞推理能力究竟源于模型本身,还是来自知识检索和工具支持等外部辅助。本文旨在将LLM的漏洞推理能力与漏洞知识采纳、上下文信息检索以及高级提示方案等其他能力解耦。我们提出LLM4Vuln这一统一评估框架,用于分离并评估LLM的漏洞推理能力,同时考察其在结合其他增强手段时的改进。为支撑该评估,我们构建了UniVul,这是首个在Solidity、Java和C/C++三种代表性编程语言中提供可检索知识和可补充上下文代码的基准。借助LLM4Vuln和UniVul,我们在3,528个受控场景中,针对147个真实漏洞和147个非漏洞案例测试了六款代表性LLM(GPT-4.1、Phi-3、Llama-3、o4-mini、DeepSeek-R1和QwQ-32B)。研究结果揭示了知识增强、上下文补充和提示方案带来的不同影响。我们还在四个试点漏洞赏金计划中发现了14个零日漏洞,并获得3,576美元赏金。

英文摘要:

Large language models (LLMs) have demonstrated significant potential in various tasks, including those requiring human-level intelligence, such as vulnerability detection. However, recent efforts to use LLMs for vulnerability detection remain preliminary, as they lack a deep understanding of whether a subject LLM's vulnerability reasoning capability stems from the model itself or from external aids such as knowledge retrieval and tooling support. In this paper, we aim to decouple LLMs' vulnerability reasoning from other capabilities, such as vulnerability knowledge adoption, context information retrieval, and advanced prompt schemes. We introduce LLM4Vuln, a unified evaluation framework that separates and assesses LLMs' vulnerability reasoning capabilities and examines improvements when combined with other enhancements. To support this evaluation, we construct UniVul, the first benchmark that provides retrievable knowledge and context-supplementable code across three representative programming languages: Solidity, Java, and C/C++. Using LLM4Vuln and UniVul, we test six representative LLMs (GPT-4.1, Phi-3, Llama-3, o4-mini, DeepSeek-R1, and QwQ-32B) for 147 ground-truth vulnerabilities and 147 non-vulnerable cases in 3,528 controlled scenarios. Our findings reveal the varying impacts of knowledge enhancement, context supplementation, and prompt schemes. We also identify 14 zero-day vulnerabilities in four pilot bug bounty programs, resulting in $3,576 in bounties.

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

↑