Without further ado, here's Li on her talk. Hello, everyone. My name is Li. I'm a data scientist at the Security and Privacy Lab at Intel Labs. Today my talk is on GAN to the Dark Side, a case study of attacking machine learning system to empower defenses. So we'll be examining how we can use GAN to exploit malware classifiers. Here is the outline of the talk for today. First of all, I will give a quick overview on what is adversarial machine learning, and then a brief introduction on GAN, which stands for Generative Adversarial Network. And then we will have an overview of how we utilize this methodology to attack other classifiers. And next, we will go through a case study where we use this technique RD-FUL to fool against ransomware detectors, where we will discuss how the data is collected and what the feature processing looks like, and what is the original classification performance, which are highly effective, and what is our attack performance and evaluation. And we'll conclude today's talk with a discussion and next steps. So regarding the intersection of AI and GAN, and security, we actually consider into three categories. The first category would be security analytics. That would be how we use AI or machine learning or deep learning for malware analysis, threat analysis, basically using AI for the good. Another aspect would be secure AI workloads, such as using trusted environment to secure your AI model to protect your AI IP. And the third aspect is adversarial resilient AI or adversarial machine learning. Basically, this aspect studies the vulnerability or the blind spot of machine learning algorithms in order to better prepare your machine learning systems. So here is a very brief pictorial overview of what adversarial machine learning is. You can essentially consider this as a two-player game. There will be an attacker that tries to attack you, to attack or exploit your machine learning systems. And then on the other side, there will be a defender that tries to develop the counter measure and then use the counter measure to evaluate the impact of the attacks. And this is a iterative loop and this type of game will continue as a cat and mouse game and hopefully your AI gets much better or your defense or your attack gets better. So some applications of adversarial machine learning. One of the most straightforward application is in vision. So here I plotted one using the fast gradient sign where you just change very unnoticeable amount of pixels and to the human eyes, the images are almost indistinguishable. However, the deep learning will mispredict them with very high accuracy. Confidence. Another aspect is for object detection where you can fool within each of the region proposal to fool the object detector. And again, deep learning will misclassify the sheep, detect the sheep as a car with very high confidence. But beyond vision, we also have adversarial machine learning in the audio domain or even in the malware domain. So in the audio domain, there's the recent paper published in IEEE SMB, using an attack technique to fool LSTM and so that what you hear would be the same sentence. However, when classified by the DNN, it's another attack sentence. And furthermore, we have AVPath developed between Intel and Georgia Tech on how to use perturbation to bypass malware, Android malware classifiers. And we have shown we are able to bypass virus total up to 100%. So Intel has been one of the pioneers in terms of identifying the key importance of adversarial machine learning. Back in 2016, we have a Intel Science Technology Center established at Georgia Tech. It's a three-year collaboration with Georgia Tech and Intel on identifying the vulnerability, studying the vulnerability of machine learning algorithms. We collaborate with Professor Wing Kim and P. Lee at Georgia Tech with three other collaborating professors. And I'm the co-principal investigator for this collaboration. And we want to study a variety of machine learning applications and how to attack them in order to improve the resiliency of these machine learning systems. So that's for the brief introduction for adversarial machine learning. For today's talk, I will be talking about how to use, use deep learning to bypass other deep learning algorithms for malware detection. As seen from the title, we'll be talking about GAN. So here is a very brief introduction of what GAN is. So before going into what this picture, the flow of this picture, I can start with a story about GAN. You can think of GAN as you have a con artist, that starts with, that doesn't really know what to draw in the beginning. And then you have a investigator that can differentiate between whether this painting is real or fake. So the con artist will first of all doodle something and the investigator will say, oh, this is not from Picasso. Then that's definitely gonna be fake. And through this iterative manner, the con artist could continue to sharpen the painting skills and the concept, and gradually it's getting better and better in terms of imitating the real paintings. So to the point that the investigator could no longer differentiate whether this is real or fake, this is when you can stop training the GAN, or this is when you can say that the con artist, it is someone that can fool the investigator, and you want the painting out from the con artist. So with that story, let me go into a description of what this picture means. So in GAN, we have a generator and a discriminator. So we originally feed a random noise into the generator, and then there is a discriminator that has the real data or the real digits in this figure, and also the pictures from the generator. So the job of the discriminator is to classify where there is real or fake, being it's generated by the generator. And the training is through an iterative manner. Every time your generator generates something, and then feed it to the discriminator, and then the discriminator tells you whether it's real or fake. Through this iterative training process, the generator gets much better at fooling the discriminator. And you can stop training the GAN when you think the images generated from the generator already seem pretty real to you. So we're going to use this philosophy in building our ATT&CK methodology. So here is an overview of our RDFool framework. So we first train, again, and we use that to generate dynamic execution logs, and then the third step is to justify the quality of these execution logs. because we don't really want to generate something that's gibberish to bypass another algorithm. That would be garbage in, garbage out. And the last step is to bypass a malware detector. Particularly in training again, what we do is we feed in those noise sequences from those dynamic traces to the generator. And the generator will generate those fake dynamic execution traces and also combine with real dynamic execution traces. Together they're fed into the discriminator. And the discriminator will try to identify which ones are real and which ones are fake. And when we update the generator, we freeze the discriminator so that we make the generator much, much better through the training process. Okay, so, our next portion of the talk will be how to apply this technique on our case study on bypassing ransomware detection. And through our analysis, we'll have more detailed understanding of how our methodology works. So in our case study on bypassing ransomware detection, first of all, our data are downloaded, the ransomware data are downloaded from VirusTotal and based on the labels from Microsoft or Kaspersky. And they contain these major families. And of course, we also collected benign data set. And it is through a dynamic data collection mechanism where the execution logs are collected using .NET framework. It is called File System Watcher. And our data format will be the timestamps because it's a dynamic log sequence and the process ID, event name, targeted file name, and the process ID, event name, targeted file name, and file entropy. So here's a quick screenshot of what our data is. So this is only two or three lines that only have occurred over two seconds. So in our real data set, we have much longer logs than this. In terms of our feature processing, we mapped the events into the categorical features. So there is some padding occurring, which I will explain later. So the padding will be in the feature encoding as zero. And then we have different events of these features encoding from one to nine. So after this feature mapping, each execution log will be represented by a sequence of events. And we set the length of each sample to 3,000. So before we try to bypass any classifiers, first of all, let's try to validate how well these classifiers are. So that would be, first of all, let us try to train some classifiers on this data set to see how effective these classifiers are. So what we have chosen here is that we use TechCNN, which is convolutional neural network for text classification, where we employ it for ransomware classification. So how TechCNN works is that, it basically represents your word in the embedding space, and then applies convolutional layer on top of that. And then after the convolution layer, you can do max pooling, and after max pooling, it's softmax. So at the output of TechCNN, you get the classification label of your text data. And one of the advantage of TechCNN over, and one of the advantage of TechCNN over, LSTM, both can be for sequential data, is that the training time for TechCNN is much faster. And also it has been shown that, in terms of classification performance, it outperforms a few of these other natural language processing classifiers in several data sets. Another thing, good thing about TechCNN is that it has channels embedded into this architecture. So you can look into, a lot of, you know, a lot of different engrams, when you try to train a TechCNN. Okay, so our classifier here, we utilize TechCNN, and here is the classification performance on this data set, where we actually train a few classifiers, TechCNN, XGB, linear discriminant analysis, quadratic discriminant analysis, and SVM, with different kernels. And what we have observed, again, is TechCNN achieves the best accuracy, and the combined with the best false positive rate. So our next step is actually try to use TechCNN as a feature extractor. So this original table, what I've shown here, is that the advantage of deep learning is one of the big, the big advantage is that it really bypassed the effort of feature engineering. So we don't have to actually do an engram anymore, so we just directly apply on the whole sequence. For fair comparison, all these other classifiers are also compared on the same sequence, so no engram extraction at all. Now our second step is to use TechCNN as a feature extractor, and then retrain those classifiers on the features, automatically learn, and then use them as a feature extractor. So what we've learned from this deep learning algorithm, and what we have observed is that these other classifiers' performance greatly improved, and the false positive also greatly dropped, because we are using the new features as extracted automatically from the deep learning algorithm. So as a result, what we have seen here is that we are able to actually find classifiers, TechCNN, or other classifiers in the TechCNN features, and generate nice InDesign projects that have very high accuracy and low false positive rate. So after understanding the effectiveness of these classifiers, then our next step is to try to exploit these classifiers. And we exploit these classifiers using GAN. And the only thing we need to know here, is the training dataset. cassette. We don't actually need to know what the malware classifiers are because later I'll show there's transferability in the attack that we can also bypass multiple of them. So we use the same training data to train again. Here we're actually training a CGAN conditional GAN and our training stopping criteria is based on the loss of the discriminator. Typically when you train again for image you can look at what is the generated image and you see oh this looks almost like a human or this looks like the digit or this looks like the room then you can stop the training. But for our case here we have nothing to look at. So our stopping criteria here is based on the loss function of the discriminator but later we'll examine again what the quality of this generated image is. So we're going to look at the loss function of the discriminator in sequences. So even though our training we use both benign and malicious data at test time we generate from one class. We generate from the malicious class because we think that's more practical use case in terms of we wanted malicious samples to be classified as benign. But of course with this mechanism you can generate samples from any of these classes. So let's move on to the third step of our methodology which is to justify the quality of those dynamic execution logs. So here I showed one example of what a generated example looks like. It's a sequence. It's a generated sequence. And now let's just go map those sequence back to the events and look at what these events mean. And from what we have observed these sequence of events actually these are these signatures that we have identified from the real malicious ransomwares. Now this is just only one example. You might be wondering what about all your five thousand fake samples. Are they closer to the real malicious or real benign because they are if they are really closer to the real benign. Then if later you claim you are all classified as benign that doesn't make sense because you're just generating benign or your GAN isn't good enough. So our next step is to look at all of the generated GAN work GAN samples the fake samples and analyze the matched N-gram patterns between the real malicious training set. I'm sorry the test set and the real benign test set. So why do I mention test set instead of training. So training we kind of use it for a GAN that our GAN has already seen. This match. Here is matching the fake from the test set that our GAN training has not seen that would mean that how well our GAN generated samples is able to generalize the malicious and top N-gram signatures. And furthermore what we're comparing here the red bar is the number of matched N-grams between the fake malicious set and the real malicious test set but not in the benign. test set. Because we also don't want to just match something that's both in the real benign and the real malicious because that doesn't really tell us that's good for the that that that's good for the quality. So the blue bar is the number of N-gram matched between the fake and the benign test set but not these N-gram do not exist in the malicious test set. And what we have observed is that for different ends. From three to seven grams we matched over 70 percent of the real malicious test set and we in here and also we analyze the Euclidean distance and L1 distance between the generated examples to the real malicious data set and that distance it's closer compared to the benign. So our third fourth step. Is to use these generated samples and tested against these highly effective classifiers that we have shown earlier. So here is the detection accuracy we have so basically texting and completely missed all of these malicious fake samples. XGB is able to actually classify 16 percent of them correctly as malicious. SVM video linear kernel and LDA are not able to catch however SVM with radio kernel is able to catch about 40 percent. And we went to examine why this is mainly due to the non-linear boundary in the text CNN feature space. So you might be saying what about the text CNN space it's non-linear. But here we're looking at the feature space in the text CNN algorithm. So in that case it's the softmax which is linear. But here the non-linearity actually helps. So we further examine where do these adversarial examples live. So this is called a tisny plot. So a tisny plot basically visualize your high dimensional data set onto 2D or 3D to separate them pretty well. It's a visualization technique or can consider dimensionality reduction technique. So the red with. The white. The ones are the real malicious data set. And the black patterns with ones are the real benign data set. And the red with zero symbols are the generated malicious sample. So what we have seen is that in the text CNN feature space these malicious samples are actually kind of living on the boundary of this feature space. However in terms of analyzing the distance is closer to the red than to the black. Hence if we were to consider a blind spot of this classifier we can actually consider this as the region. So furthermore what we wanted to see is that in the original data space what is the distance between the GAN or the fake generated features versus the real feature space. features. So this is the distance plot, histogram of distance plot. The red bars are the distance to the real malicious set, and the blue bars are the distance to the real benign set. And this is in the raw feature space. So this has nothing to do with any of the classifiers, nothing on Texan, and nothing on SVM, just the raw features. How close are they to each side? And we're seeing that the left means that the closer it is. So we're seeing that the fake GAN sequences are much closer to the real malicious data set. Now we examine the distance in the Texan feature space. So the same data that we have generated, instead of looking at the raw feature, we expand the inner layer of the text scene and then look at the distance. What we have seen here is that the distances are completely flipped. So it's much closer to the benign than to the malicious. So what does this tell us? This tells us that in the original raw feature space, these are truly really matching the n-grams of the malicious data set, and they have really close Euclidean distance, a lot of those distance to the real malicious set. However, when you use, when you apply this feature, calculate these features in a trained text CNN feature space, these distances are flipped because of that blind spot of this algorithm. And this tells us why text CNN completely are fooled by these fake generated examples, which in the raw space are actually quite malicious. And finally, what I have shown earlier are the attack, a code exploratory attack, which we exploit a classifier at text test time. Another attack is called causative attack, which we can exploit a classifier during training, or this can also be called training, poisoning the training data. So the implication of our work in terms of causative attack, what I have plotted here is the boundary of a SVM with linear kernel. Originally, it would have just the blue and the red line with a blue region and the red region with a line cutting across. However, with these generated fake example injected into the training, your fake example is not going to be executed. So the feature space actually, your boundary decision are actually divided up more. And these fake examples are just lying in this region, in that sort of blind spot of this boundary. So if we were to train, if your classifier, you train your classifier, you update your classifier every certain hours and using user's data. And using your predicted classification outcome, then by training using those fake examples, these boundaries of your classifier will be poisoned. And your performance can suffer even when you do the test on legitimate examples. Because once you poison your classifier, your boundary decisions are changed, then your classification system would not be as useful. So finally, a discussion. We showed a deep learning based mechanism to bypass ransomware detectors and validate the quality of the generated malicious samples. In this talk here, we did not test modifying the binary to result in the GAN-generated logs. However, after comparing the patterns between the patterns matched between the GAN-generated logs and the GAN-generated logs, we found that the GAN-generated logs did not match the GAN-fake examples. And the real malicious data indicate that finding such binary is not so difficult. We end our talk with an optimistic note. We are exploring a new wave of defense mechanisms to prevent such exploitation that the attacker only needs to know certain knowledge, degrees of knowledge of your training data set. And we also would like to motivate all of you in terms of designing or inventing new medications of such machine learning attacks. That's my talk for today. Thank you.