TL;DR
This paper introduces DeepDGA, a novel generative adversarial network (GAN) that crafts domain generation algorithm (DGA) domains designed to evade detection by machine learning models. By training a DGA generator to fool a DGA detector, they demonstrate that these adversarial domains can significantly harden existing DGA detectors against previously unseen DGA families.
What Problem Does This Paper Address?
Malware often uses Domain Generation Algorithms (DGAs) to create dynamic command-and-control (C&C) infrastructure, making it difficult for security systems to track and block malicious activity. While machine learning has shown promise in detecting DGA-generated domains, these models can be vulnerable to new or slightly modified DGAs they haven't been trained on. The challenge is to create DGA detectors that are robust against evolving DGA techniques, including those specifically designed to bypass them.
Methods
The core of this work is a Generative Adversarial Network (GAN) adapted for DGA generation. The process involves two main stages:
- Autoencoder Pre-training: A character-based autoencoder is first trained on a large corpus of legitimate domain names (Alexa Top 1 Million). This autoencoder learns to represent and reconstruct domain names, effectively capturing the patterns of "normal" domains.
- GAN Training: The autoencoder's components are repurposed for a GAN. The decoder becomes the generator, tasked with producing new domain names from a random seed, aiming to mimic the legitimate domain distribution. The encoder, with an added logistic regression layer, acts as the discriminator, trying to distinguish between real and generated domains. Through adversarial rounds, the generator learns to produce domains that are increasingly difficult for the discriminator to classify as fake.
The authors also highlight novel architectural choices, including using highway networks and LSTM cells for character-level sequence modeling, and a "box layer" to constrain the generator's output embeddings.
Datasets
- Alexa Top 1 Million: Used for pre-training the autoencoder and as a source of legitimate domains for training and evaluating the DGA detectors.
- DGA Families: The paper considers several known DGA families (e.g., corebot, cryptolocker, ramnit, pykspa) for comparison and evaluation.
- DeepDGA Generated Domains: Domains generated by the DeepDGA GAN itself are used as adversarial examples for training and testing.
Key Insights and Ideas
- Adversarial Examples are Transferable: A crucial finding is that domains generated to fool a deep learning detector also fool a completely different model – a random forest classifier using hand-crafted features. This suggests that adversarial examples can generalize across different model architectures and feature sets in the cybersecurity domain.
- GANs as DGA Evasion Tools: The paper demonstrates that GANs can be effectively used not just to generate realistic-looking data, but specifically to create data designed to bypass detection systems. This opens up a new avenue for understanding and defending against sophisticated malware.
- Adversarial Training for Robustness: Augmenting training datasets with these adversarially generated domains significantly hardens DGA detectors, improving their ability to identify previously unseen DGA families. This is a practical application of adversarial machine learning for enhancing security.
- Character-Level Modeling is Key: The character-by-character generation approach allows for more nuanced and stealthy DGA creation compared to simpler methods, making it harder for traditional statistical detectors to identify patterns.
Key Results
- Evasion of Deep Learning Detectors: The DeepDGA GAN successfully generated domains that increasingly confused a deep learning detector over several adversarial rounds, as evidenced by decreasing AUC scores for a random forest classifier trained on these domains.
- Evasion of Feature-Based Detectors: Domains generated by DeepDGA after three adversarial rounds exhibited a false negative rate of approximately 1 in 14 for a random forest classifier, a significant improvement in evasion compared to other character-based DGAs (e.g., pykspa with a 1 in 106 rate).
- Hardening of Detectors: When a random forest classifier was trained on a dataset augmented with 10K DeepDGA adversarial examples, its detection rate for unseen DGA families improved. For instance, the average true positive rate (TPR) at a 1% false positive rate (FPR) increased from 0.68 to 0.70.
- Mimicking Legitimate Domain Distributions: The unigram distribution of domains generated by DeepDGA after adversarial tuning closely matched that of the Alexa Top 1 Million domains, indicating their stealthy nature.
Limitations and Future Work
- Computational Cost: Training GANs can be computationally intensive, and the paper notes that adversarial training requires substantial effort to prevent common failure modes.
- Transferability to Other Models: While transferability to a random forest was shown, the paper suggests further work to explore sharing adversarial examples across even more diverse machine learning models.
- Direct Comparison to Perturbation-Based Adversarial Examples: The authors acknowledge that their GAN-crafted adversarial examples are different from perturbation-based methods (like the fast gradient sign method) and suggest future work to compare their effectiveness for DGA hardening.
- Preventing FPR Increase: The paper notes that while adversarial examples can harden models, care must be taken to avoid adversely affecting the false positive rate (FPR) when using them for hardening.
- Exploring Other GAN Training Strategies: The authors mention that other GAN training strategies, such as minibatch discrimination, could be explored to further improve diversity and prevent generator collapse.
Summary updated