Abstract: Malicious traffic detection is a pivotal component in ensuring network security. Currently, deep learning-based malicious traffic detection methods have become mainstream. However, these studies lack comprehensive attention to the structural features of traffic and the time delay information between data packets. To address these issues, we propose a new malicious traffic detection model MTD-RTPE, which is built upon relative time-delay positional encoding and multi-head self-attention mechanisms. By analyzing the hierarchical structure of traffic, we integrated certain natural language processing (NLP) techniques into our method. We designed a relative time-delay positional encoding module to embed the relative time delay information between traffic data packets into the positional encoding. Leveraging multi-head self-attention, we extracted spatio-temporal features, which significantly enhanced our model’s ability to detect malicious traffic and improved its generalization capability. Based on experiments conducted on the USTC-TFC2016, CTU-Malware&Normal, and ISOT public datasets, the proposed model demonstrates commendable performance in terms of accuracy and handling imbalanced dataset testing.
Loading