Simulating SQL Injection Vulnerability Exploitation Using Q-Learning Reinforcement Learning Agents

Laszlo Erdodi, Åvald Åslaugson Sommervoll, Fabio Massimo Zennaro
1/8/2021
cs.CRcs.LG
rl

Official code: FMZennaro/CTF-SQL (20 stars, Jupyter Notebook, last commit 2021-10-13).

Abstract

In this paper, we propose a formalization of the process of exploitation of SQL injection vulnerabilities. We consider a simplification of the dynamics of SQL injection attacks by casting this problem as a security capture-the-flag challenge.

Show full abstract

We model it as a Markov decision process, and we implement it as a reinforcement learning problem. We then deploy reinforcement learning agents tasked with learning an effective policy to perform SQL injection; we design our training in such a way that the agent learns not just a specific strategy to solve an individual challenge but a more generic policy that may be applied to perform SQL injection attacks against any system instantiated randomly by our problem generator. We analyze the results in terms of the quality of the learned policy and in terms of convergence time as a function of the complexity of the challenge and the learning agent's complexity. Our work fits in the wider research on the development of intelligent agents for autonomous penetration testing and white-hat hacking, and our results aim to contribute to understanding the potential and the limits of reinforcement learning in a security environment.

View on arXivView PDF

Code Implementations(1)

FMZennaro/CTF-SQLOfficial100%

Modelling SQL Injection Using Reinforcement Learning

202Jupyter Notebook, PythonNov 16, 20205 years ago

Similar Papers

Cite this paper

@article{erdodi2021simulating,
  title  = {Simulating SQL Injection Vulnerability Exploitation Using Q-Learning Reinforcement Learning Agents},
  author = {Laszlo Erdodi and Åvald Åslaugson Sommervoll and Fabio Massimo Zennaro},
  year   = {2021},
  eprint = {2101.03118},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2101.03118}
}

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

Discussion