Image-based Malware and Benign Software Classification

Maher F. Ismael

Abstract


The growing volume and diversity of malware challenge the scalability of manual analysis and the effectiveness of signature-based detection. An alternative approach is image-based learning, which has been the subject of numerous studies, but tend to focus on the classification of malware families instead of malicious-benign discrimination, and are based on large models where little attention is paid to the degree of data leakage and how it impacts on performance variability. This paper presents a simple convolutional approach to binary classification of executable-file images, without disassembly or dynamic execution – I-Base+. With only 18,881 trainable parameters, it is a simple framework which processes resized grayscale images with two convolutional blocks, global average pooling, and a binary output layer. Evaluation is based on 3,000 Microsoft-signed benign images and 8,444 pre-existing MalImg images from 25 malware families from which 895 images were removed that were exact duplicates. The evaluation protocol consists of training/validation and test partitions that are stratified, five random seeds, controlled ablations and a family-disjoint evaluation in which selected families of malware are not included in the training set. While providing a mean accuracy of 98.72% and a recall rate of 99.51% with a false-positive rate of 3.51%, the number of parameters required for I-Base+ is significantly fewer than the evaluated transfer-learning baselines, and CPU inference speed is significantly faster than the evaluated transfer-learning baselines. Withheld families' recall is 81.64%, indicating that generalization to unseen malware is still a major challenge. The results show a practical accuracy–efficiency trade-off for image-based malware classification, and indicate that it is necessary to consider beyond random sample splits.

Keywords


Malware Detection; Binary Classification; Malware Visualization; Convolutional Neural Network; Global Average Pooling

Full Text:

PDF

References


L. Nataraj, S. Karthikeyan, G. Jacob, and B. S. Manjunath, “Malware Images: Visualization and Automatic Classification,” in Proceedings of the 8th International Symposium on Visualization for Cyber Security (VizSec), 2011, pp. 1–7, DOI: 10.1145/2016904.2016908.

K. S. Han, J. H. Lim, B. Kang, and E. G. Im, “Malware Analysis using Visualized Images and Entropy Graphs,” International Journal of Information Security, Vol. 14, No. 1, pp. 1–14, 2015, DOI: 10.1007/s10207-014-0242-0.

R. Chaganti, V. Ravi, and T. D. Pham, “Image-based Malware Representation Approach with EfficientNet Convolutional Neural Networks for Effective Malware Classification,” Journal of Information Security and Applications, Vol. 69, Art. no. 103306, 2022, DOI: 10.1016/j.jisa.2022.103306.

T. T. Son, C. Lee, H. Le-Minh, N. Aslam, and V. C. Dat, “An Enhancement for Image-based Malware Classification using Machine Learning with Low Dimension Normalized Input Images,” Journal of Information Security and Applications, Vol. 69, Art. No. 103308, 2022, DOI: 10.1016/j.jisa.2022.103308.

A. Copiaco, L. El Neel, T. Nazzal, H. Mukhtar, and W. Obaid, “A Neural Network Approach to a Grayscale Image-based Multi-File Type Malware Detection System,” Applied Sciences, Vol. 13, No. 23, Art. No. 12888, 2023, DOI: 10.3390/app132312888.

S. Venkatraman, M. Alazab, and R. Vinayakumar, “A Hybrid Deep Learning Image-based Analysis for Effective Malware Detection,” Journal of Information Security and Applications, Vol. 47, pp. 377–389, 2019, DOI: 10.1016/j.jisa.2019.06.006.

Z. Cui, F. Xue, X. Cai, Y. Cao, and G. G. Wang, “Detection of Malicious Code Variants based on Deep Learning,” IEEE Transactions on Industrial Informatics, Vol. 14, No. 7, pp. 3187–3196, 2018, DOI: 10.1109/TII.2018.2822680.

M. Kalash, M. Rochan, N. Mohammed, N. D. B. Bruce, Y. Wang, and F. Iqbal, “Malware Classification with Deep Convolutional Neural Networks,” in 2018 9th IFIP International Conference on New Technologies, Mobility and Security (NTMS), 2018, pp. 1–5, DOI: 10.1109/NTMS.2018.8328749.

B. Zou, C. Cao, F. Tao, and L. Wang, “IMCLNet: A Lightweight Deep Neural Network for Image-based Malware Classification,” Journal of Information Security and Applications, Vol. 70, Art. No. 103313, 2022, DOI: 10.1016/j.jisa.2022.103313.

D. Vasan, M. Alazab, S. Wassan, H. Naeem, B. Safaei, and Q. Zheng, “IMCFN: Image-based Malware Classification using Fine-Tuned Convolutional Neural Network Architecture,” Computer Networks, Vol. 171, Art. No. 107138, 2020, DOI: 10.1016/j.comnet.2020.107138.

N. Bhodia, P. Prajapati, F. Di Troia, and M. Stamp, “Transfer Learning for Image-based Malware Classification,” in Proceedings of the 5th International Conference on Information Systems Security and Privacy (ICISSP), 2019, pp. 719–726, DOI: 10.5220/0007701407190726.

D. Arp, E. Quiring, F. Pendlebury, A. Warnecke, F. Pierazzi, C. Wressnegger, L. Cavallaro, and K. Rieck, “Dos and Don’ts of Machine Learning in Computer Security,” in Proceedings of the 31st USENIX Security Symposium, 2022, pp. 3971–3988.

E. Rezende, G. Ruppert, T. Carvalho, F. Ramos, and P. de Geus, “Malicious Software Classification using Transfer Learning of ResNet-50 Deep Neural Network,” in 2017 16th IEEE International Conference on Machine Learning and Applications (ICMLA), 2017, pp. 1011–1014, DOI: 10.1109/ICMLA.2017.00-19.

W. El-Shafai, I. Almomani, and A. AlKhayer, “Visualized Malware Multi-Classification Framework using Fine-Tuned CNN-based Transfer Learning Models,” Applied Sciences, Vol. 11, No. 14, Art. No. 6446, 2021, DOI: 10.3390/app11146446.

M. J. Awan, O. A. Masood, M. A. Mohammed, A. Yasin, A. M. Zain, R. Damaševičius, and K. H. Abdulkareem, “Image-based Malware Classification using VGG19 Network and Spatial Convolutional Attention,” Electronics, Vol. 10, No. 19, Art. no. 2444, 2021, DOI: 10.3390/electronics10192444.

M. Ashawa, N. Owoh, S. Hosseinzadeh, and J. Osamor, “Enhanced Image-based Malware Classification using Transformer-based Convolutional Neural Networks (CNNs),” Electronics, Vol. 13, No. 20, Art. No. 4081, 2024, DOI: 10.3390/electronics13204081.

Y. Yu, B. Cai, K. Aziz, X. Wang, J. Luo, M. S. Iqbal, P. Chakrabarti, and T. Chakrabarti, “Semantic Lossless Encoded Image Representation for Malware Classification,” Scientific Reports, Vol. 15, Art. No. 7997, 2025, DOI: 10.1038/s41598-025-88130-0.

A. Tekerek and M. M. Yapici, “A Novel Malware Classification and Augmentation Model based on Convolutional Neural Network,” Computers & Security, Vol. 112, Art. No. 102515, 2022, DOI: 10.1016/j.cose.2021.102515.

M. Asam, S. H. Khan, A. Akbar, S. Bibi, T. Jamal, A. Khan, U. Ghafoor, and M. R. Bhutta, “IoT Malware Detection Architecture using a Novel Channel Boosted and Squeezed CNN,” Scientific Reports, Vol. 12, Art. No. 15498, 2022, DOI: 10.1038/s41598-022-18936-9.

K. Shaukat, S. Luo, and V. Varadharajan, “A Novel Deep Learning-based Approach for Malware Detection,” Engineering Applications of Artificial Intelligence, Vol. 122, Art. No. 106030, 2023, DOI: 10.1016/j.engappai.2023.106030.

J. Hemalatha, S. A. Roseline, S. Geetha, S. Kadry, and R. Damaševičius, “An Efficient DenseNet-based Deep Learning Model for Malware Detection,” Entropy, Vol. 23, No. 3, Art. no. 344, 2021, DOI: 10.3390/e23030344.

S. Mahdavifar, A. F. A. Kadir, R. Fatemi, D. Alhadidi, and A. A. Ghorbani, “Dynamic Android Malware Category Classification using Semi-Supervised Deep Learning,” in 2020 IEEE International Conference on Dependable, Autonomic and Secure Computing (DASC), 2020, pp. 515–522, DOI: 10.1109/DASC-PICom-CBDCom-CyberSciTech49142.2020.00094.

K. Shaukat, S. Luo, and V. Varadharajan, “A Novel Method for Improving the Robustness of Deep Learning-based Malware Detectors Against Adversarial Attacks,” Engineering Applications of Artificial Intelligence, Vol. 116, Art. No. 105461, 2022, DOI: 10.1016/j.engappai.2022.105461.

M. Lin, Q. Chen, and S. Yan, “Network in Network,” in Proceedings of the 2nd International Conference on Learning Representations (ICLR), 2014, arXiv:1312.4400.

T. Saito and M. Rehmsmeier, “The Precision-Recall Plot is More Informative than the ROC Plot when Evaluating Binary Classifiers on Imbalanced Datasets,” PLoS ONE, Vol. 10, No. 3, Art. No. e0118432, 2015, DOI: 10.1371/journal.pone.0118432.

M. Brosolo, P. Vinod, and M. Conti, “Through the Static: Demystifying Malware Visualization via Explainability,” arXiv preprint arXiv:2503.02441, 2025.




DOI: https://doi.org/10.32520/stmsi.v15i10.6965

Article Metrics

Abstract view : 0 times
PDF - 0 times

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.