Stack-based Buffer Overflow Detection using Recurrent Neural Networks

William Arild Dahl, Laszlo Erdodi, Fabio Massimo Zennaro
12/30/2020
cs.CRcs.LG

Official code: williamadahl/RNN-for-Vulnerability-Detection (11 stars, C, last commit 2020-06-16).

Abstract

Detecting vulnerabilities in software is a critical challenge in the development and deployment of applications. One of the most known and dangerous vulnerabilities is stack-based buffer overflows, which may allow potential attackers to execute malicious code.

Show full abstract

In this paper we consider the use of modern machine learning models, specifically recurrent neural networks, to detect stack-based buffer overflow vulnerabilities in the assembly code of a program. Since assembly code is a generic and common representation, focusing on this language allows us to potentially consider programs written in several different programming languages. Moreover, we subscribe to the hypothesis that code may be treated as natural language, and thus we process assembly code using standard architectures commonly employed in natural language processing. We perform a set of experiments aimed at confirming the validity of the natural language hypothesis and the feasibility of using recurrent neural networks for detecting vulnerabilities. Our results show that our architecture is able to capture subtle stack-based buffer overflow vulnerabilities that strongly depend on the context, thus suggesting that this approach may be extended to real-world setting, as well as to other forms of vulnerability detection.

View on arXivView PDF

Code Implementations(1)

Code for my master thesis.

114C, PythonDec 16, 20196 years ago

Similar Papers

Cite this paper

@article{dahl2020stackbased,
  title  = {Stack-based Buffer Overflow Detection using Recurrent Neural Networks},
  author = {William Arild Dahl and Laszlo Erdodi and Fabio Massimo Zennaro},
  year   = {2020},
  eprint = {2012.15116},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2012.15116}
}

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/2012.15116.svg)](https://codeofpaper.com/paper/2012.15116)

Discussion