Skip to main content
QUICK REVIEW

[Paper Review] TBDetector:Transformer-Based Detector for Advanced Persistent Threats with Provenance Graph

Nan Wang, Xuezhi Wen|arXiv (Cornell University)|Apr 6, 2023
Network Security and Intrusion DetectionComputer Science4 citations
TL;DR

TBDetector is a transformer-based anomaly detection framework for Advanced Persistent Threats (APTs) that leverages provenance graphs to model long-term system behavior. By converting provenance graphs into sequential features and using a self-attention encoder-decoder to extract contextual patterns, it computes anomaly scores via similarity and isolation metrics, achieving state-of-the-art performance on five public APT detection datasets.

ABSTRACT

APT detection is difficult to detect due to the long-term latency, covert and slow multistage attack patterns of Advanced Persistent Threat (APT). To tackle these issues, we propose TBDetector, a transformer-based advanced persistent threat detection method for APT attack detection. Considering that provenance graphs provide rich historical information and have the powerful attacks historic correlation ability to identify anomalous activities, TBDetector employs provenance analysis for APT detection, which summarizes long-running system execution with space efficiency and utilizes transformer with self-attention based encoder-decoder to extract long-term contextual features of system states to detect slow-acting attacks. Furthermore, we further introduce anomaly scores to investigate the anomaly of different system states, where each state is calculated with an anomaly score corresponding to its similarity score and isolation score. To evaluate the effectiveness of the proposed method, we have conducted experiments on five public datasets, i.e., streamspot, cadets, shellshock, clearscope, and wget_baseline. Experimental results and comparisons with state-of-the-art methods have exhibited better performance of our proposed method.

Motivation & Objective

  • To address the challenge of detecting long-duration, low-and-slow APT attacks with high concealment and zero-day capabilities.
  • To overcome limitations in existing APT detection methods that fail to model long-term behavioral patterns or scale efficiently with growing provenance graphs.
  • To improve detection of unknown APTs by introducing a hybrid anomaly scoring mechanism based on similarity and isolation.
  • To develop a scalable, real-time detection system using sequence modeling on provenance graph data.

Proposed method

  • Convert system log events into a provenance graph that captures causal relationships between system entities such as processes, files, and memory objects.
  • Transform the provenance graph into a sequence of feature vectors representing system state transitions for sequence modeling.
  • Employ a transformer-based encoder-decoder architecture with self-attention to extract long-term contextual features from the sequence of system states.
  • Compute an anomaly score for each system state as a weighted combination of a similarity score (based on proximity to normal cluster centers) and an isolation score (based on distance from normal clusters).
  • Use K-means clustering on known normal samples to determine cluster centers for similarity score calculation, with K dynamically selected per dataset for optimal performance.
  • Train and evaluate the model on five public APT detection datasets: streamspot, cadets, shellshock, clearscope, and wget_baseline.

Experimental results

Research questions

  • RQ1Can a transformer-based model effectively learn long-term contextual features from provenance graph sequences to detect slow-acting APT attacks?
  • RQ2How does the proposed anomaly score—combining similarity and isolation—improve detection of unknown or zero-day APT threats compared to traditional clustering methods like K-means?
  • RQ3What is the impact of varying the number of cluster centers (K) on anomaly detection performance in the proposed framework?
  • RQ4How does TBDetector compare in performance to state-of-the-art APT detection methods across diverse, real-world datasets?

Key findings

  • On the shellshock dataset with 20% training data, TBDetector achieved a PR area of 0.9575, a 33.69% improvement over K-means (0.7162).
  • On the wget_baseline dataset with 20% training data, TBDetector achieved a PR area of 0.9965, a 3.89% improvement over K-means (0.9592).
  • On the streamspot dataset with 25% training data, TBDetector achieved a PR area of 0.9967, a 5.54% improvement over K-means (0.4645).
  • The optimal number of cluster centers (K) varied across datasets, and TBDetector’s dynamic K selection outperformed fixed-K configurations, with gains up to 5.63% over K=2 on shellshock.
  • The anomaly score mechanism demonstrated consistent superiority over K-means clustering, especially in low-data regimes, indicating robustness to limited labeled normal samples.
  • The transformer-based sequence modeling effectively captured long-term behavioral patterns in provenance graphs, enabling detection of stealthy, multi-stage APT campaigns.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.