Using Retriever Augmented Large Language Models for Attack Graph Generation

Renascence Tarafder Prapty, Ashish Kundu, Arun IyengararXiv 2024 · DOI

Introduction

In the rapidly evolving landscape of cybersecurity, an attack graph serves as a critical strategic map, delineating the various paths an adversary might traverse to compromise a target system. Traditionally, the generation of these graphs has been a labor-intensive process, requiring manual expert curation, static rule-sets, or complex formal modeling. These methods often fail to scale alongside the daily influx of new Common Vulnerabilities and Exposures (CVEs) and unstructured threat reports.

To bridge this gap, researchers have introduced CrystalBall, a system designed to automate the generation of dynamic, technically grounded attack graphs using Retriever-Augmented Generation (RAG) and Large Language Models (LLMs).

The CrystalBall Framework

CrystalBall operates as a multi-stage pipeline designed to transform raw vulnerability data into structured visual intelligence. The architecture is built upon four primary pillars:

  1. Semantic Database: A relational repository for CVE records and associated metadata.
  2. Pre-Processor: An LLM-driven module that extracts structured properties—such as product name, platform, and version—from raw CVE descriptions before indexing.
  3. Retriever: Utilizing Contriever, a self-supervised model, this component generates embeddings and calculates cosine similarity between user queries and extracted properties. This targeted retrieval significantly reduces noise compared to embedding full, verbose CVE descriptions.
  4. LLM Handler & Post-Processor: This final stage feeds retrieved context into a high-reasoning LLM (e.g., GPT-4) to "chain" vulnerabilities based on logical preconditions and postconditions, outputting a structured JSON for visualization.
Figure 1: High-level architecture of the CrystalBall Attack Graph Generator system.

Key Innovations in Retrieval

A central finding of the research is that "Property Extraction" is the critical factor in retrieval precision. Raw CVE descriptions are often too verbose for effective semantic search. By using an LLM to clean and structure data into specific fields (Product, Platform, Version) prior to embedding, the retriever achieves much higher accuracy. This ensures that the LLM handler receives highly relevant context, minimizing the risk of "hallucinations"—a common failure mode where LLMs generate abstract or technically impossible attack paths when deprived of specific grounding data.

Experimental Results and Chaining Capabilities

The system was evaluated using the MITRE CVE database and real-world unstructured reports, including the SolarWinds supply chain compromise and a Kubernetes cluster hack.

Model Performance

The researchers identified a clear performance hierarchy among models. GPT-4 significantly outperformed GPT-3.5 and Google’s Gemini in its ability to maintain logical coherence across long attack chains and understand complex, cross-device vulnerabilities. While other models produced fragmented or overly simplified graphs, GPT-4 successfully identified multiple distinct, accurate attack paths from complex threat reports.

Cross-Device Chaining

One of the most impressive capabilities demonstrated by CrystalBall is its ability to identify "cross-device" exploit paths. For instance, the system successfully mapped how a vulnerability in an Oculus Desktop application could be chained to gain access to a connected Raspberry Pi or NVIDIA Jetson device.

Figure 4: An automated attack graph illustrating a cross-device exploit chain from an Oculus Desktop vulnerability to lateral movement on a Raspberry Pi.

Limitations and Future Outlook

Despite its success, the framework faces challenges related to the "token wall" of current LLMs. Processing massive system architectures requires "chunking" context, which can occasionally obscure the broader strategic picture of an attack. Furthermore, while the LLM is adept at logical chaining, it still occasionally lacks the deep "tribal knowledge" of senior human researchers, sometimes necessitating manual refinement of the final output.

Future work aims to implement "gradual expansion" techniques. This would allow the system to iteratively "zoom in" on specific nodes, providing deeper technical implementation details on demand and further reducing the manual burden on security analysts.

Summary updated

BibTeX
@misc{prapty2024using,
  author = {Renascence Tarafder Prapty and Ashish Kundu and Arun Iyengar},
  title = {{Using Retriever Augmented Large Language Models for Attack Graph Generation}},
  year = {2024},
  eprint = {2408.05855},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.05855},
}
Figure