Yuste, JavierGarcía Pardo, EduardoTapiador, Juan2023-09-202023-09-202022Javier Yuste, Eduardo G. Pardo, Juan Tapiador, Optimization of code caves in malware binaries to evade machine learning detectors, Computers & Security, Volume 116, 2022, 102643, ISSN 0167-4048, https://doi.org/10.1016/j.cose.2022.1026430167-4048https://hdl.handle.net/10115/24407This research was supported by the Ministerio de Ciencia, Innovación y Universidades (Grant Refs. PGC2018-095322-B-C22 and PID2019-111429RB-C21), by the Region of Madrid grant CYNAMON-CM (P2018/TCS-4566), co-financed by European Structural Funds ESF and FEDER, and the Excellence Program EPUC3M17. The opinions, findings, conclusions, or recommendations expressed are those of the authors and do not necessarily reflect those of any of the funders.Machine Learning (ML) techniques, especially Artificial Neural Networks, have been widely adopted as a tool for malware detection due to their high accuracy when classifying programs as benign or malicious. However, these techniques are vulnerable to Adversarial Examples (AEs), i.e., carefully crafted samples designed by an attacker to be misclassified by the target model. In this work, we propose a general method to produce AEs from existing malware, which is useful to increase the robustness of ML-based models. Our method dynamically introduces unused blocks (caves) in malware binaries, preserving their original functionality. Then, by using optimization techniques based on Genetic Algorithms, we determine the most adequate content to place in such code caves to achieve misclassification. We evaluate our model in a black-box setting with a well-known state-of-the-art architecture (MalConv), resulting in a successful evasion rate of 97.99 % from the 2k tested malware samples. Additionally, we successfully test the transferability of our proposal to commercial AV engines available at VirusTotal, showing a reduction in the detection rate for the crafted AEs. Finally, the obtained AEs are used to retrain the ML-based malware detector previously evaluated, showing an improve on its robustness.engAtribución 4.0 Internacionalhttp://creativecommons.org/licenses/by/4.0/MalwareEvasionMachine learningAdversarial exampleGenetic algorithmOptimization of code caves in malware binaries to evade machine learning detectorsinfo:eu-repo/semantics/article10.1016/j.cose.2022.102643info:eu-repo/semantics/openAccess