arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.08131cs.SEcs.CR
收藏

游戏奖励漏洞:基于零和博弈与原型学习的软件漏洞检测

Game Rewards Vulnerabilities: Software Vulnerability Detection with Zero-Sum Game and Prototype Learning

Xin-Cheng Wen, Cuiyun Gao, Xinchen Wang, Ruiqi Wang, Tao Zhang, Qing Liao

AI总结:

本文提出RECON框架,通过零和博弈让校准器学习修复前后代码的语义无关差异,并结合原型学习增强检测器性能,在公开基准上F1分数超越最先进基线6.29%。

摘要:

近年来,自动化软件漏洞检测受到越来越多的关注。值得注意的是,基于深度学习(DL)的方法利用源代码隐式获取漏洞模式,已展现出优于其他方法的性能。然而,基于深度学习的方法仍然难以从整个代码片段中捕获与漏洞相关的信息,因为易受攻击的部分通常只占很小比例。正如我们的实验所证明的,这些方法往往过度强调语义信息,可能在实际场景中导致有限的漏洞检测性能。首先,由于代码改动极小,它们无法很好地区分开发者修复前(即易受攻击代码)和修复后(即非易受攻击代码)的代码片段。此外,将用户自定义标识符替换为占位符(例如“VAR1”和“FUN1”)会导致明显的性能下降,F1分数最多下降14.53%。为了缓解这些问题,我们提出利用易受攻击的代码片段和相应的修复后代码片段,其中极小的改动可以为漏洞检测提供与语义无关的特征提示。在本文中,我们提出了一种基于零和博弈和原型学习的软件漏洞检测框架,命名为RECON。在RECON中,我们提出了一个零和博弈构建模块。区分易受攻击代码与相应修复后代码被视为博弈中的一个参与者(即校准器Calibrator),而传统的漏洞检测则是零和博弈中的另一个参与者(即检测器Detector)。目标是捕获第一个参与者的与语义无关的特征,以增强第二个参与者在漏洞检测中的性能。在公开基准数据集上的实验表明,RECON在F1分数上比最先进的基线方法高出6.29%。

英文摘要:

Recent years have witnessed a growing focus on automated software vulnerability detection. Notably, deep learning (DL)-based methods, which employ source code for the implicit acquisition of vulnerability patterns, have demonstrated superior performance compared to other approaches. However, the DL-based approaches are still hard to capture the vulnerability-related information from the whole code snippet, since the vulnerable parts usually account for only a small proportion. As evidenced by our experiments, the approaches tend to excessively emphasize semantic information, potentially leading to limited vulnerability detection performance in practical scenarios. First, they cannot well distinguish between the code snippets before (i.e., vulnerable code) and after (i.e., non-vulnerable code) developers' fixes due to the minimal code changes. Besides, substituting user-defined identifiers with placeholders (e.g., "VAR1" and "FUN1") in obvious performance degradation at up to 14.53% with respect to the F1 score. To mitigate these issues, we propose to leverage the vulnerable and corresponding fixed code snippets, in which the minimal changes can provide hints about semantic-agnostic features for vulnerability detection. In this paper, we propose a software vulneRability dEteCtion framework with zerO-sum game and prototype learNing, named RECON. In RECON, we propose a zero-sum game construction module. Distinguishing the vulnerable code from the corresponding fixed code is regarded as one player (i.e. Calibrator), while the conventional vulnerability detection is another player (i.e. Detector) in the zero-sum game. The goal is to capture the semantic-agnostic features of the first player for enhancing the second player's performance for vulnerability detection. Experiments on the public benchmark dataset show that RECON outperforms the state-of-the-art baseline by 6.29% in F1 score.

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

↑