Hello everyone, thank you for coming, and especially thanks to the Jibeng guys and the opportunity here to give you this representation. First of all, a few words about the speakers. My name is Raffi, and I'm a senior researcher of the Yunding Lab, and my co-speaker is Quansh, he's the director of threat intelligence of the Yunding Lab. The introduction of my team, Yunding Lab, is one of the... seven Tencent security laboratory. We pay attention to the construction of Tencent cloud security system, focus on the offensive and defensive research and security operation of the cloud network environment, and build cloud security products based on cutting-edge technology concepts, such as machine learning. So, here we are. So, here is our topic, adaptive malware to anti-detection based on GAN. We will tell a story about hide and seek. First, we will... This is the first part of our story, the art of hunting, the method we use to detect malware. We have two ways to detect malware, static analysis and dynamic analysis. The first method I have in your mind is signature based by sentence. On the right side is the malware name. And the orange color is a bad pattern. And the next is hash. The third way is the... And it's a set of rules. And it's a more flexible way. It's a way to detect the malware. Dynamic analysis, we always put the malware to the sandbox or virtual machine and analyzing the software in motion. But it has some shortcomings. It's slow compared to the static analysis. It's too slow. And it's easy to detect the virtual environment by the malware. And specifically for the malware, they need some input program. It's difficult to simulate that. So, how... How much time does the antivirus product to detect the new malware? Here is an example. The most famous malware last year, quantum pride. In the... 12, 25 AM, just 16 antivirus products can detect it. And then 9 hours later, just 16 more antivirus products can detect it. During the 9 hours, thousands and thousands of computers infected with the quantum pride. So, some technologies to bypass the detection of the antivirus products. There are two ways to bypass the detection of the antivirus product. Just change the signature and hide the signature. We use the CCL or the MyCCL to slice the file into pieces and we can find which pieces This has a signature. If we can't find the signature, we can just hide the signature. Pack with packer or use polymorphic, metamorphic obfuscation. Almost 60% malware are packed in our monitor. Here's an example of the polymorphic malware, Parrot. These two code is the same malware, Parrot. It's the same malware, same function, but the same different code and hard to find the signature. And you can do this technique with the same technique yourself. You can find the anti-antivirus service anywhere. On the darknet, you can buy a diamond box, $370. And in China, on the ground, about $260 you can buy the service. So it's a big problem for the antivirus product. But no wait. More and more antivirus products claim to embed machine learning in their product line. But why? Because the machine learning can produce big data. And sometimes, Sometimes, for this example, even two features, for the hand writing rules, it's difficult to write the rules. But for the machine learning, it's easy to find the boundary here. Here are two examples of our laboratory to detect malware with machine learning. Here are three polymorphic malware. Three families of polymorphic malware. Pyrex, Verox, and Cellity. We return the malware directly to the malware image. We can easily tell the difference between this main image and the difference between the two. This is the malware family. So, this is our procedure. We turn the malware to the main image. And then we use the cell to detect the image. And then we can detect the malware. And it's easy and convenient. And the second way is the structure entropy. Because the packed malware and the metamorphic malware is a big problem for the adventure... For this example, the blue line is the original file. It is the structure entropy of the original file. And the green line is the structure entropy of the packed file. So, we can easily tell the difference between the different packed files. We can even not unpack them. We can tell the difference. So, machine learning has some advantage to the traditional way to detect the malware. The traditional way only detects the known threats, rely on known rules. But machine learning can do it automatically. And can rule the machine. We have hundreds and thousands of features. And it's easy to detect the new malware. And not easy to bypass. But is it not breakable? The answer is no. We use a machine to beat the machine. So, our method is the GAN. Here is the generative adversarial networks. Here is the image of PETA. And some specific noise. And the classifier is confused. And recognize it and keep it. Because the machine learning models always has an overfitting problem. It has blind spots. Another example. We just changed one pixel of the picture. It can account for the model. This is a frog. After changing one pixel here. It turns into a cat. But it's difficult to apply this technique to the malware generation. For this image. For the image. There's some noise. It's still an image. The GAN can tell us to change which pixel. How to change the pixel. And we can. It's still an image. But we change the bytes. The structure in the PE file. It will be a broken file. It cannot run. Here is some jobs. From previous work. By the Catherine. They did a great intubate attacks. To the . But the attackers required no. Required full knowledge of the model. Structure and the weights. But most of the time. Attackers have no access to the architecture. And the weights of the neural network. To be attacked. And the second way. The second is. Substitute neural network attacks. Attacks. Attacker can feed the black box. Neural network. And the attacker can attack other machine learning algorithm. If you don't know the model. They use. The product. The product they use. They use the linear regression. Or the SVM. Or the neural network. To work. It's all the same. Here is job. By last year. They attack the black box detector. In the game method. The algorithm. And they can. They can be. They can start. From 100 to zero. But they assume. The feature. The feature. The malware. Detection. Algorithm. Use. They know. Have known this. Features. But actually. But actually. We can. Know. Know. Know. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. The. and have the blank spot. We will camouflage malware to be a PNA file with the hashtag fidelity. Here is the PE structure. The PE file has a header and a section. The header, for example, the PE header, the dot header, for the section it has some theta. For example, strings, imports, codes. Here is the architecture of our benign malware GAN. Our GAN name is benign malware GAN. The structure is almost like a normal GAN structure, but the difference is the generator. We use the autoencoder as our generator. We train the autoencoder with the benign file, and then we put the malware into the decoder. It will generate the benign, like a benign file, benign malware. Where we use the autoencoder, this image is generated by deepfake. It's also an autoencoder. In this film, we know the kid did not act in this film. The Avengers. But here, it's a, it's a, it's a, it's a, it's a, it's a, It's a fake picture. The interviewer treated the human and confused us. The process of this technology is we train the autoencoder with person A's face, and then we put the person B's face to the decoder where we generate the face of person B, but the person B's face is more like person A's face. So the same, we train our generator with B9 file. And then we put the malware and the random noise to the decoder, and this is our generator. We will generate the B9-like malware. For the malware, we'll tear the malware apart, the strings, codes, imports, and headers, and put the parts to the game, generate the new strings, new codes, and the new imports, and new headers, and we'll re-combination this parts to the game. And we'll show the new file in our malware. And as we write, we'll do some tests, and this is an example for the crack. 51 antivirus products can detect it. And now, after the one epoch, just six can detect the malware. As a result, we can see that we can detect it, but it's just long. Like I said, we only have one day left. So we'll do one or two more methods to do it, and then we'll do it. As a result, we'll do another one or two methods to do it. And we'll do another one after the other aspects. So we'll do another one, and then later we'll do another one after the other part of the step. So we'll do another one after the other process. signature, it matches the signature. How can we defeat this attack? Defeat this attack, you can attack your model to discover the blind spot and then you can fix it. And then do not show the spot side. For example, for the crowd-strike Vulcan E-gambit mask, they show the spot outside. You can find, by this spot, you can find which feature is sensible. And the third way, you take a mouse, they want signature, you can defend this attack. So, thank you. Thank you. Anybody have any questions? Yeah, I think I have a question. Oh, okay, you go ahead. You said you trained the model with the nine files to generate the code that overlaid on it. Did you just use random files or did you use Microsoft libraries, things like that that see the nine? Yeah, I used random files. Even the, we use, for example, we use the Microsoft file. It will compare with the Microsoft file. It's still an abnormal file. Yeah. Yeah, yeah. Did your generated files run, did you do unit tests on them to make sure that they have all the test cases and they ran exactly like the original file? Like, you changed them a lot of times, so now it can't be detected. But does it do the same things now? I mean, does it do the exact same things or has something changed in its code? Is that because, for example, right, if you change the wrong bit in there and it hits an incorrect web address, right, then the file, it's gonna be useless now because the malware's not gonna be able to hit its command control interface and it's just gonna go, okay, I can't do anything, I'm just gonna sit here. Yeah, yeah, yeah. What was the combination by hand? Yeah, yeah, yeah. By human to check the format, okay. So you run it in a sandbox to check the malicious behavior? Yeah, yeah, yeah, yeah, yeah. Oh, okay, okay. I see. Okay, yeah. And adding to that, so we also did some similar thing for the benign files you input to the discriminator so it looks like the benign. Those benign files, I think, can be random, right? Any benign files and not necessarily to be, because it's approximate distribution. So it's benign file. And for the malicious one, actually, we did something like if you are generating on the binary code and you keep the ones and only change the zeros so that it's kind of like you only add function but you don't delete things. So that, presumably, you will be able to preserve the malicious functions and behaviors. Yeah, but still need to check, yeah. Did you, just a side question, did you guys try, so you used auto-clear, did you try any of the other games or did you just keep the auto-clear? Like, I'm sure, trading GANs has been, like, a difficult endeavor for everybody. Yeah, I think he used GANs, not auto-encoders, right? You used GAN, not the auto-encoder, right? Yeah. Yeah, he used the generator and discriminator instead of the auto-encoder, which is the encoder and decoder. Wasserstein GAN or just a regular GAN? That I don't know. Wasserstein GAN, or what kind of GAN are you using? Well, I think... I think one, my understanding is, for GAN in image it's hard. Because it's very hard to generate high-resolution images, but for the, like the malware, the binary case, it's relatively easy, because you don't need to care about this high-resolution and the, you know, realistic features. But again, it is hard, but you can look at the, you know, 10 or 10 discriminatory loss and I think, but yeah, but I don't know what kind of game I'm using. But I think it was just game is better. Questions? Yeah, so. Oh, okay. So, okay, let's thank the speaker again.