STAF: Leveraging LLMs for Automated Attack Tree-Based Security Test Generation

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Khule, Tanmay, Marksteiner, Stefan, Alguindigue, Jose, Fuchs, Hannes, Fischmeister, Sebastian, Narayan, Apurva
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866917056189825024
author Khule, Tanmay
Marksteiner, Stefan
Alguindigue, Jose
Fuchs, Hannes
Fischmeister, Sebastian
Narayan, Apurva
author_facet Khule, Tanmay
Marksteiner, Stefan
Alguindigue, Jose
Fuchs, Hannes
Fischmeister, Sebastian
Narayan, Apurva
contents In modern automotive development, security testing is critical for safeguarding systems against increasingly advanced threats. Attack trees are widely used to systematically represent potential attack vectors, but generating comprehensive test cases from these trees remains a labor-intensive, error-prone task that has seen limited automation in the context of testing vehicular systems. This paper introduces STAF (Security Test Automation Framework), a novel approach to automating security test case generation. Leveraging Large Language Models (LLMs) and a four-step self-corrective Retrieval-Augmented Generation (RAG) framework, STAF automates the generation of executable security test cases from attack trees, providing an end-to-end solution that encompasses the entire attack surface. We particularly show the elements and processes needed to provide an LLM to actually produce sensible and executable automotive security test suites, along with the integration with an automated testing framework. We further compare our tailored approach with general purpose (vanilla) LLMs and the performance of different LLMs (namely GPT-4.1 and DeepSeek) using our approach. We also demonstrate the method of our operation step-by-step in a concrete case study. Our results show significant improvements in efficiency, accuracy, scalability, and easy integration in any workflow, marking a substantial advancement in automating automotive security testing methodologies. Using TARAs as an input for verfication tests, we create synergies by connecting two vital elements of a secure automotive development process.
format Preprint
id arxiv_https___arxiv_org_abs_2509_20190
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle STAF: Leveraging LLMs for Automated Attack Tree-Based Security Test Generation
Khule, Tanmay
Marksteiner, Stefan
Alguindigue, Jose
Fuchs, Hannes
Fischmeister, Sebastian
Narayan, Apurva
Cryptography and Security
Artificial Intelligence
In modern automotive development, security testing is critical for safeguarding systems against increasingly advanced threats. Attack trees are widely used to systematically represent potential attack vectors, but generating comprehensive test cases from these trees remains a labor-intensive, error-prone task that has seen limited automation in the context of testing vehicular systems. This paper introduces STAF (Security Test Automation Framework), a novel approach to automating security test case generation. Leveraging Large Language Models (LLMs) and a four-step self-corrective Retrieval-Augmented Generation (RAG) framework, STAF automates the generation of executable security test cases from attack trees, providing an end-to-end solution that encompasses the entire attack surface. We particularly show the elements and processes needed to provide an LLM to actually produce sensible and executable automotive security test suites, along with the integration with an automated testing framework. We further compare our tailored approach with general purpose (vanilla) LLMs and the performance of different LLMs (namely GPT-4.1 and DeepSeek) using our approach. We also demonstrate the method of our operation step-by-step in a concrete case study. Our results show significant improvements in efficiency, accuracy, scalability, and easy integration in any workflow, marking a substantial advancement in automating automotive security testing methodologies. Using TARAs as an input for verfication tests, we create synergies by connecting two vital elements of a secure automotive development process.
title STAF: Leveraging LLMs for Automated Attack Tree-Based Security Test Generation
topic Cryptography and Security
Artificial Intelligence
url https://arxiv.org/abs/2509.20190