SliceLocator:利用基于图的检测器定位易受攻击语句
SliceLocator: Locating Vulnerable Statements with Graph-based Detectors
AI总结:
针对现有深度学习漏洞检测器无法精确定位漏洞触发语句的问题,本文提出SliceLocator,结合基于图的检测器通过权重最高的污点流路径定位漏洞相关语句,在多种GNN检测器上准确率达约87%,优于现有可解释方法和语句级检测器。
摘要:
漏洞检测是软件开发生命周期中的关键组成部分。现有的漏洞检测器,尤其是基于深度学习(DL)模型的检测器,已实现了很高的检测效能。尽管它们能够从给定代码片段中检测出存在漏洞的代码段,但这类检测器通常无法进一步定位与漏洞相关的细粒度信息,例如精确的漏洞触发位置。虽然可解释性方法能够基于代码片段的预测结果筛选出重要语句,但由于模型主要学习的是有漏洞样本与无漏洞样本之间的差异,这类方法的效能受到了限制。本文提出了SliceLocator,与以往方法不同的是,它利用检测器对有漏洞样本与无漏洞样本之间差异的理解,本质上是对漏洞修复语句的理解。SliceLocator通过结合检测器,从程序中所有潜在的漏洞触发语句里选择权重最高的流路径,从而识别出最相关的污点流。我们的实验表明,SliceLocator在四种最先进的基于GNN的漏洞检测器上均表现稳定,在六种常见C/C++漏洞的漏洞触发语句标记任务中准确率约为87%,其性能优于五种广泛使用的基于GNN的可解释性方法以及两种语句级检测器。
英文摘要:
Vulnerability detection is a crucial component in the software development lifecycle. Existing vulnerability detectors, especially those based on deep learning (DL) models, have achieved high effectiveness. Despite their capability of detecting vulnerable code snippets from given code fragments, the detectors are typically unable to further locate the fine-grained information pertaining to the vulnerability, such as the precise vulnerability triggering locations. Although explanation methods can filter important statements based on the predictions of code fragments, their effectiveness is limited by the fact that the model primarily learns the difference between vulnerable and non-vulnerable samples. In this paper, we propose SliceLocator, which, unlike previous approaches, leverages the detector's understanding of the differences between vulnerable and non-vulnerable samples, essentially, vulnerability-fixing statements. SliceLocator identifies the most relevant taint flow by selecting the highest-weighted flow path from all potential vulnerability-triggering statements in the program, in conjunction with the detector. We demonstrate that SliceLocator consistently performs well on four state-of-the-art GNN-based vulnerability detectors, achieving an accuracy of around 87% in flagging vulnerability-triggering statements across six common C/C++ vulnerabilities. It outperforms five widely used GNN-based explanation methods and two statement-level detectors.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。