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

基于细粒度解释的漏洞检测

Vulnerability Detection with Fine-grained Interpretations

Yi Li, Shaohua Wang, Tien N. Nguyen

摘要:

尽管基于机器学习(ML)和深度学习(DL)的漏洞检测器(VD)取得了成功,但它们仅限于提供关于给定代码是否易受攻击的决策,而没有关于代码的哪一部分与检测到的漏洞相关的细节。我们提出了IVDetect一个可解释的漏洞检测器,其理念是使用人工智能(AI)来检测漏洞,同时使用智能助手(IA)通过提供VD解释易受攻击的语句。对于漏洞检测,我们通过数据和控制依赖分别考虑易受攻击的语句及其周围的上下文。这使得我们的模型更好地区分易受攻击的语句,而不是像现有方法那样使用易受攻击的代码和上下文代码的混合。除了粗粒度的漏洞检测结果外,我们还利用可解释的AI为用户提供细粒度的解释,包括程序依赖图(PDG)中的子图,以及与检测到的漏洞相关的关键语句。我们对漏洞数据库的实证评估表明,IVDetect在nDCG和MAP排名前10位的得分上比现有的基于DL的方法高出43%-84%和105%-255%。IVDetect通过其解释正确地指出了与漏洞相关的易受攻击的陈述-在67%的情况下排名前5位。它比基线解释模型的准确性提高了12.3%-400%和9%-400%。

英文摘要:

Despite the successes of machine learning (ML) and deep learning (DL) based vulnerability detectors (VD), they are limited to providing only the decision on whether a given code is vulnerable or not, without details on what part of the code is relevant to the detected vulnerability. We present IVDetect an interpretable vulnerability detector with the philosophy of using Artificial Intelligence (AI) to detect vulnerabilities, while using Intelligence Assistant (IA) via providing VD interpretations in terms of vulnerable statements. For vulnerability detection, we separately consider the vulnerable statements and their surrounding contexts via data and control dependencies. This allows our model better discriminate vulnerable statements than using the mixture of vulnerable code and~contextual code as in existing approaches. In addition to the coarse-grained vulnerability detection result, we leverage interpretable AI to provide users with fine-grained interpretations that include the sub-graph in the Program Dependency Graph (PDG) with the crucial statements that are relevant to the detected vulnerability. Our empirical evaluation on vulnerability databases shows that IVDetect outperforms the existing DL-based approaches by 43%--84% and 105%--255% in top-10 nDCG and MAP ranking scores. IVDetect correctly points out the vulnerable statements relevant to the vulnerability via its interpretation~in 67% of the cases with a top-5 ranked list. It improves over baseline interpretation models by 12.3%--400% and 9%--400% in accuracy.

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

↑