journal article·2024-06-30Open access

Malware Classification Using Dynamically Extracted API Call Embeddings

Sahil Aggarwal, Fabio Di Troia

Applied Sciences· Volume 14· Issue 13

Abstract

Malware classification stands as a crucial element in establishing robust computer security protocols, encompassing the segmentation of malware into discrete groupings. Recently, the emergence of machine learning has presented itself as an apt approach for addressing this challenge. Models can undergo training employing diverse malware attributes, such as opcodes and API calls, to distill valuable insights for effective classification. Within the realm of natural language processing, word embeddings assume a pivotal role by representing text in a manner that aligns closely with the proximity of similar words. These embeddings facilitate the quantification of word resemblances. This research embarks on a series of experiments that harness hybrid machine learning methodologies. We derive word vectors from dynamic API call logs associated with malware and integrate them as features in collaboration with diverse classifiers. Our methodology involves the utilization of Hidden Markov Models and Word2Vec to generate embeddings from API call logs. Additionally, we amalgamate renowned models like BERT and ELMo, noted for their capacity to yield contextualized embeddings. The resultant vectors are channeled into our classifiers, namely Support Vector Machines (SVMs), Random Forest (RF), k-Nearest Neighbors (kNNs), and Convolutional Neural Networks (CNNs). Through two distinct sets of experiments, our objective revolves around the classification of both malware families and categories. The outcomes achieved illuminate the efficacy of API call embeddings as a potent instrument in the domain of malware classification, particularly in the realm of identifying malware families. The best combination was RF and word embeddings generated by Word2Vec, ELMo, and BERT, achieving an accuracy between 0.91 and 0.93. This result underscores the potential of our approach in effectively classifying malware.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Advanced Malware Detection Techniques · Spam and Phishing Detection · Network Security and Intrusion Detection

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Computer Science, San Jose State University, San Jose, CA 95192, USA

References (30)

Show source-provided references
1. Sonicwall (2023). SonicWall Cyber Threat Report, Sonicwall.
2. Srivastava, A., Lanzi, A., and Giffin, J. (2008, January 15–17). System call API obfuscation. Proceedings of the Recent Advances in Intrusion Detection: 11th International Symposium, RAID 2008, Cambridge, MA, USA. Proceedings 11.
3. Kotov, V., and Wojnowicz, M. (2018). Towards generic deobfuscation of windows API calls. arXiv.10.14722/bar.2018.23011 ↗
4. Ali, M., Hamid, M., Jasser, J., Lerman, J., Shetty, S., and Di Troia, F. (2022, January 9–11). Profile Hidden Markov Model Malware Detection and API Call Obfuscation. Proceedings of the ICISSP, Online.10.5220/0011005800003120 ↗
5. A Survey on Automated Dynamic Malware-Analysis Techniques and Tools10.1145/2089125.2089126 ↗
6. Uppal, D., Sinha, R., Mehra, V., and Jain, V. (2014, January 14–16). Exploring Behavioral Aspects of API Calls for Malware Identification and Categorization. Proceedings of the 2014 International Conference on Computational Intelligence and Communication Networks, Bhopal, India.10.1109/CICN.2014.176 ↗
7. Sharma, P. (2022, January 8). Windows Malware Detection using Machine Learning and TF-IDF Enriched API Calls Information. Proceedings of the 2022 Second International Conference on Computer Science, Engineering and Applications (ICCSEA), Gunupur, India.
8. Kalash, M., Rochan, M., Mohammed, N., Bruce, N.D.B., Wang, Y., and Iqbal, F. (2018, January 26–28). Malware Classification with Deep Convolutional Neural Networks. Proceedings of the 2018 9th IFIP International Conference on New Technologies, Mobility and Security (NTMS), Paris, France.10.1109/NTMS.2018.8328749 ↗
9. Siddiqui, M., Wang, M.C., and Lee, J. (2008, January 28–29). A Survey of Data Mining Techniques for Malware Detection Using File Features. Proceedings of the 46th Annual Southeast Regional Conference on XX, New York, NY, USA.10.1145/1593105.1593239 ↗
10. Tran, T.K., and Sato, H. (2017, January 15–17). NLP-based approaches for malware classification from API sequences. Proceedings of the 2017 21st Asia Pacific Symposium on Intelligent and Evolutionary Systems (IES), Hanoi, Vietnam.10.1109/IESYS.2017.8233569 ↗
11. Mikolov, T., Chen, K., Corrado, G., and Dean, J. (2013). Efficient Estimation of Word Representations in Vector Space. arXiv.
12. Popov, I. (2017, January 12–13). Malware detection using machine learning based on word2vec embeddings of machine code instructions. Proceedings of the 2017 Siberian Symposium on Data Science and Engineering (SSDSE), Novosibirsk, Russia.10.1109/SSDSE.2017.8071952 ↗
13. Alqurashi, S., and Batarfi, O. (2017, January 11–14). A comparison between API call sequences and opcode sequences as reflectors of malware behavior. Proceedings of the 2017 12th International Conference for Internet Technology and Secured Transactions (ICITST), Cambridge, UK.10.23919/ICITST.2017.8356357 ↗
14. A comparison of static, dynamic, and hybrid analysis for malware detection
15. Chandak, A., Lee, W., and Stamp, M. (2021). A Comparison of Word2Vec, HMM2Vec, and PCA2Vec for Malware Classification. arXiv.10.1007/978-3-030-62582-5_11 ↗
16. Peters, M.E., Neumann, M., Iyyer, M., Gardner, M., Clark, C., Lee, K., and Zettlemoyer, L. (2018). Deep contextualized word representations. arXiv.10.18653/v1/N18-1202 ↗
17. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, L., and Polosukhin, I. (2017). Attention Is All You Need. arXiv.
18. Devlin, J., Chang, M.W., Lee, K., and Toutanova, K. (2019). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv.
19. Malware classification with Word2Vec, HMM2Vec, BERT, and ELMo10.1007/s11416-022-00424-3 ↗
20. (2024, June 25). Buster Sanbox Analyzer. Available online: https://bsa.isoftware.nl/.
21. (2024, June 25). Sandboxie. Available online: https://sandboxie-plus.com/downloads/.
22. Stamp, M. (2022). Introduction to Machine Learning with Applications in Information Security, CRC Press.10.1201/9781003264873 ↗
23. Kale, A.S., Di Troia, F., and Stamp, M. (2021). Malware classification with word embedding features. arXiv.10.5220/0010377907330742 ↗
24. What is a support vector machine?10.1038/nbt1206-1565 ↗
25. Russell, S., and Norvig, P. (2016). Artificial Intelligence: A Modern Approach, Pearson.
26. Stamp, M. (2017). A Reassuring Introduction to Support Vector Machines. Introduction to Machine Learning with Applications in Information Security, Chapman and Hall/CRC.10.1201/9781315213262-5 ↗
27. Random Forests10.1023/A:1010933404324 ↗
28. Classification and Regression by RandomForest
29. O’Shea, K., and Nash, R. (2015). An Introduction to Convolutional Neural Networks. arXiv.
30. Sharma, S., Krishna, C.R., and Sahay, S.K. (2019). Detection of Advanced Malware by Machine Learning Techniques. arXiv.10.1007/978-981-13-0589-4_31 ↗