start	end	text
0	11660	Hi everyone. So today we are going to talk about research that we've done on a chrome
11660	22480	extension. We researched the threat landscape and the chrome extension anatomy and we
22480	29980	created models to detect malicious chrome extensions. So we are going to talk about
30300	38280	the whole process that we've done from looking at the threat landscape and to train a model
38280	46860	that can detect malicious extensions. Actually we are threat researchers. We've used, we
46860	55420	consulted with a data scientist, Jonathan, which is sitting here. So thanks for Jonathan.
58220	66180	So, um, I'm Tal. I'm working at Deep Instinct for the past two and a half years. Prior to
66180	73520	Deep Instinct, I've been serving in the IDF for seven years. Hi guys, I'm Rui. Um, I've
73520	78160	been working with Tal for the last two years and previously I worked in additional security
78160	88110	companies and also in the IDF intelligence as well. So, um, the agenda for today. Um,
88770	94890	so first we're going to talk about, uh, some background, uh, about, uh, browser extensions
94890	100810	and why we decided to, uh, to work on chrome extensions specifically. Uh, after that we'll
100810	106250	talk about the threat landscape and we will show some example of attacks that have been done
106250	113470	using, uh, chrome extension. Um, and then we will, uh, talk about the collection of the data
113470	119850	and, uh, creation of the data sets, uh, the sourcing of the data and, uh, ground tools that,
119850	127830	uh, we were able to set in order to, um, to validate the data. And, uh, after that we will talk
127830	134170	about the model, uh, that we created and, uh, we will show some, uh, three models that, uh, we
134170	142130	tried and, uh, we'll show the results and the process that we've done. Alright, so let's
142130	147990	quickly talk about browser extensions. Uh, first of all, what are browser extensions? I mean,
147990	152190	uh, if we look at, you know, the Wikipedia, uh, definition we'll see it's a small software
152190	158010	module, uh, customizing a web browser. Basically, uh, whatever we need to do to, uh, add
158010	163170	functionalities to our browsers, uh, add, uh, advanced, uh, features we would like to have.
163170	171070	And, um, um, other than that we see a trend today of, uh, much more services and companies, um,
171070	176610	turning to, uh, web based products and we see that our, uh, today the browser extensions are
176610	182690	exposed to much more standard data than before. Uh, which obviously makes it an attractive, uh,
182690	190050	threat, uh, attack surface for hackers and attackers. So, uh, why specifically Chrome? Well,
190050	196030	basically Chrome's the most common, uh, browser of them all. Uh, with, uh, controlling over 65%
196030	201970	of the market as well as other browsers who also support Chrome extensions such as, uh, Edge,
201970	208170	the new Edge browser and Oprah. Uh, which are all, um, based on the Chromium project. Other than
208170	214710	that we can see, uh, a Cisco report from 2016 which, uh, mentioned that, um, Chrome extensions
214710	222410	are one of the most prevalent, um, sources for data leakage in enterprises. Uh, mostly due to
222410	229630	the fact that they are, um, undetected for long periods of times. Uh, this is just, uh, a small
229630	234590	graph to describe the, uh, Chrome versus, uh, additional browsers as you can see from
234590	244430	rules. Alright. So, um, there are some, uh, features, like built in features in Chrome that
244430	250590	makes it, uh, attractive, uh, for, uh, attackers. Uh, so first it, uh, the extension can be
250590	257030	installed, uh, through developer mode. Uh, so after, um, uh, applying the, uh, switching to
257030	262810	developer mode browser, uh, it's, uh, it's possible to install, uh, extensions not, uh,
262810	268630	through the Chrome web store only but also, uh, manually for example by, uh, social
268630	275170	engineering the user or, uh, with, uh, the, uh, flag which is called the minus minus load
275170	282930	extension that can be passed to chrome.exe. Uh, another, uh, feature is, uh, ignorance of, uh,
282930	293410	HTTPS. So, uh, in case, uh, this flag is turned on, um, if a user surfing to, uh, website that has
293410	303010	invalid certificate, um, the, um, like the default, uh, message of, uh, un-invalid certificate is
303010	310770	not shown to the user. Um, uh, last, uh, feature is, uh, like, uh, it's not a feature but, uh, it's
310770	319130	by design like, uh, an extension, um, can, uh, look at fields, uh, some sensitive fields like
319130	325090	password fields or credit card fields without, uh, the need of special permission to be
325090	332990	declared. Um, that's it. So, um, now we will talk a bit about, uh, the anatomy of the
333010	340210	Chrome extension. Uh, so first Chrome extension, uh, has, uh, the file type dot CRX. So from now
340210	346170	on we'll, uh, mention, uh, CRX as Chrome extension. Uh, so the CRX is actually a zip file, an
346170	352490	archive file, uh, which is built as follows. Uh, so first there is the manifest file, uh, which
352490	358730	is a JSON file that, uh, describes, uh, the most important things about the file such as, uh,
358730	366370	the permission, uh, that the extension requires, uh, resources it uses, uh, metadata such as
366370	373510	name, ID and stuff like that. Uh, background script. Uh, background script is, uh, like the
373510	379850	main script, uh, which is JavaScript of the extension. Uh, this script, uh, holding the state
379850	387310	of the extension and every event that occur. Uh, so the background script is notified and
387310	395010	decides what to do. Uh, for example, it can triggers, uh, another content script. Uh, so now
395010	400890	I'll talk about the content scripts. Content scripts are scripts that, uh, are made, uh, for
400890	408870	particular web pages. Uh, it has full access to the full JavaScript API in contrast to the, uh,
408870	414990	background script that does not have full access. Um, and it's used, uh, to manipulate, uh, as
414990	421730	I said, uh, particular, uh, web pages. Uh, last, uh, component is just, uh, general resources
421730	430310	that are in use, uh, in every extension such as, uh, HTML or CSS files, image, images, uh, and
430310	438090	et cetera. Um, okay. Alright, so, uh, let's talk a bit about the threat landscape of Chrome
438090	444610	extension malware. So, uh, 2010 if we'll go, uh, all the way back we'll see that the Chrome
444610	449670	web store, uh, was live for the first time. Uh, a year later we're talking hundreds of millions
449670	456150	of, uh, downloads and according to Google 200 million, uh, active users. Uh, in the couple
456150	462570	years following, uh, there was, uh, substantial, uh, measures taken in order to, uh, prevent
462570	468650	attackers from accessing, uh, users data. Uh, for example, we can, we, uh, we have seen
468650	473450	several measures taken by Google for, uh, either if it's, uh, scanning, uh, each and every
473450	480650	extension for uploading to the web store or, uh, stopping all options to, uh, natively, uh, or,
480650	484950	uh, or secretly install extensions without using, uh, developer mode. Also, uh, they
484950	490770	cancelled the style install and, uh, also they discontinued, for example, the, uh, Netscape
490770	497550	plugin API which was, uh, basically allowed users to, uh, allow the attackers to access the
497550	503090	file system and it was, uh, deprecated. In 2015 they stopped it. 2014 they stopped it.
503790	510970	Um, a couple of years ago, obviously these measures have, uh, caused a drop in, uh, malware,
511350	516690	uh, Chrome malware distribution. However, uh, this couple, last couple of years, specifically,
516690	523950	uh, 2019 was the most, uh, uh, the biggest one. We saw, uh, uh, big growth in the, uh,
523950	530810	propagation of, uh, malware, uh, malware, uh, from CRX files. And this is a graph from, uh,
530810	537470	VirusTotal. You can see that, uh, only the first half of 2019 relative past the, uh, 2016
537470	544470	which was the, uh, biggest year for, uh, for Chrome malware. Also, uh, another interesting
544470	550750	thing we've seen from VirusTotal is the, uh, um, lack of, uh, treatment into, uh, false,
550750	556970	uh, to, um, to malware, to Chrome malware in, uh, traditional AV vendors in VirusTotal.
556970	569070	Most, um, most extensions in VirusTotal are, um, with zero detections. Um, but, uh, so let's
569070	576810	talk a bit about the attack surface. Um, so first, um, all the JavaScript code runs in, uh,
576810	584370	isolated, uh, environment, uh, sandbox, uh, of, uh, Chrome. Uh, so for example, it cannot
584370	590270	touch, uh, or get, uh, the memory of the machine or the file system, uh, without, like, uh,
590270	599570	having an exploit. Um, what it can actually still do is everything that, uh, is related to the
599570	608310	browser itself. For example, uh, stealing information or, uh, credentials, um, um, forming,
608310	614350	uh, a botnet by, uh, installing extensions on, uh, different, uh, a lot of machines. Um,
614370	622350	um, um, monetizing, like using advertisement and stuff like that. Uh, now we'll see an example
622350	628250	of, uh, an attack, uh, that was presented in Defcon and Black Hat 2 years ago. Uh, it was
628250	634530	called, uh, Game of Chromes. So basically what, uh, the attack was about is to create, uh, a
634530	641990	botnet, uh, based on a Chrome extension. Um, so, uh, it was like that. Uh, the extension, uh,
641990	649370	was injected, uh, an iframe to the Facebook, uh, page of the user, like invisible, uh, iframe
649370	659730	and inside the iframe, uh, it, uh, it enters to, uh, it signed up to Wix and created, uh, a
659730	666290	website in Wix. Wix is a free platform to create a website, uh, very fast. So using, uh, the
666290	671970	Wix website, uh, the Wix website was published to all the friends of the, of the user. So
671990	677970	all the friends of the user, uh, and, uh, by you entering to the link of the Wix webpage, other
677970	684610	users, uh, were installing, uh, by clicking and installing, uh, the extension. The extension
684610	691170	was spreaded. Uh, and, uh, lastly the extension rated itself in, uh, Chrome web store with
691170	699830	five stars which, uh, just, uh, genius. Um, so that's one attack. Uh, another attack from the
699830	705790	last month is Data Spy. Data Spy was spreaded with, uh, eight extensions for Firefox and
705790	715550	Chrome as well. Um, and the extensions collected, uh, uh, URLs and hyperlinks and webpages, uh,
715550	723490	titles, uh, and, uh, from, uh, all this data was, uh, sent to, uh, CNC server and, uh, the
723490	729810	data was, uh, actually is still, uh, sold in, uh, third party websites. Uh, you can, uh,
729830	738130	you can see the research paper, uh, and see the particular website where it's sold now. Um,
738130	747650	why it's, uh, interesting, for example, uh, in, uh, URL, you, uh, in HTTP, uh, uh, protocol.
747650	755350	So there are, uh, uh, past, uh, a lot of data, uh, tokens for file sharing is past the URL, uh,
755350	762310	and, uh, the zoom meeting uses tokens and stuff like that. Okay. All right, so we're going to
762310	767770	talk a bit about the data collection and the labeling process. So basically when, uh,
767770	774870	sourcing, uh, for data sets such as the CRX, uh, we had several challenges such as, uh,
774870	780390	finding reliable sources. This was, uh, highly uncommon and small and rather new threat
780390	785750	landscape. Uh, other than that, we wanted to make sure that all files were actually, uh, in the
785750	790850	correct format. They're actually CRX files. And of course, uh, knowing how to distinguish
790850	796790	between the malicious and the non-malicious ones. Uh, for that we used three sources. Uh, one
796790	801870	was the threat intelligence feed, for example, VirusTotal, threat, um, reversing labs. The
801870	806570	other was the official Chrome web store. And last was unofficial Chrome stores, which are
806570	812030	basically stores that, uh, crawled the official store and offered the same, uh, extensions. So
812030	817090	we're going to talk a bit about each one. So, uh, threat intelligence feeds had the lowest
817090	825270	amount of, uh, CRX files. Um, but they had, uh, much more, uh, quality metadata. For
825270	830410	example, we had the AD vendors detections. We had the number of submissions, uh, when it was
830410	837410	first uploaded, et cetera. Uh, but also had some, uh, more challenging metadata. Uh, we had, we
837410	843410	faced a lot of, uh, missing details. We couldn't find, uh, uh, the, uh, ways to, uh, cross
843410	849430	reference between the Chrome web store and VirusTotal, for example. Uh, also a lot of files
849430	855870	were actually incorrectly tagged as CRX files. And in fact, uh, something like 30 percent
855870	862250	were, were invalid even though they were tagged as CRX files. However, in the Chrome web
862250	869170	store, obviously it's the most reliable resource, uh, to valid files. Um, but, um, they also
869170	876030	remove malicious files. Uh, at least the one they, they are aware of. And only, they only store
876030	882930	the most recent, uh, version of each, uh, of each extension. Um, so we, obviously we decided
882930	889090	to refer to most files there as benign. And we, we did have, find some metadata that was
889090	895510	useful. But as I said, it's hard to cross reference between them. Um, if we talk about the
895510	899570	unofficial stores, so obviously this is the largest, uh, source for CRX files because it
899570	905290	stores all previous versions, all deleted, uh, all deleted, uh, extensions. And, uh, basically
905290	910830	everything that was ever uploaded to, uh, to the official store. Uh, but in some cases we
910830	917870	didn't have, um, metadata to use. Only an ID or not even that in some cases. And obviously we
917870	923070	didn't, we do not know, uh, what happened to the CRX between the store and the crawl. So, uh,
923070	929670	we're not sure what's the trust factor for, uh, for these, uh, extensions, for these files. So
929670	935770	just to sum it up real quick, um, so as we said, the threat intelligence feeds, uh, were
935770	942470	actually almost the best in, in everything except quantity. Uh, so what we did was use most
942470	948570	the official Chrome web store and the unofficial stores, um, together with the, uh, with the
948570	955330	feeds, uh, and basically uploaded these files to, uh, to get the results we wanted and the
955330	963070	metadata that we thought would be necessary for, for our grant. So basically, um, we decided
963070	970470	to, to, to use, uh, five positives by AV vendors in order to, uh, decide if the file was
970470	975870	malicious. As I said at the beginning, um, we see that not a lot of vendors even scan these
975870	981190	files. So five is not a lot of vendors but was enough for us at least for this, uh, research, uh,
981190	988670	model. And B9 we decided that, uh, whether, uh, files are in the official store and have zero
988670	994050	positives after that we, we scanned in Virustool or uploaded from the unofficial stores and
994050	1003970	also received zero positives. Uh, all right, so now we'll dive into the, uh, three models that
1003970	1011410	we created. Uh, something important to say is that, uh, this, this, this three models are, uh,
1011410	1017290	research model. We just want to, uh, prove a point that, uh, we can, uh, it, it's possible to
1017290	1024470	create a model to detect, uh, malicious, uh, Chrome extension with a good detection rate. Um,
1024470	1032910	so this is slide, uh, about the overall, uh, process, uh, uh, of the creation of the model. So
1032910	1039230	first is the preprocessing step. Uh, we validated the, the file that, uh, were introduced into
1039230	1045870	the data set. After that, uh, we extracted from the relevant files the relevant, uh, like the
1045870	1056670	features. Um, um, we ended up with a, a, a big dimensional, uh, size. So we had to, to reduce the
1056670	1063450	dimensionality to the dimensional. So we first used chi-square and after that we tried another
1063450	1069830	model with, uh, applying, uh, two different, uh, method, uh, like, uh, with the two steps. First
1070230	1076750	chi-square and then, um, gradient boosting. Uh, we represented the, the features into numerical
1076750	1084490	value with using TFIDF in order to train a model. Uh, and, uh, the models that we trained were, uh,
1084490	1092870	one logistic regression model and two DNNs. Um, last thing to say about that is that, uh, we, um,
1092870	1098390	we didn't try to optimize the hyperparameters since, since it's just a research model as, as I
1098390	1107650	said. Sorry. All right. Um, so, uh, the pre-processing. So first we validated, uh, the
1107650	1114990	files as I said. Uh, every deployed file should be CRX or ZIP. Uh, you can, uh, check it, uh, or
1114990	1121590	test it by looking at the magic of the file for example. Uh, another thing, uh, to test is that,
1121590	1128350	uh, each archive, uh, has a manifest, uh, dot JSON file which is a must, uh, for, uh, uh,
1128390	1137990	any extension. Uh, we ended up with, uh, a bigger data set but we used, uh, 20, uh, 20,000, uh,
1137990	1147530	files. 75 percents of the file, uh, of the data sets, of the data sets are, uh, uh, went for, uh,
1147530	1155130	training and, uh, 25 percents, uh, for, uh, test. All right. So, uh, the feature extraction
1155130	1162050	method, uh, we extracted features from the JavaScript files and from the manifest. Uh, the
1162050	1169010	feature extraction method that we used, uh, was, uh, uh, looking for sequences of 4 characters
1169010	1178010	or, uh, or more, um, of alphanumeric values or, uh, relevant, uh, uh, characters to
1178010	1184270	JavaScript such as underscore or dollar. Uh, now we'll see an example. So let's say that, uh,
1184270	1191190	we're trying to, uh, extract features, uh, using this method, uh, from this function. So these are
1191190	1200850	the features that, uh, will be extracted, uh, using the features. Uh, I hope it's clear. All
1200850	1206870	right. Uh, dimensionality reduction. So, uh, using the extraction method that, uh, we saw
1206870	1214170	earlier, uh, we ended up with 1.1 million, uh, features which is, uh, a big amount. Uh, of
1214170	1219510	course that we had to reduce the amount. So, uh, as I said, uh, we tried chi-square to
1219510	1226870	reduce to, actually we tried to, uh, different, uh, numbers. Uh, we, we tried to, uh, we
1226870	1233230	decided to take for this model the, uh, 10K, uh, features. And, uh, in second step, uh, we
1233230	1240750	used the gradient boosting to reduce from 10K to, uh, um, to 1K. Uh, and then we presented, uh,
1240750	1248990	the features into numerical value using, uh, TF-IDF as I said earlier. So, uh, here are the
1248990	1257130	results, uh, of the three models. So, first, uh, the DNN model, uh, using chi-square only. Um,
1257130	1262770	the results were best, were the best results, uh, out of the three models. Uh, as you can see,
1262770	1270350	the recalls was, uh, uh, 99 percent and, uh, false positive rate was about, uh, 2 or 3
1270350	1279690	percent. Uh, the second DNN model using, uh, another step of, um, of XGBoost, uh, was, uh,
1279690	1286470	was worse. Uh, the recall, uh, was pretty similar, but, uh, the false positive rate was much
1286470	1292270	higher. Uh, the last, uh, logistic regression model using, uh, chi-square and XGBoost, uh, had,
1292270	1300330	uh, the worst, uh, worst results, uh, out of these three. Uh, the false positive rate was
1301190	1312730	around, uh, 30 percent, which makes it, uh, it's not a sustainable model. Uh, one thing, uh,
1312730	1320370	another thing, uh, to, to note is that, uh, in general, the recall is, uh, more important, uh,
1320370	1326150	for Chrome extension that, uh, the false positive rate since, uh, an average user is around 5 or
1326950	1334730	10 extensions and, uh, you wouldn't want to, like to miss the one malicious extension, uh, rather
1334730	1342030	than a false positive on one of the, out of the 10, uh, which is, um, not good as well, but, uh,
1342030	1354180	not, uh, not bad as, uh, missing the one malicious one. Um, um, okay, and, uh, last thing to
1354180	1360340	say about this model that, uh, all of these three models were, uh, were able to detect, uh, the
1360340	1370660	data spy campaign and, uh, the other one, the game of Chromes. Future, uh, research, um, so, uh,
1370660	1376800	we would like to try, uh, to deobfuscate the JavaScript files before, uh, extracting the
1376800	1384160	features, uh, so the extension, uh, straight landscape suffer from, uh, a lot of, uh,
1384180	1389600	obfuscations, uh, on the JavaScript code, so we'd like to do some normalization and
1389600	1396700	deobfuscation before we extract, um, the features. Uh, another thing to try is, uh, combine the
1396700	1403200	data set to train a model with a combined data set of Chrome and Firefox extensions. Um, these,
1403200	1409680	these, uh, formats and, uh, files, uh, should be similar, uh, but we didn't try to train, combine
1409680	1417660	the model, uh, or tested, uh, the results on Firefox, uh, data set. Uh, and that's pretty much
1417660	1426220	it. Uh, thank you very much. Um, actually we are out of time, so we'll stay, uh, all right. One
1426220	1433020	question, okay? Is there any question? All right. Thank you very much.
