[论文解读] DeepDGA: Adversarially-Tuned Domain Generation and Detection
本文提出 DeepDGA,一种基于生成对抗网络(GAN)的 DGA,通过对抗性调优域名以逃避基于深度学习的 DGA 检测器。通过迭代训练生成器以生成隐蔽域名,同时训练检测器以区分这些域名,该框架生成的对抗性样本可泛化至其他模型——表明使用这些样本增强训练数据能显著提升对未见 DGA 家族的检测能力,包括在使用手工特征的随机森林分类器上。
Many malware families utilize domain generation algorithms (DGAs) to establish command and control (C&C) connections. While there are many methods to pseudorandomly generate domains, we focus in this paper on detecting (and generating) domains on a per-domain basis which provides a simple and flexible means to detect known DGA families. Recent machine learning approaches to DGA detection have been successful on fairly simplistic DGAs, many of which produce names of fixed length. However, models trained on limited datasets are somewhat blind to new DGA variants. In this paper, we leverage the concept of generative adversarial networks to construct a deep learning based DGA that is designed to intentionally bypass a deep learning based detector. In a series of adversarial rounds, the generator learns to generate domain names that are increasingly more difficult to detect. In turn, a detector model updates its parameters to compensate for the adversarially generated domains. We test the hypothesis of whether adversarially generated domains may be used to augment training sets in order to harden other machine learning models against yet-to-be-observed DGAs. We detail solutions to several challenges in training this character-based generative adversarial network (GAN). In particular, our deep learning architecture begins as a domain name auto-encoder (encoder + decoder) trained on domains in the Alexa one million. Then the encoder and decoder are reassembled competitively in a generative adversarial network (detector + generator), with novel neural architectures and training strategies to improve convergence.
研究动机与目标
- 开发一种基于深度学习的 DGA,通过对抗性训练显式规避深度学习分类器的检测。
- 探究对抗性生成的域名是否可作为有效数据增强手段,以增强机器学习模型对先前未见 DGA 家族的鲁棒性。
- 解决字符级 GAN 在域名生成中的训练挑战,包括模式崩溃和收敛性差的问题。
- 评估对抗性样本在不同模型架构(如使用手工特征的随机森林)间的泛化能力。
- 证明 GAN 生成的对抗性样本可提升对分布外 DGA 家族的检测性能。
提出的方法
- 在 Alexa 排名前 100 万个域名上预训练一个字符级深度学习模型作为自编码器,以学习域名表示。
- 将编码器和解码器重新用于构建 GAN:生成器生成域名,判别器充当 DGA 检测器。
- 采用新型训练策略,包括历史正则化、盒层(box layers)和主轴盒层(principal axis box layers),以稳定训练并提升收敛性。
- 生成器被训练以生成能欺骗判别器的域名,而判别器则在对抗性训练轮次中更新,以更好地区分真实与对抗性域名。
- 使用 GAN 生成的对抗性样本对另一独立随机森林分类器的训练数据集进行增强,以提升其鲁棒性。
- 框架采用留一家庭交叉验证策略,以评估对未见 DGA 家族的泛化能力。
实验结果
研究问题
- RQ1能否训练 GAN 生成对深度学习 DGA 检测器具有对抗性的域名,从而实现规避检测?
- RQ2为某一模型架构(如深度神经网络)生成的对抗性样本,是否也能规避另一模型架构(如使用手工特征的随机森林)的检测?
- RQ3能否使用 GAN 生成的对抗性样本增强训练数据,以提升对先前未见 DGA 家族的检测性能?
- RQ4在字符级 GAN 用于域名生成时,需要哪些新型训练技术以实现训练稳定?
- RQ5对抗性数据增强在固定假阳性率下,对分布外 DGA 家族的真正例率提升程度如何?
主要发现
- DeepDGA 生成器成功生成了可规避其自身判别器检测的域名,在 20% 的保留测试集上检测率仅为 48%。
- GAN 生成的对抗性域名同样可规避基于手工特征的随机森林分类器,表明其在不同模型类型间具有泛化能力。
- 在训练集中加入 10,000 个对抗性 DeepDGA 样本后,随机森林分类器在保留 DGA 家族上的平均真正例率(FPR 为 1%)从 68% 提升至 70%。
- 强化后的模型在以往表现较差的家族中表现尤为突出,如 pykspa(真正例率从 67% 提升至 71%)和 ramdo(真正例率从 54% 提升至 54%),多数家族性能提升或保持稳定。
- 该方法证明,GAN 生成的对抗性样本可有效增强模型对未见 DGA 变体的鲁棒性,其在分布真实性方面优于传统的基于扰动的对抗性训练。
- 使用自编码器预训练及新型网络层(盒层、主轴盒层)显著提升了 GAN 训练的稳定性和收敛性。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。