Manuscript Offprint

arXiv:2609.00259

DUPIN: Attack Learning Is Still Needed! Demonstrating Few-Shot after Unsupervised Pretraining Is A Nimble Forensics Learner

Chanwoo Bae, Hailun Ding, Shiqing Ma, Xiangyu Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Advanced persistent threats (APTs) pose a significant challenge in cybersecurity, involving staged and prolonged operations that often remain undetected until postmortem indicators, such as sabotage or financial loss, emerge. In consequence, human analysts are facing a needle-in-a-haystack challenge among vast accumulation of daily audit logs. However, leveraging a learning system for attack forensics is limited due to the scarcity of attack data, as attacks occur infrequently. In addition, since malicious behaviors are usually embedded in massive benign ones, they are very hard to label by humans. Thus, the recent approaches leverage self-supervised learning methods, where models rely solely on benign data and perform outlier detection. However, these methods struggle with the increasing complexity and dynamics of large-scale audit logs, often resulting in non-trivial false positives. Therefore, we propose a novel approach to learning-based attack forensics called DUP IN. First, DUP IN performs unsupervised pre-training on an enormous amount of audit events in the form of provenance graphs. It then proceeds to a few-shot learning stage, leveraging a small number of labeled attack examples to fine-tune its detection capabilities. We pretrain DUP IN on up to 38 - 52 days of audit logs (7.3TB total) and evaluate it against various baselines on 25 APT campaigns across four different data sources, facilitating the scalable evaluation.

1 Introduction

Advanced persistent threats (APTs) are sophisticated cyberattacks, characterized by their extended timeframes and organizational/state-level targets. These meticulously planned operations unfold in stages, often remaining undetected for long periods. Victims typically recognize APTs only after suffering substantial damage, such as critical infrastructure sabotage or severe financial losses. Despite the significant harm APTs can inflict, their stealthiness and complexity make investigation challenging. The vast accumulation of daily audit

logs turns surveillance into a needle-in-a-haystack challenge. Thus far, attack prevention has largely relied on human analysts, who must closely monitor extensive logs to identify a small set of potential threats. However, due to the limited supplies of trained experts, major challenges posed by complex attacks remain unsolved.

To reduce the complexity of analysis and human efforts, researchers have explored automation of auditing [19], leveraging learning-based methods for threat analysis [7, 46, 52]. Specifically, these approaches reduce attack forensics to a classification problem, enabling the model to learn and make decisions based on data distributions.

However, a prominent challenge is that attacks appear sporadically and sparsely and hence attack data is lacking, making the traditional supervised model training difficult. Consequently, the state-of-the-art methods employ self-supervised learning, such as one-class training, by primarily using benign data [12, 21]. The idea is to learn the distribution of the majority of data and label outliers as suspicious. Our evaluation (in Section 4.4) shows that such methods have limited effectiveness as many malicious behaviors share substantial similarity with benign behaviors and unseen benign behaviors are often considered as malicious mistakenly.

We consider that learning from attacks remains crucial. As evidenced by the recent rise of cyber threat intelligence [28, 38], attack knowledge has become a key factor in preventing and mitigating on-going cyberattacks. The primary insight of threat intelligence is that as attack actors become more advanced, their techniques are systematized, shared, and thus repeated. For example, after reprocessing the data from MITRE ATT&CK framework [2], we discover that 85% of the attack techniques are employed by two or more known threat actors, with each technique being used by an average of 18.6 actors (the number of real appearances can be even more). Inspired by these findings, we aim to develop a learning-based automated system, assuming attack training can operate with threat sharing and/or collaborative collection process. In this paper, we assume certain characteristics of cyberattacks and responses, where (i) attack sharing or collection provides an

Figure

(a) Attack Example - Target: Deploying multiple backdoor files.

(b) Attack Example - Training: Compromising the victim's PC.

(c) Benign Example - Training: Downloading fragmented .tar.gz files from Google Drive.

Figure 1: Motivation example.

attack knowledge base in the form of raw logs or shareable models, even though the scale may be limited, and (ii) attack techniques are archived, shared among their actors, and thus would reappear.

Recently, the remarkable advancements in NLP techniques further support the use of attack-guided learning. For example, the training phase can be divided into two steps where the model first undergoes extensive self-supervised pretraining [11,30], and then addresses downstream tasks as classification problems. Consequently, such models can rapidly adapt to downstream tasks through few-shot learning or fine-tuning. Audit data aligns perfectly with this learning paradigm. In particular, the majority of audit logs denote benign system behaviors and can be used in pretraining such that the model can understand system behaviors and provenance in general, like a foundation language model which understands natural languages. Then we can use the sparse attack samples for few-shot learning with the pretrained model.

We propose DUPIN, a novel learning based forensic analysis system. It first uses an enormous repository of benign audit logs to pretrain a foundation model such that the model can understand the domain. As raw audit logs are very noisy, with interleaving events from numerous processes, we first transform them to provenance graphs and use them to pretrain a Graph Attention Network (GAT). We employ masked prediction tasks (i.e., node/edge prediction and classification) on provenance graphs in the unsupervised pretraining phase. After training, we further perform few-shot learning using a set of attack samples. In summary, we make the following contributions.

  • We propose a new approach to learning-based attack auditing, leveraging a foundation GAT and the model's ability of rapid adaptation to the downstream task. In addition, we present the masked prediction learning on provenance graphs, enabling unsupervised pretraining. It is particularly suitable for the forensic domain.

  • We conduct extensive self-supervised learning on provenance graphs, using pretraining data spanning a total of 52 days of traces for Linux and 38 days for Windows with each tracepoint spanning 10 to 12 days. Our pretraining employs a self-supervised approach, utilizing

masked learning on process and event names. The ablation study demonstrates that our approach achieves a 16% improvement in accuracy as a result of extensive pretraining of the DUPIN model.

  • We evaluate DUPIN across 25 representative APT attack sets from four different dataset sources. We adopt a cross-validation strategy in which the model is restricted from learning from attack sets originating from the same red team (i.e., dataset source). In this setting, the training and validation sets are separated based on different attack dataset sources to more accurately reflect evolving, diverse conditions in real-world attack surveillance.

  • We implement and release a toolkit to facilitate the log forensics. It is compatible with three audit formats: (i) Linux Audit Framework, (ii) Windows ETW, allowing to directly collect logs from Ubuntu/Windows environment for simulation purposes, and (iii) Common Data Model (CDM), covering all tracepoints in DARPA TC dataset. The set of APIs supports raw log parsing and graph exploration. This toolkit is designed to facilitate future research and enable comparisons of different approaches on a common foundation to prevent environmental differences in implementation and tedious data process. We release an repository of our toolkit.¹ The implementation of DUPIN is included in the repository.

References (48)

  • GPT-4 Technical Report
  • Atlas: A sequence-based learning approach for attack investigation
  • Dos and don'ts of machine learning in computer security
  • Sometimes simpler is better: A comprehensive analysis of {State-of-the-Art} {Provenance-Based} intrusion detection systems
  • Kairos: Practical intrusion detection and investigation using whole-system provenance
  • BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
  • Airtag: Towards automated attack investigation by unsupervised learning with log texts
  • Distdet: A {Cost-Effective} distributed cyber threat detection system
  • Deeplog: Anomaly detection and diagnosis from system logs through deep learning
  • Neural message passing for quantum chemistry
  • Mamba: Linear-Time Sequence Modeling with Selective State Spaces
  • Unicorn: Runtime provenance-based detector for advanced persistent threats (opens arXiv in a new tab)
  • {SIGL}: Securing software installations through deep graph learning
  • Sok: History is a vast early warning system: Auditing the provenance of system intrusions
  • Enabling refinable {Cross-Host} attack investigation with efficient data flow tagging and tracking
  • Magic: Detecting advanced persistent threats via masked graph representation learning
  • An event-based data model for granular information flow tracking
  • Pure transformers are powerful graph learners
  • Semi-Supervised Classification with Graph Convolutional Networks
  • Distributed representations of sentences and documents
  • High accuracy attack provenance via binary-based execution partition
  • Loggc: garbage collecting audit log
  • Acing the ioc game: Toward automatic discovery and analysis of open-source cyber threat intelligence
  • What we talk about when we talk about logs: Understanding the effects of dataset quality on endpoint threat detection research
  • RoBERTa: A Robustly Optimized BERT Pretraining Approach
  • {MPI}: Multiple perspective attack investigation with semantic aware execution partitioning
  • Towards practical provenance tracing by alternating between logging and tainting
  • A comprehensive survey on graph anomaly detection with deep learning
  • Holmes: real-time apt detection through correlation of suspicious information flows
  • graph2vec: Learning distributed representations of graphs (opens arXiv in a new tab)
  • Flash: A comprehensive approach to intrusion detection via provenance graph representation learning
  • A survey of graph neural networks for social recommender systems
  • Threat intelligence computing
  • Nodemerge: Template based efficient data reduction for big-data causality analysis
  • Attention is all you need
  • Graph attention networks (opens arXiv in a new tab)
  • A hybrid approach for efficient provenance storage
  • Compressing provenance graphs
  • How powerful are graph neural networks? arXiv preprint arXiv:1810.00826, 2018 (opens arXiv in a new tab)
  • High fidelity data reduction for big data security dependency analyses
  • Prograher: An anomaly detection system based on provenance graph embedding
  • Graphformers: Gnn-nested transformers for representation learning on textual graph
  • Uiscope: Accurate, instrumentation-free, and visible attack investigation for gui applications
  • Fusing application and audit logs for precise attack provenance without instrumentation
  • Watson: Abstracting behaviors from audit logs via aggregation of contextual semantics
  • Palantir: Optimizing attack provenance with hardware-enhanced system observability
  • Shadowwatcher: Recommendation-guided cyber threat analysis using system audit records
  • Tapas: An efficient online {APT} detection with task-guided process provenance graph segmentation and analysis