<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">A Model for Detecting Malware Adversarial Samples Based on Anomaly Detection Technology 1</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Yubin</forename><surname>Ma</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">Harbin Institute of Technology (Shenzhen)</orgName>
								<address>
									<settlement>Shenzhen</settlement>
									<country key="CN">China</country>
								</address>
							</affiliation>
						</author>
						<author role="corresp">
							<persName><forename type="first">Yuxin</forename><surname>Ding</surname></persName>
							<email>yxding@hit.edu.cn</email>
							<affiliation key="aff0">
								<orgName type="institution">Harbin Institute of Technology (Shenzhen)</orgName>
								<address>
									<settlement>Shenzhen</settlement>
									<country key="CN">China</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Wen</forename><surname>Qian</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">Harbin Institute of Technology (Shenzhen)</orgName>
								<address>
									<settlement>Shenzhen</settlement>
									<country key="CN">China</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">A Model for Detecting Malware Adversarial Samples Based on Anomaly Detection Technology 1</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">4DCA2368415058B926AE92FFFA55A355</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-25T05:55+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>Anomaly detection</term>
					<term>Adversarial samples</term>
					<term>Mal-ware adversarial samples detection</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Deep-learning-based malware detection methods have been widely used. Although these models have strong learning ability and can automatically learn malware features, most of these models are vulnerable to adversarial samples. In this paper, we propose a malware adversarial samples detection model to solve this issue. The model uses the anomaly detection techniques to detect malware adversarial samples. To better represent the features of PE files, we represent an PE file as an RGB image and a one-dimensional byte sequence respectively. We design a generation model to extract data features and reconstruct the original sample. The generation model includes two different encoders, one encoder extracts the one-dimensional feature of the PE file, and the other encoder extracts the two-dimensional features of the PE file. The extracted one-dimensional and two-dimensional features are fused as the input of the decoder. The decoder is responsible for reconstructing the input. In the training phase, we only provide benign PE files as the training data, which makes the encoder only well fit benign samples. Therefore, malware adversarial samples have larger reconstruction loss than benign PE files. In this way, adversarial samples can be detected. We conduct adversarial attacks against the existing malware classifier MalConv, and construct four types of adversarial sample datasets. The proposed model gets high accuracy for detecting adversarial samples.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>While the Internet brings great convenience to information transmission and sharing, it also intensifies the widespread spread of malware. Currently malware has seriously threat-ened the security of Internet. Malware has many variants, and updates quickly, which makes malware detection technology face serious challenges. With the rapid development of deep learning technologies, deep learning-based malware detection models have been proposed and achieved high de-tection accuracy. However adversarial samples can evade the detection of deep learning models, which poses a potential threat to the security of deep learning models.</p><p>To recognize adversarial samples, two categories of ad-versarial sample defense methods are proposed. The first category is the robust defense method, which improves the robustness of the classifier to defend against adversarial samples. The second category is the detection method, which uses the detection algorithm to detect adversarial examples mixed with normal samples.</p><p>Most of the adversarial sample defense methods in the malware detection field are robust defense methods, such as adversarial training, model distillation, random feature failure, and integrated classifier. Adversarial training is to add adversarial samples generated by the adversarial sample generation algorithm into the training dataset and retrain the classifier and thus improve the robustness of the classifier. Model distillation defends against adversarial samples by improving the generalization performance of small networks. Random feature failure randomly masks some features of the input to defend against some adversarial sample attack algorithms. Integrated classifier uses multiple classifiers to learn malware features and then integrates the decisions of multiple classifiers to identify malware.</p><p>The difficulty for detecting malware adversarial samples is that attackers can design different attacking methods to generate adversarial samples, it is impossible to know all of them, therefore it is very hard to train a machine learning model that can detect all kinds of adversarial samples. The similar problem also exists in the robust defense methods, only the known adversarial samples can be added into the training set to retrain a classifier. The retrained classifier still cannot detect the unknown adversarial samples.</p><p>To solve this issue, an abnormal detection model is pro-posed to detect adversarial samples. the anomaly detection model consists of two parts, one is an asymmetric generation mode, which includes two encoders and one decoder. The data set for training the generation model only includes benign samples. The second part is the detection model. This model evaluates the similarity between the generated sample and the original sample. If the generated sample has a big difference from the original sample. The original sample is recognized as an adversarial sample. We conduct adversarial attacks against the deep learning detection model MalConv <ref type="bibr" target="#b0">[1]</ref>, and construct four types of adversarial samples. Ex-periments show that the proposed model can achieve high detection accuracy for detecting adversarial samples. The contributions we have made are as follows.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>•</head><p>To the best of our knowledge, we are the first to apply anomaly detection to recognize malware adversarial examples.</p><p>• Our model is one class classification model, which only trained using benign files, therefore, compared with other machine learning based method, our model has better generalization ability to recognize different types of adversarial samples, including unseen samples.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>•</head><p>To evaluate the generalization ability of our method, we create an evaluation dataset. We adopt different methods to generate byte perturbations and try different positions to insert perturbated bytes. This dataset can be used as benchmark dataset to evaluate the performance of adversarial sample detecting methods.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Related Work</head><p>Our study mainly involves two research fields. One is malware adversarial attack methods and the other is malware adversarial defense methods. In this section we introduce the research advances in these two areas, respectively.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">Malware Adversarial Attack Methods</head><p>The adversarial attack algorithms in the malware domain are different from these in the computer vision domain. Each byte in a malware sample has a specified meaning, there-fore the generated sample should have the same functions and semantics as the original sample after being modified by the adversarial attack algorithms. Most of the existing adversarial attack algorithms in the malware domain are gradient-based algorithms, where perturbation is obtained by optimizing a distance metric between the original and the perturbed sample. To generate adversarial samples for MalConv model <ref type="bibr" target="#b0">[1]</ref>(a deep learning-based malware detec-tion model), Kolosnjaji <ref type="bibr" target="#b1">[2]</ref> et al. firstly added random bytes to the tail of a malware sample and then iteratively update these bytes using a gradient algorithm, and only one byte is modified in each iteration. The experiments show more than 60% adversarial samples can evade the classifiers. Suciu <ref type="bibr" target="#b2">[3]</ref> et al. proposed an enhanced attack on MalConv <ref type="bibr" target="#b0">[1]</ref> using iterative FGM, which generates perturbations in the embedding space, and then finds the nearest neighbor bytes to the modified embedding representation by traversing the bytes in the computed embedding matrix, then modifies the current byte to be the nearest neighbor byte. In addition to the gradient-based attack model, Chen <ref type="bibr" target="#b3">[4]</ref> et al. applied the feature visualization method Grad cam <ref type="bibr" target="#b5">[5]</ref> to extract features of benign files important for MalConv <ref type="bibr" target="#b0">[1]</ref> classifier, then added the extracted features to the tail of the malware samples to generate the adversarial samples. They also combined the FGSM algorithm to enhanced benign feature attack (BFA) to increase the success rate of attack. We also use the above adversarial attack method to build our test dataset.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Malware Adversarial Defense Methods</head><p>There are the malware adversarial attack algorithms, and accordingly, there are malware adversarial defense meth-ods. For DNN-based malware detectors, Wang <ref type="bibr" target="#b6">[6]</ref> et al. used the random feature failure method to defend against attack algorithms. Random feature failure defense against the attack by randomly deleting or masking the features of the input, and the disadvantage of this method is that the accuracy of malware detection is low. Grosse <ref type="bibr" target="#b7">[7]</ref> et al. proposed two defenses, namely defensive distillation and adversarial training, to enhance the robustness of the DNN-based malware detectors. Modifying the structure of classifier can also defenses against the adversarial attack, e.g., using integrated classifiers or using model distillation. Smutz <ref type="bibr" target="#b8">[8]</ref> et al. used the integrated classifier containing multiple basic classifiers to defense against the attack. The integrated classifier votes on the results returned by basic classifiers to make a decision. Also similar to integrated classification, Biggio <ref type="bibr" target="#b9">[9]</ref> et al. proposed a one-and-a-half class classifier, specifically, the authors firstly combined a twoclass classifier with a one-class classifier and then com-bined them using another one-class classifier. In additional, other researchers also used random subspaces and bagging techniques to enhance SVMbased malware detectors, which are called as Multi-Classifier System SVM (MCS-SVM).</p><p>For windows malware, Dujaili <ref type="bibr" target="#b10">[10]</ref> et al. proposed the maximum minimization adversarial training, which is used to enhance DNN-based detectors. In the defense method, the inner layer is optimized to generate hostile files by maximizing the loss function of the classifier, and the outer layer optimizes the parameters of the DNN to minimize the loss of the classifier for hostile classification. Li <ref type="bibr" target="#b11">[11]</ref> et al. used variational self-encoder and multilayer perceptron to detect malware and combined their detection results to detect malware and defend against the adversarial attacks.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Proposed Model</head><p>The proposed detection model is an unsupervised one-class classification model based on anomaly detection tech-nology. The input data of this model are benign PE files. By learning the features of benign PE files, it has lower re-construction error for reconstructing benign samples. When reconstructing adversarial samples, a higher reconstruction error will be generated. Therefore, by evaluating the simi-larity between the original sample and the generated (recon-structed) sample, adversarial samples can be detected. Here, we describe how the model detects malware adversarial samples. Figure <ref type="figure" target="#fig_0">1</ref> shows the overview architecture of the abnormal detection, which consists of three stages.</p><p>• Stage1: Data processing. All PE files are represented in two forms, one dimensional sequential data (1D) and two dimensional RGB image data (2D).</p><p>• Stage2: Data Reconstruction. In this stage, we train two encoders and one decoder, the Enc 1 extracts features from the 1D byte sequences, and the Enc 2 extracts the features from the 2D RGB data. We fuse the extracted 1D features and 2D features as the input of decoder. Then the Dec 1 decodes the fused input to get the reconstructed output data.</p><p>• Stage3: Adversarial Sample Detection. A testing sample is input to the encoders, and the decoder generates the reconstructed sample. By evaluating the reconstructed loss, we can decide if the testing sample is a malware adversarial sample.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">Data Processing a)</head><p>Convert PE file to Two-dimensional image: PE files are portable and executable files in Windows OS, a PE file mainly includes DOS header, NT header, section table and specific sections. PE files have different size, and their distribution is not uniform. It is impossible to use the entire PE file as the input of the model. Therefore, we need to process PE files to better learn the features of PE files. In order to learn the features of benign PE files well, we extract the bytes in each section in a PE file. Kancherla <ref type="bibr" target="#b14">[14]</ref> et al. represented PE files into gray-scale images, but the size of PE files is large, it is unable to extract all bytes in a PE file to construct an image, some sections in a PE file have to be ignored, such as the. rsrc segment, which is at the end of the PE files, its information is often discarded. To fully represent a PE file, we represent PE files as RGB images. We extract bytes from each section as the data of channels of an RGB image. In details, the data of R channel is the first K bytes of the code section .txt, the data of G channel is the first K bytes of the data sections, including .rdata,.idata, .edata, .data, and the data of B channel is the first K bytes of the other parts of a PE file. If there are not enough bytes, padding 0 byte at the end of each channel. The bytes in each channel are expanded into a two-dimensional image and then fuse into an RGB image.</p><p>b) Convert a PE file to a one-dimensional byte sequence: A PE file can be seen as a binary stream. We merge every 8 bits into one byte, and the value of each byte is from 0 to 255. we connect these bytes one by one to get the one-dimensional data representation of a PE file. Usually, the size of PE files is large, we cannot analysis the whole file. In our work, we extract the channels of the above RGB image, and connect each channel one by one to obtain the one-dimensional byte sequence used to describe a PE file.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">Data Reconstruction</head><p>We construct a generation model to construct the input data. The generation model is an asymmetric autoencoder, which includes two encoders and one decoder. The first encoder Enc 1 encodes the onedimensional byte sequence to get the 1D feature vector of a PE file and the second encoder encodes the 2D image to get the 2D feature vector of a PE file. We make the dimension of 1D feature vector encoded by Enc 1 the same as that of the 2D feature vector encoded by Enc 2 . Then, we connect these two feature vectors as the input of the decoder Dec. Then we use the decoder to reconstruct the original input. The size of the reconstructed output has the same dimension as the RGB image. So we can calculate the mean squared error (Mse) between the original 2D image and the reconstructed output to evaluate the similarity between them. We also extract the RGB channels form the reconstructed image, and get the one-dimensional byte sequence which has the same dimension as the original onedimensional byte sequence. In the same way we can calculate the mean squared error between the → ← original 1D sequence and the reconstructed sequence. The total loss function is shown as Eq <ref type="bibr" target="#b0">(1)</ref>.</p><formula xml:id="formula_0">l MSE = ∥x d2 − [Dec(Enc 1 (x d1 ) + Enc 2 (x d2 ))]∥ (1) + ∥x d2 − Ext(Dec(Enc 1 (x d1 ) + Enc 2 (x d2 )))∥</formula><p>In Eq(1), X denotes the set of original input samples. Ext means to extend two-dimentional image to one-dimentional sequence. X d1 denotes the set of one-dimensional byte sequence for PE files, X d2 denotes the set of two-dimensional RGB images for PE files, Enc 1 denotes the encoder function that encodes the 1D sequence into a feature vector in the latent space, and Enc 2 denotes the encoder function encodes the 2D image into a feature vector in the latent space. Dec denotes the decoder function that converts the feature vectors in the latent space into the original input data. In our work, the structure of Enc 1 contains seven one dimensional convolution layers. The active function in each layer is the Leakly relu function. The structure of Enc 2 contains six two dimentional convolution layers and we also use Leakly relu function as the activation function. In Dec, we use six two dimensional deconvolution layers and the active function in each layer is the Leakly relu function. We calculate the total loss using Eq(1), and then use the gradient descent algorithm to train the encoders and decoder. The training process is shown in Algorithm 1.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Algorithm 1 Training the generation model</head><p>Require: Training set of benign PE files X, number of iterations N , length of extracted segments K. Ensure: Models: Enc 1 for extracting one-dimensional fea-tures, Enc 2 for extracting two-dimensional features, Dec for decoder. </p><formula xml:id="formula_1">for i = 1 N do 3:</formula><p>for x in X do 4:</p><p>x d1 ← PREPRO ONE(x,K) 5:</p><p>x d2 ← PREPRO TWO(x,K) </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3">Abnormal Detection</head><p>We only use the benign file to train the abnormal detection model. Therefore, if the testing sample is a benign sample, the mean square error between the reconstructed sample and the benign sample is lower, otherwise the mean squared error is high. According this, we can detect the adversarial sample. In the detection phase, a testing sample is input to the generation model. The encoder outputs a generated sample. Then we calculate the mean squared error between the generated sample and the testing sample. If the mean squared error is greater than a threshold value. The testing sample is classified as an adversarial sample.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Experiment</head><p>In this section, we mainly make three experiments. The first experiment is to decide the input length of the genera-tion model. The second experiment we make is to compare the performance of different malware adversarial sample detection models. The third experiment is the ablation ex-periment, which prove fusing different features can improve the performance of the abnormal detection model. Before conducting the experiments, we constructed four different types of datasets based on different malware adversarial sample generation algorithms.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Selecting Perturbation Locations for Adversarial samples</head><p>• When a PE file is loaded from disk into memory, it takes up more virtual address space than it does on the hard disk. This is because the sections in each PE file are contiguous on disk, while in memory they are aligned by page, so there are some gaps between sections after being loaded. Adding random scrambled bytes in these gaps will not affect the functions of the PE file. The parameter PointerToRawData in the section table of each PE file specifies the offset of the current section on disk, V irtualSize is the total size loaded in memory, SizeOf RawData is the size of the section on disk, and V irtualAddress is the offset address in memory. The actual size occupied when loaded into memory is smaller than the size occupied on disk, so we can get this gap interval and find the location where we can add scrambled bytes by indexing. Adding a scrambling between the start and end location is not going to affect the malicious functionality of the malware. Figure <ref type="figure">2</ref> shows the mapping of PE files on disk to memory.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Fig. 2. PE file on disk corresponding to the memory</head><p>• Besides the gaps between sections, we can add new sections in a PE file. By modifying the parameter values of the section table in the table header, we can add arbitrarily named new sections to a PE file. Since the codes in other sections of the PE file does not call the codes in the newly added sections, this inserting method also does not affect the functionality of the original PE files. According to the structure of the PE file, we can get the value of NumberOf Sections in the PE file header, which is the number of sec-tions. The value of FileAlignment in the PE optional header, which is the amount of alignment of the PE file on the disk. The value of SectionAlignment, which is the amount of alignment of the PE file in memory. And then we calculate the size of the real new section to be added by initializing the inser-tion size value and the amount of alignment in the disk. Meanwhile, we calculate the size of the last section in disk based on the PointerToRawData, SizeOf RawData values and FileAlignment of the last section. And we calculate the size of the last section in memory based on the V irtualAddress and MiscV irtualSize of the last section. We create a space of size SIZEOFSECTIONHEADER in the section table of the PE file and fill it with the data obtained above in the corresponding location of the new section table. Finally, we find the new section start offset value and the size of the section to be filled, and set all the byte values of added section to 0x00. At this point, the new section is added to the end of the PE files. In the papers of Kolosnjaji <ref type="bibr" target="#b2">[3]</ref> and Chen <ref type="bibr" target="#b3">[4]</ref>, their methods add bytes directly at the end of PE files, these methods have a slight defect, their methods just read the start and end position of each section in the header of PE file, and get the length of the whole PE file. So we can avoid reading the scrambled bytes added directly at the end. In this paper, we use the section gap of PE files and create a new section at the tail of PE files as the scrambled position.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Selection of Model Parameters</head><p>In the proposed model, we need to extract the first K bytes from each type of sections in the PE file. In the experiments, we choose K as 2 x10 4 , 10 x10 4 , 15 x10 4 , 20 x10 4 , 25 x10 4 respectively. The difference d between the reconstructed sample and the original sample is calculated by Eq.( <ref type="formula">1</ref>), which is a floating-point number. Since the training set we use only contains benign samples, we can get a mean square loss value for each sample after encoding and decoding. We average the mean square loss values of all train set samples to get the threshold. If the output result of the data in the test set through the model is greater than the threshold, we will determine it as an abnormal sample, otherwise it will be determined as a normal sample. During the training process, we use 15840 benign PE files as the training data and they vary in length from 3KB to 60MB. The experimental results are shown in Table <ref type="table" target="#tab_2">1</ref>. In Table <ref type="table" target="#tab_2">1</ref>, SinAD+Gap, SinAD+NS, IFGM+NS and BFA+NS represent four adversarial datasets. SinAD, IFGM and BFA represent the algorithms used to generate the adversarial samples. SinAD is the single-byte modified adversarial sam-ples generation algorithm <ref type="bibr" target="#b1">[2]</ref>, IFGM is the iterative FGM algorithm <ref type="bibr" target="#b2">[3]</ref>, BFA is the benign feature based algorithm <ref type="bibr" target="#b3">[4]</ref>. Gap and NS represent the methods for inserting perturbated bytes. Gap means the perturbated bytes are inserted into the gaps between sections in a PE file, and NS means inserting perturbated bytes into newly created sections in a PE file. In the real scenario adversarial samples are far less than benign samples, so we set the ratio of adversarial samples to benign samples in the test dataset to be 1:10. We prepare four testing datasets, and each testing dataset includes one adversarial dataset, 150 adversarial samples and 1500 randomly selected benign samples.</p><p>From Table <ref type="table" target="#tab_2">1</ref> we can see that the highest AUC values are obtained on four testing datasets, which means the overall performance of the detector for K=2x10 4 is better than others. So in the following experiments, K is set as 2x10 4 for each abnormal detection model. </p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Fig. 1 .</head><label>1</label><figDesc>Fig. 1. Overview of the abnormal detection model.</figDesc><graphic coords="4,71.76,71.76,451.44,249.12" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_2"><head>TABLE 1 EXPERIMENTAL</head><label>1</label><figDesc></figDesc><table><row><cell></cell><cell cols="3">RESULTS UNDER DIFFERENT K VALUES</cell><cell></cell><cell></cell></row><row><cell>K</cell><cell>Metric</cell><cell>SinAD+GAP</cell><cell>SinAD+NS</cell><cell>IFGM+NS</cell><cell>BFA+NS</cell></row><row><cell></cell><cell>Acc</cell><cell>0.788</cell><cell>0.770</cell><cell>0.770</cell><cell>0.809</cell></row><row><cell></cell><cell>Pre</cell><cell>0.901</cell><cell>0.888</cell><cell>0.887</cell><cell>0.938</cell></row><row><cell>2W</cell><cell>Recall</cell><cell>0.833</cell><cell>0.827</cell><cell>0.827</cell><cell>0.828</cell></row><row><cell></cell><cell>F1</cell><cell>0.866</cell><cell>0.856</cell><cell>0.856</cell><cell>0.879</cell></row><row><cell></cell><cell>Roc auc</cell><cell>0.702</cell><cell>0.679</cell><cell>0.683</cell><cell>0.764</cell></row><row><cell></cell><cell>Acc</cell><cell>0.889</cell><cell>0.882</cell><cell>0.865</cell><cell>0.911</cell></row><row><cell></cell><cell>Pre</cell><cell>0.889</cell><cell>0.883</cell><cell>0.903</cell><cell>0.913</cell></row><row><cell cols="2">10W Recall</cell><cell>0.969</cell><cell>0.969</cell><cell>0.923</cell><cell>0.968</cell></row><row><cell></cell><cell>F1</cell><cell>0.927</cell><cell>0.924</cell><cell>0.913</cell><cell>0.939</cell></row><row><cell></cell><cell>Roc auc</cell><cell>0.529</cell><cell>0.489</cell><cell>0.606</cell><cell>0.477</cell></row><row><cell></cell><cell>Acc</cell><cell>0.849</cell><cell>0.824</cell><cell>0.810</cell><cell>0.782</cell></row><row><cell></cell><cell>Pre</cell><cell>0.892</cell><cell>0.888</cell><cell>0.899</cell><cell>0.912</cell></row><row><cell cols="2">15W Recall</cell><cell>0.916</cell><cell>0.892</cell><cell>0.863</cell><cell>0.823</cell></row><row><cell></cell><cell>F1</cell><cell>0.904</cell><cell>0.890</cell><cell>0.880</cell><cell>0.865</cell></row><row><cell></cell><cell>Roc auc</cell><cell>0.681</cell><cell>0.639</cell><cell>0.638</cell><cell>0.592</cell></row><row><cell></cell><cell>Acc</cell><cell>0.895</cell><cell>0.899</cell><cell>0.916</cell><cell>0.932</cell></row><row><cell></cell><cell>Pre</cell><cell>0.900</cell><cell>0.911</cell><cell>0.885</cell><cell>0.954</cell></row><row><cell cols="2">20W Recall</cell><cell>0.950</cell><cell>0.940</cell><cell>0.947</cell><cell>0.934</cell></row><row><cell></cell><cell>F1</cell><cell>0.924</cell><cell>0.931</cell><cell>0.909</cell><cell>0.929</cell></row><row><cell></cell><cell>Roc auc</cell><cell>0.867</cell><cell>0.842</cell><cell>0.925</cell><cell>0.896</cell></row></table></figure>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.">Acknowledgement</head><p>This work was supported by the National Natural Sci-ence Foundation of China (Grant No. 61872107) and the Guangdong Provincial Key Laboratory of Novel Security Intelligence Technologies (2022B1212010005).</p></div>
			</div>

			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3">Comparison With Other Anomaly Detection Algorithms</head><p>In this section we compare the proposed model with two classical anomaly detection algorithms, LOF <ref type="bibr" target="#b12">[12]</ref> and DeepSVDD <ref type="bibr" target="#b13">[13]</ref>. As there is no anomaly detection algorithm to be used for detecting adversarial samples, we reproduce the two algorithm and apply them to detect adversarial samples. LOF is an anomaly detection algorithm based on domain density, and is widely used in the field of computer vision and the DeepSVDD is a deep learning-based anomaly detection algorithm. The results of the comparison experi-ments are shown in Table <ref type="table">2</ref>.</p><p>From Table <ref type="table">2</ref>, it can be seen that the LOF algorithm has the lowest AUC value. The reason is that LOF is less effective for high-dimensional data classification. Our method is significantly better than the other two models. Compared with DeepSVDD, the structure of our model is flexible, in our model the decoder and encoder are separated, so we can easily increase new encoders to learn more useful data features.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.4">Ablation Study</head><p>There are three modules in our model. To evaluate the influence of each module on the model performance, we From the results of the ablation experiments, deleting Enc 1 or Enc 2 all leads the decrease of the overall perforam-nce. The lack of Enc 1 has a greater impact on the BFA+NS dataset. However, regardless of removing any encoder, the overall detection performance on IFGM+NS dataset does not change much. It can be seen that on most datasets, the 1D feature has greater influence on the reconstructed data than the 2D feature. Overall, all three modules have a positive impact on the final classification performance, and none are indispensable.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Conclusion</head><p>We propose an anomaly detection model to detect mal-ware adversarial samples. The model is trained by learning the features of benign samples and treats all non-benign samples as anomalous data. To better learn data features, we represent benign samples as binary files and 2D image files respectively, and design two encoders to learn both 1D and 2D features. In the testing phase, we detect adversarial sample according to the similarity between the reconstructed sample and the original sample. The experiments show that the proposed model can effectively detect malware adversarial samples mixed in benign samples.</p></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Malware detection by eating a whole exe</title>
		<author>
			<persName><forename type="first">E</forename><surname>Raff</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Barker</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Sylvester</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Workshops at the Thirty-Second AAAI Conference on Artificial Intelligence</title>
				<imprint>
			<date type="published" when="2018">2018</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">Adversarial malware binaries: Evading deep learning for malware detection in executa-bles</title>
		<author>
			<persName><forename type="first">B</forename><surname>Kolosnjaji</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Demontis</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Biggio</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">C]//2018 26th European signal processing conference (EU-SIPCO). IEEE</title>
				<imprint>
			<biblScope unit="volume">2018</biblScope>
			<biblScope unit="page" from="533" to="537" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Exploring adversarial samples in malware detection</title>
		<author>
			<persName><forename type="first">O</forename><surname>Suciu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><forename type="middle">E</forename><surname>Coull</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Johns</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">IEEE Security and Privacy Workshops (SPW)</title>
				<imprint>
			<publisher>IEEE</publisher>
			<date type="published" when="2019">2019. 2019</date>
			<biblScope unit="page" from="8" to="14" />
		</imprint>
	</monogr>
	<note>C</note>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Adversarial samples for cnn-based malware detectors</title>
		<author>
			<persName><forename type="first">B</forename><surname>Chen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Z</forename><surname>Ren</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Yu</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">J</title>
		<imprint/>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title/>
	</analytic>
	<monogr>
		<title level="j">IEEE Access</title>
		<imprint>
			<biblScope unit="volume">7</biblScope>
			<biblScope unit="page" from="54360" to="54371" />
			<date type="published" when="2019">2019</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Grad-cam: Vi-sual explanations from deep networks via gradient-based localiza-tion[C</title>
		<author>
			<persName><surname>Selvaraju R R</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Cogswell</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Das</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the IEEE international conference on com-puter vision</title>
				<meeting>the IEEE international conference on com-puter vision</meeting>
		<imprint>
			<date type="published" when="2017">2017</date>
			<biblScope unit="page" from="618" to="626" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Adversary resistant deep neural networks with an application to malware detection</title>
		<author>
			<persName><forename type="first">Q</forename><surname>Wang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Guo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Zhang</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 23rd ACM sigkdd international conference on knowledge discovery and data mining</title>
				<meeting>the 23rd ACM sigkdd international conference on knowledge discovery and data mining</meeting>
		<imprint>
			<biblScope unit="volume">2017</biblScope>
			<biblScope unit="page" from="1145" to="1153" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<monogr>
		<title level="m" type="main">Adversarial samples for malware detection[C]//European symposium on research in computer security</title>
		<author>
			<persName><forename type="first">K</forename><surname>Grosse</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Papernot</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Manoharan</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2017">2017</date>
			<publisher>Springer</publisher>
			<biblScope unit="page" from="62" to="79" />
			<pubPlace>Cham</pubPlace>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">When a Tree Falls: Using Diversity in Ensemble Classifiers to Identify Evasion in Malware Detectors</title>
		<author>
			<persName><forename type="first">C</forename><surname>Smutz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Stavrou</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">C</title>
		<imprint>
			<date type="published" when="2016">2016</date>
			<publisher>NDSS</publisher>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<monogr>
		<title level="m" type="main">One-and-a-half-class multiple classifier systems for secure learning against evasion attacks at test time[C]//International Workshop on Multiple Classifier Systems</title>
		<author>
			<persName><forename type="first">B</forename><surname>Biggio</surname></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><surname>Corona</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Z M</forename><surname>He</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2015">2015</date>
			<publisher>Springer</publisher>
			<biblScope unit="page" from="168" to="180" />
			<pubPlace>Cham</pubPlace>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<analytic>
		<title level="a" type="main">Adversarial deep learn-ing for robust detection of binary encoded malware</title>
		<author>
			<persName><forename type="first">A</forename><surname>Al-Dujaili</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Huang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Hemberg</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">IEEE Security and Privacy Workshops (SPW)</title>
				<imprint>
			<publisher>IEEE</publisher>
			<date type="published" when="2018">2018</date>
			<biblScope unit="volume">2018</biblScope>
			<biblScope unit="page" from="76" to="82" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">Robust Android Malware Detection against Adversarial Example Attacks</title>
		<author>
			<persName><forename type="first">H</forename><surname>Li</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Zhou</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Yuan</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the Web Conference</title>
				<meeting>the Web Conference</meeting>
		<imprint>
			<date type="published" when="2021">2021</date>
			<biblScope unit="volume">2021</biblScope>
			<biblScope unit="page" from="3603" to="3612" />
		</imprint>
	</monogr>
	<note>C</note>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<title level="a" type="main">LOF: identifying density-based local outliers[C</title>
		<author>
			<persName><forename type="first">M</forename><surname>Breunig</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Kriegel</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><forename type="middle">P</forename><surname>Ng R T</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 2000 ACM SIGMOD international conference on Management of data</title>
				<meeting>the 2000 ACM SIGMOD international conference on Management of data</meeting>
		<imprint>
			<date type="published" when="2000">2000</date>
			<biblScope unit="page" from="93" to="104" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<analytic>
		<title level="a" type="main">BM3D and Deep Image Prior based Denoising for the Defense against Adversarial Attacks on Malware Detection Networks</title>
		<author>
			<persName><forename type="first">K</forename><surname>Sandra</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S H</forename><surname>Lee</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">International journal of advanced smart convergence</title>
		<imprint>
			<biblScope unit="volume">10</biblScope>
			<biblScope unit="issue">3</biblScope>
			<biblScope unit="page" from="163" to="171" />
			<date type="published" when="2021">2021</date>
		</imprint>
	</monogr>
	<note>J</note>
</biblStruct>

<biblStruct xml:id="b14">
	<analytic>
		<title level="a" type="main">Enhanced DNNs for malware classifi-cation with GAN-based adversarial training</title>
		<author>
			<persName><forename type="first">Y</forename><surname>Zhang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><surname>Li</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Zheng</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Journal of Computer Virology and Hacking Techniques</title>
		<imprint>
			<biblScope unit="volume">17</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="153" to="163" />
			<date type="published" when="2021">2021</date>
		</imprint>
	</monogr>
	<note>J</note>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
