Adaptive detection of encrypted malware traffic via fully convolutional masked autoencoders
Jizhe JIA , Meng SHEN , Qingjun YUAN , Yong LIU , Jing WANG , Jian KONG , Liang HUANG , Haotian HE , Liehuang ZHU
Front. Comput. Sci. ›› 2026, Vol. 20 ›› Issue (4) : 2004804
Adaptive detection of encrypted malware traffic via fully convolutional masked autoencoders
Network traffic encryption techniques are widely adopted to protect data confidentiality and prevent privacy leakage during data transmission. However, malware often leverages these traffic encryption techniques to conceal malicious activities. Recent research has demonstrated the effectiveness of machine and deep learning-based malware traffic detection methods. However, these methods rely on a sufficient amount of labeled data readily available for model training, limiting the capability of transferring to new malware detection.
In this paper, we propose Malcom, an adaptive encrypted malware traffic detection method based on fully convolutional masked autoencoders to detect malware traffic hidden in the encrypted traffic. We first propose a novel traffic representation named Header-Payload Matrix (HPM) to extract discriminative features that can differentiate from malware and benign traffic. Subsequently, we develop a hierarchical ConvNeXt traffic encoder and a lightweight ConvNeXt traffic decoder to learn high-level features from a large amount of unlabeled data. The masked autoencoder framework enables our model to be adaptive to new malware detection by fine-tuning with only a few labeled data. We conduct extensive experiments with real-world datasets to evaluate Malcom. The results demonstrate that Malcom outperforms the state-of-the-art (SOTA) methods in two typical scenarios. Particularly, in the scenario of few-shot learning, Malcom achieves an average F1 score of 97.35%, with an improvement of 8.24% over the SOTA method, by fine-tuning with only 10 samples per malware type.
malware traffic detection / encrypted traffic analysis / self-supervised learning / masked autoencoder
| [1] |
|
| [2] |
WatchGuard’s threat lab analyzes the latest malware and internet attacks. See watchguard.com/wgrd-resource-center/security-report-q3-2023 website, 2023 |
| [3] |
|
| [4] |
|
| [5] |
|
| [6] |
Anderson B, McGrew D. Identifying encrypted malware traffic with contextual flow data. In: Proceedings of 2016 ACM Workshop on Artificial Intelligence and Security. 2016, 35−46 |
| [7] |
|
| [8] |
Fu C, Li Q, Shen M, Xu K. Realtime robust malicious traffic detection via frequency domain analysis. In: Proceedings of 2021 ACM SIGSAC Conference on Computer and Communications Security. 2021, 3431−3446 |
| [9] |
|
| [10] |
|
| [11] |
|
| [12] |
|
| [13] |
|
| [14] |
Sirinam P, Mathews N, Rahman M S, Wright M. Triplet fingerprinting: more practical and portable website fingerprinting with N-shot learning. In: Proceedings of 2019 ACM SIGSAC Conference on Computer and Communications Security. 2019, 1131−1148 |
| [15] |
|
| [16] |
|
| [17] |
|
| [18] |
|
| [19] |
Deng X, Li Q, Xu K. Robust and reliable early-stage website fingerprinting attacks via spatial-temporal distribution analysis. In: Proceedings of 2024 on ACM SIGSAC Conference on Computer and Communications Security. 2024, 1997−2011 |
| [20] |
Shen M, Zhang J, Xu K, Zhu L, Liu J, Du X. DeepQoE: real-time measurement of video QoE from encrypted traffic with deep learning. In: Proceedings of the IEEE/ACM 28th International Symposium on Quality of Service (IWQoS). 2020, 1−10 |
| [21] |
Lin W T, Pan J Y. Mobile malware detection in sandbox with live event feeding and log pattern analysis. In: Proceedings of the 18th Asia-Pacific Network Operations and Management Symposium (APNOMS). 2016, 1−6 |
| [22] |
Devlin J, Chang M W, Lee K, Toutanova K. BERT: Pre-training of deep bidirectional transformers for language understanding. In: Proceedings of 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. 2019, 4171−4186 |
| [23] |
|
| [24] |
|
| [25] |
|
| [26] |
|
| [27] |
|
| [28] |
Wang W, Zhu M, Zeng X, Ye X, Sheng Y. Malware traffic classification using convolutional neural network for representation learning. In: Proceedings of 2017 International Conference on Information Networking (ICOIN). 2017, 712−717 |
| [29] |
|
| [30] |
|
| [31] |
|
| [32] |
Uhrig J, Schneider N, Schneider L, Franke U, Brox T, Geiger A. Sparsity invariant CNNs. In: Proceedings of 2017 International Conference on 3D Vision (3DV). 2017, 11−20 |
| [33] |
|
| [34] |
|
Higher Education Press
/
| 〈 |
|
〉 |