arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2602.23121cs.CRcs.AI
收藏

利用深度表示学习自动检测源代码中的漏洞

Automated Vulnerability Detection in Source Code Using Deep Representation Learning

Computer Science University of Cyprus(计算机科学 希腊塞浦路斯大学)

C. Seas, G. Fitzpatrick, J. A. Hamilton, M. C. Carlisle

AI总结:

本文提出利用深度学习模型自动检测C语言源代码中的漏洞,通过优化方法在高精度下提升召回率,并在复杂代码中发现真实漏洞。

摘要:

每年都会发现软件漏洞,这些漏洞可能带来显著的利用风险和系统破坏风险。我们提出了一种卷积神经网络模型,能够成功识别C代码中的错误。我们使用两个互补的数据集训练我们的模型:一个是由Draper Labs使用三个静态分析器创建的机器标注数据集,另一个是NIST SATE Juliet人为标注的数据集,专门用于测试静态分析器。与Russell等人在这些数据集上的工作相比,我们专注于C程序,使我们能够专门化和优化我们的检测技术以针对这种语言。在去除数据集中的重复项后,我们将输入转换为91个标记类别。类别值转换为二进制向量以节省内存。我们的第一个卷积层被选择,使得整个标记的编码被呈现给过滤器。我们使用两个卷积和池化层,随后是两个全连接层,将程序分类为常见弱点枚举类别或“干净”。我们在该数据集上获得比Russell等人更高的召回率,当要求高精度时。我们还展示了在自定义Linux内核数据集上,我们能够以低误报率发现复杂代码中的真实漏洞。

英文摘要:

Each year, software vulnerabilities are discovered, which pose significant risks of exploitation and system compromise. We present a convolutional neural network model that can successfully identify bugs in C code. We trained our model using two complementary datasets: a machine-labeled dataset created by Draper Labs using three static analyzers and the NIST SATE Juliet human-labeled dataset designed for testing static analyzers. In contrast with the work of Russell et al. on these datasets, we focus on C programs, enabling us to specialize and optimize our detection techniques for this language. After removing duplicates from the dataset, we tokenize the input into 91 token categories. The category values are converted to a binary vector to save memory. Our first convolution layer is chosen so that the entire encoding of the token is presented to the filter. We use two convolution and pooling layers followed by two fully connected layers to classify programs into either a common weakness enumeration category or as ``clean.'' We obtain higher recall than prior work by Russell et al. on this dataset when requiring high precision. We also demonstrate on a custom Linux kernel dataset that we are able to find real vulnerabilities in complex code with a low false-positive rate.

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

↑