TL;DR
CRAKEN improves autonomous cybersecurity LLM agents by embedding domain-specific knowledge into their execution loop via an iterative, self-grading retrieval-augmented generation (RAG) system. Combining multi-agent task execution with hybrid vector- and graph-based retrieval over human CTF writeups, CRAKEN achieves a state-of-the-art 22% solve rate on the NYU CTF Bench—surpassing prior agents while discovering solutions to complex, previously unsolved challenges.
What Problem Does This Paper Address?
While autonomous LLM agents can identify software vulnerabilities and execute exploits, they face two fundamental hurdles in offensive cybersecurity:
- The Knowledge Cutoff & Domain Gap: Pre-trained models lack fine-grained, post-cutoff knowledge of emerging vulnerabilities, esoteric cipher implementations, and novel exploit payloads.
- Context Clutter and Hallucination: In multi-step planning scenarios like Capture-the-Flag (CTF) competitions, indiscriminately dumping reference material into the LLM’s context causes prompt bloat, distraction, or severe hallucinations of non-existent attack vectors.
Prior agentic frameworks (such as D-CIPHER and EnIGMA) rely primarily on internal parametric memory and interactive terminal tools. CRAKEN investigates how to dynamically retrieve external, technical know-how and inject it precisely where it matters—without misleading the agent.
Methods
Built upon the hierarchical planner-executor multi-agent architecture of D-CIPHER, CRAKEN introduces a specialized knowledge integration pipeline that intervenes during task delegation:
[Agent Task] ──> [Context Decomposition] ──> [Hybrid Search: Milvus + Neo4j]
│
[Executor Agent] <── [Knowledge Hint] <── [Graders Loop] <─┘
(Self-RAG: Relevance, Hallucination, & Task Solved)
- Context Decomposition: Instead of querying with the entire conversational history, CRAKEN decomposes the executor’s immediate sub-goal into focused technical queries and key search terms.
- Recursive Self-RAG: CRAKEN uses dedicated grading modules to critique retrieval and generation:
- Relevance Grader: Checks if retrieved context is actually relevant to the query. If not, the query is rewritten and retried.
- Hallucination Grader: Evaluates whether the generated hint is factually grounded in the retrieved text.
- Solved Grader: Verifies whether the generated knowledge hint sufficiently answers the decomposed query before passing it along.
- Hybrid Graph-RAG: In addition to dense vector search (Milvus), CRAKEN builds a knowledge graph (Neo4j) of entities and relationships extracted from security writeups. Structured sub-graph traversal is combined with unstructured text retrieval to capture topological connections between tools, vulnerabilities, and exploitation steps.
- Execution-Level Injection: The resulting grounded knowledge is delivered to the executor agent as a targeted hint rather than feeding it to the high-level planner.
Datasets
The authors curated three distinct external knowledge bases:
- CTF Writeups (Primary): 1,298 human CTF solution writeups in Markdown (with all CSAW CTFs excluded to prevent leakage).
- Payloads: 135 compact attack scripts and exploit payloads mapped to vulnerability types.
- Code Snippets: 4,656 code samples paired with task descriptions.
Evaluation Benchmarks: - NYU CTF Bench (NCB): 200 challenges spanning six categories (Cryptography, Reverse Engineering, Binary Exploitation/PWN, Forensics, Web, and Miscellaneous). - CSAW '24 (Post-Cutoff): 22 challenges released in November 2024 to verify generalization beyond Claude 3.5 Sonnet's training cutoff. - MITRE ATT&CK Matrix: Evaluated against 44 mapped offensive techniques.
Key Insights and Ideas
- Execution Beats Planning for Knowledge Injection: Injecting hints into the executor yielded a 21.0% solve rate, compared to just 17.0% when injected into the planner. Planning requires high-level abstraction, whereas execution relies on fine-grained, system-specific implementation details.
- Curated Operational Writeups Beat Raw Payloads or Code: Grounding the agent in structured CTF writeups (21.0%) outperformed using payload databases (16.0%), code snippets (17.5%), or uncurated mixtures of all three (15.5%). Step-by-step narrative reasoning provides far better guidance than disjointed snippets.
- Hallucination Verification is Crucial: 72.7% of initial draft answers generated by the retrieval pipeline failed hallucination grading. Recursive self-reflection and query rewriting directly accounted for 33.7% of all successful retrievals.
- Knowledge Diversifies Solutions: CRAKEN did not just incrementally improve scores; it uniquely solved 8 challenges that both D-CIPHER and EnIGMA failed, confirming that external knowledge unblocks specialized, niche tasks (e.g., obscure cipher implementations like custom Rust-based RC4).
Key Results
- State-of-the-Art CTF Accuracy: CRAKEN with Graph-RAG and Claude 3.5 Sonnet achieved 22.0% accuracy on NYU CTF Bench, outperforming prior state-of-the-art D-CIPHER (19.0%) and baseline agents (5.0%).
- Broad Offensive Technique Coverage: CRAKEN solved 25–30% more MITRE ATT&CK techniques than baseline agents, showing marked improvements in Web exploitation (+10.5% absolute gain for Claude 3.5) and Cryptography.
- Model Behavior & Cost: Claude 3.5 Sonnet proved the most cost-effective top performer ($0.68/CTF in vector mode; $0.86 in Graph-RAG). In contrast, GPT-4o frequently gave up early (62% give-up rate vs. 0.5% for Claude 3.7), while GPT-4.1 consumed excessive tokens (166k tokens/challenge) without performance gains.
- Post-Cutoff Validation: On the post-training-cutoff CSAW '24 set, CRAKEN achieved a 13.64% solve rate, confirming true zero-shot reasoning on unseen challenges rather than benchmark memorization.
Limitations and Future Work
- Tool-Calling Dependencies: CRAKEN relies heavily on multi-agent function calling, preventing the immediate drop-in use of dedicated reasoning models (e.g., OpenAI o3 or Claude 3.7 Sonnet with extended thinking mode).
- Corpus Breadth: The retrieval database remains limited to specific curated writeups and payloads; wider security documentation, CVE databases, and source code repositories have yet to be integrated.
- Dual-Use and Prompt Injection Risks: Integrating external retrieval into autonomous offensive agents opens potential attack vectors, such as indirect prompt injection embedded within target CTF challenge files or untrusted external writeups.
Summary updated