基于LSTM与多头注意力机制的恶意域名检测算法

2019-10-08 09:03:43黄偲琪张冬梅闫博
软件 2019年2期

黄偲琪 张冬梅 闫博

摘  要: DGA域名是一类由特定算法生成,用来与恶意C&C服务器进行通信的域名,针对DGA域名的检测一直是一个研究热点。有文献提出了基于PCFG模型的DGA域名生成算法,在现有DGA检测方法的测试下,它的抗检测效果非常显著。这是因为它由合法域名生成,具备合法域名的统计特征。基于此,本文提出了将神经网络和自注意力机制相结合的检测模型M-LSTM,它利用Bi-LSTM实现字符序列编码以及初步特征提取,并结合多头注意力机制进行深度特征提取。实验结果表明,该算法在检测基于PCFG模型的域名上效果优异。

关键词: 域名检测;多头注意力机制;PCFG模型

【Abstract】: DGA (domain generation algorithms) domain names are a class of domain names generated by specific algorithms and they are used to communicate with malicious C&C servers. The detection of DGA domain names has always been a research hotspot. DGA based on the PCFG model has been proposed Lately. Under the test of the existing DGA detection technology, its anti-detection effect is very obvious. This is because it is generated by a legal domain name and has the same statistical characteristics of a legitimate domain name. Based on this, this paper proposes a detection model M-LSTM that combines neural network and self-attention mechanism. Bi-LSTM is employed to realize character sequence coding and preliminary feature extraction, combined with Multi-Head Attention mechanism for depth feature extraction. The experimental results show that the algorithm is excellent in detecting domain names based on PCFG model.

【Key words】: Domain name detection; Multi-Head attention mechanism; PCFG model

0  引言

当今世界,互联网已经渗透进到了我们生活中的每一块角落。在带给我无穷便利的同时,不少不法分子开始利用互联网进行违法犯罪活动。近几年不断曝光的勒索软件,DDOS攻击,僵尸网络等就是良好的佐证。它们利用DGA算法生成大量的域名,与隐藏着的C&C(Command and Control)服务器建立通信。在使用这种方式时,C&C服务器不再使用唯一的固定域名,而是在不同时间生成多组域名,黑客只需要注册其中的部分域名,即可实现对僵尸网络的完整控制。据相关实验[1]表明,在采样到的43个恶意软件中,有23个将DGA域名作为唯一通信手段,另外的恶意软件则将恶意域名进行了硬编码。由此可见,DGA域名已经成为当前恶意域名通信的主要形式,针对DGA所生成的恶意域名检查具有非常重要的意义。

1  相关工作

早期的DGA算法经常以一个特定的参数作为种子,比如时间,热门网站的内容等,它们被用以初始化一个伪随机算法。……

登录APP查看全文