CRAKEN: Cybersecurity LLM Agent with Knowledge-Based Execution

Minghao Shao, Haoran Xi, Nanda Rani, Meet Udeshi, Venkata Sai Charan Putrevu, Kimberly Milner, Brendan Dolan-Gavitt, Sandeep Kumar Shukla, Prashanth Krishnamurthy, Farshad Khorrami, Ramesh Karri, Muhammad Shafique · DOI

Abstract

CRAKEN is a novel LLM agent framework designed to address the critical challenges of knowledge cut-offs and strategic integration in automated cybersecurity. By implementing an iterative, self-correcting retrieval-augmented generation (RAG) system combined with a specialized database of Capture-The-Flag (CTF) writeups and hybrid Graph-RAG, CRAKEN achieves state-of-the-art performance. It demonstrates a 22% accuracy on the NYU CTF Bench and orchestrates up to 30% more MITRE ATT&CK techniques than previous leading agents.

Introduction

Large Language Models (LLMs) face two primary hurdles in cybersecurity: knowledge cut-offs, where models lack information on the latest vulnerabilities, and strategic integration, where agents struggle to apply technical nuances to complex attack plans. In simulated environments like CTF competitions, agents often fail because they lack specific "how-to" knowledge for niche exploits or become overwhelmed by redundant context. CRAKEN (Cybersecurity LLM Agent with Knowledge-Based Execution) bridges this gap by allowing agents to autonomously determine information needs and verify the quality of retrieved data.

System Architecture and Methodology

CRAKEN utilizes a Planner-Executor architecture enhanced by a sophisticated retrieval pipeline. The system's core innovation lies in three distinct mechanisms:

  1. Contextual Decomposition: The agent breaks down high-level tasks into focused sub-queries to avoid sending over-encumbered prompts to the search engine.
  2. Iterative Self-Reflected Retrieval (Self-RAG): A recursive loop where the system retrieves documents, grades their relevance, generates a "knowledge hint," and verifies it for hallucinations. If the information is deemed insufficient or incorrect, the query is rewritten and the process repeats.
  3. Hybrid Graph-RAG: While standard RAG relies on vector-based text similarity, CRAKEN incorporates Graph-RAG to understand relationships between entities, such as the connection between a specific buffer overflow and a stack canary.
The CRAKEN architecture, featuring a Planner-Executor multi-agent system integrated with a sophisticated iterative retrieval pipeline.

These verified knowledge hints are injected directly into the executor agent's workflow, providing tactical advantages during the execution phase of an attack.

Experimental Setup

The framework was evaluated using the NYU CTF Bench (200 diverse challenges) and the MITRE ATT&CK framework. To support the RAG system, the authors curated a massive knowledge base including 1,298 human-written CTF writeups, 135 attack payloads, and over 4,600 code snippets. This data provides the step-by-step operational knowledge often missing from base LLM training.

Results and Key Insights

CRAKEN achieved a state-of-the-art 22% accuracy on the NYU CTF Bench, outperforming the previous leader, D-CIPHER, by 3%. Furthermore, it successfully executed 25–30% more MITRE ATT&CK techniques than prior works.

Venn diagram illustrating the unique and overlapping challenges solved by CRAKEN, D-CIPHER, and EniGMA on the NYU CTF Bench.

Key findings from the study include:

  • Execution-Phase Primacy: Injecting knowledge during the execution phase is significantly more effective than during the planning phase, as execution requires finer technical detail.
  • The Value of Writeups: Human-authored solutions proved to be a superior knowledge source compared to raw code or payload databases.
  • Model Persistence: Evaluation showed that Claude 3.7 Sonnet exhibited remarkable persistence, with a "give-up" rate of only 0.5% compared to GPT-4o’s 62% on similar tasks.
  • Cost Efficiency: Despite the added complexity of RAG, the trade-off is favorable; for Claude 3.5 Sonnet, a 10.5% improvement in solve rate resulted in only a 31% increase in challenge cost.

Conclusion and Future Work

While CRAKEN sets a new benchmark for cybersecurity agents, limitations remain. The current knowledge base is CTF-centric, and the framework's reliance on standard tool-calling currently prevents the integration of newer "thinking" models. Additionally, the risk of knowledge base poisoning via prompt injection remains a security concern. Future research will focus on expanding the dataset to real-world enterprise security and exploring longer conversational contexts for multi-stage attacks.

Summary updated

BibTeX
@misc{shao2025craken,
  author = {Minghao Shao and Haoran Xi and Nanda Rani and Meet Udeshi and Venkata Sai Charan Putrevu and Kimberly Milner and Brendan Dolan-Gavitt and Sandeep Kumar Shukla and Prashanth Krishnamurthy and Farshad Khorrami and Ramesh Karri and Muhammad Shafique},
  title = {{CRAKEN: Cybersecurity LLM Agent with Knowledge-Based Execution}},
  year = {2025},
  eprint = {2505.17107},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.17107},
}
Figure