通道注意力模块的作用是关注特征图不同通道的重要程度,并对更重要的通道赋予更高的权重。如图4所示,该模块将经过卷积池化操作得到的特征图作为输入,并通过全局平均池化层(Global Average Pooling,GAP)和全局最大池化层(Global Max Pooling,GMP)并行地对空间维度进行压缩,得到两个C×1×1的特征向量(其中C为输入特征图的通道数)。这两个特征向量被输入一个共享的多层感知器MLP中,该MLP由两个全连接层构成,其神经元个数分别为C/8,C,用于通道的降维和增维,以拟合通道间的相关性。最后将两个输出相加并进行sigmoid激活操作,得到维度为C×1×1的通道权值向量,通道权值向量再与原始输入特征图相乘,从而对不同的通道赋予对应的权重。通道权值向量的计算公式如式(2)所示:
在目前已公开的流量数据集中,涉及加密识别方面的数据相对较少。“ISCX VPN-nonVPN”数据集是当前研究加密流量领域常用的数据集,是由Draper-Gil等在2016年提出的[16],其中包括7种常规加密流量和7种虚拟专用网络(Virtual Private Network,VPN)隧道传输流量。但是作者对于该数据集只是做出了简单介绍,并没有给出这些数据的对应标签,这就造成一些流量所属类型出现模糊不清的情况。对于Browsing以及VPN-Browsing两类流量,例如Facebook_video既可划分为Browsing,也可划分为Streaming。因此,本文选择将类模糊的流量进行删除。最终,本文实验选择其中6种常规加密流量和6种VPN隧道传输加密流量作为训练和测试的样本。此外,为了充分验证本文方法的可行性,实验还使用了“ISCX Tor-nonTor”数据集,该数据集是由University of New Brunswick(UNB)发布的,涵盖了来自十几种应用(facebook,skype等)的8种类别加密网络流量。在这两个公开的数据集中,主要包括两种可提取的数据特征,分别为流量的统计特征和原始网络流量,原始网络流量即原始的pcapng和pcap格式的数据包。我们首先会对原始流量进行数据预处理工作,并提取实验所需的四个统计特征然后转换为RGBA图,表3—表4分别介绍了这两个数据集的流量类别、每一种类别流量包含的内容以及样本数。
2)流量清洗:为了防止流量部分信息影响实验性能评估,我们首先需要对流量进行匿名化处理,每个流量类别在数据集中都有一个唯一的IP地址,如果不删除IP地址和媒体访问控制地址(Media Access Control Address,MAC),模型可能会产生过拟合。此外,实验还会去除流量数据集中的重复的文件或者空文件,避免在训练的时候影响模型的分类性能。
AZABA, KHASAWNEHM, ALRABAEES, et al. Network Traffic Classification: Techniques, Datasets, and Challenges[J]. Digit Commun Netw, 2022. DOI: 10.1016/j.dcan.2022.09.009 .
[2]
LINP, HUY S, LINY Y, et al. PEAN: A Packet-level End-to-end Attentive Network for Encrypted Traffic Identification[C]//2021 IEEE 23rd Int Conf on High Performance Computing & Communications; 7th Int Conf on Data Science & Systems; 19th Int Conf on Smart City; 7th Int Conf on Dependability in Sensor, Cloud & Big Data Systems & Application (HPCC/DSS/SmartCity/DependSys). Haikou, Hainan: IEEE, 2022: 267-274. DOI: 10.1109/HPCC-DSS-SmartCity-DependSys53884.2021.00061 .
[3]
ZHENGW P, ZHONGJ H, ZHANGQ Z, et al. MTT: an Efficient Model for Encrypted Network Traffic Classification Using Multi-task Transformer[J]. Appl Intell, 2022, 52(9): 10741-10756. DOI: 10.1007/s10489-021-03032-8 .
[4]
DAIJ B, XUX L, GAOH H, et al. SHAPE: A Simultaneous Header and Payload Encoding Model for Encrypted Traffic Classification[J]. IEEE Trans Netw Serv Manag, 2023, 20(2): 1993-2012. DOI: 10.1109/TNSM.2022.3213758 .
[5]
OKONKWOZ, FOO E, LIQ Y, et al. A CNN Based Encrypted Network Traffic Classifier[C]//Proceedings of the 2022 Australasian Computer Science Week. New York: ACM, 2022: 74-83. DOI: 10.1145/3511616.3513101 .
[6]
MOOREA W, ZUEVD. Internet Traffic Classification Using Bayesian Analysis Techniques[C]//Proceedings of the 2005 ACM SIGMETRICS International Conference on Measurement and Modeling of Computer Systems. New York: ACM, 2005: 50-60. DOI: 10.1145/1064212.1064220 .
[7]
TAYLORV F, SPOLAORR, CONTIM, et al. Robust Smartphone App Identification via Encrypted Network Traffic Analysis[J]. IEEE Trans Inf Forensics Secur, 2018, 13(1): 63-78. DOI: 10.1109/TIFS.2017.2737970 .
[8]
CAOJ, FANGZ, QUG, et al. An Accurate Traffic Classification Model Based On Support Vector Machines[J]. Int J Netw Manag, 2017, 27(1): e1962. DOI: 10.1002/nem.1962
[9]
WANGW, ZHUM, ZENGX W, et al. Malware Traffic Classification Using Convolutional Neural Network for Representation Learning[C]//2017 International Conference on Information Networking (ICOIN). Da Nang, Vitenam: IEEE, 2017: 712-717. DOI: 10.1109/ICOIN.2017.7899588 .
[10]
WANGW, ZHUM, WANGJ L, et al. End-to-end Encrypted Traffic Classification with One-dimensional Convolution Neural Networks[C]//2017 IEEE International Conference on Intelligence and Security Informatics (ISI). Beijing, China: IEEE, 2017: 43-48. DOI: 10.1109/ISI.2017.8004872 .
[11]
LOTFOLLAHIM, SIAVOSHANIM J, ZADER S H, et al. Deep Packet: a Novel Approach for Encrypted Traffic Classification Using Deep Learning[J]. Soft Comput, 2020, 24(3): 1999-2012. DOI: 10.1007/s00500-019-04030-2 .
[12]
HEY J, LIW. Image-based Encrypted Traffic Classification with Convolution Neural Networks[C]//2020 IEEE Fifth International Conference on Data Science in Cyberspace (DSC). New York: IEEE, 2020: 271-278. DOI: 10.1109/DSC50466.2020.00048 .
[13]
HUOHT L, LUOY, LIP L, et al. Flow-based Encrypted Network Traffic Classification with Graph Neural Networks[C]//IEEE Transactions on Network and Service Management. New York: IEEE, 2022: 1224-1237. DOI: 10.1109/TNSM.2022.3227500 .
[14]
LINP, YEK J, HUY S, et al. A Novel Multimodal Deep Learning Framework for Encrypted Traffic Classification[J]. IEEE/ACM Trans Netw, 2023, 31(3): 1369-1384. DOI: 10.1109/TNET.2022.3215507 .
[15]
IZADIS, AHMADIM, RAJABZADEHA. Network Traffic Classification Using Deep Learning Networks and Bayesian Data Fusion[J]. J Netw Syst Manage, 2022, 30(2): 25. DOI: 10.1007/s10922-021-09639-z .
[16]
DRAPER-GILG, LASHKARIA H, MAMUNM S I, et al. Characterization of Encrypted and VPN Traffic Using Time-related Features[C]//Proceedings of the 2nd International Conference on Information Systems Security and Privacy. Roma, Italy: SCITEPress, 2016: 407-414. DOI: 10.5220/0005740704070414 .
[17]
HABIBI LASHKARIA, DRAPER GILG, MAMUNM S I, et al. Characterization of Tor Traffic Using Time Based Features[C]//Proceedings of the 3rd International Conference on Information Systems Security and Privacy. Porto, Portugal: SCITEPress, 2017: 253-262. DOI: 10.5220/0006105602530262 .
XUH P, MAZ W, YIH, et al. Network Traffi c Anomaly Detection Technology Based on Convolutional Recurrent Neural Network[J]. Netinfo Secur, 2021(7): 54-62. DOI: 10.3969/j.issn.1671-1122.2021.07.007 .
[20]
MAZ H, LIK Y, LIZ Y, et al. Encrypted Traffic Classification Based on a Convolutional Neural Network[J]. J Phys: Conf Ser, 2022, 2400(1): 012056. DOI: 10.1088/1742-6596/2400/1/012056 .
[21]
QINJ Y, LIUG J, DUANK. A New Imbalanced Encrypted Traffic Classification Model Based on CBAM and Re-weighted Loss Function[J]. Appl Sci, 2022, 12(19): 9631. DOI: 10.3390/app12199631 .
[22]
MAX L, ZHUW B, WEIJ L, et al. EETC: An Extended Encrypted Traffic Classification Algorithm Based on Variant Resnet Network[J]. Comput Secur, 2023, 128: 103175. DOI: 10.1016/j.cose.2023.103175 .
[23]
OBESOA M, BENOIS-PINEAUJ, GARCÍA VÁZQUEZM S, et al. Visual vs Internal Attention Mechanisms in Deep Neural Networks for Image Classification and Object Detection[J]. Pattern Recognit, 2022, 123: 108411. DOI: 10.1016/j.patcog.2021.108411 .