Manuscript Offprint

arXiv:2609.07280

Merging Cyber Threat Intelligence Through Retrieval-Augmented Generation and Small Language Models for Rich Threat Representation

Nicola Deidda, Leonardo Regano, Alessandro Sanna, Davide Maiorca, Giorgio Giacinto

Nicola Deidda¹,² [0009-0005-7309-5703], Leonardo Regano¹ [0000-0002-9259-5157], Alessandro Sanna¹ [0000-0002-0610-7736], Davide Maiorca¹ [0000-0003-2640-4663], and Giorgio Giacinto¹,³ [0000-0002-5759-3017]

¹ University of Cagliari, Cagliari, Italy name.surname@unica.it ² IMT School for Advanced Studies Lucca, Lucca, Italy name.surname@imtlucca.it ³ Consorzio Interuniversitario Nazionale per l'Informatica, Rome, Italy

Abstract. Modern cybersecurity operations rely on Cyber Threat Intelligence (CTI) collected from heterogeneous sources, including semi-structured threat representations, Indicators of Compromise (IoCs), and narrative technical reports. However, these artifacts are often insufficient in isolation to reconstruct how an attack unfolds, under which conditions each step is feasible, and which traces it leaves behind. In practice, analysts must manually correlate partial evidence scattered across multiple and only partially structured sources, delaying the design of effective prevention, detection, and response actions.

To address this gap, we propose an automated pipeline that derives an actionable representation of a cyberattack from heterogeneous CTI sources. The pipeline combines a Retrieval-Augmented Generation (RAG) architecture, used to retrieve step-relevant evidence from dispersed documents, with a locally deployable Small Language Model (SLM), used to consolidate such evidence and infer missing operational details. Starting from a semi-structured threat representation and auxiliary CTI documents, the pipeline produces an enriched Attack Graph that captures a coarse, tactic-aligned progression of the attack and annotates each step with an enriched description, explicit pre-conditions, and explicit post-conditions. This representation supports prevention by exposing execution requirements, detection by highlighting observable traces, and response by clarifying the temporal progression of the attack.

Then, due to the lack of validated datasets with ground-truth information on the temporal evolution of real-world attacks, we test the complete pipeline on 10 real-world case studies spanning multiple threat types, including backdoors and staged downloaders delivered via phishing. A manual assessment across 10 real-world case studies provides initial evidence that the generated Attack Graphs are consistent with expected attack progressions, indicating that the proposed approach can support analysts by consolidating dispersed CTI evidence into a structured and actionable view of attacks.

Keywords: Cyber Threat Intelligence · Small Language Models · Attack Graphs · Attack Flow · Preconditions · Postconditions

1 Introduction

Modern defense mechanisms rely on large-scale data to model, analyze, and counter cyber threats [23]. In this context, integrating Cyber Threat Intelligence (CTI) processes into organizational operations improves cybersecurity posture [25]: these processes consume CTI feeds, enrich and analyze the data, and disseminate derived artifacts. However, collected CTI (e.g., technical reports, structured files, blog articles) still requires substantial manual processing to become operationally actionable [12][30]. In practice, no single CTI artifact provides a complete operational view of an attack. Indicators of Compromise (IoCs) expose observable signs of compromise, while standards such as STIX [1] define entities, attributes, and relations, thus supporting intelligence sharing. However, these artifacts are not sufficient to reconstruct how an attack unfolds over time, under which conditions each step is feasible, and which traces or system changes it produces. As a consequence, analysts often reconstruct the execution flow manually from heterogeneous sources, then derive each step's pre-conditions and post-conditions (e.g., required privileges and observable artifacts) [11], a costly and error-prone task that delays the design of effective prevention, detection, and response actions. In this work, we do not infer a fully ordered execution trace; rather, we derive a tactic-aligned representation of coarse attack progression and enrich its steps with grounded operational details. Such information is typically represented through Attack Graphs, a widely used method for helping security practitioners understand the temporal evolution of cyberattacks [15].

Several works model cyber threats from unstructured CTI using Large Language Model (LLM)-based pipelines and knowledge graphs [8, 33, 17, 7, 38]. However, these representations are typically entity-centric and do not explicitly emphasize the execution flow, nor do they provide step-level pre-conditions and post-conditions that support feasibility assessment and investigation. Our focus is instead on step-level operational semantics: starting from heterogeneous CTI, we aim to reconstruct a coherent attack progression and enrich each step with the information required to make that representation directly useful to analysts.

Motivated by this gap, we study the following research questions:

RQ1 Is it possible to leverage Natural Language Processing (NLP) and Artificial Intelligence (AI)-based techniques to extract, from heterogeneous technical sources, coherent Attack Graphs that describe the temporal evolution of an attack?

RQ2 Is it possible to leverage NLP and AI-based techniques to enrich each attack step of an Attack Graph with coherent descriptions, pre-conditions, and post-conditions, while supporting the continuous integration of data?

RQ3 Can these technologies generalize this inference process across diverse real-world cyber threats belonging to different threat families, involving different architectures, and Tactics, Techniques, and Procedures (TTPs)?

To address these questions, we propose a pipeline that, starting from a heterogeneous set of documents describing a cyber threat, derives a tactic-aligned attack representation and enriches each step with grounded descriptions, pre-conditions, and post-conditions:

  1. We derive a coarse attack progression by leveraging a Small Language Model (SLM) [2] over documents stored and retrieved via a Retrieval-Augmented Generation (RAG) architecture. The result is modeled as an Attack Graph [20] extended with nodes defined as Milestones and Attack Steps, where Milestones are tactic-aligned execution checkpoints and Attack Steps are atomic attacker actions.

  2. We enrich the graph by grounding Attack Steps in evidence from heterogeneous documents and by inferring, for each Attack Step, the actions pre-conditions and resulting post-conditions. Pre-conditions support prevention-oriented prioritization by filtering infeasible steps, while post-conditions provide concrete indicators for detection and post-incident investigation.

  3. We empirically evaluate the pipeline on 10 real-world case studies spanning multiple threat families to provide feasibility evidence across diverse scenarios.

To the best of our knowledge, no public datasets map cyberthreats to attack flows with step-level pre-conditions and post-conditions. More broadly, the scarcity of validated ground-truth data on cyberattacks remains a current issue in CTI research. Krašovec et al. [13] highlighted the volatility of ground truths in CTI, which depends on expert analysis and mapping of technical reports. Furthermore, intelligence should be manually validated; this is a time-consuming, error-prone process. Given the current absence of large amounts of validated data, we validate the pipeline components individually. Then, we empirically verify the complete execution across 10 case studies.

The remainder of the paper is organized as follows: Section 2 introduces the core concepts underlying the pipeline; Section 3 details the proposed methodology; Section 4 presents experimental results; Section 5 discusses findings and limitations; Section 6 compares related literature; and Section 7 concludes with future research directions.

References (38)