TL;DR
This paper introduces a novel methodology for extracting temporal patterns from network flow data to improve Network Intrusion Detection Systems (NIDS). By comparing a sequential Long Short-Term Memory (LSTM) model against a traditional Feedforward Neural Network (FNN), the study demonstrates that temporal patterns can indeed enhance detection capabilities, particularly in challenging datasets.
What Problem Does This Paper Address?
Network Intrusion Detection Systems (NIDS) are crucial for cybersecurity, but they face constant challenges from evolving threats and the sheer volume of network traffic. While deep learning, especially sequential models like LSTMs, has shown promise in capturing temporal characteristics of network data, there's a lack of rigorous evaluation specifically for network flows (NetFlows) and a clear understanding of whether these sequential models truly offer benefits over traditional static models. Many existing approaches borrow techniques from other fields without deep consideration for the unique aspects of cybersecurity, and there's a need to investigate if temporal patterns observed at the packet level still hold true for NetFlows, which are aggregated summaries. This paper aims to bridge this gap by proposing a methodology to extract and evaluate temporal patterns in NetFlows for NIDS.
Methods
The core of this paper lies in its proposed methodology for extracting "attack scenarios" from labeled NetFlow data. This involves:
- Expert Knowledge and Data Analytics: Leveraging existing knowledge of attack patterns and analyzing NetFlow data to identify time intervals where malicious activities occur.
- Scenario Creation: Isolating specific time intervals that contain malicious NetFlows (and potentially some benign ones) to form "attack scenarios." This process aims to reduce the noise from overwhelming benign traffic and focus on potentially meaningful temporal sequences.
- Mitigating Data Imbalance: The methodology acknowledges the significant imbalance between benign and malicious traffic in NIDS datasets. It proposes to mitigate this by focusing on specific time intervals and, if necessary, creating separate "benign scenarios" to ensure the models learn from representative data.
- Sequential vs. Static Models: The study compares two machine learning models:
- LSTM (Sequential): A Long Short-Term Memory network, chosen for its ability to capture temporal dependencies in sequential data.
- FNN (Static): A Feedforward Neural Network, used as a baseline to represent traditional models that do not explicitly consider temporal relationships.
- Fair Comparison: Both models are trained and tested on the same preprocessed data, with similar architectural complexity (e.g., number of hidden layers, dropout) to ensure a fair comparison.
- Ensemble Evaluation: To further validate if the LSTM and FNN learn different patterns, an ensemble model (FNN+LSTM) is created using a logical OR operation. This helps determine if combining their predictions offers further improvements.
Datasets
The study uses two well-known and publicly available datasets for evaluating NIDS:
- CTU13: This dataset comprises thirteen collections of real network traffic data, each containing various botnet families and malicious activities. It's noted for its significant data imbalance.
- CICIDS2017: This dataset features synthetic benign traffic and common attack types, with the advantage of having distinct time intervals for each attack type and being less imbalanced than CTU13. Its documentation provides precise time intervals for attacks, which is beneficial for the proposed scenario creation method.
Key Insights and Ideas
- Temporal Patterns in NetFlows Exist and Matter: The study provides evidence that temporal patterns within NetFlow data can be extracted and are useful for detecting malicious activities, especially when using sequential models like LSTMs.
- NetFlows as a Viable Data Source for Temporal Analysis: While packet-level temporal analysis is common, this work demonstrates its applicability to NetFlows, which are more efficient to process.
- LSTM Outperforms FNN in Specific Scenarios: While both models perform well overall, the LSTM shows superior performance in certain attack scenarios, particularly those with complex temporal dynamics. This suggests that the sequential nature of LSTM allows it to better adapt to and learn these specific patterns.
- Scenario Creation is Key: The proposed method for creating focused "attack scenarios" is crucial. It helps to isolate relevant temporal information and mitigate the challenges posed by imbalanced datasets, leading to more effective learning.
- Ensemble Benefits Highlight Distinct Learning: The FNN+LSTM ensemble often outperforms the standalone LSTM, indicating that the FNN learns complementary patterns that the LSTM might miss, and vice-versa. This reinforces the idea that sequential and static models capture different aspects of the data.
Key Results
- CICIDS2017: Both LSTM and FNN achieved high F1-scores (over 99.5%). However, the LSTM showed better performance in specific scenarios, demonstrating lower false negatives and positives in some cases.
- CTU13: The LSTM significantly outperformed the FNN, achieving a 95.7% F1-score compared to the FNN's 91.5%. This dataset, with its higher imbalance and varied attack types, highlights the LSTM's advantage.
- Ensemble Performance: The FNN+LSTM ensemble generally showed improvements, particularly in reducing false negatives, confirming that the two models learn distinct patterns. For instance, in the CTU13 dataset, the ensemble achieved a 90.8% F1-score, with a significant reduction in false negatives compared to the standalone FNN.
Limitations and Future Work
- No Guarantee of Pattern Meaningfulness: The authors acknowledge that while their method extracts scenarios, there's no inherent guarantee that these scenarios capture truly meaningful temporal relationships for detection. This is why empirical validation with ML models is essential.
- Computational Burden: The process of extracting scenarios and training deep learning models can be computationally intensive.
- Future Work: The paper suggests exploring more advanced sequential models, investigating different methods for scenario creation, and applying the methodology to a wider range of datasets and attack types. Further research into how to best combine the strengths of sequential and static models in an ensemble is also a promising direction.
Summary updated