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

传统特征提取与轻量级模型能否提升漏洞类型识别的性能?

Can An Old Fashioned Feature Extraction and A Light-weight Model Improve Vulnerability Type Identification Performance?

Hieu Dinh Vo, Son Nguyen

AI总结:

本研究针对漏洞类型识别问题,提出一种基于传统TF-IDF基线方法并引入轻量级独立组件以优化预测的方案,在保持高效率的同时性能优于深度预训练模型,并能显著提升神经网络方法的宏平均F1分数。

摘要:

自动化漏洞检测的最新进展在帮助开发者确定易受攻击的组件方面取得了潜在的成果。然而,在检测到漏洞之后,调查并修复易受攻击的代码是一项艰巨的任务。事实上,漏洞的类型(如缓冲区溢出或内存损坏)可以帮助开发者快速理解弱点的本质,并定位漏洞以进行安全分析。在本研究中,我们探讨了漏洞类型识别(VTI)问题。该问题被建模为多标签分类任务,可以通过带有深度预训练嵌入模型的“预训练,然后微调”框架来有效解决。我们在大量漏洞数据集上评估了知名且先进的预训练模型在VTI上的性能。令人惊讶的是,它们的性能并不比使用传统的词袋模型、TF-IDF的经典基线方法好多少。同时,这些深度神经网络方法消耗的资源要多得多,并且需要GPU。我们还引入了一个轻量级的独立组件来优化基线方法的预测。我们的想法是,漏洞类型可能与程序中几个关键部分的某些代码标记(区分性标记)强相关。每种漏洞类型的区分性标记是基于它们在该类型与其他类型中的普遍性进行统计识别的。我们的结果表明,由我们的组件增强的基线方法能够优于最先进的深度预训练方法,同时保持极高的效率。此外,所提出的组件还可以将神经网络方法的宏平均F1分数提高多达92.8%。

英文摘要:

Recent advances in automated vulnerability detection have achieved potential results in helping developers determine vulnerable components. However, after detecting vulnerabilities, investigating to fix vulnerable code is a non-trivial task. In fact, the types of vulnerability, such as buffer overflow or memory corruption, could help developers quickly understand the nature of the weaknesses and localize vulnerabilities for security analysis. In this work, we investigate the problem of vulnerability type identification (VTI). The problem is modeled as the multi-label classification task, which could be effectively addressed by "pre-training, then fine-tuning" framework with deep pre-trained embedding models. We evaluate the performance of the well-known and advanced pre-trained models for VTI on a large set of vulnerabilities. Surprisingly, their performance is not much better than that of the classical baseline approach with an old-fashioned bag-of-word, TF-IDF. Meanwhile, these deep neural network approaches cost much more resources and require GPU. We also introduce a lightweight independent component to refine the predictions of the baseline approach. Our idea is that the types of vulnerabilities could strongly correlate to certain code tokens (distinguishing tokens) in several crucial parts of programs. The distinguishing tokens for each vulnerability type are statistically identified based on their prevalence in the type versus the others. Our results show that the baseline approach enhanced by our component can outperform the state-of-the-art deep pre-trained approaches while retaining very high efficiency. Furthermore, the proposed component could also improve the neural network approaches by up to 92.8% in macro-average F1.

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

↑