<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">OJAppS</journal-id><journal-title-group><journal-title>Open Journal of Applied Sciences</journal-title></journal-title-group><issn pub-type="epub">2165-3917</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ojapps.2023.1312193</article-id><article-id pub-id-type="publisher-id">OJAppS-130241</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Biomedical&amp;Life Sciences</subject><subject> Chemistry&amp;Materials Science</subject><subject> Computer Science&amp;Communications</subject><subject> Engineering</subject><subject> Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  Malware Detection Using Deep Learning
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Achi</surname><given-names>Harrisson Thiziers</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Koné</surname><given-names>Tiémoman</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>N’guessan</surname><given-names>Behou Gérard</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Traoré</surname><given-names>Tiémoko Qouddouss Kabir</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Unité de Recherche et d’Expertise Numérique (UREN), Université Virtuelle de C&amp;amp;#244;te d’Ivoire, Abidjan, C&amp;amp;#244;te d’Ivoire</addr-line></aff><pub-date pub-type="epub"><day>01</day><month>12</month><year>2023</year></pub-date><volume>13</volume><issue>12</issue><fpage>2480</fpage><lpage>2491</lpage><history><date date-type="received"><day>28,</day>	<month>November</month>	<year>2023</year></date><date date-type="rev-recd"><day>26,</day>	<month>December</month>	<year>2023</year>	</date><date date-type="accepted"><day>29,</day>	<month>December</month>	<year>2023</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  Malware represents a real threat to information systems, because of the dam
  age it causes. This threat is growing today, as these programs take on more complex forms. This means they escape traditional malware detection methods. Hence the need for artificial intelligence, more specifically Deep
   Learning, which could detect malware more effectively. In this article, we’ve proposed a model for malware detection using artificial neural networks. Our approach used data from the characteristics of machines, particularly computers, to train our Deep Learning algorithm. This model demonstrated an accuracy of around 83% in predicting the presence of malware on a machine. Thus, the use of artificial neural networks for malware detection has shown his ability to assimilate complex, non-linear patterns from data.
 
</p></abstract><kwd-group><kwd>Neural Network</kwd><kwd> ANNs</kwd><kwd> Malicious Code</kwd><kwd> Malware Analysis</kwd><kwd> Artificial Intelligence</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>With the rapid development of the Internet, malware has become one of today’s major cyberthreats. As the diversity of malware increases, antivirus software is no longer able to meet security needs. As a result, millions of computers are under attack. According to Kaspersky Labs (2016), 6,563,145 different hosts were attacked, and 4,000,000 unique malicious objects were detected in 2015. While traditional methods, such as signature-based static analysis, have been foundational in combating known threats, the dynamic and sophisticated nature of modern malware necessitates more advanced detection strategies. This paradigm shift towards deep learning in malware detection has led to substantial improvements in identifying previously unseen and polymorphic malware variants. However, despite the progress made, there exists a research gap in understanding the robustness, scalability, and generalizability of deep learning models across diverse malware landscapes. By focusing on this crucial research gap, the proposed study seeks to contribute valuable knowledge to the existing literature, providing a nuanced understanding of the capabilities and challenges associated with deploying deep learning for malware detection. Through empirical evaluations and rigorous experimentation, the research endeavors to offer practical recommendations for optimizing deep learning models, thereby fostering the development of more robust and resilient malware detection systems in the face of an ever-evolving cyber threat landscape. This paper presents elements of solutions for detecting malware based on artificial intelligence, mainly Deep Learning.</p></sec><sec id="s2"><title>2. Malware Basics</title><sec id="s2_1"><title>2.1. Malware Definition</title><p>Malware is a generic term for any type of computer program or software known as “malicious software”. It covers a range of techniques and tools designed to infect and damage their victims’ hardware, silently exploit their resources, extort money and/or steal sensitive and important data. They are used by cybercriminals for financial gain. There are different types of malwares, the best known of which are: Ransomware (Bounaamane, B., &amp; Drissi, Z. (2023)) [<xref ref-type="bibr" rid="scirp.130241-ref1">1</xref>] , Trojans (Moffie, et al. 2006) [<xref ref-type="bibr" rid="scirp.130241-ref2">2</xref>] , Spyware, Backdoor, Viruses (Horton and Seberry 1997) [<xref ref-type="bibr" rid="scirp.130241-ref3">3</xref>] , Remote Administration Tools (RAT), Worms, Rootkits (Chuvakin 2003) [<xref ref-type="bibr" rid="scirp.130241-ref4">4</xref>] .</p></sec><sec id="s2_2"><title>2.2. Malware Detection Methods</title><p>All malware detection techniques can be divided into two categories: static methods based on signatures; dynamic methods based on behavior [<xref ref-type="bibr" rid="scirp.130241-ref5">5</xref>] .</p><sec id="s2_2_1"><title>2.2.1. Static Methods Based on Signatures</title><p>Signature-based analysis is a static method based on predefined signatures. These can be file fingerprints, such as MD5 or SHA1 hashes, static strings, or file metadata. The detection scenario, in this case, would be as follows: when a file arrives on the system, it is statically analyzed by the antivirus software. If one of the signatures matches, an alert is triggered, indicating that the file is suspicious [<xref ref-type="bibr" rid="scirp.130241-ref6">6</xref>] .</p></sec><sec id="s2_2_2"><title>2.2.2. Dynamic Methods Based on Behavior (Behavior-Based Analysis)</title><p>Today’s attackers are developing malware that can modify its signature. This characteristic of malware is called polymorphism. Antivirus vendors have therefore had to find another means of detection, based on behavior or heuristics. In this method, the actual behavior of malware is observed during execution, looking for signs of malicious behavior: modification of host files, registry keys, establishment of suspicious connections [<xref ref-type="bibr" rid="scirp.130241-ref7">7</xref>] .</p></sec><sec id="s2_2_3"><title>2.2.3. Some Signs of Malware in the Information System</title><p>The daily impact of malware is disabling your computers and technological tools; Data loss and theft; Financial losses. Some signs of malware infection are computer slowness; problems shutting down or starting up your computer (slow startup); Infection warnings, often accompanied by purchase requests to remedy the situation; presence of unknown programs on your computer. <xref ref-type="fig" rid="fig1">Figure 1</xref> illustrates the presence of malware in the system.</p></sec></sec><sec id="s2_3"><title>2.3. The Need for Artificial Intelligence and Deep Learning</title><p>The two previous methods are increasingly outdated by the complexity of malware, and a solution based on artificial intelligence has been considered by several studies.</p><p>Recent work by Ijaz, Durad &amp; Ismail in 2019 focuses on modern malware, which is represented by its runtime behaviors and collected using the Cuckoo Sandbox tool. The authors demonstrate that better predictive accuracy is achieved with static analysis, due to the predominance of simple malware. However, they point out that dynamic analysis is preferable due to the protection mechanisms used by malware [<xref ref-type="bibr" rid="scirp.130241-ref8">8</xref>] .</p><p>Kolosnjaji, Zarras, Webster &amp; Eckert in 2016 applied neural networks to old malware in PE format (32-bit Windows executables). Although the results obtained were interesting, this methodology cannot be implemented in real time due to the need for post-processing to remove repeated actions [<xref ref-type="bibr" rid="scirp.130241-ref9">9</xref>] .</p></sec></sec><sec id="s3"><title>3. Material and Methods of Our Proposed Model</title><sec id="s3_1"><title>3.1. Material of Our Proposed Model</title><p>We used Microsoft Malware Prediction dataset, from Kaggle database, to build our prediction models. “Microsoft Malware Prediction” is a set of binary classification data (HasDetections “0” or “1”), containing around 16,774,736 machines and 81 attributes (machine and target identifier “HasDetections”), including 52 categorical attributes (23 attributes are attributes are numerically</p><p>coded to protect data confidentiality). Our data source consists of 2 csv files, one of which is the training file (train.csv) and the other the test file (test.csv). Together, these files contain 83 columns or attributes describing various information concerning the hardware and software of each machine. Of these, 53 are numerical values. The train.csv file contains 567,730 machines and 83 attributes, while the test.csv contains 243,313 machines with 82 columns. The overview of our dataset is illustrated by the two images (see <xref ref-type="fig" rid="fig2">Figure 2</xref> and <xref ref-type="fig" rid="fig3">Figure 3</xref>).</p></sec><sec id="s3_2"><title>3.2. Description of the Dataset</title><p>The dataset used is made up mainly of healthy machines, as shown by the distribution of data according to labels, as shown on <xref ref-type="fig" rid="fig4">Figure 4</xref>.</p></sec><sec id="s3_3"><title>3.3. Method of Our Proposed Model</title><sec id="s3_3_1"><title>3.3.1. Data Pre-Processing</title><p>The first step consisted of dealing with missing values and outliers, the analysis of the dataset has revealed that more than 44 columns have missing values, and between them around 7 columns have more than 50% missing data. The visual representation below shows how missing values are distributed before data processing (see <xref ref-type="fig" rid="fig5">Figure 5</xref>).</p><p>The second step consisted of data balancing according to the targeted column. Analyzing the target column, we observe an imbalance of occurrences, namely: 482,571 machines not infected by malware; 85,159 malware-infected machines.</p><p>For better learning, we’re going to balance this out by putting them at the same level, as shown in the figure below. At the end of this resampling, we obtain a data set containing as many healthy machines as infected machines (see <xref ref-type="fig" rid="fig6">Figure 6</xref>).</p><p>The following <xref ref-type="fig" rid="fig7">Figure 7</xref> shows the distribution of infected and uninfected machines after data preprocessing.</p><p>The last step is encoding. We used the following policy: for any categorical variable with more than 2 unique categories, we used label encoding. As shown in the illustration of <xref ref-type="fig" rid="fig8">Figure 8</xref>, columns with categorical values are encoded using the LabelEncoder function.</p></sec><sec id="s3_3_2"><title>3.3.2. Development Environment</title><p>The model was deployed in a python environment, on a HP Gamer Omen RTX computer, 64 GB Ram, Core i9, 2 Tera SSD, with the following tools: Python 3.9; Jupyter Notebook; Google Colab; These are the following libraries: Matplotlib; Numpy; Pandas; Seaborn; Scikit-learn, TensorFlow, Keras. We used 70% of our dataset to train our neural network, while we used 30% of our data for testing.</p></sec><sec id="s3_3_3"><title>3.3.3. Our Deep Learning Algorithm Used: Artificial Neural Network (ANN)</title><p>To implement our artificial neural network (ANN), we went through several steps: data pre-processing, data scaling and finally data partitioning into training and test samples. The data partitioning is illustrated in the figure below (see <xref ref-type="fig" rid="fig9">Figure 9</xref>).</p><p>Our ANN, based on a biological model, is represented as follows, with each ball representing a neuron (see <xref ref-type="fig" rid="fig1">Figure 1</xref>0).</p><p>- The set {w<sub>0</sub>, w<sub>1</sub>, …, w<sub>n</sub>} represents the weights associated with each neuron</p><p>- The set {x<sub>0</sub>, x<sub>1</sub>, …, x<sub>n</sub>} represents the input values for each neuron</p><p>- f represents the activation function</p><p>- b represents the neuron’s bias</p><p>- The output s of a neuron in each layer is calculated by applying the activation function f to the sum of the input values x<sub>k</sub> weighted by the weights w<sub>k</sub> and summed with the bias b.</p></sec><sec id="s3_3_4"><title>3.3.4. Our ANN Architecture</title><p>The model used for our study is an artificial neural network (ANN) whose modeling approach is described in the diagram of <xref ref-type="fig" rid="fig1">Figure 1</xref>1.</p></sec></sec></sec><sec id="s4"><title>4. Results and Discussion</title><sec id="s4_1"><title>4.1. Results</title><p>To evaluate the performance of our model, we relied on certain classification evaluation measures, namely:</p><p>● The Matrix confusion [<xref ref-type="bibr" rid="scirp.130241-ref10">10</xref>] is shown on <xref ref-type="fig" rid="fig1">Figure 1</xref>2</p><p>- TP: Our model predicts 84,541 true positives</p><p>- TN: Our model predicts that 29,524 machines are not infected, but are in fact infected</p><p>- FP: Our model predicts that 105,331 machines will be infected</p><p>- FN: Our model predicts that 9248 machines are infected, but they are not.</p><p>- Precision score</p><p>We trained an Artificial Neural Network (ANN) using Keras to predict the state of machines in relation to malware. Our model achieved an accuracy rate of 83.04%, as shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>3.</p><p>The score was obtained thanks to good training of the neural network. This training gave the following performance (see <xref ref-type="fig" rid="fig1">Figure 1</xref>4).</p><p>On the left-hand side, the error rate decreases, while the accuracy increases over time. The error rate has fallen from around 60% to 20%, demonstrating the accuracy of the model.</p><p>● The classification report:</p><p>- Precision: Precision is the proportion of instances correctly classified for a given class among all instances predicted to belong to that class.</p><p>- Recall: Recall, also known as sensitivity, measures the proportion of instances correctly classified for a given class among all instances belonging to that class.</p><p>- F1-score: F1-score is a metric that combines both precision and recall into a single value to assess prediction accuracy. It is particularly useful when classes are unbalanced.</p><p>- Support: Support represents the number of real instances for each class, allowing us to evaluate the distribution of the data. We can see all these in <xref ref-type="fig" rid="fig1">Figure 1</xref>5.</p></sec><sec id="s4_2"><title>4.2. Discussion</title><p>The solution we have proposed for detecting malware within machines or computers enables us to identify the presence of malware. However, the validity of our study may vary depending on whether it is applied to machines equipped with non-proprietary operating systems, such as open-source ones. Indeed, our research has mainly focused on machines running the Windows operating system. Our approach emphasizes machine characteristics, whereas existing studies focus more on the functional aspects of malware. Consequently, extending our findings to open-source environments would require in-depth analysis to assess the feasibility of applying our method.</p></sec><sec id="s4_3"><title>4.3. Comparison</title><p>Given the impact that malware can have on information systems, malware detection is all the more important in cybersecurity.</p><p>Z. Zhang, in an article published in 2022, used LightGBM, a machine learning model. His work was based on the same dataset as ours. LightGBM is a boosting model based on the gradient boosting algorithm, designed to improve performance and efficiency over other boosting methods such as XGBoost or Gradient Boosting Machine (GBM). Compared with our work, it scored below ours, which is 0.684 [<xref ref-type="bibr" rid="scirp.130241-ref11">11</xref>] .</p><p>D. Huo and colleagues have also carried out research into software detection. They used two learning methods, namely LightGBM and a one-dimensional CNN, with respective scores of 67.16% and 72.47% [<xref ref-type="bibr" rid="scirp.130241-ref12">12</xref>] . In the following <xref ref-type="table" rid="table1">Table 1</xref>, we have grouped together the different scores achieved by previous works, compared with the results of our own.</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Model comparison table</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Model</th><th align="center" valign="middle" >Score (%)</th><th align="center" valign="middle" >Authors</th></tr></thead><tr><td align="center" valign="middle" >LightGBM</td><td align="center" valign="middle" >68.40</td><td align="center" valign="middle" >Z. Zhang</td></tr><tr><td align="center" valign="middle" >CNN unidimensionnel 1D</td><td align="center" valign="middle" >72.47</td><td align="center" valign="middle" >D. Huo, X. Li, L. Li, Y. Gao, X. Li and J. Yuan</td></tr><tr><td align="center" valign="middle" >LightGBM*</td><td align="center" valign="middle" >67.16</td><td align="center" valign="middle" >D. Huo, X. Li, L. Li, Y. Gao, X. Li and J. Yuan</td></tr><tr><td align="center" valign="middle" >Our ANN</td><td align="center" valign="middle" >83.00</td><td align="center" valign="middle" ></td></tr></tbody></table></table-wrap></sec></sec><sec id="s5"><title>5. Conclusion</title><p>In this work, we have proposed and implemented a model for detecting malware within machines. This is a deep learning model based on artificial neural networks, to provide a highly efficient model. This work has enabled us to develop a malware detection model using data derived from machine characteristics. The python programming language and TensorFlow library were used to implement this model. The resulting model, based on neural networks, can predict the presence or absence of malware with an accuracy of 83%. The use of this model will enabled malware to be detected effectively, even if it could modify code to evade traditional detection methods and avoid attacks at an early stage.</p></sec><sec id="s6"><title>Acknowledgements</title><p>We would like to thank the Universit&#233; Virtuelle de C&#244;te d’Ivoire for allowing us to carry out this research work.</p></sec><sec id="s7"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s8"><title>Cite this paper</title><p>Thiziers, A.H., Ti&#233;moman, K., G&#233;rard, N.B. and Kabir, T.T.Q. (2023) Malware Detection Using Deep Learning. Open Journal of Applied Sciences, 13, 2480-2491. https://doi.org/10.4236/ojapps.2023.1312193</p></sec></body><back><ref-list><title>References</title><ref id="scirp.130241-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Bounaamane, B. and Drissi, Z. (2023) Cybercriminalité et cyber-résilience: Les enjeux de la sécurité numérique dans un monde connecté. International Journal of Accounting, Finance, Auditing, Management and Economics, 4, 451-469.</mixed-citation></ref><ref id="scirp.130241-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Moffie, M. and Cheng, W. (2006) Hunting Trojan Horses. Proceedings of the 1st Workshop on Architectural and System Support for Improving Software Dependability, San Jose, California, 21 October 2006, 12-17. https://doi.org/10.1145/1181309.1181312</mixed-citation></ref><ref id="scirp.130241-ref3"><label>3</label><mixed-citation publication-type="book" xlink:type="simple">Horton, J. and Seberry, J. (1997) Computer Viruses: An Introduction. In: Patel. M., Ed., Proceedings of the Twentieth Australasian Computer Science Conference (ACSC’97), Computer Science Communications, Vol. 19, 122-131.</mixed-citation></ref><ref id="scirp.130241-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Chuvakin, A. (2003, February) An Overview of Unix Rootkits. dans iALERT White Paper, iDefense Labs, Chantilly, VA, p. 27.</mixed-citation></ref><ref id="scirp.130241-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Souri, A. and Hosseini, R. (2018) A State-of-the-Art Survey of Malware Detection Approaches Using Data Mining Techniques. Human-Centric Computing and Information Sciences, 8, Article No. 3. https://doi.org/10.1186/s13673-018-0125-x</mixed-citation></ref><ref id="scirp.130241-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Osho, O. and Hong, S. (2021) A Survey Paper on Machine Learning Approaches to Intrusion Detection. International Journal of Engineering Research &amp; Technology (IJERT), 10, 94-102. https://doi.org/10.17577/IJERTV10IS010040</mixed-citation></ref><ref id="scirp.130241-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Almasoudy, F.H., Al-Yaseen, W.L. and Idrees, A.K. (2020) Differential Evolution Wrapper Feature Selection for Intrusion Detection System. Procedia Computer Science, 167, 1230-1239. https://doi.org/10.1016/j.procs.2020.03.438</mixed-citation></ref><ref id="scirp.130241-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Ijaz, M., Durad, M.H. and Ismail, M. (2019) Static and Dynamic Malware Analysis Using Machine Learning. 2019 16th International Bhurban Conference on Applied Sciences and Technology (IBCAST), Islamabad, 8-12 January 2019, 687-691. https://doi.org/10.1109/IBCAST.2019.8667136</mixed-citation></ref><ref id="scirp.130241-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Kolosnjaji, B., Zarras, A., Webster, G. and Eckert, C. (2016) Deep Learning for Classification of Malware System Calls Sequences. In: AI 2016: Advances in Artificial Intelligence: 29th Australasian Joint Conference, Springer International Publishing, Cham, 137-149. https://doi.org/10.1007/978-3-319-50127-7_11</mixed-citation></ref><ref id="scirp.130241-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">https://en.wikipedia.org/wiki/Confusion_matrix</mixed-citation></ref><ref id="scirp.130241-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Zhang, Z. (2022) Microsoft Malware Prediction Using LightGBM Model. 2022 3rd International Conference on Big Data, Artificial Intelligence and Internet of Things Engineering (ICBAIE), Xi’an, 15-17 July 2022, 41-44. https://doi.org/10.1109/ICBAIE56435.2022.9985850</mixed-citation></ref><ref id="scirp.130241-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Huo, D., Li, X., Li, L., Gao, Y., Li, X. and Yuan, J. (2022) The Application of 1D-CNN in Microsoft Malware Detection. 2022 7th International Conference on Big Data Analytics (ICBDA), Guangzhou, 4-6 March 2022, 181-187. https://doi.org/10.1109/ICBDA55095.2022.9760349</mixed-citation></ref></ref-list></back></article>