Skip to main content
QUICK REVIEW

[论文解读] Learning To Predict Vulnerabilities From Vulnerability-Fixes: A Machine Translation Approach

Aayush Garg, Renzo Degiovanni|arXiv (Cornell University)|Dec 21, 2020
Software Engineering Research参考文献 38被引用 5
一句话总结

该论文提出了一种受机器翻译启发的编码器-解码器模型,通过利用历史漏洞修复记录及其代码上下文,自动学习并预测软件漏洞,无需人工特征工程。在Linux内核、OpenSSL和Wireshark上的评估表明,该方法在真实训练环境下性能显著提升——Matthews相关系数(MCC)提高了4.7倍,优于当前最先进技术。

ABSTRACT

Vulnerability prediction refers to the problem of identifying the system components that are most likely to be vulnerable based on the information gained from historical data. Typically, vulnerability prediction is performed using manually identified features that are potentially linked with vulnerable code. Unfortunately, recent studies have shown that existing approaches are ineffective when evaluated in realistic settings due to some unavoidable noise included in the historical data. To deal with this issue, we develop a prediction method using the encoder-decoder framework of machine translation that automatically learns the latent features (context, patterns, etc.) of code that are linked with vulnerabilities. The key idea of our approach is to learn from things we know, the past vulnerability fixes and their context. We evaluate our approach by comparing it with existing techniques on available releases of the three security-critical open source systems (Linux Kernel, OpenSSL, and Wireshark) with historical vulnerabilities that have been reported in the National Vulnerability Database (NVD). Our evaluation demonstrates that the prediction capability of our approach significantly outperforms the state-of-the-art vulnerability prediction techniques (Software Metrics, Imports, Function Calls, and Text Mining) in both recall and precision values (yielding 4.7 times higher MCC values) under realistic training setting.

研究动机与目标

  • 解决现有漏洞预测技术依赖手工构造特征且对历史数据中的噪声敏感的局限性。
  • 在历史数据不可避免地包含噪声的真实场景下,提升预测性能。
  • 开发一种自动化方法,从过去漏洞修复及其周围代码上下文中学习潜在模式。
  • 在精确率和召回率方面均优于最先进的方法,如软件度量、导入依赖、函数调用和文本挖掘技术。

提出的方法

  • 该方法采用受序列到序列机器翻译模型启发的编码器-解码器神经网络架构。
  • 编码器处理漏洞修复的上下文(例如,周围代码变更)以生成上下文表示。
  • 解码器生成对给定代码组件是否具有漏洞的预测,将漏洞预测视为序列生成任务。
  • 模型在从版本控制系统和NVD记录中提取的历史漏洞-修复配对数据上进行端到端训练。
  • 该方法能自动从与漏洞相关的代码模式和结构变更中学习复杂且潜在的特征。
  • 该框架在模拟真实世界部署场景的现实训练条件下进行评估,包含噪声历史数据。

实验结果

研究问题

  • RQ1在真实且含噪声的训练环境中,受机器翻译启发的模型能否优于传统漏洞预测方法?
  • RQ2从过去漏洞修复中学习,与手工构造特征相比,能在多大程度上提升预测准确率?
  • RQ3与最先进技术相比,该方法在精确率、召回率和MCC方面的表现如何?
  • RQ4该模型能否在Linux内核、OpenSSL和Wireshark等多样化且安全关键的开源系统上实现良好泛化?

主要发现

  • 在真实训练环境下,该方法相比现有最先进技术,Matthews相关系数(MCC)提高了4.7倍。
  • 在Linux内核、OpenSSL和Wireshark三个系统中,该模型在精确率和召回率方面均表现出色。
  • 该方法显著减少了对手工特征的依赖,实现了对代码中潜在漏洞模式的自动发现。
  • 编码器-解码器框架有效捕捉了与漏洞相关的代码变更中的上下文和结构模式。
  • 即使在噪声历史数据上进行训练,该模型仍保持高性能,优于基于特征的基线方法,在真实条件下表现更优。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。