[Paper Review] Predicting Domain Generation Algorithms with Long Short-Term Memory Networks
The paper introduces a featureless LSTM-based classifier that detects DGA-generated domains in real time (per-domain) and can classify domains by malware family, achieving state-of-the-art AUC and F1 scores with no contextual data. It also provides reproducible open-source code.
Various families of malware use domain generation algorithms (DGAs) to generate a large number of pseudo-random domain names to connect to a command and control (C&C) server. In order to block DGA C&C traffic, security organizations must first discover the algorithm by reverse engineering malware samples, then generating a list of domains for a given seed. The domains are then either preregistered or published in a DNS blacklist. This process is not only tedious, but can be readily circumvented by malware authors using a large number of seeds in algorithms with multivariate recurrence properties (e.g., banjori) or by using a dynamic list of seeds (e.g., bedep). Another technique to stop malware from using DGAs is to intercept DNS queries on a network and predict whether domains are DGA generated. Such a technique will alert network administrators to the presence of malware on their networks. In addition, if the predictor can also accurately predict the family of DGAs, then network administrators can also be alerted to the type of malware that is on their networks. This paper presents a DGA classifier that leverages long short-term memory (LSTM) networks to predict DGAs and their respective families without the need for a priori feature extraction. Results are significantly better than state-of-the-art techniques, providing 0.9993 area under the receiver operating characteristic curve for binary classification and a micro-averaged F1 score of 0.9906. In other terms, the LSTM technique can provide a 90% detection rate with a 1:10000 false positive (FP) rate---a twenty times FP improvement over comparable methods. Experiments in this paper are run on open datasets and code snippets are provided to reproduce the results.
Motivation & Objective
- Motivate the need for real-time DGA detection without contextual data or manual features.
- Propose a per-domain DGA classifier using LSTM networks.
- Evaluate against retrospective and real-time baselines across multiple DGA families.
- Show that the method supports multiclass classification by malware family and provide reproducible code.
Proposed method
- Use an embedding layer followed by an LSTM to learn character-level patterns in domain names.
- Apply dropout after the LSTM layer and use a logistic classifier for binary or multinomial logistic regression for multiclass output.
- Train and test on open datasets with Alexa top 1M domains as benign and Bambenek OSINT DGA feeds as DGAs.
- Compare LSTM to HMM, logistic regression on bigrams, and random forest with manual features.
- Provide open-source Python/Keras implementations to enable reproduction.
Experimental results
Research questions
- RQ1Can a per-domain DGA classifier detect DGA domains without any contextual information?
- RQ2Can an LSTM-based model outperform feature-based and retrospective approaches for real-time DGA detection?
- RQ3Is the approach capable of multiclass classification to attribute domains to specific DGA families?
- RQ4What are the performance metrics (AUC, F1, precision, recall) achievable in realistic open-data setups?
Key findings
- LSTM achieves AUC of 0.9993 in binary classification, outperforming alternative methods.
- LSTM yields micro-averaged F1 of 0.9906 and substantially lower FP rates (e.g., 1:10000) than prior methods.
- The model can perform multiclass classification with high accuracy across 30 DGA families.
- Classification of a domain takes around 20 ms on commodity hardware.
- Code and experiments are reproducible using open datasets and Keras implementations.
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.