WEBVTT

00:00.000 --> 00:00.880
Awesome.

00:00.880 --> 00:02.320
Thank you, everybody.

00:02.320 --> 00:10.700
Next up, for our last talk, actually, at the AI Village, we have Shimon and Tal on noisy distributed distorted data sets.

00:10.900 --> 00:14.440
And let's all give them a round of applause.

00:22.160 --> 00:25.160
Well, good morning, everyone.

00:25.160 --> 00:29.660
And thank you all for being here on this Sunday talk.

00:30.780 --> 00:33.540
Actually, it's quite a nice attendance for a Sunday morning.

00:34.300 --> 00:37.100
We're, as presented before, Shimon and Tal.

00:37.100 --> 00:50.840
And we'll be talking about how we take noisy and distorted or initially noisy and distorted data sets and data sources and bring them into being excellent prediction models.

00:51.360 --> 00:52.940
Just a bit about ourselves.

00:52.940 --> 00:57.840
So as I said before, I'm Shimon, I'm the VP of research and deep learning at Deep Instinct.

00:57.840 --> 01:02.420
I've been working with Deep Instinct for the past three years since mid 2016.

01:02.420 --> 01:17.480
But overall, I have roughly 16 years of experience in cyberspace, both in offensive and defensive positions, both deep into research, but also, in recent years, more in management positions.

01:18.940 --> 01:21.200
So good morning, everybody.

01:21.200 --> 01:22.360
I'm Tal.

01:22.360 --> 01:29.580
Maybe some of you remember me from the talk about malicious Chrome extensions two days ago.

01:30.440 --> 01:34.280
So it's a big pleasure to be here again.

01:34.620 --> 01:38.940
I'm working at Deep Instinct as well for the past two years and a half.

01:38.980 --> 01:43.160
PR to Deep Instinct, I've been serving at the IDF for seven years.

01:44.940 --> 01:50.760
Okay, so after you know us a bit better, let's talk a bit about this talk's agenda.

01:51.140 --> 01:57.660
We'll start by introducing the problem that we're about to talk about in the next 40 minutes or so.

01:58.620 --> 02:04.320
I guess a lot of the people sitting here know that putting together excellent datasets is hard.

02:05.720 --> 02:11.860
It's not an easy task, and it involves a lot of knowledge, a lot of experience, a lot of trial and error.

02:12.020 --> 02:21.120
We'll be talking about some main problems and common issues when it comes to building those datasets.

02:21.180 --> 02:25.860
We'll be talking about source quality, accuracy, and diversity, and how do we evaluate those.

02:25.860 --> 02:35.320
We'll be talking about issues related to specific file formats and how file formats in general might affect the way that we build and engineer datasets.

02:35.320 --> 02:42.360
And then we'll talk about some noise and distributions and distortions error issues in threat intelligence sources.

02:42.360 --> 03:00.520
We'll conclude and wrap up by talking about how everything that we will be talking about drills down to the way that we conduct research into false positives and false negatives of the different models that we create.

03:00.520 --> 03:06.840
And we'll talk about some tips and recommendations about how to build the best datasets possible.

03:06.840 --> 03:07.820
Let's get started.

03:10.770 --> 03:11.730
All right.

03:11.730 --> 03:17.330
So the problem that we are trying to... we are talking about in this presentation.

03:17.650 --> 03:25.370
So basically the very first step at every creation of a model is building a dataset.

03:26.650 --> 03:38.210
The data that is used for the datasets is of course an important step in the creation of the model.

03:38.750 --> 03:52.810
As was stated two years ago in a presentation by Hillary Sanders, they were talking about how the data affects the results of the model that you create.

03:53.090 --> 04:04.670
So in this talk we would like to dive into some specific use cases and issues that we have experienced in our work, in the everyday work.

04:06.370 --> 04:13.750
And how these issues affect the datasets that you might build.

04:16.720 --> 04:22.620
So we will be talking about some sources.

04:23.480 --> 04:27.960
The commercial feeds such as VirusStore and Reversing Labs.

04:28.820 --> 04:32.400
Malware repositories like free repositories.

04:32.560 --> 04:37.240
And software repositories such as NSRL.

04:40.640 --> 04:41.360
OK.

04:41.360 --> 04:46.180
So I briefly mentioned before some of the main three topics.

04:46.180 --> 04:49.980
What we'll be showcasing in each one is as follows.

04:49.980 --> 04:54.820
When it comes to source quality and accuracy we'll talk about free and open malware repositories.

04:55.060 --> 04:58.740
They're a good thing but we also need to be careful about using them.

04:58.740 --> 05:01.140
We'll show why and how.

05:01.140 --> 05:09.720
We'll talk about sample duplications and the way that those duplications manifest in the most common threat intel feeds.

05:09.720 --> 05:21.780
As far as file format issues, we'll showcase how the threat landscape in two specific file formats, XLS office files or Excel office, you know what it is.

05:21.780 --> 05:37.640
And RTF, how the threat landscape in those two file types manifests into a very specific distribution of the files we see in the threat landscape and how that might affect the data sets and ultimately the models we'll build.

05:37.640 --> 05:54.200
And then moving on to noise and distortion, threat intelligence we'll show even sometimes how time distribution can be very weird and that in itself is not a desirable situation that might have pretty adverse outcomes.

05:54.200 --> 05:58.140
And we'll talk about two specific threat landscapes.

05:58.140 --> 06:04.320
One being the 64 bit PE threat landscape and the second one being the, yes even Android going into the stock.

06:04.360 --> 06:22.100
How these two threat landscapes have very very dense and specific distributions that also, that ultimately we might also, we might even call them a distortion of a kind and how that might affect how we, how we should build the data sets around those kind of threat landscapes.

06:22.100 --> 06:22.900
Let's get going.

06:25.400 --> 06:31.620
All right, so uh, the first category is uh, is the, is the sources.

06:31.620 --> 06:35.540
Uh, so uh, there are like two different kind of sources.

06:35.540 --> 06:38.700
Uh, the first one is the free repositories.

06:38.700 --> 06:40.580
Uh, and the second one is the commercial.

06:40.640 --> 06:44.440
Uh, we'll use uh, two use cases, different use cases.

06:44.440 --> 06:49.260
One from uh, free repositories and the second one is from a commercial one.

06:49.760 --> 06:54.000
Um, so in general, uh, start with the free repository.

06:54.000 --> 06:56.200
Um, every repository is welcome.

06:56.200 --> 07:00.240
I mean, when you, if you can get like more data, so actually it's good.

07:00.240 --> 07:05.400
So every time when there is like a new repository out there, uh, we are happy.

07:05.400 --> 07:19.080
Uh, we would like to, to take this data and to use it and to like uh, put it uh, into our uh, databases and uh, to connect it to our uh, data pipelines.

07:19.600 --> 07:23.180
Um, so it should be a good thing in general.

07:23.180 --> 07:33.520
Uh, but uh, sometimes when you, when we start looking at the data, uh, it's not as good uh, as we might expect it uh, to be.

07:34.260 --> 07:46.600
Uh, since a lot of uh, repositories are biased and uh, are indeed noisy, uh, which uh, create imbalances in your datasets if you take it as is.

07:48.500 --> 07:49.540
Alright.

07:49.560 --> 07:57.220
So the first use case uh, that we will be talking about is the free uh, open uh, repositories.

07:57.340 --> 08:00.460
Uh, there are a lot of uh, repositories out there.

08:00.460 --> 08:02.860
Uh, some examples are shown in the presentation.

08:02.860 --> 08:16.760
Uh, we took one uh, repository uh, that we are facing, we've been facing like uh, a lot of times uh, uh, we found it very used uh, by customers and by uh, researchers.

08:16.920 --> 08:21.480
And uh, we'd like to see what uh, what lays inside uh, these repositories.

08:21.480 --> 08:23.840
Uh, this specific uh, repository.

08:24.040 --> 08:35.400
Uh, since uh, it was really used a lot and uh, we saw that uh, in general the results that we had on this repository was not as good as uh, we are used to have.

08:35.480 --> 08:43.320
Um, so we took a dataset of one hundred and thirty thousand uh, samples from uh, this repository.

08:43.420 --> 08:49.740
Uh, uh, this repository uh, claims to be uh, containing malware only.

08:49.740 --> 08:53.220
Uh, so we tried to uh, answer uh, two questions.

08:53.220 --> 08:56.360
Uh, the first is what is the relevance of this repository?

08:56.360 --> 08:59.800
Like what uh, can you do with this repository?

08:59.800 --> 09:03.360
And the second, how uh, good the data that lays inside is?

09:03.360 --> 09:13.140
Or um, uh, or actually uh, is it really containing uh, only uh, malicious files as it claims?

09:13.460 --> 09:17.840
Uh, we have also uh, published a blog post about it so you can read about it later.

09:18.060 --> 09:23.720
Um, so uh, about the data that lays inside this uh, repository.

09:23.720 --> 09:36.000
So as you can see uh, only around uh, sixty percent are uh, were P files and uh, there was uh, like a very huge amount of files that were just actual files.

09:36.000 --> 09:45.020
Uh, which of course cannot harm a computer and uh, it's a bit problematic to like classify them as uh, malicious files.

09:45.080 --> 09:56.960
Um, and uh, of course that the data from uh, this uh, this repository cannot be- cannot be taken as is for uh, testing uh, models for example.

09:58.360 --> 10:16.940
Uh, but uh, we saw that the- the distribution types uh, and uh, of course that not everything is P in this repository but uh, at least uh, we hope to see that everything uh, is indeed malicious files as it claims to contain.

10:17.200 --> 10:33.220
Uh, so uh, we took uh, the data set and- that we created before uh, as I mentioned and uh, we tried to figure out how many uh, malicious files are indeed lays uh, lay in this uh, repository.

10:33.220 --> 10:44.760
Uh, we found out- we found out that there are only 56 percent uh, malware files uh, in the PE uh, section of the data set.

10:44.760 --> 11:05.140
Uh, we were truly amazed to see that uh, about 40 percent are PUA and around 4 uh, or 5 or uh, 3 or 4 percent were just benign files and we say benign we mean uh, pure benign files like not something that can be uh, PUA or stuff like that.

11:05.300 --> 11:17.740
Uh, so of course that as you can see uh, data from uh, this repository cannot uh, be taken as is for uh, testing models or uh, or training sets.

11:17.740 --> 11:28.160
Uh, of course that uh, one can use uh, the data from this repository uh, it's open, it's free uh, you- you should be trying to use it.

11:28.160 --> 11:33.260
Uh, not everybody has like uh, you know, API keys and uh, to commercial feeds.

11:33.280 --> 11:40.960
Uh, but uh, you cannot take it as is and you need to do some uh, engineering on the data before you take it.

11:40.960 --> 11:43.040
So that's the- the bottom line.

11:45.720 --> 11:47.780
Um, alright.

11:47.820 --> 11:56.500
Uh, another uh, use case that uh, we might uh, we will talk about it is uh, is from commercial feeds.

11:56.780 --> 12:01.160
Um, this uh, use case is the sample duplication.

12:01.160 --> 12:23.160
Uh, a lot of times uh, there is uh, like a specific sample that uh, is changed uh, with a few bytes inside the file and is uploaded again and uh, of course that the change uh, the change uh, makes the file has uh, a new hash and uh, and then you find uh,

12:23.160 --> 12:35.460
like thousands or even tens of thousands of times uh, similar files, almost the same file with a few uh, bytes that are changed uh, inside the commercial uh, repository.

12:35.480 --> 12:40.880
Uh, so let's talk about uh, a few examples for uh, this case.

12:40.880 --> 12:43.500
So the first is like polymorphic malware.

12:43.520 --> 12:50.960
Uh, in order to uh, like evade IOC based detection uh, that is used by a lot of vendors.

12:51.000 --> 13:11.320
Um, sometimes malware uh, change like something inside the file like uh, uh, uh, uh, first to, to change its hash and second to change uh, some IOCs such as file name or IP address or uh, or things that uh, vendor can uh, can sign on.

13:11.460 --> 13:15.820
Uh, the second use case is uh, virus uh, infected files.

13:15.820 --> 13:22.200
So uh, viruses in general uh, what they do is like uh, infecting a file.

13:22.200 --> 13:36.920
We'll see uh, in the next uh, next in the presentation we'll talk about a, a use case that uh, a virus like change something in the file, in the Microsoft file and uh, how it affects the, the data.

13:36.920 --> 13:41.660
Uh, and the last but not least uh, use case is the mass submissions.

13:41.660 --> 13:53.780
Uh, so a lot of times there are like researchers or even threat uh, actors that try to see if uh, their new, brand new malware is caught by uh, vendors.

13:53.780 --> 14:10.300
So they can like change a few bytes or change something in the behavior of, of their malware and upload it again to, to virus total for example and, and then we end up, we can end up with a lot of uh, duplicated samples again with different hash but very,

14:10.300 --> 14:12.740
very similar uh, files.

14:15.800 --> 14:19.940
Now let, let's back up for, for one second.

14:19.940 --> 14:21.200
Uh, mass submissions.

14:21.200 --> 14:24.400
Are we actually talking about a poisoning attack?

14:24.700 --> 14:32.420
Uh, we're here in the AI village and I think that poisoning attacks or attacking AI in general is one of the most discussed topics.

14:32.520 --> 14:44.240
So one could say uh, and, and this for the people sitting in this room this might be quite appealing or attractive even to say that wow, we're actually seeing AI poisoning attacks.

14:44.620 --> 14:50.160
Uh, so we actually think that this, this mass submissions use case is not exactly that.

14:50.160 --> 15:09.100
First of all because as we said in, in many cases uh, we see that these mass submissions are coming from users with API keys and those tend to be usually consumer, usually consumers on the defense side of these uh, um, of, of these uh, feeds and sources.

15:09.280 --> 15:25.320
Uh, not to say that when it comes from threat actors this is not uh, maybe also used not only for testing their own malware but also to try maybe and confuse or, or, or send you know, send researchers and send the security industry into different places.

15:25.320 --> 15:38.420
They want to want the, the, the, the attackers maybe don't want them to look at so they'll upload mass amounts of files and to cause you know, someone to think that you know, this is the hot stuff right now but actually they're doing something else.

15:38.420 --> 15:53.940
So, but still there's a difference between uh, you know, say poisoning attack and uh, just you know, doing something massive in order to, to, to, to confuse your, your enemy or your adversary.

15:53.940 --> 15:57.040
So we think it's more the second case than the first.

15:57.060 --> 16:01.620
So we're not still seeing actually targeted poisoning attacks.

16:01.620 --> 16:20.160
Not to say that it not, that it might not happen uh, uh, in the very, very near future but we don't think that's exactly the case as it but still taking those mass duplications in might inadvertently actually cause those mass submissions to be uh, a kind of poisoning attack.

16:20.160 --> 16:22.480
So that's why we chose to bring it forward here.

16:24.200 --> 16:32.560
Alright so uh, let's talk about a specific example of uh, uh, a malware .

16:32.560 --> 16:43.620
A polymorphic one uh, that uh, has been uploaded like tens of thousands of uh, uh, uh, times with uh, different hashes.

16:43.620 --> 16:45.860
So uh, we're talking about the Ramnit.

16:45.860 --> 16:51.440
Uh, Ramnit is a worm that is active for uh, more or less 7 or 8 years already.

16:51.440 --> 16:58.300
Uh, and as you can see in this results uh, it's uh, it has been uploaded a lot of times.

16:58.300 --> 17:17.580
Uh, we used uh, it's SSDIP uh, and uh, after taking this SSDIP uh, we looked at some of the samples that lays, that lay inside uh, this cluster in order to figure out if they are actually the same uh, file or not.

17:17.800 --> 17:28.260
So uh, as you can see we found out that uh, all these files were uh, in the size of uh, 3.5k uh, kilobytes.

17:28.480 --> 17:31.560
Uh, and uh, they were all DLL files.

17:31.620 --> 17:38.160
Um, the sections was uh, was the same uh, sections uh, by hash.

17:38.160 --> 17:40.780
Uh, at least 3 out of 4.

17:40.780 --> 17:49.700
Uh, about the, the fourth one uh, it was the data section uh, and the section uh, hash was different.

17:49.700 --> 17:59.700
So uh, we were interested uh, in like taking this example uh, to showcase uh, why uh, the sample duplication actually happened.

17:59.700 --> 18:06.960
Uh, so we looked uh, further uh, into this uh, data section in order to see what is the difference about.

18:06.960 --> 18:15.180
Uh, so as you can see the difference where, where was in only a few bytes, the red bytes uh, in the, in these uh, screenshots.

18:15.360 --> 18:27.960
Um, inside the, the data section um, uh, this few bytes uh, were uh, looking very interesting uh, because it's uh, it's actually a string .

18:27.960 --> 18:37.740
So we decided to, to took uh, uh, these uh, samples and to figure out like what, what these strings uh, actually used for .

18:37.740 --> 18:57.520
Uh, so by looking uh, uh, with IDA on these samples we were able to find out that this cluster of SSD uh, contains like a lot of uh, samples that are used to be the loader of the actual malicious uh, file.

18:57.520 --> 18:59.680
The actual malware ramnet.

18:59.680 --> 19:16.120
Uh, so as you can see the string was uh, some string dot exit uh, and this is the loader and uh, the actual file is being uh, loaded after that uh, by using the create process uh, API call.

19:20.480 --> 19:30.280
Okay uh, let's move on to talk a bit about issues that are very related to the format uh, of the files themselves.

19:30.280 --> 19:38.300
So um, before we get into it let's, let's think for a second what actually makes a file format a format.

19:38.540 --> 19:44.600
Um, and and what do different, how do different formats uh, ve- are different from one another.

19:44.600 --> 19:48.060
So formats define you know, the file's structure.

19:48.060 --> 19:49.320
It's header.

19:49.320 --> 19:55.380
The, the syntax meaning the actual binary sequence that separates between different parts of the file.

19:55.980 --> 20:03.400
Um, the type of data that we can find in the file whether it's a textual format or some kind of binary format.

20:03.400 --> 20:13.500
What kind of other data might be found uh, within the file whether it's compressed data, photos, pictures, uh, compressed data, encrypted data, etc.

20:13.500 --> 20:19.100
And of course different file formats uh, have different functionalities.

20:19.100 --> 20:19.820
Okay?

20:19.820 --> 20:27.580
Um, for instance you know, a PDF has it's own functionality.

20:27.580 --> 20:29.980
Uh, office files have their own functionalities.

20:29.980 --> 20:32.360
Uh, uh, PEs have their own functionality.

20:32.360 --> 20:34.840
They're meant to allow code to run.

20:34.840 --> 20:48.240
Um, the way that this uh, relates to what we're talking about here is that the threat landscape of each file format is based on that functionality and on the context in which it's being used.

20:48.260 --> 20:59.820
And in many cases, actually usually in most cases, attackers abuse the innate attributes and functionalities that lay in the different formats that we all use on a day to day basis.

21:00.080 --> 21:05.640
Uh, and use those in order to achieve their uh, their malicious intent.

21:05.660 --> 21:16.280
And when we say that, we mean that in many cases uh, a lot of the file formats can be uh, abused without actually you know, leveraging vulnerabilities or exploits.

21:16.280 --> 21:20.140
And let me give a few examples in that regard.

21:20.140 --> 21:27.460
When uh, someone embeds a malicious Javascript uh, regardless of what the Javascript does into a PDF file.

21:27.660 --> 21:32.020
Uh, so you know, having Javascript in a PDF file is not a vulnerability.

21:32.020 --> 21:33.040
It's a feature.

21:33.040 --> 21:33.860
Okay?

21:33.860 --> 21:42.540
Uh, even if that Javascript you know, triggers some kind of exploit, the fact that again, Javascript is supported in PDFs.

21:42.540 --> 21:45.820
The same goes for macros in office files, right?

21:45.820 --> 21:51.420
I mean having a macro is not, again it's not a vulnerability, it's a feature.

21:51.640 --> 22:06.020
Uh, so and if you look at every file type that can be abused and of course even looking at PEs, you know, if the PE is running, okay it might not, it might have you know, shouldn't have been there in the first place.

22:06.240 --> 22:09.140
But the fact that it's running, you know, that's what it does.

22:09.140 --> 22:09.500
It's running.

22:09.500 --> 22:10.900
It's running code on the machine.

22:11.000 --> 22:21.120
So again, all those things when you come, when you think about it, um, in many cases there isn't really any vulnerability or exploit necessary.

22:21.120 --> 22:24.520
Just abusing what the file format allows us to do.

22:24.740 --> 22:43.240
Uh, the fact that this is how the majority actually of the threat landscape behaves makes us think, uh, that we need to be very, very careful in examining how malicious files look like and how the benign files look like because we don't want these, uh,

22:43.240 --> 22:56.180
again, seemingly malicious but not necessarily malicious, um, you know, differences between, you know, the way malicious files look like and benign files look like to affect, uh, to affect our models.

22:56.260 --> 23:02.140
Uh, and let's give, uh, a few examples here to, uh, to demonstrate what we're talking about.

23:02.140 --> 23:17.880
The next few slides will all relate to just, uh, random, uh, recent data sets, uh, of 100K, uh, known benign files from each file type that we'll show and 100K malicious files from each file type that we'll show.

23:17.880 --> 23:34.920
We'll, we'll use the very, very, uh, naive, um, ground truth, uh, uh, approach here with, uh, as far as the malicious label is concerned with just anything with more than 20 engines, uh, 20 detections in either VirusTotal or other threat feeds that we have.

23:35.820 --> 23:38.920
So let's talk about, uh, Excel files.

23:38.920 --> 23:53.680
You know, uh, we don't need any kind of AI machine learning or deep learning or what have you in order to, uh, um, to have a pretty good, uh, detection mechanism for malicious Excel, uh, Excel files.

23:53.860 --> 24:12.620
We just can, we, we can use just one if, if condition, uh, and get, you know, 95% recall and only, again, with one if statement, it's not bad, uh, only 10% false positive if we just say, you know, if this is an Excel file and it has macro, let's deem it malicious.

24:12.700 --> 24:35.300
Because if you look at, you know, uh, at macro content, uh, so only, yeah, only about 10% of the benign files, uh, of benign Excel files have macros in them where, uh, you know, like on the other hand, a whopping 95% of the malicious Excel files have macros.

24:35.680 --> 24:42.060
Um, so, but again, do we want a model that makes, makes that distinction?

24:42.220 --> 24:43.100
I think not.

24:43.100 --> 24:52.480
Uh, especially not with a 10% false positive rate, which is, uh, again, for such a naive, uh, model, so to speak, is not bad, but obviously this is not something that we want to have.

24:52.600 --> 25:00.920
Um, the same goes if we look at the number of streams, uh, uh, 80% of benign Excel files have less than 10 streams.

25:00.920 --> 25:13.840
You know, XLS files, they're OLEs, OLEs are built, built out of streams, so 80% of the benign ones have less than 10 streams, whereas 80% of the malicious ones have anywhere between 11 to 20.

25:13.840 --> 25:27.480
Now, again, someone might think, wow, this is an amazing feature, because statistically, it really differentiates between the two, uh, uh, between the two, uh, between the two files, uh, or between the two, uh, you know, categories of files.

25:27.480 --> 25:40.780
But again, this is not something that in and of itself we want to, uh, uh, necessarily affect the decision, because then it would create a model that's very, very easily, uh, uh, evaded and by, or bypassed.

25:41.000 --> 26:04.460
Um, similar example looking at RTF, uh, you know, finding a benign RTF file that has, uh, an OLE object embedded in it is a, is, is, is quite a task, uh, because less than 0.5% of, uh, benign RTF files, uh, I mean, today I would think, generally speaking,

26:04.460 --> 26:20.620
that, you know, no RTF is benign, because who uses RTF anymore, but still, uh, uh, if you look at, uh, uh, the benign RTFs that are out there, barely any, any one of them, uh, has any kind of OLE object, but if we look at malicious RTF files, so we're talking about 70%,

26:20.620 --> 26:40.000
uh, more or less, uh, again, this is not something that we want to translate immediately into the models that we create and we need to engineer the data and think about, okay, so how are we actually going to generate a decent data set here, considering the fact that these are the statistics.

26:42.600 --> 27:00.280
Okay, now we're going to talk about some other distortions, uh, uh, and noise, um, phenomenons in threat intelligence that are not necessarily related to a specific file format, but more to a specific landscape or just to, you know, what we're seeing in threat landscape,

27:00.280 --> 27:01.820
in, in, in threat intel sources.

27:01.820 --> 27:17.100
A lot of what we'll see here lies in the fact that, you know, uh, the threat sources that we look at doesn't matter if it's the biggest threat sources, the most, you know, the most expensive one with the biggest number of files and the best coverage of the threat landscape.

27:17.100 --> 27:21.180
They don't reflect the reality.

27:21.280 --> 27:24.580
They are, they are a function of the reality.

27:24.580 --> 27:25.340
Okay?

27:25.420 --> 27:31.280
Uh, they're probably a much closer and better function, uh, of the malicious threat landscape.

27:31.600 --> 27:48.680
As far as the benign files that exist in the world, they obviously, uh, um, contain a fraction of what's, what's, what's really out there because, I mean, most benign files don't find their way into these, uh, uh, sources and feeds.

27:48.720 --> 27:55.740
Um, and, and that again, that in itself causes some kind of weird phenomenons that we'll, we'll now look at.

27:55.900 --> 27:58.500
The first is, uh, uh, time distribution.

27:58.540 --> 28:10.780
And this is, uh, uh, something that we did looking, uh, pretty much at all of the, uh, uh, PDF files found in VirusTotal, uh, from a period of six years.

28:10.780 --> 28:11.280
Okay?

28:11.280 --> 28:14.320
Between 2012 and 2017.

28:14.740 --> 28:24.200
Now, if you look at the distribution of these, uh, uh, of, of, of the files per month, you see, like, quite a weird phenomenon.

28:24.200 --> 28:40.580
You see that if we look at the beginning of the, of this time period, uh, it, it seemed like almost everything, well, not almost everything, but, uh, I mean, roughly, I don't know, two thirds, maybe even three quarters of the total PDF files you could find,

28:40.580 --> 28:43.080
you could find in VirusTotal were actually malicious.

28:43.500 --> 28:50.620
Whereas, if you look later into that time period, that tends, uh, uh, tendency seems to change.

28:50.620 --> 28:54.560
And, okay, now, one would say, you know, VirusTotal became so much more popular.

28:54.560 --> 28:57.240
I mean, you can't compare between 2012 and 2017.

28:57.760 --> 29:06.320
Uh, but then again, it makes you think, is this something that we want to somehow leak into our data set?

29:06.320 --> 29:25.720
Because if, even if we say, okay, let's just take 50 percent of the, uh, uh, benign files of all times, 50 percent of the malicious files of all times, what we'll get in, uh, in our data set is, uh, is, I mean, much more of the benign files that we would have are from the second half of that time period.

29:25.720 --> 29:33.620
And that, again, depending on the kind of model that you use, the kind of features that you use, um, that's something that might leak into your model.

29:33.780 --> 29:44.200
Uh, which is, uh, I think you'd all agree with me that, uh, creation, timestamp, and PDFs is not something that's very relevant for their classification.

29:44.440 --> 29:50.560
Uh, and this is something that's found in, just in, in, in clear text in pretty much every PDF out there.

29:50.760 --> 30:05.300
Um, this is the, the, looking again at the distribution, but just looking at absolute, uh, I mean, looking at each of the landscape and, and, and, and seeing how that specific, either the benign or the malicious landscape, uh, distribute in time.

30:05.300 --> 30:23.980
What we also see, and again, this comes, uh, comes back to those mass duplications we talked about before, is we're also seeing some, like, very weird and, uh, obviously out of the ordinary, uh, uh, months, uh, where suddenly, uh, there's a huge surge in the amount of,

30:23.980 --> 30:30.420
of malicious samples and sometimes even in the benign samples, um, that are, that you can find.

30:30.420 --> 30:48.120
So again, both this, uh, uh, this phenomenon, so to speak, but also this, this one with these distorted months, again, this is something that needs to be looked at because, uh, again, it, it might, if, if we just look at things randomly, it might really affect the data that we,

30:48.120 --> 30:52.100
uh, uh, that we put into our, uh, to our data sets.

30:55.240 --> 31:05.880
So, uh, uh, these, uh, statistics are, uh, talking about, uh, a data set of, uh , 64 bits PE.

31:06.240 --> 31:18.000
Um, so as you can see, uh, with the random data sets of 64 bits PE, there is, uh, around 90 percent of the files, uh, just, uh, dotnet assemblies files.

31:18.340 --> 31:32.780
Um, so again, it's, uh, it's a huge bias to dotnet assemblies and, uh, probably that this is not what you're trying to generalize the model on when you take, like , 64 bits, uh, data set.

31:32.780 --> 31:38.840
Uh, 45 percent of the data was just, uh, Microsoft, uh, infected files.

31:39.060 --> 31:46.740
Um, um, so again, there is a strong bias, uh, to a lot of Microsoft files in the malicious data set.

31:46.740 --> 31:49.580
Uh, probably it's not the case in the benign data set.

31:49.580 --> 32:02.560
So, uh, you'll find out, you, you, you end up with, uh, a benign and malicious data sets when you have more, uh, files that, uh, look like, uh, Microsoft files in your malicious, uh, data sets.

32:02.940 --> 32:05.500
Uh, and it might be a problem.

32:05.500 --> 32:19.440
So, uh, let's see, uh, an example, uh, for, uh, why, uh, there are so many, uh, malicious infected, uh, files.

32:19.440 --> 32:32.500
So, we, there is a specific, uh, DLL, DNS API, uh, which, uh, has been, uh, like tens of thousands of times in, in a random, uh, data set that, uh, we created.

32:32.500 --> 32:41.000
Uh, and, um, and we try, we try to find out, like, why there are so many DNS, uh, API infected files.

32:41.000 --> 32:47.040
So, uh, one concrete example is, uh, was discovered by, uh, Malwarebytes in this, uh, in this link.

32:47.380 --> 32:54.040
Uh, and, uh, what actually was there is, uh, like a virus that, uh , changed the host files.

32:54.040 --> 33:00.580
Like, uh, it, it was just patching the, the host files in order to hijack, uh, the host files.

33:00.580 --> 33:10.020
Uh, the host file is a file that, uh, like, uh, there is, uh, there can be configured like, uh, uh, like DNS entries.

33:10.020 --> 33:24.100
Uh, so every time your machine needs to, uh, like, do, uh, like, uh, it, when it needs to do, like, a DNS query, uh, so prior to the DNS query, uh, the machine checks inside the host local file.

33:24.200 --> 33:35.240
Uh, so by hijacking, uh, the host file, uh, the malware can control, uh, the DNS, uh, that, uh, that are served, uh, to the machine.

33:35.780 --> 33:48.800
And of course that, uh, as I said, uh, 45, uh, percent of, uh, Microsoft files or, uh, like Microsoft files in the malicious data set might lead easily to false positive on Microsoft files.

33:53.300 --> 33:59.280
Uh, another use case, uh, lays in the Android landscape.

33:59.320 --> 34:11.340
Uh, so APK, uh, of course, uh, I guess that you know, uh, is an Android package, uh, like, uh, an archive, uh, that contains, uh, the resources and the stuff for an application.

34:11.340 --> 34:18.560
Uh, so there are a lot of, uh, malicious files in the threat landscape of, uh, Android.

34:18.560 --> 34:38.540
Uh, there are ransomware for, uh, Android, uh, spyware, uh, a lot of differences of, uh, PUA, uh, but also there is, uh, a specific type of, uh, of malware, uh, premium SMS, like, uh, an application that, uh, what it does is just like, uh, sending SMS,

34:38.540 --> 34:49.500
uh, messages from, uh, from users in order to monetize it, uh, and to, like, pay money from, by the user to the, to the attacker.

34:50.420 --> 35:02.300
Uh, so we created, uh, again, a random, uh, data set, uh, and we were looking at, uh, the families, uh, of the malware, uh, that lays, uh, that lay inside the data set.

35:02.300 --> 35:08.060
So, as you can see, we looked at, uh, the, the 3 top, uh, families.

35:08.060 --> 35:19.700
All the 3 top families, uh, are, uh, composed, uh, are, uh, like, uh, taking, uh, around, uh, 37 percent of the data set, and all of them were, uh, premium SMS.

35:19.700 --> 35:31.820
So, again, uh, here is another use case of, uh, strong bias to something that we probably didn't want, like, the model, like, the, the APK data set to be, uh, biased to.

35:31.820 --> 35:45.180
Like, we probably wanted it to be, um, more, uh, like, uh, presenting the, the real, uh, types of, like, malicious APK data, data router.

35:48.870 --> 35:49.670
All right.

35:49.670 --> 36:00.310
So, uh, now we'll, uh, conclude and, uh, we will, uh, like, uh, show you, like, uh, also we'll say, we'll talk about some takeaways from this presentation.

36:00.310 --> 36:16.590
But, uh, first I'll start with, uh, like, uh, a process that, uh, we are doing post-training and, uh, can be taken and, uh, applied, uh, like, it's an, uh, process or an attitude that you can take and apply after that, uh, post-training, uh, for your models.

36:16.610 --> 36:21.430
Uh, so, uh, first you need to identify, like, a pattern, a specific pattern.

36:21.430 --> 36:26.390
For example, uh, as I said earlier, uh, let's take, uh, for example, a P model.

36:26.390 --> 36:35.810
So you, if the data set was biased as, uh, we've seen earlier, so maybe you might have false positive on Microsoft files.

36:36.110 --> 36:41.930
Uh, then, uh, what you need to do is, like, going back to your data set.

36:41.930 --> 36:49.430
Uh, the reason is to, to look at the training set that the model was generalize, generalize, generalize done, sorry.

36:49.810 --> 36:51.250
Generated from, yeah.

36:52.650 --> 37:07.630
Uh, uh, in order to, like, uh, examine the, the pattern appearance, uh, to see, uh, how it, uh, how it's distributed inside a benign data set, uh, and a malicious data set in the training set.

37:08.010 --> 37:28.070
Uh, sometimes you can go even further and, uh, look at, uh, the feature level and, uh, like, trying to create, uh, like, what is the combination of features that, uh, makes your, uh, makes this file or this, uh, uh, collection of files, uh, look like,

37:28.070 --> 37:33.930
uh, a malicious file for, uh, for the model, uh, leads to false positive, of course.

37:34.550 --> 37:37.490
Uh, and by that, uh, you need to understand the meaning.

37:37.490 --> 37:46.170
So, for example, in the collection earlier that I described, you, uh, might, uh, call it, like, Microsoft files or a DNS API DLL file.

37:46.490 --> 37:56.350
Uh, the last step is, like, uh, adjusting and engineering, uh, the feature distribution or the pattern distribution inside the training set.

38:00.110 --> 38:17.970
Uh, so Tal just talked about, uh, you know, uh, how, uh, how, uh, uh, how, uh, we might use all the, all the data that we've shown here in the false positive or for the false negative research, uh, um, phase that, again, usually occurs post-training, whether it's when you still,

38:17.970 --> 38:36.790
whether it's when you're still, you know, testing and evaluating your, uh, newly created model or even if it's, you know, and for the folks here that are coming from, you know, AI-based, uh, from AI vendors or from next-gen vendors or whatever or the legacy ones that are now using machine learning as well.

38:36.990 --> 38:41.970
Uh, uh, you can do it on, of course, on your production data.

38:41.970 --> 38:46.050
Okay, so false, false positives and false negatives that occur in production.

38:46.050 --> 39:01.190
But, uh, a lot of what we talked about, uh, comes back to, you know, what we do pre-training and, again, how we build and engineer the best data sets possible that will ultimately, uh, enable us to create the best models possible.

39:01.190 --> 39:11.930
And those are some of the, uh, uh, the, you know, the do's, so to speak, uh, or, or the recommendations that we have, uh, uh, based on what we've seen.

39:11.930 --> 39:23.190
Uh, the first is, you know, we need to really understand the threat landscape and whatever is the problem that you're trying to solve and think about how it might affect the data.

39:23.710 --> 39:25.770
Uh, because it might affect the data.

39:25.770 --> 39:36.210
You need to really differentiate between, uh, uh, again, those innate features or, uh, uh, features in the general term of features, not in model features.

39:36.530 --> 39:43.410
Uh, uh, but, but the features in the file format or, or the functionality of the file format, how that's abused in the threat landscape.

39:43.790 --> 39:53.070
And, of course, what's, you know, not really an abuse of the format, but something that's, you know, uh, again, a vulnerability or an exploit that, that, that could be leveraged.

39:53.070 --> 40:00.430
Those things will manifest differently in, uh, the, the, in, in your benign data sets and your, and your malicious data sets.

40:00.430 --> 40:06.670
And you need to think about caref- you need to think about that carefully and understand that before you go about building your data sets.

40:07.170 --> 40:19.050
Uh, another, uh, another thing that, that, that we, that we want to mention is, again, different file formats, uh, behave and distribute very, very, very differently from one another.

40:19.190 --> 40:29.890
Sometimes, uh, it's, uh, you could see that in, um, even in, uh, in, in formats that are very, very closely related.

40:29.890 --> 40:35.810
Let's say, PEs, 32-bit and 64-bit don't look the same, don't behave the same.

40:35.810 --> 40:57.830
Uh, at least as far as their, their distribution threat landscape, uh, is concerned, um, and, and, and again, this goes also to different types of document files or even if we look at even more specific packages, uh, or formats like OLEs, so again, doc files and Excel files and PowerPoint files don't distribute,

40:57.830 --> 41:01.410
uh, uh, the same although their format is the same one.

41:01.470 --> 41:17.270
Uh, one of the most important takeaways, uh, we believe is that, uh, we all need to very carefully examine the raw data that, uh, uh, that we take and, uh, examine its, its, its distribution.

41:17.370 --> 41:31.570
Meaning, okay, uh, of course, I, I believe we all, you know, normally try to, you know, build the biggest data sets possible, uh, with respect to, you know, whatever we can find or how big the, the, the available data is.

41:31.570 --> 41:36.190
And if, and sometimes it's a question of, of the resources and, and, and computation that we have at hand.

41:36.390 --> 41:48.490
But, uh, uh, of course, you know, uh, yes, a good approach is starting from as big as possible, but then, uh, really examining the distribution and making sure that it seems reasonable.

41:49.090 --> 42:06.790
Um, noise and distortion can be found somewhere in the most, can be sometimes found in the most unexpected of places, like time distribution, uh, with really just, you know, weird, uh, uh, weird phenomenons of like months where, you know, PDF was the king of the malware or whatever,

42:06.790 --> 42:08.830
but, uh, it's not actually the case.

42:08.830 --> 42:14.570
And usually it is some kind of distortion that you better if, if, if you clean it out.

42:14.790 --> 42:19.750
Now, in a lot of what we've mentioned here, there's no, you know, there are no textbook recipes.

42:19.750 --> 42:20.150
Okay.

42:20.150 --> 42:31.690
Uh, but as we all know, well thought of trial and error is our best friend, uh, in many cases and, and, and, and applying AI and to, into the field we're in.

42:31.850 --> 42:36.410
So, and this is the part where, you know, data science is a bit of an art as well.

42:36.470 --> 42:57.870
Uh, uh, yes, of course there will be more files with, uh, uh, macros in a malicious, uh, Excel, um, data set, but whether we want to have that exact distribution the way it is, if we look at the raw data, uh, our recommendation is no, uh, uh, engineer that,

42:57.870 --> 43:07.610
uh, that somehow differently in what way, whether you do it with over sampling or with, you know, uh, compromising for a smaller data set with a different distribution.

43:07.610 --> 43:23.930
Again, that lies, that depends on, on everybody sitting here and your peers and colleagues, but, um, we recommend that you again, look at the things and, uh, you know, do your trial and error and see, uh, uh, and see what's best different models, different,

43:23.930 --> 43:27.990
you know, feature spaces, different file formats, different threat landscape.

43:28.150 --> 43:31.930
The solution for them is, is quite different.

43:32.650 --> 43:35.070
This pretty much concludes, uh, our talk.

43:35.070 --> 43:38.370
Thank you all very much for listening and we'll be happy to take any questions if there are.

44:05.390 --> 44:10.790
In a way, but the question is, what is your bias?

44:11.310 --> 44:15.970
And how, uh, and again, what's the problem you're trying to solve?

44:16.070 --> 44:29.650
Sometimes that problem might be, if you are at the very, very early stage, how do I build the best model that generalizes on the right things and not on distribution of, of, of the threat landscape as it is?

44:29.650 --> 44:32.770
Because that might lead to adverse results.

44:32.770 --> 44:47.110
And sometimes in order to fix something that you already find to be problematic, a specific pattern that consistently is causing false positives or false negatives, and then our recommendation is go back to your data.

44:47.110 --> 44:51.430
Sometimes the problem is not in, sometimes the problem is not algorithmic.

44:51.430 --> 44:53.070
It's not in your feature space.

44:53.070 --> 44:57.750
It's not in your, you know, model architecture or the specific algorithm you chose.

44:57.770 --> 45:00.450
Sometimes the problem simply lies.

45:00.450 --> 45:05.450
It might not be as simple to solve it, but the problem lies in the data itself.

45:06.710 --> 45:07.550
Yeah, sure.

45:08.070 --> 45:10.290
Just want to add something.

45:10.690 --> 45:18.010
Uh, the issue is that, uh, it's, it's when you create a dataset, it's not possible to find out like all the, these biases.

45:18.330 --> 45:31.670
So in many cases you just, you know, after seeing some production environment or like after tackling and using the model for a, for a period, uh, you, you find out these patterns and these biases.

45:31.730 --> 45:36.650
So that's the point that it's not always, um, so easy to find them out.

45:37.270 --> 45:38.310
Yeah.

45:51.480 --> 45:53.800
This, this is a great question.

45:53.800 --> 45:57.580
Uh, the answer is yes, but it's, uh, I'll repeat the question.

45:57.580 --> 46:03.140
Did we try to, uh, come up with some kind of metric to build datasets or to balance them?

46:03.140 --> 46:06.300
Uh, the, the, the, the short answer is yes.

46:06.300 --> 46:20.100
The longer answer is yes, but it's way out of scope for this talk and for 45 minutes because it's just, it's so, um, um, it's just, it's so different between different file types and different formats and different threat landscape.

46:20.100 --> 46:22.120
So again, there's no textbook recipe.

46:22.120 --> 46:31.020
And it also, I mean, what we've done is, you know, is good for our approach, for our models, for the way that we work, for our infrastructure and framework.

46:31.020 --> 46:42.000
It might be very, very different for other researchers, for other companies that use intrinsically different approaches, algorithms, models, data sources, et cetera.

46:42.000 --> 46:45.480
So, and, and in that sense, what we said, there's no textbook recipe.

46:45.480 --> 46:47.440
If there was one, we, we'd share it.

46:52.100 --> 46:53.280
Thank you all.

