APIRL: Deep Reinforcement Learning for REST API Fuzzing

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Foley, Myles, Maffeis, Sergio
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909436259336192
author Foley, Myles
Maffeis, Sergio
author_facet Foley, Myles
Maffeis, Sergio
contents REST APIs have become key components of web services. However, they often contain logic flaws resulting in server side errors or security vulnerabilities. HTTP requests are used as test cases to find and mitigate such issues. Existing methods to modify requests, including those using deep learning, suffer from limited performance and precision, relying on undirected search or making limited usage of the contextual information. In this paper we propose APIRL, a fully automated deep reinforcement learning tool for testing REST APIs. A key novelty of our approach is the use of feedback from a transformer module pre-trained on JSON-structured data, akin to that used in API responses. This allows APIRL to learn the subtleties relating to test outcomes, and generalise to unseen API endpoints. We show APIRL can find significantly more bugs than the state-of-the-art in real world REST APIs while minimising the number of required test cases. We also study how reward functions, and other key design choices, affect learnt policies in a thorough ablation study.
format Preprint
id arxiv_https___arxiv_org_abs_2412_15991
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle APIRL: Deep Reinforcement Learning for REST API Fuzzing
Foley, Myles
Maffeis, Sergio
Software Engineering
Artificial Intelligence
Networking and Internet Architecture
REST APIs have become key components of web services. However, they often contain logic flaws resulting in server side errors or security vulnerabilities. HTTP requests are used as test cases to find and mitigate such issues. Existing methods to modify requests, including those using deep learning, suffer from limited performance and precision, relying on undirected search or making limited usage of the contextual information. In this paper we propose APIRL, a fully automated deep reinforcement learning tool for testing REST APIs. A key novelty of our approach is the use of feedback from a transformer module pre-trained on JSON-structured data, akin to that used in API responses. This allows APIRL to learn the subtleties relating to test outcomes, and generalise to unseen API endpoints. We show APIRL can find significantly more bugs than the state-of-the-art in real world REST APIs while minimising the number of required test cases. We also study how reward functions, and other key design choices, affect learnt policies in a thorough ablation study.
title APIRL: Deep Reinforcement Learning for REST API Fuzzing
topic Software Engineering
Artificial Intelligence
Networking and Internet Architecture
url https://arxiv.org/abs/2412.15991