start	end	text
1500	6260	Alright, welcome back and let's resume with the talks.
6980	11280	Up next, we have the very famous Vivek Ramachandran.
11760	14080	Now we all know who this personality is.
16840	20840	He has over a decade's researching experience.
20840	23880	He has done a lot of research with Wi-Fi security as well.
24360	31120	He has identified attacks such as Caffe Latte attack, broken WPA encoding, and a lot more.
31120	37520	He has been a regular speaker at premier conferences such as Black Hat and DEF CON.
38640	44500	Now, his talk is with respect to identifying weaknesses in secure web gateways.
44580	52620	At times, mitigating web-based initial access threats, enterprises deploy something called as a secure web gateway.
52620	67980	And in this talk, he will explore on how to conduct reconnaissance against SVGs, identify the vendor and location, reconstruct the rules and policies applied, and identify bypasses based on these insights.
68280	77000	He will also introduce a tool called as SVG Recon, a new tool in order to automate enumeration processes.
77220	84960	This tool has been rigorously tested against all leading vendors in the market and has proven to be highly effective.
84960	87060	Quite a good day for us to see this tool.
87060	96700	So here, Vivek will be talking about how easy it is for an attacker to deploy JavaScript via their websites and deliver malware to enterprise browsers.
96700	103380	So please welcome the founder of SquareX, the founder of Pentest Academy, Vivek Ramachandran.
108500	111900	Thank you so much for that kind and sweet introduction.
112360	113500	You said decade.
113500	114860	I've been doing this two decades.
114860	116820	I'm starting to get a bit dated now.
119480	121880	So yeah, welcome to my talk.
121880	125720	A bunch of great people as well, and they'll do an introduction shortly.
125940	127900	So, SWG Recon.
128360	134120	Today, I'm also doing a main stage talk later on SWGs and how they can be broken, track four.
135060	138640	It's a continuation of this, so feel free to show up for that as well.
138960	142120	Now, a little bit about myself.
142520	145860	I started doing security almost 24 years back.
146440	152200	Discovered a bunch of attacks, did my very first DEF CON main stage all the way back in 2007.
152200	154000	It's almost 17 years.
154740	161820	Founded a couple of companies, Pentest Academy, and now I run this company called SquareX where we do browser-native security.
163260	165760	Also, I have a wonderful team.
166040	168160	Most of the work was done by these guys.
170700	171860	Hello, everyone.
171860	172840	I'm Shorin.
172840	176060	I work as a principal software engineer at SquareX.
176260	183240	My research is mainly around extensions and we'll see how we're going to use extensions in this talk as well.
183340	190740	My work has been published in Black Hat Europe before and I'm also giving a few more talks in this DEF CON.
194640	195780	Hello, all.
195780	196720	Happy to see you here.
196720	197880	My name is Dakshita.
197880	200960	I do help out with security research at SquareX.
200960	207000	I've been here since the beginning of the company, so really happy to be part of the ride and happy to share this talk with you.
211430	214170	And this was my co-speaker, Jesvin.
215110	221370	Unfortunately, last-minute US immigration issues and he couldn't make it, so he says hi.
223910	226530	Okay, so secure web gateways.
226570	244470	I think if you look at web browsing in the enterprise today, you have sassy SSE solutions with secure web gateways and the promise that SWGs made that they could look at SSL traffic by doing SSL interception and then just by looking at the network traffic of HTML,
244470	248230	CSS, and JavaScript, figure out application layer attacks.
248850	254270	Anyone here uses SWGs, as they're called, in their enterprise?
254270	255530	Okay, someone?
255530	256890	Okay, just one.
257690	267350	Now, for the purpose of this talk, I'm basically using SWG as a collective term for a lot of security controls which exist with it.
267710	271450	SSL interception, malware detection, DLP, firewall.
271710	278770	So for the talk purpose, all of these components are working together and that's what we are going to go ahead and see how we can recon.
279770	281730	Now, how do SWGs work?
281730	291990	So if you look at a standard file download, what ends up happening is, let's say a user whose computer's traffic is going through the SWG ends up clicking on a link.
292250	296610	There's a HTTP content disposition header which kind of, you know, shows up.
296730	315030	The SWG figures out with that and maybe a couple of other metrics that this is an active file download and then the SWG will either cache it in the cloud, wait for the whole file to be cached, run an AV scan, or it'll start allowing the download while it is analyzing.
315430	320670	And based upon if it feels this is bad, then it'll end up blocking or killing the download in between.
321210	338630	Now similarly for files, or rather websites, if there is a malicious website with HTML, CSS, JavaScript, and maybe it figures that out that this is a clone or a spear phishing website, it'll try to fingerprint that and if you just took that very same website,
338630	344710	put it up on a new domain, typically SWGs will block it or at least that is the promise.
347780	355220	Now from an attacker's perspective, I think browser is a very, very interesting component.
355360	372560	Especially in today's world where hybrid work is happening, your entire workforce is traveling, and really the browser has become the gateway or the access to all your enterprise as well as resources on the internet which your team ends up using.
372560	391440	And that is really where from an attacker's perspective, being able to smuggle malware, malicious files, spear phishing websites, all of that through a secure web gateway which is analyzing all of that traffic in between is very important and crucial.
391460	403880	So because this is the recon village, the entire focus here is hey, could an attacker with absolute zero knowledge figure out if all the traffic is going through a SWIG?
404080	408260	And if yes, what kind of policies, rules, etc.
408260	409600	have been applied, right?
409600	412820	So of course, this talk is just 40-45 minutes.
412820	416960	So I'm going to talk about some of the more interesting use cases.
417320	423680	And at the very end, we'll actually leave you with a GitHub repo where you can download and try this tool out.
423990	427280	And where we plan to cover a lot of other cases.
427440	433220	Much more fine-grained analysis which unfortunately, in such a short talk is very difficult to cover.
433980	443700	So when you look at SWIG enumeration of all the rules and policies, primarily we've kind of broken it down for the purpose of this talk into 5 categories.
443880	448900	The first is vendor detection which is, can you figure out who the vendor is?
449500	458000	I was telling the organizers it's fairly incidental that we have a sassy SSE vendor who is also a sponsor of the recon village.
459960	466880	After the vendor detection is done, how do you figure out what kind of category-based web filtering is applied?
467160	471220	The allowed file types, file sizes, a couple of other things.
471720	476780	And beyond that, if you guys are interested, feel free to show up for the 5pm talk today.
478680	482020	Okay, so identifying SWIG vendors.
482020	484740	Let's have Dakshita run us through it.
486440	492820	First we'll see how we're going to identify which SWIG is being used.
493000	494920	Primarily we do it through two methods.
494920	497500	First is to check for the IP range.
497760	499980	And secondly is to check for connectivity.
500220	504660	Once we've done both of these checks, we kind of know who the vendor is.
504760	527220	If we take a look at how this works, we're just going to send a request and the request will go through the secure web gateway to this website called api.ipapi.is and this essentially gives a JSON response and this response contains the IP address where we can then figure out the ASN,
527220	531040	the organization, and from this way we can figure out who the vendor is.
531200	533000	This is pretty straightforward here.
536160	544160	So just to add to that, SWIG vendors have to have very massive data centers, right, where all of this scrubbing is going on.
544160	554720	And most of the time these data centers are so big and so geographically distributed that you actually see dedicated ASNs for certain vendors.
554860	572740	And most of these IP address ranges are also published many times on the vendor website itself and because all the traffic goes through the proxy, if an attacker were to set up a website where he can basically ping or use one of the open kind of IP pinging services,
572740	577840	it's very easy for him to go ahead and figure out what IP address range is there.
578200	588220	Honestly, there are probably 7 or 8 SWIG vendors in the whole world through which most of the traffic ends up going and this makes it fairly easy to fingerprint.
588520	591480	At the very end of the talk, we'll show you some demos.
591700	595620	Again, the whole idea here is to be vendor agnostic, not to name and shame.
595940	600540	So we'll try not to go ahead and show vendor logos and things like that, right?
600700	603760	Of course, also don't want to get sued.
605820	609640	Okay, so Shaury will talk about the URL categories.
613110	624470	Okay, so just to add one more thing, so you know, sometimes it might happen that the secure web gateways might not actually be sending the traffic from a specific IP or an ASN.
624470	628690	They might also use some sort of a cloud service or they might also use something else.
628690	633450	So in that case, our logic will basically fall back to the connectivity endpoints.
633450	641430	So generally, secure web gateways also have some connectivity endpoints which you can actually call to see whether the secure web gateway is connected or not.
641450	649450	So we have an exhaustive list of those endpoints and using that also, we can figure out which vendor it is in case the ASN check doesn't work.
649790	653170	Now coming back to the allowed URL categories.
653390	662190	So what happens is that typically one of the first policies that any enterprise setup is that what kind of websites are allowed in the network.
662430	666830	Now these can basically be, for example social networking is allowed or not, right?
666830	669010	Or it can be like sports websites allowed or not.
669090	675790	So this is like a very basic check that most people do to filter out what kind of traffic can actually open in the enterprise network.
675870	681630	Now as an attacker, it can actually be helpful as well to get in the system and we'll see how that can be.
681770	687970	So before doing that, we'll see how we can actually recon what kind of categories are allowed in the network.
688550	693330	So typically, you know, there are a lot of different categories.
693370	696870	There is an exhaustive list of categories that Swig supports.
697070	699990	Many of them are also available in their documentation.
700390	705190	Now what we're going to do is that we have a list of URLs.
705330	709610	These URLs fall under different categories and we're going to do a similar thing.
709610	717350	We're going to call all these endpoints from the given device and see which of them are basically opening and which of them are not opening.
717670	726950	Now if in case it gets blocked, we know that based on the policy of the enterprise, this specific category is not allowed to be opened.
727110	728950	Now how do we figure that out?
729090	733690	So typically when you open a webpage , there's an HTTP status code that is written.
733810	746550	So in case it comes out as 200, and that is something we have made sure in the list that whatever endpoint we are hitting or whatever URL we are hitting, generally gives a 200 when it's allowed to be opened.
746610	757810	So in case it's getting blocked by the SWIG, in that case, they'll send like a 4xx response or they'll send a redirect response with a 3xx series.
758150	763390	So whenever we get a status code similar to that, there's a good chance that it's actually being blocked.
763850	779270	In some cases, like this was a possible thought we had, that there might be some vendors who might actually return a 2xx instead of doing a 3xx or 4xx, but at least in the run that we did for any of the major vendors, we did not find that.
779450	784090	However, a possible solution for that could actually be to look at the content text.
784090	789710	Because typically the block page text of a given vendor might be quite similar.
789950	797370	So we can, in case we get a 2xx response, we can look at the HTML content of that page and see if it is something related to a block page.
797470	802490	So in that way, we can also cover cases in case a vendor gives a 2xx response.
803150	811850	Now , similar to that, there are also some common categories which often can be used by attackers.
812030	816110	For example, what kind of domains are allowed?
816170	820150	Sometimes there might be a recently registered domain, whether they're allowed or not.
820210	823190	And there can also be things like a free hosting website.
823790	830530	We have seen cases where people have running phishing campaigns which are typically hosted on any of the online blog pages.
830530	833410	Because they have an older domain, they have a good reputation.
833410	835350	And they often are allowed in the network.
835490	840290	So these checks that we have made, make sure to also open all these categories.
841010	847490	Now, let's say you understood what categories are allowed after the recon.
847730	856030	Now, taking a step further, if we want to see how an attacker can leverage what kind of categories are allowed, we can look at these four different ways.
856070	860530	So the first one is that let's say I go ahead and I register a new domain.
860710	865290	And I figure out that my domain is basically a very new domain.
865490	873130	Now, there are pages of specific SWIG vendors where you can actually go and submit your domain for a classification check.
873490	880890	Now, typically what vendors start with is a categorization based on a domain, rather than doing it on a whole URL.
880890	886110	So I'll do a submission first, making sure that my page looks for a given category.
886170	894530	And once that submission is done, after a while I will simply add a phishing page or a malicious page in a given subdomain.
894610	901230	So for a good period of time, your SWIG will still categorize it as that specific domain which it previously categorized as.
901450	907530	So it's one of the ways you can actually leverage the knowledge of what kind of category is supported in a malicious way.
907530	911530	The other one I already mentioned, you can also use free hosting websites.
911910	921950	One other way is that if you know that a specific category was missed out by the admin in the configuration, you can actually register a domain in that specific category.
922310	928650	And you can have a specific plan to open a certain category of domains in that specific network.
928990	935370	Similarly, one of the most missed out events could also be if recently registered domains are allowed.
935370	942250	Because in some cases, when a domain is very recently registered, they might give an NA or uncategorized response.
942250	947950	So if in case the admin has not set a policy, it can be a very easy way to get into the system.
948870	950710	Now, we'll look at...
950710	951990	Yeah.
953290	963510	So one funny quirk is, which we found with some vendors, is you can buy a new domain and just redirect that domain to a well-known one.
963510	968750	So let's say you buy xxxwhatever.com and just redirect that to yahoo.com.
968750	977030	A lot of swigs today end up following the redirection and by default place you in the same bucket as yahoo.com.
977250	983970	So this is as crazy as it sounds, but in some of the tests that we ran, we actually found this.
988000	988740	Okay.
988740	992840	So now we'll look at a bit about the file types.
992860	1000840	Sometimes a certain category of files might also be allowed or not allowed in a given organization based on the policies.
1002560	1006920	So Vivek will now take this up and show how different vendors set this up.
1008780	1013520	So this was the part which was the most interesting when we started doing this research.
1014080	1020540	By the way, this is based upon the public documentation available today on all swig vendors.
1020940	1028120	Now, you won't believe, there are swig vendors who can only scan up to 15 megabits of file size.
1028860	1046240	So, literally, if a malware author wanted to go ahead and get this bypassed, all he has to do is have a file size larger, and unless the organization is blocking all files above 15 megs, he can easily bypass that thing.
1046240	1048700	Now, why is this limitation there, right?
1048700	1052540	So when we were doing this research, I was thinking, well, why would you want to do this?
1052540	1056720	Like, today you have so much of memory CPU available in the cloud.
1057040	1059400	Why have these crazy limitations?
1059880	1062700	By the way, one of the vendors is also at 2 megs.
1063900	1064860	Unbelievable.
1066060	1075580	Now, our hypothesis here is, look, anytime you have to do a deep analysis of a large file, you need to throw a lot of CPU and memory at it, right?
1075580	1080700	So now imagine a swig vendor who's looking at millions of requests per second.
1080700	1095540	If they had to go through hundreds of thousands of files and push a lot of CPU memory at it to do that analysis, I don't think you can actually offer your swig or sassy SSE product at $2 to $3 a month per endpoint.
1095620	1102740	It is just cost prohibitive to go ahead and run such large and in-depth analysis in the cloud.
1103100	1108320	So if you look at it, file scanning size limits, that's a pretty big one.
1108780	1119560	And most of the time in our tests, if you just go above it, unless the organization is blanket-blocking everything above a certain size, your malware, whatever you have, would just kind of go through.
1120100	1122940	The second is file type scanning.
1123160	1126200	There's massive variation here as well.
1126880	1133500	Also, a lot of web-native compiled versions of files aren't looked at.
1133500	1135560	How many of you have heard of WebAssembly?
1135560	1136540	Wasm.
1136900	1149160	So you can go about compiling so much of interesting logic into a Wasm module, which is really binary for what it's worth, gets loaded by the browser, runs in the context of the browser.
1149160	1154920	At this point in time, you could literally write an entire credential stealer in Wasm if you so wanted.
1155260	1157560	Unfortunately, swigs can't look at it.
1157700	1159860	They can't look at images.
1159880	1162620	Now, why could images be interesting?
1162620	1166680	Come to our talk in the main stage talk today at 5pm.
1166700	1175080	We'll look at how you can actually hide malware and do something called last-mile reassembly to pick malware out and just drop it in the browser.
1176860	1178520	Zip recursion levels.
1178520	1180920	This one was the most interesting.
1181940	1190080	If you basically have zip files placed recursively, a lot of vendors, unfortunately, cannot scan beyond a few steps.
1190080	1193860	Some of them actually blatantly just allow it to go through.
1194500	1197660	And as i said, this is public documentation.
1197660	1200580	This is not something we tested against different vendors.
1201040	1203200	Again, there's no need to name and shame.
1203500	1206060	We just call them swig vendor A to E.
1211310	1214670	So we tested a bunch of different file types.
1214670	1218950	So all we did is put all of them on an S3 bucket and went ahead to download it.
1218970	1222390	And we'll basically see whether this download goes through or not.
1222390	1225430	So if we get a 200 okay, that means it went through.
1225430	1231210	So this is how we figure out whether certain file types has been blocked, whether there's been certain policies set up.
1231210	1241830	So usually what happens is that if swig is not able to scan it, then the admin generally has a policy, can set a policy to say block it completely or just let it pass through.
1241830	1247850	So this way we can figure out what are the different file types that can go through without being blocked.
1248730	1250770	So what can we say from this?
1250770	1258010	So popular file formats like images, audio, videos, generally they are allowed because they tend to be harmless.
1258010	1262610	But there is many different ways you can hide malware and embed them within it.
1262610	1264010	So we can use that.
1264010	1265570	The attackers can use that.
1265690	1268070	And archives are generally allowed as well.
1268070	1269630	And they have limited capabilities.
1269630	1273830	Swigs generally do not scan archives as in-depth as they should.
1273830	1282590	So we can transform the content, maybe do recursive zipping and so on and find ways to deliver this to the client side.
1282590	1287430	Password protected zips are also pretty questionable ones.
1287430	1296130	So if you password protect some content, if the swig is by default not blocking this, you can get it through to the victim.
1296470	1298050	Finally, office file formats.
1298050	1300170	So this one is a pretty interesting one.
1300230	1304710	So there are a few ways we can embed malware through office file formats.
1304710	1311070	One is definitely through macros, which is the active content within the office files.
1311130	1322930	Additionally, because the more recent office file formats are actually a zip, so the OXML formats are actually zip, they can actually compress really large file sizes within them.
1322930	1327590	So you can embed pretty large malware within the office file and zip it up.
1327590	1329570	So that is one way we can bypass it as well.
1329570	1333490	And of course, you can password protect your office document, which anybody can do.
1333490	1336030	And that's another way that we can bypass this.
1339450	1350910	So I think one of the other things we saw was SWIGs and even endpoint security exceptionally bad at looking at malicious office documents with macros in it.
1351270	1353550	It's unbelievably bad.
1353790	1355790	So, EXCs has been pretty good.
1355790	1359190	I think, you know, most folks have evolved their whole EXC analysis.
1359250	1363850	You know, static dynamic, there are so many threat feeds and what not.
1363910	1366090	Office documents, we were surprised.
1366090	1368030	I mean, this is all about SWIGs.
1368030	1370150	Maybe we'll do one on endpoint security.
1370310	1375990	But very, very surprised at how easy it is to kind of go ahead and subvert.
1379660	1387600	So now we'll look at how we can check what are the different kinds of file size limits enforced by the policy.
1387840	1395980	So often, what people do is they simply block any kind of downloads which are happening greater than or less than a given file size.
1395980	1400480	So as part of the recon, it's also good to know what kind of file sizes are actually supported.
1400920	1405680	It's also very similar to how we were checking different file, supported file types.
1405700	1411500	So we basically have a bunch of files of different different sizes of a given category.
1411500	1415120	So let's say I have like five, six different files of Word documents.
1415180	1419980	And then I will basically categorize them into small size, medium size, and large size.
1420100	1425540	And then when I upload those files in a given endpoint, or let's say if I try to download them.
1425540	1428240	So in this case, we're going to download that file.
1428280	1432580	We'll see what kind of file sizes are allowed to be downloaded.
1432940	1438420	So to know if a file download is successful, we, again, do the same thing.
1438420	1441300	We see if the status check is coming out as 200.
1441520	1449560	In some cases, we saw that often vendors return a 200 status, but there's a file size mismatch.
1449760	1458240	So they basically send back a file, but it is not the same as what we were initially requesting, because they scanned it, and they found it to be malicious, for example.
1458500	1466960	So in those cases, what we're going to do is, we're going to use the file hash, compare them, because we are downloading these files from our own bucket.
1466960	1468860	We know what are the file hashes.
1468860	1473300	We compare that, and through that, we can know if the download was successful or not.
1473480	1482240	So through the 200 status check, as well as the file hash check, we are able to do this recon on what kind of file sizes are actually supported.
1483620	1487460	Now, let's say I know what kind of file sizes are supported.
1487460	1489960	Now, as an attacker, how can I use that?
1490060	1494900	So one of the most common ways of doing that would be actually to break files into different chunks.
1495500	1503640	I can actually break a particular file, break it into chunks, and then I have another client-side script running, which can stitch everything together.
1503800	1511480	So it's one of the ways such kind of recon can help an attacker to deliver a malicious file in a given device.
1511780	1518120	Similar to how Dakshita mentioned earlier, you know, even the newer office formats are actually zip files.
1518120	1521380	So you can put some malicious files inside them as well.
1521700	1524420	Similarly, large image sizes.
1524420	1530360	Sometimes, you know, people often don't put a limit on things like images.
1530460	1540300	And if an admin misses out on such a policy, you can actually use something like technography to, you know, put some sort of malicious file within an image itself.
1540300	1544920	So it will look like a legit image format, but it can actually have a malicious file.
1545040	1549460	And then at the client-side, you can again take that malicious file outside your given image.
1549940	1560540	Similarly, you know, like any kind of web resource, like HTML, JavaScript, WebAssembly, all these can also be used to actually embed a malicious file.
1562080	1569220	Now we'll look at, you know, now we'll look at how we can also identify the unmonitored channels.
1572480	1575220	Yeah, so this one is interesting.
1575800	1584800	I think the promise that SWIX came up with is, you know, we are going to monitor all traffic coming in from a user's browser, probably from an endpoint.
1584880	1587460	But the web is evolving really fast, right?
1587460	1598160	Like, large vendors like Google and everybody, right from the browser's perspective, new protocol's perspective, there's leaps and bounds in which, you know, new things are coming up.
1598160	1616060	And this is really very interestingly, today SWIX are unable to monitor unbelievably anything which goes through WebSockets, because WebSockets is binary streams anyway, so you can actually smuggle through things via WebSocket and completely evade SWIX detection today.
1616360	1627900	Similarly, protocols like gRPC, WebRTC, WebTransport, SSC, WebPush protocols, unbelievably, all of these are completely unmonitored at this point in time.
1627900	1635020	So, you really do not need to send a malicious file through your regular HTTP.
1635020	1638660	You can just go about using one of these, and there is full bypass.
1638940	1648180	As crazy as it sounds, a lot of SWIX vendors recommend that you actually block these protocols on the browser.
1649380	1664860	But if you block these, the overall seamlessness with which the web loads live, let's say, any form of audio stream and all of that, there is perceptible loss in the user's experience.
1665000	1668560	But at this point in time, these channels are completely unmonitored.
1673170	1682110	So, you can actually go about smuggling various things through it, different kind of documents and all of that, and I think Shaurya can explain more about it.
1682110	1686190	Yeah, so, it's pretty simple.
1686370	1692030	What we're going to do here is we're going to actually download a given file through one of these channels.
1692030	1697090	By doing so, we can figure out what channels admin has missed out on the policy.
1697230	1703230	So, like Vivek mentioned, most of the time, these vendors recommend to block these kind of protocols.
1703310	1714870	So, in case an admin has missed out on these policies, during this recon, we can actually find out which particular channel, which is usually unmonitored, is allowed based on the policy.
1715230	1723150	So, we have different types of files, and we're going to just download them through all of these different newer protocols.
1724350	1728070	Now, the next one is identifying the DLP policies.
1732910	1742370	One of the interesting things I wanted to mention about these unmonitored channels is in a lot of enterprises, now you have managed browsers.
1742370	1747850	You can manage your Chrome, Edge, and there's a bunch of ways to go about doing it.
1748010	1762830	So, in the recon, even though the SWIG itself isn't really doing anything here, you can actually figure out if some of these protocols were blocked on the browser side itself, and that kind of shows that probably the enterprise is using some kind of managed browser solution.
1764270	1764890	Okay.
1764930	1766670	DLP is very interesting.
1766850	1781870	I think, again, the same promise, when a file is getting uploaded, you can go about running regular expressions, other pattern matching, and all of that, and then figure out if something is admissible, inadmissible, allow or block it.
1781910	1792710	And this is really where it's very easy for an attacker to go about simulating a file upload from the user's perspective, and try to enumerate various DLP policies.
1793010	1814150	Now, if an attacker, in one of the earlier enumerations, figures out the exact vendor name, and of course, you know, most nation state attackers or more sophisticated ones would have access to the products as well, it is actually possible to build out very granular DLP testing policies based upon who the vendor is,
1814150	1815030	by the way.
1815110	1831930	For the purpose of this talk, we've tried to keep it generic, but with understanding of who the vendor is, you can literally figure out every way that they currently allow you to slice and dice DLP policies, and go about creating tests for that, which can run entirely by the client.
1835150	1835830	Okay.
1835930	1841230	So, the different ways by which you can go about deploying this, i think Shaury will take over that.
1842130	1849350	Primarily, just to give you a high level, is, one is an attacker-controlled website, and the other is through a malicious extension.
1852350	1852770	Yeah.
1852850	1871170	So, the reason for using an extension here, is because, you know, since we have a bunch of URL categories, and a bunch of URLs, it's not possible for a single attacker to go ahead and buy all these domains, and update all the course policies.
1871170	1876730	So, we're going to use extensions here, because extensions are highly privileged inside the browser.
1876750	1887210	So, if you're making a request from the background script or service worker, as it's called now, you will actually be able to make calls without having any kind of course restrictions.
1887310	1898350	So, this would make the whole recon process quite easy, because you can actually have a huge list of URLs of different categories, and actually call them up from an extension.
1898910	1912070	In case, you know, installing an extension is not an option, then of course you can fall back to a normal attacker-controlled website as well, and from that you can also make this request, but in that case you will have to take care of the course restrictions.
1912910	1918130	Also, you know, if it's happening through an extension, it happens very silently.
1918350	1925790	So, that's also very convenient for an attacker, in case, you know, he's able to install some sort of an extension through any kind of social engineering measures.
1925810	1932170	Like, for example, you know, let's say ChatGPT releases a new version, and you just ask them, you know, hey, can I get access to that?
1932170	1937650	And people are going to search online, and they'll see, oh, there's an extension, which is allowing a free access to that.
1937650	1942550	They install it on their computer, and you can have your recon process running from there, in the background.
1942710	1948410	Since there is no tab open, if you are doing it from the background strip, it's way more convenient for an attacker.
1948470	1957770	So, both these methods are available, but for this talk, what we are going to use is an extension, because it's much more convenient for any kind of lifting the course restrictions.
1960770	1971890	So, the important thing you have to understand is, you can do this with an attacker-controlled website, minus the URL category one.
1971890	1979750	And the only reason is, I mean, of course, you as an attacker could also set up all of these different URL categories, and then you don't need an extension as well.
1979890	1985450	All the other recons that we've shown can actually happen through an attacker-controlled website, right?
1985830	1987690	So, that's an important distinction.
1987690	1993990	It's just, how much does an attacker want to invest in setting up, you know, his whole backend infrastructure?
1994410	1995030	Okay.
1995110	1997970	So, Shoray will show you guys a quick demo.
1997970	2003950	The important thing is, we will release this tool on GitHub, and you can go get it after the talk.
2004430	2010550	Of course, for purposes of the talk, if you do live enumeration, you will end up seeing a lot of vendor names.
2011110	2013070	How many of you want to see vendor names?
2014730	2015850	No way.
2017530	2020130	So, for the purpose of the talk, it's a video.
2020130	2021870	I hate doing that, you know.
2021870	2024570	I did my very first talk at DEF CON in 2007.
2024570	2026050	Always did live ones.
2026830	2034090	But there's a threatscape beyond the attack, which is the legal threatscape, so I want to be sure to navigate that well as well.
2034270	2044750	So, we'll show you a video demo, but I guess much of it is, you know, fairly logical, and then hey, on GitHub, pick up the tool, try it out, you know, on your own.
2047460	2048160	Okay.
2048160	2057100	So, in this video, we will see a real recon running in an environment where a SWG vendor is present.
2057280	2065040	For the purpose of this recon, there are a few policies which I want to let you all know was actually configured there.
2065200	2074400	So , the web sockets and the web socket over SSL, both of these were blocked on the network of the enterprise where this recon was running.
2074400	2081520	At the same time, all kinds of files which are greater than 500 KB were blocked.
2081880	2086040	Similarly, a DLP policy was actually set for credit card numbers.
2086040	2090000	So, there was no DLP policy set for social security numbers.
2090000	2091780	So, this is how it looks like.
2092760	2098300	So, you know, what we are going to do is, we are going to simply go ahead, open an extension page.
2098300	2104480	So, if you see on the top, once you have the extension installed, you can actually access an extension page.
2104480	2106240	So, I open this extension page.
2106240	2108680	The purpose of showing this is via a UI.
2108960	2116060	All these checks are actually running on the background strip, so you don't even have to open this extension page if you are using it in a real environment.
2116540	2121520	So, I'm just going to go and show how it happens when you click on start analysis.
2122060	2126800	So, it's going to do a bunch of these checks at the same time on different sites.
2126800	2131680	So, you can see on the top left, you can see on the top left,
2136430	2140850	yeah , so on the top left, the vendor was basically identified, but we have blurred this out.
2141670	2152350	Similarly, all these kinds of enumerations are running, and we are able to see that what kind of protocols are basically allowed in the network, what kind of categories are being allowed.
2152390	2159810	So, we can see the whole enumeration thing is running, and we are seeing that what is the status code we are getting for each of the URLs we are trying it out with.
2159990	2164710	So, as I mentioned before, in this particular admin policy, the WebSockets were blocked.
2164710	2170110	So, we can see that it's appearing as a cross, while the other ones are unable and showing as a check.
2170110	2181030	So, we can see that in this case, certain kind of categories got blocked, some got partially blocked, and some got completely blocked.
2181110	2194250	So, the partially blocked implies that certain URLs, so this can also happen that some URLs might have multiple categories, and some of them might get blocked under a different category.
2194270	2198010	So, in that case, those will basically fall under the partially one.
2198010	2210530	Similarly, we can see what is happening when we are uploading different kinds of DLP, check the DLP policies, we are uploading files which have social security numbers, or the files which have credit card numbers.
2210670	2219830	So, this gives a very good view of what kind of file types are supported, what kind of file sizes are supported, and what kind of protocols are supported.
2220690	2226450	Also, to mention, like I mentioned before, any file greater than 500 KB was blocked.
2226450	2233330	So, you can see here that in the file size check, all the files which are greater than 500 KB are actually getting blocked.
2234750	2247310	So, this is how the tool would look like, and once the whole recon is done, you can see the whole list of different categories, the different subcategories, and simple check marks to show what is supported and what is not.
2247790	2253050	So, now we'll just quickly see how we can prepare ourselves for using this tool.
2253190	2255190	So, this is the GitHub repo link.
2255890	2259470	It's a simple Chrome extension, Chromium -based extension.
2259470	2262990	You can run it over Brave, Chrome browser, any of them.
2263150	2267750	You simply have to follow the instructions on the readme on how to build the extension.
2267990	2274530	Once you have the extension built, you have to load this extension in your browser in the developer mode.
2274570	2280550	The moment you do that, you will be able to access that extension page, and you will be able to run the whole recon.
2286110	2287190	Thank you so much.
2287190	2288090	Any questions?
2288090	2289490	Anyone has any questions?
2289770	2292950	I don't know if you have time to take questions.
2293290	2294770	Organizers, anyone?
2297090	2298510	Yeah, okay.
2306560	2307640	Okay.
2308040	2318020	So, we have a main stage talk today at 5 p.m., where we're going to talk about an entire new class of attacks, which we call Last Mile Reassembly.
2318020	2324220	And we'll show you how those attacks primarily target the architecture of secure web gateways.
2324680	2335860	We show over 25 bypasses, but honestly, based upon that entire attack genre that we plan to introduce, you can go about extrapolating and building many more attacks.
2335860	2341180	So, if this was interesting, definitely track 4, 5 p.m., please do come.
2341180	2341680	Yeah?
2341680	2343000	Thank you so much.
2343000	2343820	Thank you.
