Abstract
MaskDGA is a practical, black-box adversarial attack designed to help botnets evade state-of-the-art deep learning domain detectors. By strategically perturbing critical character positions in an algorithmically generated domain (AGD) name, the technique slashes the detection F1-score of top-tier classifiers from 0.977 to 0.495. Unlike previous GAN-based approaches, MaskDGA is computationally efficient and maintains domain validity while bypassing common adversarial defenses such as retraining and distillation.
Introduction
Modern botnets utilize Domain Generation Algorithms (DGAs) to establish resilient communication channels with Command and Control (C&C) servers. Defenders have countered this by deploying deep learning models (e.g., LSTMs and CNNs) that identify malicious domains based on lexicographic patterns. However, these models often rely on specific character distributions that can be exploited. MaskDGA addresses the need for a "black-box" attack—one where the attacker lacks knowledge of the defender's specific model architecture—to generate evasive domains that remain cheap and available for botnet operators.
Methodology
The MaskDGA framework operates as a wrapper around existing DGAs, following a four-step pipeline to transform standard AGDs into adversarial samples.
- Substitute Model Training: The attacker trains a local "substitute" model using public datasets to approximate the defender's decision boundary.
- Jacobian-based Saliency Map (JSM): Through a single feed-forward and back-propagation step, the attacker identifies character positions that most strongly influence the model's classification.
- Strategic Perturbation: The top 50% most salient positions are replaced with characters that push the model toward a "benign" label.
- Constraint Enforcement: The algorithm ensures the resulting domain is valid and minimizes collisions.
Experimental Evaluation
The study utilized the DMD-2018 dataset, comprising 100,000 benign domains and nearly 300,000 AGDs from 20 DGA families. MaskDGA was tested against four state-of-the-art classifiers: Endgame, CMU, Invincea, and MIT.
- Detection Collapse: The average F1-score of the models dropped from 0.977 to 0.495 under attack.
- Superiority over Baselines: MaskDGA outperformed random replacement and GAN-based methods (like DeepDGA), which only reduced F1-scores to approximately 0.78.
- Resilience to Defenses: The attack remained effective even against models hardened with adversarial retraining or distillation, highlighting the fragility of current detection methods.
Key Insights and Discussion
- Transferability: Adversarial examples generated against a substitute model effectively transfer to production models because they exploit shared vulnerabilities in character distribution learning.
- Lexicographic Fragility: Classifiers often rely on "shortcuts," such as associating specific characters (e.g., underscores) with benign traffic, which MaskDGA ruthlessly exploits.
- Efficiency: Unlike GANs, which can be unstable and produce unusable domains, MaskDGA is reliable and computationally light, making it a practical tool for real-world attackers.
Conclusion
MaskDGA demonstrates that current lexicographic DGA classifiers are highly vulnerable to targeted perturbations. The results suggest that these models are not truly "understanding" domain structure but are instead memorizing distributions. Future defense strategies must move beyond character-level analysis to incorporate contextual features like DNS query timing and IP reputation to build more robust security perimeters.
Summary updated