start	end	text
0	4300	Awesome. Thank you, everybody. Next up, for our last talk,
4300	8420	actually, at the AI Village, we have Shimon and Tal on noisy
8420	13420	distributed distorted data sets. And let's all give them a round
13420	14440	of applause.
22160	26460	Well, good morning, everyone. And thank you all for being here
26460	32300	on this Sunday talk. Actually, it's quite a nice attendance
32300	36340	for a Sunday morning. We're, as presented before, Shimon and
36340	40800	Tal. And we'll be talking about how we take noisy and distorted
41820	47280	or initially noisy and distorted data sets and data sources and
47280	52120	bring them into being excellent prediction models. Just a bit
52120	55840	about ourselves. So as I said before, I'm Shimon, I'm the VP
55840	58520	of research and deep learning at Deep Instinct. I've been working
58520	62860	with Deep Instinct for the past three years since mid 2016. But
62860	68440	overall, I have roughly 16 years of experience in cyberspace, both
68440	73880	in offensive and defensive positions, both deep into research,
73880	77480	but also, in recent years, more in management positions.
78940	83520	So good morning, everybody. I'm Tal. Maybe some of you remember
83520	89580	me from the talk about malicious Chrome extensions two days ago.
90440	96380	So it's a big pleasure to be here again. I'm working at Deep Instinct
96380	100140	as well for the past two years and a half. PR to Deep Instinct,
100140	103160	I've been serving at the IDF for seven years.
104940	109060	Okay, so after you know us a bit better, let's talk a bit about
109060	114540	this talk's agenda. We'll start by introducing the problem that
114540	119460	we're about to talk about in the next 40 minutes or so. I guess a
119460	121580	lot of the people sitting here know that putting together
121580	128520	excellent datasets is hard. It's not an easy task, and it involves
128720	131120	a lot of knowledge, a lot of experience, a lot of trial and
131120	138220	error. We'll be talking about some main problems and common
138220	141740	issues when it comes to building those datasets. We'll be talking
141740	144700	about source quality, accuracy, and diversity, and how do we
144700	148600	evaluate those. We'll be talking about issues related to specific
148600	152980	file formats and how file formats in general might affect
152980	155640	the way that we build and engineer datasets. And then we'll
155640	159260	talk about some noise and distributions and distortions
159260	162780	error issues in threat intelligence sources. We'll
162780	167400	conclude and wrap up by talking about how everything that we will
167400	174360	be talking about drills down to the way that we conduct research
174360	178900	into false positives and false negatives of the different
178900	183160	models that we create. And we'll talk about some tips and
183160	185780	recommendations about how to build the best datasets
185780	187820	possible. Let's get started.
190770	195130	All right. So the problem that we are trying to... we are
195130	199630	talking about in this presentation. So basically the
199630	204590	very first step at every creation of a model is building a
204590	212270	dataset. The data that is used for the datasets is of course
212270	219430	an important step in the creation of the model. As was
219430	222910	stated two years ago in a presentation by Hillary
222910	228890	Sanders, they were talking about how the data affects the
228890	234470	results of the model that you create. So in this talk we would
234470	240670	like to dive into some specific use cases and issues that we
240670	247570	have experienced in our work, in the everyday work. And how
248930	258080	these issues affect the datasets that you might build. So we
258080	264880	will be talking about some sources. The commercial feeds
264880	270200	such as VirusStore and Reversing Labs. Malware repositories
270200	275960	like free repositories. And software repositories such as
275960	277240	NSRL.
280640	285360	OK. So I briefly mentioned before some of the main three
285360	290260	topics. What we'll be showcasing in each one is as follows. When
290260	292740	it comes to source quality and accuracy we'll talk about free
292740	296500	and open malware repositories. They're a good thing but we also
296500	301140	need to be careful about using them. We'll show why and how.
301140	304820	We'll talk about sample duplications and the way that those
304820	309920	duplications manifest in the most common threat intel feeds. As
309920	313980	far as file format issues, we'll showcase how the threat
313980	318880	landscape in two specific file formats, XLS office files or
318880	324000	Excel office, you know what it is. And RTF, how the threat
324000	327600	landscape in those two file types manifests into a very
329380	332600	specific distribution of the files we see in the threat
332600	335880	landscape and how that might affect the data sets and
335880	338420	ultimately the models we'll build. And then moving on to
338420	342360	noise and distortion, threat intelligence we'll show even
342360	347700	sometimes how time distribution can be very weird and that in
347700	352920	itself is not a desirable situation that might have pretty
352920	357360	adverse outcomes. And we'll talk about two specific threat
357360	361000	landscapes. One being the 64 bit PE threat landscape and the
361000	364320	second one being the, yes even Android going into the stock.
364360	367440	How these two threat landscapes have very very dense and
367440	371640	specific distributions that also, that ultimately we might
371640	376040	also, we might even call them a distortion of a kind and how
376040	380420	that might affect how we, how we should build the data sets
380420	382900	around those kind of threat landscapes. Let's get going.
385400	390800	All right, so uh, the first category is uh, is the, is the
390800	394940	sources. Uh, so uh, there are like two different kind of
394940	399280	sources. Uh, the first one is the free repositories. Uh, and
399280	402300	the second one is the commercial. Uh, we'll use uh,
402300	405840	two use cases, different use cases. One from uh, free
405840	410340	repositories and the second one is from a commercial one. Um,
410340	415060	so in general, uh, start with the free repository. Um, every
415060	417820	repository is welcome. I mean, when you, if you can get like
417820	421800	more data, so actually it's good. So every time when there
421800	425940	is like a new repository out there, uh, we are happy. Uh, we
425940	432040	would like to, to take this data and to use it and to like uh,
432040	437060	put it uh, into our uh, databases and uh, to connect it
437060	442360	to our uh, data pipelines. Um, so it should be a good thing in
442360	447920	general. Uh, but uh, sometimes when you, when we start looking
447920	452100	at the data, uh, it's not as good uh, as we might expect it
452100	458700	uh, to be. Uh, since a lot of uh, repositories are biased and
458700	464760	uh, are indeed noisy, uh, which uh, create imbalances in your
464760	471300	datasets if you take it as is. Alright. So the first use case
471300	476140	uh, that we will be talking about is the free uh, open uh,
476140	479900	repositories. Uh, there are a lot of uh, repositories out
479900	483440	there. Uh, some examples are shown in the presentation. Uh,
483440	488420	we took one uh, repository uh, that we are facing, we've been
488420	494420	facing like uh, a lot of times uh, uh, we found it very used uh,
494420	497680	by customers and by uh, researchers. And uh, we'd like
497680	501700	to see what uh, what lays inside uh, these repositories. Uh,
501700	507080	this specific uh, repository. Uh, since uh, it was really used
507220	511080	a lot and uh, we saw that uh, in general the results that we had
511080	515400	on this repository was not as good as uh, we are used to have.
515480	520320	Um, so we took a dataset of one hundred and thirty thousand
520320	525080	uh, samples from uh, this repository. Uh, uh, this
525080	530260	repository uh, claims to be uh, containing malware only. Uh, so
530260	534360	we tried to uh, answer uh, two questions. Uh, the first is what
534360	538100	is the relevance of this repository? Like what uh, can you
538100	541920	do with this repository? And the second, how uh, good the data
541920	548920	that lays inside is? Or um, uh, or actually uh, is it really
548920	554060	containing uh, only uh, malicious files as it claims? Uh,
554060	556560	we have also uh, published a blog post about it so you can
556560	562080	read about it later. Um, so uh, about the data that lays inside
562080	566980	this uh, repository. So as you can see uh, only around uh, sixty
566980	572700	percent are uh, were P files and uh, there was uh, like a very
572700	577200	huge amount of files that were just actual files. Uh, which of
577200	581020	course cannot harm a computer and uh, it's a bit problematic
581020	587800	to like classify them as uh, malicious files. Um, and uh, of
587800	590760	course that the data from uh, this uh, this repository cannot
590760	595980	be- cannot be taken as is for uh, testing uh, models for
595980	604300	example. Uh, but uh, we saw that the- the distribution types uh,
604300	607300	and uh, of course that not everything is P in this
607300	612320	repository but uh, at least uh, we hope to see that everything
612320	619460	uh, is indeed malicious files as it claims to contain. Uh, so uh,
619460	624800	we took uh, the data set and- that we created before uh, as I
624800	629060	mentioned and uh, we tried to figure out how many uh, malicious
629060	633660	files are indeed lays uh, lay in this uh, repository. Uh, we
633660	639200	found out- we found out that there are only 56 percent uh,
639200	645440	malware files uh, in the PE uh, section of the data set. Uh, we
645440	649860	were truly amazed to see that uh, about 40 percent are PUA and
649860	657100	around 4 uh, or 5 or uh, 3 or 4 percent were just benign files
657100	660740	and we say benign we mean uh, pure benign files like not
660740	666360	something that can be uh, PUA or stuff like that. Uh, so of
666360	669560	course that as you can see uh, data from uh, this repository
669560	675680	cannot uh, be taken as is for uh, testing models or uh, or
676360	681240	training sets. Uh, of course that uh, one can use uh, the data
681240	686320	from this repository uh, it's open, it's free uh, you- you
686320	690540	should be trying to use it. Uh, not everybody has like uh, you
690540	695040	know, API keys and uh, to commercial feeds. Uh, but uh,
695040	699180	you cannot take it as is and you need to do some uh, engineering
699180	703040	on the data before you take it. So that's the- the bottom line.
705720	710960	Um, alright. Uh, another uh, use case that uh, we might uh, we
710960	718200	will talk about it is uh, is from commercial feeds. Um, this
718200	722800	uh, use case is the sample duplication. Uh, a lot of times
722800	728420	uh, there is uh, like a specific sample that uh, is changed uh,
728420	733920	with a few bytes inside the file and is uploaded again and uh, of
733920	738960	course that the change uh, the change uh, makes the file has uh,
739140	744620	a new hash and uh, and then you find uh, like thousands or even
744620	748420	tens of thousands of times uh, similar files, almost the same
748420	753300	file with a few uh, bytes that are changed uh, inside the
753300	758500	commercial uh, repository. Uh, so let's talk about uh, a few
758500	762600	examples for uh, this case. So the first is like polymorphic
762600	767860	malware. Uh, in order to uh, like evade IOC based detection
767860	773400	uh, that is used by a lot of vendors. Um, sometimes malware
773400	778300	uh, change like something inside the file like uh, uh, uh, uh,
778300	783080	first to, to change its hash and second to change uh, some IOCs
783080	788760	such as file name or IP address or uh, or things that uh, vendor
788760	794580	can uh, can sign on. Uh, the second use case is uh, virus uh,
794580	799740	infected files. So uh, viruses in general uh, what they do is
799740	806020	like uh, infecting a file. We'll see uh, in the next uh, next in
806020	809880	the presentation we'll talk about a, a use case that uh, a
809880	813520	virus like change something in the file, in the Microsoft file
813520	818540	and uh, how it affects the, the data. Uh, and the last but not
818540	823040	least uh, use case is the mass submissions. Uh, so a lot of
823040	826720	times there are like researchers or even threat uh, actors that
826720	833160	try to see if uh, their new, brand new malware is caught by uh,
833160	837360	vendors. So they can like change a few bytes or change something in
837360	841280	the behavior of, of their malware and upload it again to, to virus
841280	845820	total for example and, and then we end up, we can end up with a lot
845820	850440	of uh, duplicated samples again with different hash but very, very
850440	860240	similar uh, files. Now let, let's back up for, for one second. Uh,
860240	863480	mass submissions. Are we actually talking about a poisoning
863480	867120	attack? Uh, we're here in the AI village and I think that
867120	870360	poisoning attacks or attacking AI in general is one of the most
870360	876360	discussed topics. So one could say uh, and, and this for the
876360	878980	people sitting in this room this might be quite appealing or
878980	882680	attractive even to say that wow, we're actually seeing AI
882680	887040	poisoning attacks. Uh, so we actually think that this, this
887040	890840	mass submissions use case is not exactly that. First of all
890840	894820	because as we said in, in many cases uh, we see that these mass
894820	900520	submissions are coming from users with API keys and those tend to
900520	904640	be usually consumer, usually consumers on the defense side of
904640	910220	these uh, um, of, of these uh, feeds and sources. Uh, not to
910220	913700	say that when it comes from threat actors this is not uh,
913700	916800	maybe also used not only for testing their own malware but
916800	921980	also to try maybe and confuse or, or, or send you know, send
921980	924460	researchers and send the security industry into different
924460	928820	places. They want to want the, the, the, the attackers maybe
928820	931800	don't want them to look at so they'll upload mass amounts of
931800	935200	files and to cause you know, someone to think that you know,
935200	937580	this is the hot stuff right now but actually they're doing
937580	942900	something else. So, but still there's a difference between uh,
943300	948580	you know, say poisoning attack and uh, just you know, doing
948580	952500	something massive in order to, to, to, to confuse your, your
952500	956220	enemy or your adversary. So we think it's more the second case
956220	960480	than the first. So we're not still seeing actually targeted
960480	964340	poisoning attacks. Not to say that it not, that it might not
964340	969060	happen uh, uh, in the very, very near future but we don't think
969060	973240	that's exactly the case as it but still taking those mass
973240	976460	duplications in might inadvertently actually cause
977100	980220	those mass submissions to be uh, a kind of poisoning attack. So
980220	982480	that's why we chose to bring it forward here.
984200	992080	Alright so uh, let's talk about a specific example of uh, uh, a
992080	998100	malware. A polymorphic one uh, that uh, has been uploaded like
998100	1004000	tens of thousands of uh, uh, uh, times with uh, different hashes.
1004000	1007020	So uh, we're talking about the Ramnit. Uh, Ramnit is a worm
1007020	1012060	that is active for uh, more or less 7 or 8 years already. Uh,
1012060	1016160	and as you can see in this results uh, it's uh, it has been
1016160	1022920	uploaded a lot of times. Uh, we used uh, it's SSDIP uh, and uh,
1022920	1028760	after taking this SSDIP uh, we looked at some of the samples
1028760	1032980	that lays, that lay inside uh, this cluster in order to figure
1032980	1039520	out if they are actually the same uh, file or not. So uh, as
1039520	1044460	you can see we found out that uh, all these files were uh, in
1044460	1049820	the size of uh, 3.5k uh, kilobytes. Uh, and uh, they were
1049820	1056560	all DLL files. Um, the sections was uh, was the same uh, sections
1056560	1063060	uh, by hash. Uh, at least 3 out of 4. Uh, about the, the fourth
1063060	1068840	one uh, it was the data section uh, and the section uh, hash was
1068840	1073480	different. So uh, we were interested uh, in like taking
1073480	1078140	this example uh, to showcase uh, why uh, the sample duplication
1078140	1082940	actually happened. Uh, so we looked uh, further uh, into this
1082940	1087280	uh, data section in order to see what is the difference about. Uh,
1087280	1091180	so as you can see the difference where, where was in only a few
1091180	1096720	bytes, the red bytes uh, in the, in these uh, screenshots. Um,
1096720	1104340	inside the, the data section um, uh, this few bytes uh, were uh,
1104340	1107720	looking very interesting uh, because it's uh, it's actually a
1107720	1112780	string. So we decided to, to took uh, uh, these uh, samples and
1112780	1117160	to figure out like what, what these strings uh, actually used
1117160	1124400	for. Uh, so by looking uh, uh, with IDA on these samples we were
1124400	1131840	able to find out that this cluster of SSD uh, contains like a lot of uh,
1131840	1136820	samples that are used to be the loader of the actual malicious uh,
1136820	1142220	file. The actual malware ramnet. Uh, so as you can see the string was
1142220	1147940	uh, some string dot exit uh, and this is the loader and uh, the actual
1147940	1154200	file is being uh, loaded after that uh, by using the create process
1154200	1164440	uh, API call. Okay uh, let's move on to talk a bit about issues that
1164440	1171900	are very related to the format uh, of the files themselves. So um,
1171900	1175180	before we get into it let's, let's think for a second what actually
1175180	1180940	makes a file format a format. Um, and and what do different, how do
1180940	1184820	different formats uh, ve- are different from one another. So
1184820	1189660	formats define you know, the file's structure. It's header. The, the
1189660	1193520	syntax meaning the actual binary sequence that separates between
1193520	1199240	different parts of the file. Um, the type of data that we can find in
1199240	1203400	the file whether it's a textual format or some kind of binary format.
1203400	1207980	What kind of other data might be found uh, within the file whether
1207980	1212240	it's compressed data, photos, pictures, uh, compressed data,
1212240	1217280	encrypted data, etc. And of course different file formats uh, have
1217280	1225720	different functionalities. Okay? Um, for instance you know, a PDF has
1225720	1228760	it's own functionality. Uh, office files have their own
1228760	1232460	functionalities. Uh, uh, PEs have their own functionality. They're
1232460	1239460	meant to allow code to run. Um, the way that this uh, relates to what
1239460	1242320	we're talking about here is that the threat landscape of each file
1242320	1247100	format is based on that functionality and on the context in which it's
1247100	1252060	being used. And in many cases, actually usually in most cases,
1252060	1256600	attackers abuse the innate attributes and functionalities that lay in
1256600	1261400	the different formats that we all use on a day to day basis. Uh, and
1261400	1265880	use those in order to achieve their uh, their malicious intent. And
1265880	1269980	when we say that, we mean that in many cases uh, a lot of the file
1269980	1273880	formats can be uh, abused without actually you know, leveraging
1273880	1278860	vulnerabilities or exploits. And let me give a few examples in that
1279480	1284520	regard. When uh, someone embeds a malicious Javascript uh, regardless
1284520	1288980	of what the Javascript does into a PDF file. Uh, so you know, having
1288980	1293860	Javascript in a PDF file is not a vulnerability. It's a feature. Okay?
1293860	1299000	Uh, even if that Javascript you know, triggers some kind of exploit,
1299000	1303020	the fact that again, Javascript is supported in PDFs. The same goes
1303020	1309600	for macros in office files, right? I mean having a macro is not, again
1309600	1314140	it's not a vulnerability, it's a feature. Uh, so and if you look at
1314140	1318260	every file type that can be abused and of course even looking at PEs,
1318260	1323540	you know, if the PE is running, okay it might not, it might have you
1323540	1327100	know, shouldn't have been there in the first place. But the fact that
1327100	1329780	it's running, you know, that's what it does. It's running. It's running
1329780	1333480	code on the machine. So again, all those things when you come, when you
1333480	1339640	think about it, um, in many cases there isn't really any vulnerability
1339640	1343940	or exploit necessary. Just abusing what the file format allows us to
1343940	1348280	do. Uh, the fact that this is how the majority actually of the threat
1348280	1353500	landscape behaves makes us think, uh, that we need to be very, very
1353500	1359600	careful in examining how malicious files look like and how the benign
1359600	1364500	files look like because we don't want these, uh, again, seemingly
1364500	1369840	malicious but not necessarily malicious, um, you know, differences
1369840	1373240	between, you know, the way malicious files look like and benign files
1373240	1378420	look like to affect, uh, to affect our models. Uh, and let's give, uh, a
1378420	1382260	few examples here to, uh, to demonstrate what we're talking about.
1382260	1387240	The next few slides will all relate to just, uh, random, uh, recent
1387240	1392460	data sets, uh, of 100K, uh, known benign files from each file type
1392460	1397360	that we'll show and 100K malicious files from each file type that we'll
1397360	1402620	show. We'll, we'll use the very, very, uh, naive, um, ground truth,
1402620	1406320	uh, uh, approach here with, uh, as far as the malicious label is
1406320	1411120	concerned with just anything with more than 20 engines, uh, 20
1411120	1416140	detections in either VirusTotal or other threat feeds that we have. So
1416140	1421280	let's talk about, uh, Excel files. You know, uh, we don't need any kind
1421280	1426420	of AI machine learning or deep learning or what have you in order to,
1426420	1432140	uh, um, to have a pretty good, uh, detection mechanism for malicious
1432140	1437380	Excel, uh, Excel files. We just can, we, we can use just one if, if
1437380	1443620	condition, uh, and get, you know, 95% recall and only, again, with one
1443620	1448420	if statement, it's not bad, uh, only 10% false positive if we just say,
1448420	1451700	you know, if this is an Excel file and it has macro, let's deem it
1451700	1457600	malicious. Because if you look at, you know, uh, at macro content, uh,
1457600	1464620	so only, yeah, only about 10% of the benign files, uh, of benign Excel
1464620	1470540	files have macros in them where, uh, you know, like on the other hand, a
1470540	1478140	whopping 95% of the malicious Excel files have macros. Um, so, but again,
1478140	1483580	do we want a model that makes, makes that distinction? I think not. Uh,
1483580	1487380	especially not with a 10% false positive rate, which is, uh, again, for
1487380	1490820	such a naive, uh, model, so to speak, is not bad, but obviously this is
1490820	1495240	not something that we want to have. Um, the same goes if we look at the
1495240	1499980	number of streams, uh, uh, 80% of benign Excel files have less than 10
1499980	1504720	streams. You know, XLS files, they're OLEs, OLEs are built, built out of
1504720	1511280	streams, so 80% of the benign ones have less than 10 streams, whereas 80%
1511280	1514500	of the malicious ones have anywhere between 11 to 20. Now, again, someone
1514500	1518720	might think, wow, this is an amazing feature, because statistically, it
1518720	1523120	really differentiates between the two, uh, uh, between the two, uh, between
1523120	1527480	the two files, uh, or between the two, uh, you know, categories of files.
1527480	1532020	But again, this is not something that in and of itself we want to, uh, uh,
1532020	1534880	necessarily affect the decision, because then it would create a model
1534880	1542440	that's very, very easily, uh, uh, evaded and by, or bypassed. Um, similar
1542440	1549380	example looking at RTF, uh, you know, finding a benign RTF file that has, uh,
1549380	1556360	an OLE object embedded in it is a, is, is, is quite a task, uh, because less
1556360	1563160	than 0.5% of, uh, benign RTF files, uh, I mean, today I would think,
1563160	1566840	generally speaking, that, you know, no RTF is benign, because who uses RTF
1566840	1572700	anymore, but still, uh, uh, if you look at, uh, uh, the benign RTFs that are
1572700	1577020	out there, barely any, any one of them, uh, has any kind of OLE object, but
1577020	1581840	if we look at malicious RTF files, so we're talking about 70%, uh, more or
1581840	1586880	less, uh, again, this is not something that we want to translate immediately
1586880	1592280	into the models that we create and we need to engineer the data and think
1592280	1596380	about, okay, so how are we actually going to generate a decent data set
1596380	1603720	here, considering the fact that these are the statistics. Okay, now we're
1603720	1609660	going to talk about some other distortions, uh, uh, and noise, um,
1609660	1613640	phenomenons in threat intelligence that are not necessarily related to a
1613640	1618640	specific file format, but more to a specific landscape or just to, you know,
1618640	1622700	what we're seeing in threat landscape, in, in, in threat intel sources. A lot
1622700	1627760	of what we'll see here lies in the fact that, you know, uh, the threat sources
1627760	1632020	that we look at doesn't matter if it's the biggest threat sources, the most,
1632020	1635460	you know, the most expensive one with the biggest number of files and the
1635460	1641400	best coverage of the threat landscape. They don't reflect the reality. They
1641400	1647140	are, they are a function of the reality. Okay? Uh, they're probably a much
1647140	1652500	closer and better function, uh, of the malicious threat landscape. As far as
1652500	1659180	the benign files that exist in the world, they obviously, uh, um, contain a
1659180	1663000	fraction of what's, what's, what's really out there because, I mean, most
1663000	1669440	benign files don't find their way into these, uh, uh, sources and feeds. Um,
1669440	1674200	and, and that again, that in itself causes some kind of weird phenomenons
1674200	1679100	that we'll, we'll now look at. The first is, uh, uh, time distribution. And
1679100	1684320	this is, uh, uh, something that we did looking, uh, pretty much at all of the,
1684320	1691280	uh, uh, PDF files found in VirusTotal, uh, from a period of six years. Okay?
1691280	1698920	Between 2012 and 2017. Now, if you look at the distribution of these, uh, uh, of,
1698920	1704700	of, of the files per month, you see, like, quite a weird phenomenon. You see
1704700	1710200	that if we look at the beginning of the, of this time period, uh, it, it seemed
1710200	1715380	like almost everything, well, not almost everything, but, uh, I mean, roughly,
1715380	1720020	I don't know, two thirds, maybe even three quarters of the total PDF files you
1720020	1724280	could find, you could find in VirusTotal were actually malicious. Whereas, if you
1724280	1730620	look later into that time period, that tends, uh, uh, tendency seems to change.
1730620	1734560	And, okay, now, one would say, you know, VirusTotal became so much more popular.
1734560	1739480	I mean, you can't compare between 2012 and 2017. Uh, but then again, it makes
1739480	1746320	you think, is this something that we want to somehow leak into our data set?
1746320	1750480	Because if, even if we say, okay, let's just take 50 percent of the, uh, uh,
1750480	1755000	benign files of all times, 50 percent of the malicious files of all times, what
1755000	1762300	we'll get in, uh, in our data set is, uh, is, I mean, much more of the benign
1762300	1766500	files that we would have are from the second half of that time period. And that,
1766500	1769140	again, depending on the kind of model that you use, the kind of features that you
1769140	1775600	use, um, that's something that might leak into your model. Uh, which is, uh, I
1775600	1779720	think you'd all agree with me that, uh, creation, timestamp, and PDFs is not
1780220	1785520	something that's very relevant for their classification. Uh, and this is
1785520	1789800	something that's found in, just in, in, in clear text in pretty much every PDF
1789800	1794620	out there. Um, this is the, the, looking again at the distribution, but just
1794620	1799820	looking at absolute, uh, I mean, looking at each of the landscape and, and, and,
1799820	1804120	and seeing how that specific, either the benign or the malicious landscape, uh,
1804120	1808300	distribute in time. What we also see, and again, this comes, uh, comes back to
1808300	1812540	those mass duplications we talked about before, is we're also seeing some, like,
1812540	1819780	very weird and, uh, obviously out of the ordinary, uh, uh, months, uh, where
1819780	1825060	suddenly, uh, there's a huge surge in the amount of, of malicious samples and
1825060	1830740	sometimes even in the benign samples, um, that are, that you can find. So again,
1830740	1836260	both this, uh, uh, this phenomenon, so to speak, but also this, this one with
1836260	1840660	these distorted months, again, this is something that needs to be looked at
1840660	1845880	because, uh, again, it, it might, if, if we just look at things randomly, it might
1845880	1851320	really affect the data that we, uh, uh, that we put into our, uh, to our data
1851320	1863900	sets. So, uh, uh, these, uh, statistics are, uh, talking about, uh, a data set of,
1863900	1871760	uh, 64 bits PE. Um, so as you can see, uh, with the random data sets of 64 bits PE,
1871760	1877380	there is, uh, around 90 percent of the files, uh, just, uh, dotnet assemblies
1877380	1883340	files. Um, so again, it's, uh, it's a huge bias to dotnet assemblies and, uh,
1885160	1890120	probably that this is not what you're trying to generalize the model on when you take,
1890120	1897500	like, 64 bits, uh, data set. Uh, 45 percent of the data was just, uh, Microsoft, uh,
1897500	1904600	infected files. Um, um, so again, there is a strong bias, uh, to a lot of Microsoft
1904600	1908900	files in the malicious data set. Uh, probably it's not the case in the benign data
1908900	1914480	set. So, uh, you'll find out, you, you, you end up with, uh, a benign and malicious
1914480	1920100	data sets when you have more, uh, files that, uh, look like, uh, Microsoft files in
1920100	1927580	your malicious, uh, data sets. Uh, and it might be a problem. So, uh, let's see, uh, an
1927580	1938880	example, uh, for, uh, why, uh, there are so many, uh, malicious infected, uh,
1938880	1946820	files. So, we, there is a specific, uh, DLL, DNS API, uh, which, uh, has been, uh, like
1946820	1953380	tens of thousands of times in, in a random, uh, data set that, uh, we created. Uh, and,
1953380	1960260	um, and we try, we try to find out, like, why there are so many DNS, uh, API infected
1960260	1965580	files. So, uh, one concrete example is, uh, was discovered by, uh, Malwarebytes in
1965580	1971800	this, uh, in this link. Uh, and, uh, what actually was there is, uh, like a virus that,
1971800	1977360	uh, changed the host files. Like, uh, it, it was just patching the, the host files in
1977360	1984780	order to hijack, uh, the host files. Uh, the host file is a file that, uh, like, uh,
1984780	1991420	there is, uh, there can be configured like, uh, uh, like DNS entries. Uh, so every time
1991420	1997560	your machine needs to, uh, like, do, uh, like, uh, it, when it needs to do, like, a DNS
1997560	2004500	query, uh, so prior to the DNS query, uh, the machine checks inside the host local file. Uh,
2004500	2012580	so by hijacking, uh, the host file, uh, the malware can control, uh, the DNS, uh, that, uh,
2012580	2019200	that are served, uh, to the machine. And of course that, uh, as I said, uh, 45, uh,
2019200	2025200	percent of, uh, Microsoft files or, uh, like Microsoft files in the malicious data set might
2025200	2037760	lead easily to false positive on Microsoft files. Uh, another use case, uh, lays in the Android
2037760	2046660	landscape. Uh, so APK, uh, of course, uh, I guess that you know, uh, is an Android package, uh,
2046660	2051340	like, uh, an archive, uh, that contains, uh, the resources and the stuff for an application.
2051340	2059300	Uh, so there are a lot of, uh, malicious files in the threat landscape of, uh, Android. Uh, there
2059300	2067700	are ransomware for, uh, Android, uh, spyware, uh, a lot of differences of, uh, PUA, uh, but
2067700	2073900	also there is, uh, a specific type of, uh, of malware, uh, premium SMS, like, uh, an
2073900	2081280	application that, uh, what it does is just like, uh, sending SMS, uh, messages from, uh, from
2081280	2088680	users in order to monetize it, uh, and to, like, pay money from, by the user to the, to the
2088680	2096160	attacker. Uh, so we created, uh, again, a random, uh, data set, uh, and we were looking at, uh,
2096160	2103160	the families, uh, of the malware, uh, that lays, uh, that lay inside the data set. So, as you
2103160	2111260	can see, we looked at, uh, the, the 3 top, uh, families. All the 3 top families, uh, are, uh,
2111280	2117660	composed, uh, are, uh, like, uh, taking, uh, around, uh, 37 percent of the data set, and all
2117660	2124260	of them were, uh, premium SMS. So, again, uh, here is another use case of, uh, strong bias to
2124260	2130920	something that we probably didn't want, like, the model, like, the, the APK data set to be, uh,
2130920	2141260	biased to. Like, we probably wanted it to be, um, more, uh, like, uh, presenting the, the real,
2141260	2151890	uh, types of, like, malicious APK data, data router. All right. So, uh, now we'll, uh,
2151890	2158170	conclude and, uh, we will, uh, like, uh, show you, like, uh, also we'll say, we'll talk about
2158170	2164310	some takeaways from this presentation. But, uh, first I'll start with, uh, like, uh, a process
2164310	2170870	that, uh, we are doing post-training and, uh, can be taken and, uh, applied, uh, like, it's
2170870	2175650	an, uh, process or an attitude that you can take and apply after that, uh, post-training, uh, for
2175650	2181550	your models. Uh, so, uh, first you need to identify, like, a pattern, a specific pattern. For
2181550	2188570	example, uh, as I said earlier, uh, let's take, uh, for example, a P model. So you, if the data
2188570	2194870	set was biased as, uh, we've seen earlier, so maybe you might have false positive on Microsoft
2194870	2203330	files. Uh, then, uh, what you need to do is, like, going back to your data set. Uh, the reason is
2203330	2208750	to, to look at the training set that the model was generalize, generalize, generalize done,
2208750	2217410	sorry. Generated from, yeah. Uh, uh, in order to, like, uh, examine the, the pattern
2217410	2224850	appearance, uh, to see, uh, how it, uh, how it's distributed inside a benign data set, uh,
2224870	2232550	and a malicious data set in the training set. Uh, sometimes you can go even further and, uh,
2232550	2238290	look at, uh, the feature level and, uh, like, trying to create, uh, like, what is the
2238290	2246130	combination of features that, uh, makes your, uh, makes this file or this, uh, uh, collection
2246130	2252690	of files, uh, look like, uh, a malicious file for, uh, for the model, uh, leads to false
2252690	2257850	positive, of course. Uh, and by that, uh, you need to understand the meaning. So, for
2257850	2262890	example, in the collection earlier that I described, you, uh, might, uh, call it, like,
2262890	2269270	Microsoft files or a DNS API DLL file. Uh, the last step is, like, uh, adjusting and
2269270	2275550	engineering, uh, the feature distribution or the pattern distribution inside the training
2275550	2285190	set. Uh, so Tal just talked about, uh, you know, uh, how, uh, how, uh, uh, how, uh,
2285810	2290190	we might use all the, all the data that we've shown here in the false positive or for the
2290190	2295990	false negative research, uh, um, phase that, again, usually occurs post-training, whether
2295990	2302630	it's when you still, whether it's when you're still, you know, testing and evaluating your,
2302630	2307710	uh, newly created model or even if it's, you know, and for the folks here that are coming
2307710	2314230	from, you know, AI-based, uh, from AI vendors or from next-gen vendors or whatever or the
2314230	2320590	legacy ones that are now using machine learning as well. Uh, uh, you can do it on, of
2320590	2324630	course, on your production data. Okay, so false, false positives and false negatives that
2324630	2330970	occur in production. But, uh, a lot of what we talked about, uh, comes back to, you know,
2330970	2336190	what we do pre-training and, again, how we build and engineer the best data sets possible
2336730	2342750	that will ultimately, uh, enable us to create the best models possible. And those are some
2342750	2349230	of the, uh, uh, the, you know, the do's, so to speak, uh, or, or the recommendations that
2349230	2354470	we have, uh, uh, based on what we've seen. Uh, the first is, you know, we need to really
2355450	2360130	understand the threat landscape and whatever is the problem that you're trying to solve
2360130	2365810	and think about how it might affect the data. Uh, because it might affect the data. You
2365810	2371910	need to really differentiate between, uh, uh, again, those innate features or, uh, uh,
2371910	2377990	features in the general term of features, not in model features. Uh, uh, but, but the
2377990	2382710	features in the file format or, or the functionality of the file format, how that's abused in
2382710	2387570	the threat landscape. And, of course, what's, you know, not really an abuse of the format,
2387570	2391810	but something that's, you know, uh, again, a vulnerability or an exploit that, that, that
2391810	2397610	could be leveraged. Those things will manifest differently in, uh, the, the, in, in your
2397610	2402070	benign data sets and your, and your malicious data sets. And you need to think about caref-
2402070	2405470	you need to think about that carefully and understand that before you go about building
2405470	2410890	your data sets. Uh, another, uh, another thing that, that, that we, that we want to mention
2410890	2417490	is, again, different file formats, uh, behave and distribute very, very, very differently
2418010	2427010	from one another. Sometimes, uh, it's, uh, you could see that in, um, even in, uh, in, in
2427010	2433710	formats that are very, very closely related. Let's say, PEs, 32-bit and 64-bit don't look
2433710	2438850	the same, don't behave the same. Uh, at least as far as their, their distribution threat
2438850	2445110	landscape, uh, is concerned, um, and, and, and again, this goes also to different types
2445110	2451110	of document files or even if we look at even more specific packages, uh, or formats like
2451110	2458410	OLEs, so again, doc files and Excel files and PowerPoint files don't distribute, uh, uh, the
2458410	2465290	same although their format is the same one. Uh, one of the most important takeaways, uh, we
2465290	2473430	believe is that, uh, we all need to very carefully examine the raw data that, uh, uh, that we
2473430	2480070	take and, uh, examine its, its, its distribution. Meaning, okay, uh, of course, I, I believe
2480070	2486730	we all, you know, normally try to, you know, build the biggest data sets possible, uh, with
2486730	2492190	respect to, you know, whatever we can find or how big the, the, the available data is. And if,
2492190	2495730	and sometimes it's a question of, of the resources and, and, and computation that we have
2495730	2501270	at hand. But, uh, uh, of course, you know, uh, yes, a good approach is starting from as
2501270	2507230	big as possible, but then, uh, really examining the distribution and making sure that it
2507230	2513030	seems reasonable. Um, noise and distortion can be found somewhere in the most, can be
2513030	2518430	sometimes found in the most unexpected of places, like time distribution, uh, with really
2518430	2524990	just, you know, weird, uh, uh, weird phenomenons of like months where, you know, PDF was
2524990	2530130	the king of the malware or whatever, but, uh, it's not actually the case. And usually it is
2530130	2536150	some kind of distortion that you better if, if, if you clean it out. Now, in a lot of what
2536150	2541850	we've mentioned here, there's no, you know, there are no textbook recipes. Okay. Uh, but as
2541850	2548370	we all know, well thought of trial and error is our best friend, uh, in many cases and, and,
2548370	2553490	and, and applying AI and to, into the field we're in. So, and this is the part where, you
2553490	2559430	know, data science is a bit of an art as well. Uh, uh, yes, of course there will be more
2559430	2569990	files with, uh, uh, macros in a malicious, uh, Excel, um, data set, but whether we want to
2569990	2574270	have that exact distribution the way it is, if we look at the raw data, uh, our
2574270	2580030	recommendation is no, uh, uh, engineer that, uh, that somehow differently in what way,
2580030	2585510	whether you do it with over sampling or with, you know, uh, compromising for a smaller
2585510	2591090	data set with a different distribution. Again, that lies, that depends on, on everybody
2591090	2597210	sitting here and your peers and colleagues, but, um, we recommend that you again, look at
2597210	2602050	the things and, uh, you know, do your trial and error and see, uh, uh, and see what's best
2602050	2607310	different models, different, you know, feature spaces, different file formats, different
2607310	2613590	threat landscape. The solution for them is, is quite different. This pretty much
2613590	2616990	concludes, uh, our talk. Thank you all very much for listening and we'll be happy to take
2616990	2653030	any questions if there are. In a way, but the question is, what is your bias? And how, uh, and
2653030	2658870	again, what's the problem you're trying to solve? Sometimes that problem might be, if you
2658870	2663570	are at the very, very early stage, how do I build the best model that generalizes on the
2663570	2670290	right things and not on distribution of, of, of the threat landscape as it is? Because that
2670290	2676270	might lead to adverse results. And sometimes in order to fix something that you already find
2676270	2682950	to be problematic, a specific pattern that consistently is causing false positives or false
2682950	2688190	negatives, and then our recommendation is go back to your data. Sometimes the problem is
2688190	2693550	not in, sometimes the problem is not algorithmic. It's not in your feature space. It's not
2693550	2698490	in your, you know, model architecture or the specific algorithm you chose. Sometimes the
2698490	2704250	problem simply lies. It might not be as simple to solve it, but the problem lies in the data
2704250	2713290	itself. Yeah, sure. Just want to add something. Uh, the issue is that, uh, it's, it's when you
2713290	2720090	create a dataset, it's not possible to find out like all the, these biases. So in many cases
2720090	2725630	you just, you know, after seeing some production environment or like after tackling and using
2725630	2732790	the model for a, for a period, uh, you, you find out these patterns and these biases. So that's
2732790	2753020	the point that it's not always, um, so easy to find them out. Yeah. This, this is a great
2753020	2759020	question. Uh, the answer is yes, but it's, uh, I'll repeat the question. Did we try to, uh, come
2759020	2765180	up with some kind of metric to build datasets or to balance them? Uh, the, the, the, the short
2765180	2770340	answer is yes. The longer answer is yes, but it's way out of scope for this talk and for 45
2770340	2777260	minutes because it's just, it's so, um, um, it's just, it's so different between different file
2777260	2781440	types and different formats and different threat landscape. So again, there's no textbook
2781440	2786980	recipe. And it also, I mean, what we've done is, you know, is good for our approach, for our
2786980	2792040	models, for the way that we work, for our infrastructure and framework. It might be very,
2792040	2798100	very different for other researchers, for other companies that use intrinsically different
2798600	2803780	approaches, algorithms, models, data sources, et cetera. So, and, and in that sense, what we
2803780	2813280	said, there's no textbook recipe. If there was one, we, we'd share it. Thank you all.
