The Curious Case of Machine Learning in Malware Detection: Sherif Saad, William Briguglio and Haytham Elmiligi
The Curious Case of Machine Learning in Malware Detection: Sherif Saad, William Briguglio and Haytham Elmiligi
Keywords: Malware, Machine Learning, Behaviour Analysis, Adversarial Malware, Online Training, Detector Interpre-
tation.
Abstract: In this paper, we argue that detecting malware attacks in the wild is a unique challenge for machine learn-
ing techniques. Given the current trend in malware development and the increase of unconventional malware
attacks, we expect that dynamic malware analysis is the future for antimalware detection and prevention sys-
tems. A comprehensive review of machine learning for malware detection is presented. Then, we discuss how
malware detection in the wild present unique challenges for the current state-of-the-art machine learning tech-
niques. We defined three critical problems that limit the success of malware detectors powered by machine
learning in the wild. Next, we discuss possible solutions to these challenges and present the requirements of
next-generation malware detection. Finally, we outline potential research directions in machine learning for
malware detection.
The new and emerging malware threats discussed in Cybersecurity analysts always prefer solutions that
section 3 provide strong evidence for the need of are interpretable and understandable, such as rule-
adopting dynamic and behavioral analysis to build based or signature-based detection. This is because
malware detection tools. The use of machine learning of the need to tune and optimize these solutions to
is the most promising technique to implement mal- mitigate and control the effect of false positives and
ware detectors and tools that apply behavioral analy- false negatives. Interpreting machine learning mod-
sis as shown in section 2. While the use of machine els is a new and open challenge (Shirataki and Ya-
learning for malware detection has shown promising maguchi, 2017). However, it is expected that an in-
results in both static and dynamic analysis, there are terpretable machine learning solution will be domain
significant challenges that limit the success of ma- specific, for instance, interpretable solutions for ma-
chine learning based malware detectors in the wild. chine learning models in healthcare are different than
solutions in malware detection (Ahmad et al., 2018).
4.1 Cost of Training Detectors Any malware detector will generate false posi-
tives, and unless malware analysts can understand and
The first challenge is the cost of training and updating interpret the reason that a benign application wrongly
malware detectors in production environment. Mal- classified as malicious, they will not accept those
ware detection is unlike other domains where ma- black box malware detectors. To our knowledge, no
chine learning techniques have been applied success- work in the literature investigated the interpretability
fully such as computer vision, natural language pro- of machine learning models for malware detection.
4.3 Adversarial Malware is built to detect the behaviors of a specific malware
instance (e.g., Mirai, WannaCry), or at most a sin-
Last but not least, a malware detection system utiliz- gle malware family (a group of similar malware in-
ing machine learning could be defeated (bypassed) stances). Also, each model or detector is built us-
using adversarial malware samples. For instance, ing features that are similar, such as having the same
Kolosnjaji et al. showed in (Kolosnjaji et al., 2018) computational cost, or unique to the specific execu-
that by using an intelligent evasion attack they can tion environment. This is because out of the superset
defeat the deep learning detection system proposed in of features designed to detect malware, it is common
(Raff et al., 2017) by Raff et al. They simply used that a subset of these features could be more or less
their knowledge of how the proposed deep learning useful to detect a specific malware instance or fam-
detection system operates and designed a gradient- ily. The use of micro (small) and focused detectors
based attack as an evasion technique to overcome it. reduce the cost of retraining and deployment in pro-
With adversarial malware, the system detection accu- duction. This is because detectors for new malware
racy dropped from 94.0% to almost 50.0%. Machine could be trained and added without the need to retrain
learning algorithms are not designed to work with ad- existing detectors. In addition, when a malware de-
versarial examples. Grosse et al. demonstrated that tector becames outdated as a result of malware evolv-
using adversarial malware samples; they could reduce ing behaviors, the outdated detectors are disposed of
the detection accuracy of a malware detection sys- and replaced by new ones. The use of micro-detectors
tem that uses static analysis and machine learning to enables adaptability by design rather than attempting
63.0% (Grosse et al., 2017). They also showed that to change machine learning models and algorithms to
adopting anti adversarial machine learning techniques support adaptability.
used in computer vision is not effective in malware
detection. Yang et al. proposed adversarial training as 5.2 Analyst Friendly Interpretation
a solution for adversarial malware (Yang et al., 2017).
They designed a method for adversarial android mal-
ware instances generation. The proposed method re- Adopting sophisticated machine learning techniques
quires access to the malware binaries and source code, for malware detection in a production environment is
besides, it is mainly useful for static malware detec- a challenge. This is because most of the time it is not
tion systems. possible to understand how the machine learning sys-
tems make their malware detection decisions. There-
fore, tuning and maintaining these systems is a chal-
lenge in production and new techniques for malware
5 BRIDGING THE DETECTION analysts to interpret and evaluate the performance of
GAP malware detectors are needed. We propose the use
of evolutionary computation techniques such as ge-
To overcome the challenges we discussed in section 4, netic algorithms or clonal selection algorithms to gen-
we propose new solutions to mitigate these challenges erate an interpretation for black-box machine learn-
and reduce the gap. ing models such as deep learning. Using evolutionary
computation, we could describe the decisions of mal-
5.1 Disposable Micro Detectors ware detectors using a set of IF-Then rules. The only
information required is the input features the malware
Current best practices in constructing and build- detector uses to make a decision.
ing machine learning models follow a mono- The IF-Then rules are useful to explain the behav-
lithic architecture. In monolithic architecture, iors that trigger a specific decision (e.g., malicious
a computationally-expensive single-monolithic (to or benign) by the malware detector. Cybersecurity
build and train) machine learning model is used to and malware analyst are comfortable working with
detect malwares. While this architecture or approach IF-Then rules. These rules will help in understand-
for building machine learning models is successful in ing the decision made by malware detectors, explain
other domains, we believe it is unsuitable for mal- the scope of the detection, and identify potential over
ware detection given the highly evolving character- generalization or overfitting that could result in false
istics of malware instance. We propose a new ap- positives or false negatives.
proach inspired by microservices architecture. In this It is essential that the IF-Then rules set interpre-
approach, multiple, small, inexpensive, focused ma- tation of the malware detector to be expressed in raw
chine learning models are built and orchestrated to malware behaviors and not in machine learning fea-
detect malware instances. Each model or detector tures. Machine learning features are most likely un-
derstandable by machine learning engineers and ex- 6 CONCLUSION
perts. The interpretation should be acceptable to a
malware analyst who does not need to be machine In this paper, we reviewed the current state-of-the-art
learning experts. in malware detection using machine learning. We dis-
cussed the recent trends in malware development and
5.3 Anti Adversarial Malware emerging malware threats. We argued that behavioral
analysis would dominate the next generation antimal-
To improve the resilience of malware detectors ware systems. We discussed the challenges of apply-
against adversarial malware, we believe it is essential ing machine learning to detect malware in the wild
to study the effort required by the malware authors and proposed our thoughts on how we could over-
to design an adversarial malware for specific malware come these challenges. Machine learning malware
detectors. For example, what technique a malware au- detectors require inexpensive training methods; they
thor would use to probe and study a malware detector need to be interpretable for the malware analysts and
in production to design a malware that could bypass not only for machine learning experts. Finally, they
this detector. need to tolerate adversarial malware by design.
Measuring the effort to probe detectors and design
adversarial malware under two main settings is essen-
tial. The first setting is black-box, where the malware REFERENCES
authors have minimum knowledge about the malware
detector internal design and the features used by the Ahmad, M. A., Teredesai, A., and Eckert, C. (2018). In-
machine learning algorithm. The second setting is terpretable machine learning in healthcare. In 2018
white-box, where the malware authors have sufficient IEEE International Conference on Healthcare Infor-
knowledge about the malware detector internal design matics (ICHI), pages 447–447.
and the machine learning algorithm. Training and up- Allix, K., Bissyandé, T. F., Klein, J., and Le Traon, Y.
dating the malware detectors is likely the most effi- (2015). Are your training datasets yet relevant? In
Piessens, F., Caballero, J., and Bielova, N., editors,
cient solution against adversarial malware. Knowing Engineering Secure Software and Systems, pages 51–
the effort needed to evade a malware detector will 67, Cham. Springer International Publishing.
help in designing training strategies and policies to Azmoodeh, A., Dehghantanha, A., Conti, M., and Choo,
increase the effort required to evade the detectors. K.-K. R. (2018). Detecting crypto-ransomware in
As we mentioned before, Cohen provided a for- iot networks based on energy consumption footprint.
mal proof that creating a perfect malware detection Journal of Ambient Intelligence and Humanized Com-
system is not possible (Cohen, 1987; Cohen, 1989). puting, 9(4):1141–1152.
We believe that designing a perfect adversarial mal- Choi, W., Joo, K., Jo, H. J., Park, M. C., and Lee, D. H.
ware is not possible. Therefore we expect that using (2018). Voltageids: Low-level communication char-
acteristics for automotive intrusion detection system.
ensemble-based hybrid machine learning approach IEEE Transactions on Information Forensics and Se-
for malware detector will be effective against ad- curity, 13(8):2114–2129.
versarial malware. It is expected that by creating a Cohen, F. (1987). Computer viruses: Theory and experi-
malware detector using an ensemble hybrid machine- ments. Computers & Security, 6(1):22 – 35.
learning approach, the risk of evading detection will Cohen, F. (1989). Computational aspects of computer
decrease and the effort to design adversarial malware viruses. Computers & Security, 8(4):297 – 298.
will increase. A hybrid machine learning model is David, O. E. and Netanyahu, N. S. (2015). Deepsign: Deep
when two or more different machine learning algo- learning for automatic malware signature generation
rithms are used to construct the model. In the litera- and classification. In 2015 International Joint Confer-
ture, adversarial malware samples evade malware de- ence on Neural Networks (IJCNN), pages 1–8.
tectors that use a single machine learning algorithm de Drézigué, D., Fizaine, J.-P., and Hansma, N. (2006). In-
or technique (Yang et al., 2017; Grosse et al., 2017; depth analysis of the viral threats with openoffice.org
documents. Journal in Computer Virology, 2(3):187–
Kolosnjaji et al., 2018). In our method, a hybrid ma- 210.
chine learning approach for building a malware de- Global Research and Analysis Team, KASPERSKY Lab
tector is an approach to provide a defense-in-depth (2017). Fileless attack against enterprise network.
model for malware detectors. Grosse, K., Papernot, N., Manoharan, P., Backes, M.,
and McDaniel, P. (2017). Adversarial examples for
malware detection. In Foley, S. N., Gollmann, D.,
and Snekkenes, E., editors, Computer Security – ES-
ORICS 2017, pages 62–79, Cham. Springer Interna-
tional Publishing.
Gupta, A., Kuppili, P., Akella, A., and Barford, P. (2009). Paola, A. D., Gaglio, S., Re, G. L., and Morana, M. (2018).
An empirical study of malware evolution. In 2009 A hybrid system for malware detection on big data. In
First International Communication Systems and Net- IEEE INFOCOM 2018 - IEEE Conference on Com-
works and Workshops, pages 1–10. puter Communications Workshops (INFOCOM WK-
Hajmasan, G., Mondoc, A., and Cre, O. (2017). Dynamic SHPS), pages 45–50.
behavior evaluation for malware detection. In 2017 Ponemon Institute, Research Report (2017). The 2017 state
5th International Symposium on Digital Forensic and of endpoint security risk.
Security (ISDFS), pages 1–6. Prokofiev, A. O., Smirnova, Y. S., and Surov, V. A. (2018).
Hassen, M., Carvalho, M. M., and Chan, P. K. (2017). Mal- A method to detect internet of things botnets. In
ware classification using static analysis based features. 2018 IEEE Conference of Russian Young Researchers
In 2017 IEEE Symposium Series on Computational in Electrical and Electronic Engineering (EIConRus),
Intelligence (SSCI), pages 1–7. pages 105–108.
Karam, C. and Kamluk, V. (2015). Blockchainware - de- Raff, E., Barker, J., Sylvester, J., Brandon, R., Catanzaro,
centralized malware on the blockchain. In Black Hat B., and Nicholas, C. K. (2017). Malware detection by
ASIA. eating a whole exe. CoRR, abs/1710.09435.
Kilgallon, S., Rosa, L. D. L., and Cavazos, J. (2017). Im- Rigaki, M. and Garcia, S. (2018). Bringing a gan to a knife-
proving the effectiveness and efficiency of dynamic fight: Adapting malware communication to avoid de-
malware analysis with machine learning. In 2017 Re- tection. In 2018 IEEE Security and Privacy Work-
silience Week (RWS), pages 30–36. shops (SPW), pages 70–75.
Kirat, Jiyong, and Stoecklin (2018). Deeplocker concealing Selcuk, A. A., Orhan, F., and Batur, B. (2017). Undecidable
targeted attacks with ai locksmithing. problems in malware analysis. In 2017 12th Inter-
Kolosnjaji, B., Demontis, A., Biggio, B., Maiorca, D., Gi- national Conference for Internet Technology and Se-
acinto, G., Eckert, C., and Roli, F. (2018). Adversarial cured Transactions (ICITST), pages 494–497.
malware binaries: Evading deep learning for malware Shirataki, S. and Yamaguchi, S. (2017). A study on in-
detection in executables. CoRR, abs/1803.04173. terpretability of decision of machine learning. In
Lim, H., Yamaguchi, Y., Shimada, H., and Takakura, H. 2017 IEEE International Conference on Big Data (Big
(2015). Malware classification method based on se- Data), pages 4830–4831.
quence of traffic flow. In 2015 International Con- Soliman, S. W., Sobh, M. A., and Bahaa-Eldin, A. M.
ference on Information Systems Security and Privacy (2017). Taxonomy of malware analysis in the iot. In
(ICISSP), pages 1–8. 2017 12th International Conference on Computer En-
M. Chess, D. and R. White, S. (2000). An undetectable gineering and Systems (ICCES), pages 519–529.
computer virus. In Proceedings of Virus Bulletin Con- Su, J., Vasconcellos, V. D., Prasad, S., Daniele, S., Feng,
ference. Y., and Sakurai, K. (2018). Lightweight classifica-
Magnusardottir, A. (2018). Fileless ransomware: How it tion of iot malware based on image recognition. In
works & how to stop it? White Paper. 2018 IEEE 42nd Annual Computer Software and Ap-
Martinelli, F., Mercaldo, F., Saracino, A., and Visaggio, plications Conference (COMPSAC), volume 01, pages
C. A. (2016). I find your behavior disturbing: Static 664–669.
and dynamic app behavioral analysis for detection of Su, M.-Y. and Fung, K.-T. (2016). Detection of android
android malware. In 2016 14th Annual Conference on malware by static analysis on permissions and sensi-
Privacy, Security and Trust (PST), pages 129–136. tive functions. In 2016 Eighth International Confer-
Miller, C. and Valasek, C. (2015). Remote exploitation of ence on Ubiquitous and Future Networks (ICUFN),
an unaltered passenger vehicle. White Paper. pages 873–875.
Moubarak, J., Chamoun, M., and Filiol, E. (2018). Devel- Yang, W., Kong, D., Xie, T., and Gunter, C. A. (2017). Mal-
oping a k-ary malware using blockchain. In NOMS ware detection in adversarial settings: Exploiting fea-
2018 - 2018 IEEE/IFIP Network Operations and ture evolutions and confusions in android apps. In AC-
Management Symposium, pages 1–4. SAC.
Naeem, H., Guo, B., and Naeem, M. R. (2018). A light- Yeo, M., Koo, Y., Yoon, Y., Hwang, T., Ryu, J., Song,
weight malware static visual analysis for iot infras- J., and Park, C. (2018). Flow-based malware de-
tructure. In 2018 International Conference on Artifi- tection using convolutional neural network. In 2018
cial Intelligence and Big Data (ICAIBD), pages 240– International Conference on Information Networking
244. (ICOIN), pages 910–913.
Narayanan, A., Yang, L., Chen, L., and Jinliang, L. Zhang-Kennedy, L., Assal, H., Rocheleau, J., Mohamed, R.,
(2016). Adaptive and scalable android malware de- Baig, K., and Chiasson, S. (2018). The aftermath of a
tection through online learning. In 2016 International crypto-ransomware attack at a large academic institu-
Joint Conference on Neural Networks (IJCNN), pages tion. In Proceedings of the 27th USENIX Conference
2484–2491. on Security Symposium, SEC’18, pages 1061–1078,
Berkeley, CA, USA. USENIX Association.
OSahn, D., Kural, O. E., Akleylek, S., and Kiliç, E. (2018).
New results on permission based static analysis for an-
droid malware. In 2018 6th International Symposium
on Digital Forensic and Security (ISDFS), pages 1–4.