[Paper Review] Botnet Detection Using Recurrent Variational Autoencoder
This paper proposes a Recurrent Variational Autoencoder (RVAE) for online, real-time botnet detection by modeling sequential patterns in network traffic flow data. The method achieves high accuracy in detecting previously unseen botnet families—matching state-of-the-art results—by assigning anomaly scores via learned probability distributions, enabling streaming detection with robust performance across diverse botnet types and communication protocols.
Botnets are increasingly used by malicious actors, creating increasing threat to a large number of internet users. To address this growing danger, we propose to study methods to detect botnets, especially those that are hard to capture with the commonly used methods, such as the signature based ones and the existing anomaly-based ones. More specifically, we propose a novel machine learning based method, named Recurrent Variational Autoencoder (RVAE), for detecting botnets through sequential characteristics of network traffic flow data including attacks by botnets. We validate robustness of our method with the CTU-13 dataset, where we have chosen the testing dataset to have different types of botnets than those of training dataset. Tests show that RVAE is able to detect botnets with the same accuracy as the best known results published in literature. In addition, we propose an approach to assign anomaly score based on probability distributions, which allows us to detect botnets in streaming mode as the new networking statistics becomes available. This on-line detection capability would enable real-time detection of unknown botnets.
Motivation & Objective
- To address the limitations of signature-based and traditional anomaly-based botnet detection methods that fail to detect evolving, previously unseen botnet families.
- To develop a machine learning-based anomaly detection system capable of identifying botnets through sequential and periodic traffic patterns, especially in streaming mode.
- To enable online, real-time detection of unknown botnets by leveraging probabilistic reconstruction error distributions from a trained RVAE model.
- To validate robustness across diverse botnet types, including those using non-standard protocols like proprietary C2 channels, not seen during training.
- To improve generalization and adaptability of anomaly detection systems by modeling temporal dependencies in network traffic using deep generative models.
Proposed method
- The proposed method employs a Recurrent Variational Autoencoder (RVAE) to learn the latent representation of normal network traffic sequences, capturing temporal and periodic patterns.
- The RVAE is trained exclusively on normal network flow data, learning to reconstruct input sequences while modeling uncertainty via variational inference.
- Anomaly scores are computed using the likelihood of reconstruction errors under learned probability distributions (PDFs), enabling statistical anomaly detection.
- The system supports online detection by processing new network statistics in real time, with a sliding window approach to maintain temporal context.
- Best-fit probability distributions (e.g., generalized logistic, fold Cauchy, Mielke) are estimated for reconstruction error distributions to distinguish between normal and botnet traffic.
- The method evaluates performance across varying time window durations (5s, 60s, 300s), with 60s found optimal for balancing sequence length and gradient stability.
Experimental results
Research questions
- RQ1Can a deep generative model like RVAE effectively detect botnets by modeling sequential and periodic patterns in network traffic?
- RQ2How does the proposed RVAE-based anomaly detection system perform on previously unseen botnet families, especially those using non-IRC/HTTP/P2P protocols?
- RQ3What is the optimal time window duration for balancing reconstruction accuracy, gradient stability, and detection performance in streaming mode?
- RQ4Can probability distributions of reconstruction errors reliably distinguish between normal and botnet traffic, even when the distribution shapes vary with window size?
- RQ5Does the method achieve competitive performance compared to state-of-the-art approaches on benchmark datasets like CTU-13, especially in online detection scenarios?
Key findings
- The RVAE model achieves an F1 score of 0.929 and AUROC of 0.975 on the CTU-13 dataset when using a 60-second time window, matching or exceeding the best-known results in the literature.
- With a 60-second window, the method achieves 100% recall and 86.5% precision, demonstrating strong detection capability for diverse botnet types.
- The 300-second window yields lower precision (53.7%) due to overlapping distributions of normal and botnet reconstruction errors, indicating poor separation.
- The 5-second window shows high variance and poor separation, with the best-fit PDF being fold Cauchy, suggesting instability in short-term pattern modeling.
- The 60-second window yields the most distinct separation between normal and botnet reconstruction error distributions, with the generalized logistic distribution providing the best fit.
- The method successfully detects a previously unseen botnet family (scenario 6, using proprietary C2) with 66% of samples having reconstruction errors below 4, indicating robustness to novel protocols.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.