Vulnerability Detection in C/C++ Code with Deep Learning

Zhen Huang, Amy Aumpansub
5/20/2024
cs.CRcs.LG

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

Deep learning has been shown to be a promising tool in detecting software vulnerabilities. In this work, we train neural networks with program slices extracted from the source code of C/C++ programs to detect software vulnerabilities. The program slices capture the syntax and semantic characteristics of vulnerability-related program constructs, including API function call, array usage, pointer usage, and arithmetic expression. To achieve a strong prediction model for both vulnerable code and non-vulnerable code, we compare different types of training data, different optimizers, and different types of neural networks. Our result shows that combining different types of characteristics of source code and using a balanced number of vulnerable program slices and non-vulnerable program slices produce a balanced accuracy in predicting both vulnerable code and non-vulnerable code. Among different neural networks, BGRU with the ADAM optimizer performs the best in detecting software vulnerabilities with an accuracy of 92.49%.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{huang2024vulnerability,
  title  = {Vulnerability Detection in C/C++ Code with Deep Learning},
  author = {Zhen Huang and Amy Aumpansub},
  year   = {2024},
  eprint = {2405.12384},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.12384v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.12384.svg)](https://codeofpaper.com/paper/2405.12384)

Discussion