Skip to main content

Classification of Grayscale Malware Images Using the K-Nearest Neighbor Algorithm

  • Conference paper
  • First Online:
Innovations in Smart Cities Applications Edition 3 (SCA 2019)

Abstract

The biggest problem with recovering from cyberattacks is that security professionals rarely get the chance to deal with them immediately. So, using advanced intelligent techniques, we can defense systems against malware the moment it begins to download. For that reason, a new type of feature has been recently introduced for malware classification task, borrowing techniques from computer vision community called malware visualization technique. Malware classification goal is to know how they work, and then we can rapidly defend them especially in the case of zero-days attacks. In this paper, we adopt KNN algorithm to classify malwares based on their image visualization. So, a malware binary is converted to grayscale image. Then to extract similarities and dis-similarities from these images a GIST descriptor is computed. We used a database of 9339 samples of malwares belonging to 25 families. Our malware classifier reached a high score of 97%, which is very close to the results found in literature.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Cakir, B., Dogdu, E.: Malware classification using deep learning methods. In: Proceedings of the ACMSE 2018 Conference, pp. 10:1–10:5. ACM, New York (2018). https://doi.org/10.1145/3190645.3190692

  2. Islam, R., et al.: Classification of malware based on integrated static and dynamic features. J. Netw. Comput. Appl. 36(2), 646–656 (2013). https://doi.org/10.1016/j.jnca.2012.10.004

    Article  Google Scholar 

  3. Jerlin, M.A., Marimuthu, K.: A new malware detection system using machine learning techniques for API call sequences. J. Appl. Secur. Res. 13(1), 45–62 (2018). https://doi.org/10.1080/19361610.2018.1387734

    Article  Google Scholar 

  4. Luo, J., Lo, D.C.: Malware image classification using machine learning with local binary pattern. In: 2017 IEEE International Conference on Big Data (Big Data), pp. 4664–4667 (2017). https://doi.org/10.1109/BigData.2017.8258512

  5. Makandar, A., Patrot, A.: Malware analysis and classification using artificial neural network. In: 2015 International Conference on Trends in Automation, Communications and Computing Technology (I-TACT-15), pp. 1–6 (2015). https://doi.org/10.1109/ITACT.2015.7492653

  6. Makandar, A., Patrot, A.: Malware class recognition using image processing techniques. In: 2017 International Conference on Data Management, Analytics and Innovation (ICDMAI), pp. 76–80 (2017). https://doi.org/10.1109/ICDMAI.2017.8073489

  7. Makandar, A., Patrot, A.: Wavelet statistical feature based malware class recognition and classification using supervised learning classifier. Orient. J. Comput. Sci. Technol. 10(2), 400–406 (2017). https://doi.org/10.13005/ojcst/10.02.20

    Article  Google Scholar 

  8. Nataraj, L., et al.: Malware images: visualization and automatic classification. In: Proceedings of the 8th International Symposium on Visualization for Cyber Security - VizSec 2011, pp. 1–7. ACM, Pittsburgh (2011). https://doi.org/10.1145/2016904.2016908

  9. Parsian, M.: Data Algorithms. O’Reilly, Boston (2015)

    Google Scholar 

  10. Rieck, K., et al.: Learning and classification of malware behavior. In: Zamboni, D. (ed.) Detection of Intrusions and Malware, and Vulnerability Assessment, pp. 108–125. Springer, Berlin (2008). https://doi.org/10.1007/978-3-540-70542-0_6

  11. Cisco 2018 Annual Cybersecurity Report

    Google Scholar 

  12. Le rapport de sécurité 2018/2019 d’AV-TEST (2019)

    Google Scholar 

Download references

Acknowledgments

We acknowledge financial support for this research from the “Centre National pour la Recherche Scientifique et technique”, CNRST, Morocco.

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Ikram Ben Abdel Ouahab , Mohammed Bouhorma , Anouar Abdelhakim Boudhir or Lotfi El Aachak .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Ben Abdel Ouahab, I., Bouhorma, M., Boudhir, A.A., El Aachak, L. (2020). Classification of Grayscale Malware Images Using the K-Nearest Neighbor Algorithm. In: Ben Ahmed, M., Boudhir, A., Santos, D., El Aroussi, M., Karas, İ. (eds) Innovations in Smart Cities Applications Edition 3. SCA 2019. Lecture Notes in Intelligent Transportation and Infrastructure. Springer, Cham. https://doi.org/10.1007/978-3-030-37629-1_75

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-37629-1_75

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-37628-4

  • Online ISBN: 978-3-030-37629-1

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics