arXiv:2609.06579cs.CRSep 2026

Manuscript Offprint

arXiv:2609.06579

A TTP by TTP Approach: Precise Malware Detection via Malicious TTP Recognition

Yashovardhan Sharma

Yashovardhan Sharma

University of Oxford

Oxford, United Kingdom

yashovardhan.sharma@cs.ox.ac.uk

Abstract—Machine learning methods, and especially neural networks, are now routinely used for malware detection in network traffic. Though very effective, systems based on such methods often (i) are purely data-driven, ignoring the substantial body of available knowledge about the tactics, techniques, and procedures (TTPs) possibly used, and, consequently (ii) are not precise, since they either cannot correlate malicious activity with TTP usage, or if they do, they are unable to explain which TTP has been maliciously used. In this paper we demonstrate that it is possible to precisely detect malware by (i) providing the neural network model with information about the TTPs used by any given sample, and (ii) teaching the neural network to detect not just the malicious activity as a whole, but which specific TTPs are maliciously used. We show that our approach consistently outperforms the three alternative models, which either do not exploit TTP information, or which are not taught to detect the malicious usage of TTPs, or both. Moreover, we show that our approach (i) is particularly beneficial in detecting malware that utilises rarely-used TTPs, a scenario which is particularly challenging for the other systems; (ii) allows for TTP by TTP tuning, further improving its ability to detect the malicious usage of TTPs; (iii) consistently outperforms other systems across a wide-range of scenarios, including when relying on limited training data or when subjected to adversarial attack.

1. Introduction

Machine learning methods and especially neural networks are now routinely used for malware detection in network traffic (see, e.g., [18], [20], [32]). Just within the research literature, Scopus indicates that there has been a 508% increase in papers referencing machine learning (ML) or deep learning (DL) within the context of cyber security over the last 5 years [36]. The rapid increase in the usage of such techniques within the domain of malware detection has been fuelled by the challenge of keeping up with constantly-evolving malware and the ability of ML models to handle large volumes of data. Approaches using neural networks in particular have been favoured since they do not require an expert's domain knowledge to define discriminative feature used in malware detection system [9]. Though very effective, such methods are often: (i) purely data-driven, ignoring the substantial body of available knowledge about the tactics, techniques, and procedures (TTPs) possibly used, and (ii) not precise, since they either cannot correlate malicious activity with TTP usage or if they do, they give little to no explanation about which TTPs have been maliciously used. Furthermore, ML methods typically require large amounts of quality training data, and are often not robust to adversarial attacks [9], [32].

In this paper, we leverage the ontology of adversarial behaviour provided by the MITRE ATT&CK framework, comprising of tactics, techniques, and procedures (TTPs), to show that it is possible to precisely detect malware from network captures by (i) formulating the problem as a multi-label classification problem (see, e.g., [43]) with one set of labels to classify the TTPs, and another label to classify the maliciousness of the entire network traffic sample (henceforth referred to as sample), and (ii) designing a Deep Neural Network (DNN) architecture for the multi-label classification problem, that can take into account information about the TTPs utilised by the sample in the form of TTP features. In particular, we propose a methodology in which (i) each sample is analysed in order to automatically extract the TTPs utilised by it, (ii) the network traffic features of the sample, together with the features about the matched TTPs, are then given as inputs to the DNN architecture, which is not only responsible for detecting the maliciousness of the sample, but also which TTPs are maliciously used. To the best of our knowledge, ours is the first system which is able to detect malicious network traffic and precisely characterise which TTPs have been maliciously used. This is a rather useful property since it enables our system to have different fine-grained outputs, as advocated in [3]. Compared to the existing purely data-driven approaches for malware detection (see, e.g., [18], [20]), we expect that by (i) providing the information about the TTPs used by a sample, and (ii) training the neural network to detect both the malicious activity as a whole and the specific TTPs that are maliciously used, our system is particularly well-suited for detecting malware that utilises uncommon or rarely-used TTPs—a scenario which is particularly challenging for any data-driven approach.

We evaluate our system by conducting an extensive experimental analysis involving more than 1.5 million malicious and benign samples, curated from 5 different publicly available datasets, thus allowing us to test our system on a broad range of real-world samples. We consider 5 micro-average metrics usually used to evaluate systems for multi-label classification problems ( F1F_{1}-score, Subset Accuracy, Precision, Recall and False Positive Rate), together with the macro-average metrics corresponding to the F1F_{1}-score, Precision and Recall. These metrics are widely used

(see, e.g., [8], [24], [33]), and each highlights a different aspect of our system's performance. For instance, we utilise the macro-average metrics to highlight the performance of our system at TTP classification since individual TTP classes are unbalanced in our data, and these metrics are suited for multi-label classification with unbalanced classes [30], [42]. On the other hand, we use micro-average metrics to highlight the overall performance of our system, specifically for sample classification, which is evaluated on balanced malicious and benign datasets. We further evaluate our approach across four possible configurations:

  1. STTP2STTP: the system is given the sample and TTP features as input, and it has to detect both if the sample is malicious, and which TTPs are maliciously used by it.
  2. STTP2S: the system is given the sample and TTP features as input, and it has to determine whether the sample is malicious or not.
  3. S2STTP: the system is given just the sample as input, and it has to detect both if the sample is malicious, and which TTPs are maliciously used by it.
  4. S2S: the system is given just the sample as input, and it has to determine whether the sample is malicious or not.

We test our approach in all configurations, across all of our datasets, to thoroughly evaluate its performance. We conduct further experimental analysis to test our approach in various challenging conditions, such as when faced with limited training data or dealing with adversarial attack. Our experimental analysis confirms that:

  • The STTP2STTP, STTP2S and S2STTP models consistently outperform the standard S2S model.
  • The STTP2STTP model has the best overall performance, and significantly better average performance in detecting rarely-occurring malicious TTPs, as witnessed by an average improvement in the Macro F1F_1-score, Macro Precision and Macro Recall of 37.55%, 11.82% and 46.05% respectively.
  • It is possible to further improve the performance of STTP2STTP by finely tuning the decision threshold for each individual TTP. In our datasets, we measure average performance gains of 12.5%, 12.0%, and 47.6%, for the Macro F1F_1-score, Macro Precision, and Macro Recall respectively.
  • STTP2STTP maintains its ability to better detect malicious TTPs than S2STTP even when considering challenging scenarios where models are trained with a limited number of samples, or when tested with noisy malicious samples flooded with benign traffic by adversaries attempting to camouflage their activities.

The better performance of STTP2STTP when compared to any other model (be it S2STTP, STTP2S or S2S) corresponds to the possibility of training STTP2STTP with less data and still getting the same performance of the other model, thus at least partially overcoming the well-known data-greediness problem of ML models (see, e.g., [9]). For instance, STTP2STTP utilising 25% of the training data has

a higher average F1F_1-score than S2STTP utilising 100% of the training data, and STTP2STTP when trained with 10% of the data has on average still a higher Recall than S2STTP trained with 100% of the data.

To recap, the main contributions of the paper can be summarised as follows:

  • We design a novel multi-label DNN architecture that can precisely detect network-based malware along with the specific TTPs utilised by it, by exploiting TTP information in the form of automatically-generated features.
  • We outperform the state-of-the-art models, regardless of whether or not they exploit the same TTP features used by our system. Our approach is particularly beneficial in detecting the malicious usage of uncommon or rarely-used TTPs.
  • Our system is highly configurable, allowing for TTP by TTP tuning, thus further increasing its performance.
  • We test our approach on a large dataset of real-world malicious and benign samples. We utilise 5 balanced datasets to fairly test our system, consisting of over 1.5 million samples.
  • We evaluate our system under challenging scenarios, such as when it has access to limited training data or when it is subjected to adversarial attack, and demonstrate that it consistently outperforms other systems even under these conditions.

The rest of the paper is organised as follows: Section 2 gives a brief overview of the MITRE ATT&CK framework and discusses closely related work. Section 3 discusses the overall architecture of the system and the functioning of its individual components. The four models STTP2STTP, S2STTP, STTP2S and S2S are then comparatively evaluated in Section 4. Section 5 contains further experimental analysis of our system, by testing it under various challenging conditions and tuning it on a TTP-by-TTP basis to further improve performance. A thorough discussion about the results presented is in Section 6, followed by the overall conclusions of our work in Section 7.

References (36)