TL;DR
This paper introduces AULD, a novel unsupervised learning framework for detecting Advanced Persistent Threats (APTs) by analyzing DNS activity. By extracting host, domain, and time-based features from massive DNS logs, AULD effectively identifies suspicious domains associated with APTs, even with limited labeled attack data.
What Problem Does This Paper Address?
Advanced Persistent Threats (APTs) pose a significant and growing threat to network security, often exploiting vulnerabilities in Internet of Things (IoT) devices. These sophisticated attacks involve multiple stages, including infiltration, attack, concealment, spread, and data exfiltration, making them difficult to detect with traditional, single-point security measures. A key challenge in detecting APTs is the reliance on DNS for communication at various stages, but analyzing the sheer volume of DNS logs is computationally intensive. Furthermore, the scarcity of labeled APT attack samples hinders the effectiveness of conventional supervised machine learning approaches. This paper aims to bridge this gap by proposing an unsupervised learning method that can effectively identify APT-related suspicious domains within large-scale DNS datasets.
Methods
The core of the proposed solution is the AULD (Advanced Persistent Threats Unsupervised Learning Detection) framework. AULD operates in four main stages:
- Data Collection: DNS request records are collected from a large university campus network.
- Data Preprocessing: Raw DNS logs are cleaned by extracting relevant fields, standardizing formats, folding domains to their second-level representation, and removing common, non-suspicious websites (both from global top lists and internal network popular sites). This step is crucial for reducing noise and focusing on potentially malicious activity.
- Feature Extraction: Ten key features are extracted from the preprocessed DNS data, categorized into host-based, domain-based, and time-based features. Notably, the time-based features capture the temporal characteristics of APT attacks, such as access time points and intervals, which are often overlooked in existing methods. These features are designed to reflect the covert and prolonged nature of APT activities.
- Clustering: An unsupervised learning approach, specifically a hybrid Canopy and K-means algorithm, is employed. Canopy clustering is used first to efficiently group similar data points and estimate the number of clusters (K), followed by K-means for refining the clusters. This combination addresses the challenge of limited labeled data and the difficulty in pre-determining the optimal number of clusters. The algorithm aims to group suspicious domains into a "malicious" cluster.
Datasets
The study utilizes a substantial dataset of DNS request records collected from a university campus network. Specifically, they collected 1,037,572,118 DNS request records over 70 days (May 23, 2016, to July 31, 2016).
- Training Data: The first 20 days of data were used for training.
- Testing Data: The remaining 50 days of data were used for testing.
Additionally, the researchers generated six independent DNS simulation data sets (labeled S1 to S6) based on APT attack reports and timelines to inject known malicious behavior into the real DNS logs for evaluation. This approach allows for a more controlled assessment of the framework's ability to detect known malicious patterns.
Key Insights and Ideas
- Time-based features are critical for APT detection: The paper strongly emphasizes that APT attacks have distinct temporal patterns (long dwell times, covert communication). Incorporating features that capture these time-based characteristics is crucial for effective detection, especially when other methods might miss them.
- Unsupervised learning is viable for APT detection with limited labels: The scarcity of labeled APT data is a significant hurdle. The success of AULD demonstrates that unsupervised learning, particularly when combined with carefully engineered features, can effectively identify malicious activities without relying on pre-labeled attack samples.
- Hybrid clustering offers a practical solution: The combination of Canopy and K-means addresses the limitations of each algorithm. Canopy efficiently handles large datasets and provides a reasonable estimate for K, while K-means refines the clusters for better accuracy. This hybrid approach is more robust than using either algorithm in isolation for this problem.
- DNS is a rich source for APT behavioral analysis: The paper highlights that DNS communication is an unavoidable aspect of APTs, making DNS logs a valuable source for inferring attacker behavior and identifying malicious domains.
Key Results
- The AULD framework successfully detected all of the simulated attacking samples (S1-S6) injected into the real DNS data.
- The framework demonstrated the ability to effectively detect suspicious domain names associated with APT attacks.
- In experiments, AULD achieved an Accuracy Rate of 96.9%, a TP Rate of 91.8%, and an FP Rate of 3.1% when compared against other unsupervised and supervised learning algorithms. While supervised methods (Decision Tree, Logistic Regression) showed slightly higher accuracy, AULD performed better than other unsupervised methods like DBSCAN and Density Peaks.
- The time complexity of AULD (Canopy + K-means) is significantly better than supervised learning algorithms, making it more suitable for processing large-scale, real-time DNS data.
Limitations and Future Work
- Auxiliary Method: The authors acknowledge that AULD is an auxiliary method and does not detect the complete APT attack process. Its primary function is to identify suspicious domains, which then require further analysis by security experts.
- Internal Network Data: The paper notes that malicious domain names within the internal network are detected at a lower rate due to the overwhelming amount of "white" (benign) data. This suggests a need for future research to improve the model and data characterization for internal network threats.
- Future Work: The authors plan to extend their work to restore the entire APT attack process by analyzing associated logs and integrating their proposed method with other techniques. They also aim to improve the model and data characterization for better detection of internal network threats.
Summary updated