Abstract
In cybersecurity, mapping software vulnerabilities (CVEs) to strategic attack frameworks like MITRE ATT&CK is essential for defensive planning but remains a manual, error-prone task. This paper introduces Crimson, a framework that enables 7B-parameter Large Language Models (LLMs) to perform complex strategic reasoning. By utilizing a novel Retrieval-Aware Training (RAT) approach and a curated synthetic dataset, Crimson achieves performance comparable to GPT-4 while significantly reducing hallucinations and computational costs.
Introduction
The cybersecurity landscape is currently overwhelmed by over 200,000 recorded Common Vulnerabilities and Exposures (CVEs). However, these descriptions are often unstructured, making it difficult for security teams to understand how a specific flaw fits into a broader adversary campaign. The challenge lies in strategic reasoning: translating a technical bug into a strategic move within the MITRE ATT&CK framework.
While large-scale models like GPT-4 show promise in this area, they are often cost-prohibitive and prone to "hallucinating" non-existent security techniques. Crimson addresses these issues by fine-tuning smaller, open-source LLMs with specialized retrieval techniques and domain-specific knowledge.
Methodology
The Crimson framework employs a three-phase methodology to transform standard LLMs into cybersecurity experts:
- Synthetic Data Curation: A "human-in-the-loop" workflow uses high-end models (GPT-4 and Claude 2) to generate initial CVE-to-ATT&CK mappings, which are then adjudicated by human experts to create a "gold standard" dataset.
- Retrieval-Aware Training (RAT & RAT-R): Crimson trains the model to perform Retrieval-Augmented Generation (RAG) during the training phase. The refined version, RAT-R, requires the model to output a "reason" attribute, explaining the logic behind each mapping.
- Domain-Specific Embeddings: An embedding model (bge-large-en-v1.5) was fine-tuned on cybersecurity data to better distinguish between strategically distinct but textually similar attack techniques.
- AST Sub-Tree Matching: Evaluation is conducted by treating ATT&CK mappings as Abstract Syntax Trees (ASTs), measuring the model's ability to reconstruct hierarchical relationships between exploitation techniques and impacts.
Datasets
The research utilized two primary datasets: CVEM-40k (40,806 records for embedding fine-tuning) and CVEM-1k (1,212 human-curated records for instruction tuning). These were derived from the cvelistV5 repository and the MITRE ATT&CK framework.
Key Insights and Results
A major finding of this work is that specialized training allows small models to "punch up." A 7B-parameter model equipped with RAT-R approaches the performance of GPT-4. Furthermore, the requirement to provide reasoning significantly mitigates hallucinations; the hallucination rate for Crimson-7B was measured at 0.09, compared to 0.26 for GPT-4 and 0.87 for the base Llama-2 model.
Crimson also excels at contextual differentiation. While standard models might confuse "Drive-by Compromise" with "Exploit Public-Facing Application" due to textual similarities, Crimson's domain-specific embeddings allow it to recognize the strategic difference regarding user interaction.
Performance Summary
- Accuracy: Crimson-7B achieved an AST Accuracy of 0.19 (rivaling GPT-4's 0.22). With an expanded retrieval window (top 100), accuracy reached 0.68.
- Reliability: Crimson-7B's low hallucination rate (0.09) makes it significantly more reliable for real-world Security Operations Center (SOC) applications than larger, general-purpose models.
- Embedding Efficiency: The
crimson-embeddingmodel improved retrieval accuracy (@1) by nearly 4x over the base model.
Conclusion and Future Work
Crimson represents a significant advancement in automating cybersecurity strategic reasoning. By combining retrieval-aware training with domain-specific data, it provides a high-performance, low-hallucination alternative to massive LLMs. Future work will focus on improving the scalability of the knowledge base updates and integrating the framework into active SOC workflows to handle live threat intelligence.
Summary updated