IMCSCL: Image-Based Malware Classification using Self-Supervised and Contrastive Learning
Yetao Jia, Yangyang Meng, Honglin Zhuang · 2023
The use of malware for illicit cyber activities, including network attacks and information theft, poses a severe threat to cybersecurity. In comparison to traditional malware detection methods based on signature and heuristics, machine learning and deep learning-based malware detection methods demonstrate superior generalization ability. However, existing research still faces challenges such as reliance on relatively single malware features, inadequate ability to describe malware features, and overdependence on labeled data. In this paper, we propose an image-based malware classification method using self-supervised and contrastive learning, named IMCSCL. We visualize malware using opcode semantic features, and then detect malware using a contrastive learning method with improved feature encoder network. Experimental results demonstrate that IMCSCL achieves higher detection accuracy compared to supervised malware detection methods, achieving 98.85% accuracy on the Microsoft Malware Classification Challenge dataset. Fine-tuning the model using randomly selected 5% labeled samples from the training set still achieved high accuracy of 94.22%. IMCSCL exhibits superior generalization ability, faster convergence speed, and better training stability. Moreover, contrastive learning significantly reduces malware labeling costs while effectively enhancing detection performance.