1 00:00:00,000 --> 00:00:04,460 Next up, we have Nishant Sharma and Sourya Pratap Singh. 2 00:00:04,460 --> 00:00:08,720 Nishant is the Head of Cybersecurity Research at SquareX. 3 00:00:09,020 --> 00:00:11,960 And, yes, you can see SquareX over here. 4 00:00:12,080 --> 00:00:12,940 There you go. 5 00:00:12,940 --> 00:00:14,400 They are one of our sponsors. 6 00:00:17,880 --> 00:00:27,160 Sourya Pratap Singh is responsible for building SquareX's security-focused extension and works on researching methods to contract with web security risks. 7 00:00:27,300 --> 00:00:32,360 They will be speaking about plug-and-play, scanning, and scoring browser extensions. 8 00:00:32,360 --> 00:00:41,700 We'll get a walkthrough on how extensions are abused in the wild and how even well-known plugins can turn malicious, which also involves a live demo as well. 9 00:00:41,700 --> 00:00:44,460 So please bring it up for Nishant and Sourya. 10 00:00:49,040 --> 00:00:50,420 Hello, everyone. 11 00:00:50,500 --> 00:00:52,080 I hope I'm audible. 12 00:00:54,060 --> 00:00:55,100 Okay. 13 00:00:55,480 --> 00:01:02,340 So, we're going to talk about plug-and-play, scanning, and scoring browser extensions. 14 00:01:02,520 --> 00:01:05,600 So, before we start, a little bit of introduction. 15 00:01:05,600 --> 00:01:06,760 So, this is me. 16 00:01:06,760 --> 00:01:10,380 I work as a Principal Software Engineer at SquareX. 17 00:01:10,420 --> 00:01:15,700 And I mainly work in browser security space, specifically on web extensions. 18 00:01:15,820 --> 00:01:21,840 I have actually presented before at DEF CON last year at MainStage and also at the Creative Stage. 19 00:01:21,900 --> 00:01:24,800 This year, I'm also doing another MainStage talk. 20 00:01:24,980 --> 00:01:30,140 And, yeah, I've also presented my work before in Black Hat EU. 21 00:01:30,140 --> 00:01:34,160 And I've also conducted workshops at other conferences like the Texas Cyber Summit. 22 00:01:35,740 --> 00:01:37,600 Now, we have Nishant here. 23 00:01:39,140 --> 00:01:40,900 Good afternoon, everybody. 24 00:01:41,080 --> 00:01:42,120 I'm Nishant. 25 00:01:42,120 --> 00:01:45,000 I'm the Head of Cybersecurity Research at SquareX. 26 00:01:45,180 --> 00:01:48,520 I was in cybersecurity education for 10 years. 27 00:01:48,660 --> 00:01:51,300 I was VP of Labs and R&D at IME. 28 00:01:51,360 --> 00:01:55,480 You might know them, EGPT, and all of those certifications. 29 00:01:55,480 --> 00:01:57,960 Before that, I was with my desktop academy. 30 00:01:59,000 --> 00:02:04,740 So, you know, I have been coming to DEF CON and Black Hat for 6-7 years now. 31 00:02:04,740 --> 00:02:07,240 I've been doing trainings, workshops, and all of that. 32 00:02:07,380 --> 00:02:15,760 So, now the latest journey that I'm on is related to browser security and that's how we are also going to cover web extension security. 33 00:02:15,920 --> 00:02:16,640 So, yeah. 34 00:02:16,680 --> 00:02:18,420 Nice to have all of you here. 35 00:02:18,420 --> 00:02:20,800 I'll pass it back to Sharath, so we can continue. 36 00:02:22,280 --> 00:02:22,880 Yeah. 37 00:02:22,880 --> 00:02:28,500 So, I think before we start, I mean, a little bit about, like, what we do. 38 00:02:28,500 --> 00:02:32,260 So, as I said before, we are from a browser security company. 39 00:02:32,420 --> 00:02:36,000 So, browser security deals with everything that happens in your browser. 40 00:02:36,180 --> 00:02:44,280 You can see a couple of use cases here, broadly, like the browser detection and response which is, like, stopping attacks which are happening all by the browser. 41 00:02:44,340 --> 00:02:48,920 Then you have your use cases which are around, like, private access and things like that. 42 00:02:48,920 --> 00:02:53,840 And then you have, like, web DLP which happens by the browser, like the browser DLP. 43 00:02:53,980 --> 00:02:56,720 So, all these things are something that we work at Squarex. 44 00:02:58,280 --> 00:02:58,940 Okay. 45 00:02:58,940 --> 00:03:01,280 So, now starting with the main talk. 46 00:03:01,280 --> 00:03:03,460 So, what are extensions? 47 00:03:03,460 --> 00:03:06,260 I think most of you might be knowing what extensions are. 48 00:03:06,260 --> 00:03:08,560 Anyone here has never heard about extensions? 49 00:03:09,840 --> 00:03:10,360 Okay. 50 00:03:10,360 --> 00:03:10,960 Cool. 51 00:03:11,520 --> 00:03:17,300 So, just to give you a very small brief, extensions are, like, small applications that run on your browser. 52 00:03:18,180 --> 00:03:25,140 They achieve this generally by accessing the content of the page and then they can do some processing on the background as well. 53 00:03:25,300 --> 00:03:29,020 So, it's a mix of what you run on the page and also what you do on the background. 54 00:03:29,640 --> 00:03:35,120 Now, there are a couple of them, like, the most famous ones you can see here, like, you know, password managers. 55 00:03:35,580 --> 00:03:39,000 Then you have your ad blockers, you have Pocket and a couple of them. 56 00:03:39,000 --> 00:03:41,900 So, these are just canonical examples of what extensions could be. 57 00:03:42,620 --> 00:03:45,220 Now, why are extensions important? 58 00:03:45,220 --> 00:03:51,140 So, I think it's important to understand the definition of endpoint. 59 00:03:51,140 --> 00:03:57,540 So, earlier, the endpoint can be easily used for anything, which is the overall machine. 60 00:03:57,540 --> 00:04:02,540 But nowadays, like, more than 90% of the work that we do is actually by the browser. 61 00:04:03,060 --> 00:04:06,500 If we just exclude the developers, then it might be, like, 99%. 62 00:04:06,500 --> 00:04:11,360 Like, most departments would just use, like, maybe Outlook or Slack outside. 63 00:04:11,360 --> 00:04:14,940 But other than that, they're just spending all of their time on the browser. 64 00:04:15,280 --> 00:04:19,720 And that's how, you know, all the malicious actors are also evolving. 65 00:04:19,720 --> 00:04:26,460 So, earlier, there used to be, like, a lot of attacks via some, you know, malicious files on your endpoint. 66 00:04:26,460 --> 00:04:29,200 But now this endpoint has been shifted to the browser. 67 00:04:29,400 --> 00:04:32,680 So, you're seeing more things coming via the browser. 68 00:04:32,700 --> 00:04:39,540 And that's why extension is also one of those things that we all need to focus on to help, you know, protect against. 69 00:04:40,480 --> 00:04:44,140 Just a couple of, you know, differences. 70 00:04:44,140 --> 00:04:45,920 So, this is the one from 2024. 71 00:04:45,920 --> 00:04:51,120 We're just talking about how close to, you know, 280 million installs happened for Chrome extensions. 72 00:04:51,120 --> 00:04:54,480 Which led to, like, you know, a lot of people being affected. 73 00:04:54,740 --> 00:05:00,100 Google also, you know, constantly looks at how malicious things are coming in on the store. 74 00:05:00,100 --> 00:05:02,120 They keep on removing them as well. 75 00:05:02,200 --> 00:05:07,760 We can see, like, you know, close to 32 malicious extensions were removed in 2023. 76 00:05:07,880 --> 00:05:11,060 And which had a download count of 75 million. 77 00:05:11,060 --> 00:05:18,200 And that just shows, you know, how many endpoints, the new endpoint notion those malicious extensions have reached to. 78 00:05:19,420 --> 00:05:23,340 So, there are some couple of recent events as well. 79 00:05:23,360 --> 00:05:29,540 Like, you know, there were many... I would say spyware as a term for these kind of extensions as well. 80 00:05:29,540 --> 00:05:31,360 Because they're trying to spy on the data. 81 00:05:31,740 --> 00:05:34,420 There have also been supply chain attacks. 82 00:05:34,540 --> 00:05:37,340 So, there have been companies who have been compromised. 83 00:05:37,980 --> 00:05:38,780 And that... 84 00:05:38,780 --> 00:05:40,320 like, one example is this one. 85 00:05:40,320 --> 00:05:42,960 So, the extension itself was compromised. 86 00:05:43,100 --> 00:05:52,300 And since this extension was installed across multiple enterprise endpoints, all of them were, you know, it was distributed through all of them. 87 00:05:52,480 --> 00:05:55,860 So, a single mistake can lead to a lot of issues as well. 88 00:05:56,800 --> 00:06:06,820 So, before we understand how we can go ahead and analyze extensions, it's important to understand how an extension structure looks like. 89 00:06:06,820 --> 00:06:12,280 So, like I said before, an extension has a part that runs on every page. 90 00:06:12,280 --> 00:06:14,900 And then there is something that happens on the background. 91 00:06:15,080 --> 00:06:18,280 So, what you see here is those four components. 92 00:06:18,520 --> 00:06:23,480 The second one that you see here, service worker, is something that runs on the background. 93 00:06:23,640 --> 00:06:27,820 The third one is the content strip, which runs on every page. 94 00:06:27,900 --> 00:06:31,760 The first one that you see is called a manifest file. 95 00:06:31,760 --> 00:06:37,540 So, manifest file is a single JSON file, which is present inside every extension. 96 00:06:38,140 --> 00:06:49,660 So, if you go ahead and download an extension from any of the stores, for example, let's say you download it from a Chrome store, the format is a CRX file, right? 97 00:06:49,660 --> 00:06:53,000 So, this CRX file is nothing but a zip file. 98 00:06:53,100 --> 00:06:59,420 So, if you just run a simple unzip command on top of it, you can see the structure of whatever I'm talking about out there. 99 00:06:59,800 --> 00:07:02,420 Now, lastly, there is one more thing. 100 00:07:02,420 --> 00:07:06,320 So, sometimes extensions also have HTML pages. 101 00:07:06,320 --> 00:07:11,600 This could be like dedicated pages or something that appears when you click on the extension icon. 102 00:07:11,600 --> 00:07:16,240 So, those are the fourth point mentioned here, which is pop-up or HTML pages. 103 00:07:16,340 --> 00:07:20,140 So, these four components are there in almost every extension. 104 00:07:20,140 --> 00:07:24,860 Some can avoid a background process and some can avoid a content script as well. 105 00:07:24,860 --> 00:07:27,260 But this is what is there in most of the places. 106 00:07:28,140 --> 00:07:36,900 Now, the whole model of extensions is based upon pre-declared permissions. 107 00:07:36,900 --> 00:07:43,540 So, whatever permissions an extension requires, it needs to specify that in the manifest file. 108 00:07:43,800 --> 00:07:52,340 So, if you see here, this is an example of a manifest file and it is always located in the main project directory. 109 00:07:52,620 --> 00:07:58,580 And in that, you can see that you have your name, description, content script. 110 00:07:58,580 --> 00:08:03,840 So, in this example, it says that this is the content script which is going to get executed on this particular page. 111 00:08:03,840 --> 00:08:05,200 Not like all the pages. 112 00:08:06,520 --> 00:08:11,580 Now, talking about the extension architecture in general. 113 00:08:11,960 --> 00:08:16,260 So, what happens is that, as you can see here, there is a red line here. 114 00:08:16,260 --> 00:08:17,820 Like a red dotted line. 115 00:08:17,820 --> 00:08:20,720 This is what we call as an isolated world. 116 00:08:21,200 --> 00:08:29,040 So, your extension scripts and the scripts from your page, both of them can run at the same time on the page. 117 00:08:29,080 --> 00:08:31,720 And both of them can access the DOM. 118 00:08:31,840 --> 00:08:41,040 However, there is a risk here that, let's say, a website uses a variable A and your extension code also uses a variable A. 119 00:08:41,040 --> 00:08:42,760 There might be a bit of conflict. 120 00:08:43,220 --> 00:08:50,680 And people can make websites which can, let's say, modify those variables which could cause an extension to break as well. 121 00:08:50,680 --> 00:08:59,360 So, just to keep it separated, there is something called as an isolated world which is the default mode in which, like most extensions, content scripts run. 122 00:08:59,840 --> 00:09:11,660 So, by this, both the page's script and the script of the content script, both of them can access the DOM, but they will have separate JavaScript variables. 123 00:09:11,660 --> 00:09:13,640 They will not interfere with each other. 124 00:09:13,800 --> 00:09:17,300 This provides a bit of security for the extension itself. 125 00:09:17,420 --> 00:09:21,100 However, you have an option to run it in the main world as well. 126 00:09:21,100 --> 00:09:23,520 In that case, the dotted line will go away. 127 00:09:23,520 --> 00:09:28,220 Then we have the browser process and then we have an extension process. 128 00:09:28,340 --> 00:09:34,460 So, the browser itself divides all these things into different, different processes. 129 00:09:34,740 --> 00:09:36,920 So, let's say you run your own extension. 130 00:09:36,920 --> 00:09:40,700 So, the service worker and everything will go in your extension process. 131 00:09:40,820 --> 00:09:44,400 And what you see on the tab is going to be your renderer process. 132 00:09:44,640 --> 00:09:55,240 So, now, what I'm trying to show here is that if you have a piece of code written by an extension running on a tab, it will run on the same process as your tab's process. 133 00:09:55,600 --> 00:09:59,960 So, as you can see on the left side, the renderer process, this is what your tab process is. 134 00:10:00,020 --> 00:10:04,940 So, within that, there's just like a dotted, isolated layer, but it's running in the same process. 135 00:10:05,400 --> 00:10:21,820 So, if let's say you have something outside and it's trying to figure out which process is the extension contributing to, probably people can just look at the service worker side, but the content script will be difficult to distinguish because it's all running as part of the same process. 136 00:10:23,340 --> 00:10:28,160 So, how are extension permissions created? 137 00:10:28,160 --> 00:10:39,060 The whole notion is based on the principle of least privilege, PLP, and developers have to declare whatever permissions they need right there in the manifest.json file. 138 00:10:39,300 --> 00:10:43,420 However, I won't say that the structure there is perfect. 139 00:10:43,580 --> 00:10:50,720 So, if you look at any extensions out there, let's pick Grammarly as an example, it can literally run on every page. 140 00:10:51,000 --> 00:11:00,260 So, it just needs a host permission, which says I can do some modification and read the content of the page, modify something on the DOM. 141 00:11:00,260 --> 00:11:04,540 So, that permission is so common that most of the extensions have them. 142 00:11:04,540 --> 00:11:10,940 So, it's just very risky, or it would be a very broad way to look at just the permissions and take a decision. 143 00:11:10,940 --> 00:11:13,920 However, permission is a very good indicator as well. 144 00:11:13,920 --> 00:11:17,700 Like, let's say an extension is asking for cookies permission. 145 00:11:17,700 --> 00:11:18,940 That's like a risky permission. 146 00:11:18,940 --> 00:11:24,120 It means like an extension can extract even HTTP-only cookies from a given page. 147 00:11:24,340 --> 00:11:29,920 So, of course, the very first check that you can do is actually based on permission. 148 00:11:29,920 --> 00:11:32,540 And that's how we will begin our analysis. 149 00:11:32,700 --> 00:11:37,940 So, coming to the analysis piece, the very first thing we can check for is the permissions. 150 00:11:38,380 --> 00:11:44,400 So, as you can see here, there are some permissions that you can actually go ahead and justify. 151 00:11:44,400 --> 00:11:49,920 And when I say justify, the context of the extension itself is also important. 152 00:11:50,020 --> 00:11:55,020 You cannot just say like, hey, if it's a cookies permission, it's fine. 153 00:11:55,020 --> 00:11:56,920 But who is asking for this cookie permission? 154 00:11:56,920 --> 00:11:58,700 That's also really important to ask. 155 00:11:58,920 --> 00:12:04,220 Like, as an example, let's say there is a developer extension called Cookie Editor. 156 00:12:04,480 --> 00:12:10,120 Now, the purpose of the extension itself is to allow developers to edit cookies. 157 00:12:10,760 --> 00:12:14,920 So, in some cases, it might still be okay, because it makes sense, right? 158 00:12:14,920 --> 00:12:19,240 Like, you know, someone would want to edit their cookies as a developer. 159 00:12:19,240 --> 00:12:20,360 So, it makes sense. 160 00:12:20,600 --> 00:12:23,900 It depends on the organization, whether they want to allow it or not. 161 00:12:23,900 --> 00:12:33,240 However, if you have, let's say, an AI extension, which is just going ahead and helping you get some results on the page, why would that need a cookie permission? 162 00:12:33,520 --> 00:12:41,620 So, you also need to justify a particular permission is why it is needed by that particular use case. 163 00:12:41,700 --> 00:12:47,840 So, it's important not just to look at the severity of the permission, but also justification of why you really need it. 164 00:12:48,320 --> 00:12:53,320 The next one is about metadata, which I would like Nishant to explain further. 165 00:12:55,990 --> 00:13:13,610 So, as we discussed till now that extensions are the new viruses, and currently the way we analyze them, the way we assess them, the way we contain them, it is in the same phase where your malware containment and detection and mitigation was like 15 years back. 166 00:13:13,610 --> 00:13:21,750 People have just started to see extensions affecting things on a massive scale, and you have seen some of the news clipping. 167 00:13:21,750 --> 00:13:26,730 You have extensions where 100,000 downloads are there, installs are there. 168 00:13:26,730 --> 00:13:30,830 They were good all the time, and then something happened and it turned bad. 169 00:13:30,830 --> 00:13:32,270 And they're already there. 170 00:13:32,270 --> 00:13:41,250 There are policies across your enterprises which can let you block, control what kind of extensions your users can install. 171 00:13:41,250 --> 00:13:46,390 But if it is already installed, and if it goes bad, then what do you do? 172 00:13:46,390 --> 00:13:48,950 So there is no straight answer, just like Saurabh mentioned. 173 00:13:48,950 --> 00:13:56,530 Even with the permission analysis that you do, even if it is context aware, you are checking what this extension does. 174 00:13:56,530 --> 00:14:00,090 Does it really need this permission or not? 175 00:14:00,090 --> 00:14:01,570 That's just one pillar. 176 00:14:01,570 --> 00:14:11,390 And that is why you need a more complicated flow or assessment to see if something is benign, risky, and malicious. 177 00:14:11,510 --> 00:14:18,110 And as you can imagine, saying something is malicious obviously requires a proof. 178 00:14:18,110 --> 00:14:19,990 It's a big claim that you're making. 179 00:14:19,990 --> 00:14:30,350 Whereas risky is the place where it has a lot of power, it can go bad, it has the power to do real damage if it goes bad. 180 00:14:30,350 --> 00:14:40,910 So with that in mind, we are talking about five other things that we have built into this tool that we'll make available for the extension analysis. 181 00:14:40,910 --> 00:14:44,030 Second, obviously, is the metadata analysis. 182 00:14:44,110 --> 00:14:45,490 What does this mean? 183 00:14:45,490 --> 00:14:47,530 It has different levels. 184 00:14:47,770 --> 00:14:51,090 Easy one, obviously, is the number of installs, number of reviews. 185 00:14:51,090 --> 00:14:55,150 You can do sentiment analysis and keyword search on the reviews. 186 00:14:55,150 --> 00:14:56,910 And that will give some things away. 187 00:14:56,910 --> 00:15:09,150 Sometimes if you go on these very I'll say free extensions, and you'll see that in the reviews it says that it looks like what it is doing is not what is mentioned in the description. 188 00:15:09,190 --> 00:15:11,870 So by doing that, we are able to catch some things. 189 00:15:11,870 --> 00:15:13,770 Then there are second degree things. 190 00:15:13,770 --> 00:15:19,850 So for example, your extensions, most of your authors, they don't really provide you the address, the office address. 191 00:15:19,850 --> 00:15:22,290 If they are not providing that, that can be a factor. 192 00:15:22,290 --> 00:15:26,930 If they have provided it, we are plotting it on the graph as you can see here. 193 00:15:26,930 --> 00:15:28,070 We also analyze it. 194 00:15:28,070 --> 00:15:36,510 We try to analyze if there is a residential area where this office is located or if there is a commercial area where it is. 195 00:15:36,510 --> 00:15:39,710 If it is out of nowhere, then you know that something is going wrong. 196 00:15:39,710 --> 00:15:43,010 Same goes for the domain, the email address. 197 00:15:43,010 --> 00:15:46,810 So if you do a hoist on it, you'll know how old it is. 198 00:15:46,810 --> 00:15:58,570 So what is also happening now is in addition to takeovers, where you are hacking the person and then taking over their malicious extension, there is also a secondary market where you can buy and sell these extensions. 199 00:15:58,670 --> 00:16:06,370 So if you have a free extension which you have been supporting for 5 or 7 years, people are approaching these people and then taking it over. 200 00:16:06,370 --> 00:16:11,430 And the problem is that currently there is no way for you to know that the ownership has changed. 201 00:16:11,530 --> 00:16:15,230 So for that you need continuous delta analysis monitoring. 202 00:16:15,230 --> 00:16:16,350 That's what we call it. 203 00:16:16,530 --> 00:16:23,090 So yeah, you can do registration analysis if the domain has changed, if the domain is new, that is something to think about. 204 00:16:23,090 --> 00:16:26,930 Again, none of these factors alone can dictate if it is a malicious extension. 205 00:16:26,990 --> 00:16:32,050 But it can obviously contribute to a score that we are going to calculate, which will give you some idea. 206 00:16:32,530 --> 00:16:34,630 So this is the metadata analysis. 207 00:16:34,930 --> 00:16:38,530 Similarly, code analysis, we are living in the world of LLMs. 208 00:16:38,530 --> 00:16:40,870 We are living in the world of AI agents. 209 00:16:40,890 --> 00:16:50,470 So instead of just relying on your SAST tools, which are mainly done to check your own code, you can also involve AI agents and LLMs. 210 00:16:50,470 --> 00:16:51,930 You can pass them these files. 211 00:16:51,930 --> 00:16:57,910 So for example, what you are seeing here, as Shorter described, you have a structure of an extension. 212 00:16:57,950 --> 00:16:59,730 In that you have designated files. 213 00:16:59,730 --> 00:17:01,830 You have manifest file, which will have permissions. 214 00:17:01,830 --> 00:17:05,610 Then you have a background.js, which will run the service worker. 215 00:17:05,650 --> 00:17:09,910 And then obviously you have content.js, which you put into the webpage. 216 00:17:10,030 --> 00:17:19,950 Now when you pass these with context to an LLM, to an AI agent, by looking at it it is able to understand what it is doing, and then it is able to mark it. 217 00:17:19,950 --> 00:17:21,810 And that's precisely what we are doing here. 218 00:17:21,810 --> 00:17:26,530 So on the top, in the table you are seeing the entries for two different files. 219 00:17:26,550 --> 00:17:28,030 First one is the content one. 220 00:17:28,030 --> 00:17:29,650 Second one is the background file. 221 00:17:29,670 --> 00:17:32,030 And then you are also seeing the reasoning behind it. 222 00:17:32,030 --> 00:17:34,850 Because LLMs are kind of a brain. 223 00:17:34,970 --> 00:17:39,050 They can actually give a logical reasoning why they think something is like this. 224 00:17:39,730 --> 00:17:41,830 So yeah, that is the code analysis. 225 00:17:41,850 --> 00:17:44,670 So this is different from your static code analysis. 226 00:17:44,670 --> 00:17:52,550 It is more about understanding what the code does, and then accordingly give a verdict, which will again factor into a larger model. 227 00:17:53,830 --> 00:17:58,010 Third one is also the composition analysis, and why it is important. 228 00:17:58,010 --> 00:18:07,050 Because nowadays you have things like Wasm, so WebAssembly, where you can compile this code into this binary which can then run inside your browser. 229 00:18:07,230 --> 00:18:10,610 These things sometimes this code is obfuscated. 230 00:18:10,610 --> 00:18:21,010 So by looking at the composition of your extension, if a lot of it is coming from a binary which is obfuscated, that obviously is a risky thing. 231 00:18:21,250 --> 00:18:25,870 Why an extension, which is not doing anything wrong, want to hide stuff? 232 00:18:25,870 --> 00:18:30,550 Why it wants most of its code to be in a binary or to be in obfuscated form? 233 00:18:30,550 --> 00:18:33,090 So that is also something we are taking a look at. 234 00:18:33,110 --> 00:18:37,670 Same goes for the number of files, the kind of files we are analyzing those as well. 235 00:18:38,610 --> 00:18:40,870 And this is the most powerful part. 236 00:18:40,870 --> 00:18:44,710 This is the dynamic analysis using your AI agents. 237 00:18:45,250 --> 00:18:56,010 We all know, till the time you emulate something on the browser, if you just install an extension or if you just do a code analysis of it, you won't know what it is going to do on runtime. 238 00:18:56,010 --> 00:19:00,610 And it is very very easy to avoid a lot of these static analysis. 239 00:19:00,830 --> 00:19:16,950 So just to give you an example, suppose this extension has a URL, and on the runtime it is going to fetch the instructions from this URL, and that too is based on your DGCA or DDGA, the dynamically generated domain generation algorithms. 240 00:19:16,950 --> 00:19:19,810 We have seen them in malware and all other places. 241 00:19:20,090 --> 00:19:24,110 So things like that, your static analysis won't be able to do much about. 242 00:19:24,110 --> 00:19:30,470 If you talk about automated approaches of analyzing the URLs, you can't do that if it is protected behind a capture or something. 243 00:19:30,470 --> 00:19:32,790 If it keeps changing, how are you going to do that? 244 00:19:32,790 --> 00:19:34,810 So that is where the dynamic analysis comes in. 245 00:19:34,810 --> 00:19:45,970 So what we do in this case, currently your browser tools that are there in the browser just like you use them to debug the websites, there is not much that you can do for extensions. 246 00:19:45,970 --> 00:19:58,390 If you want to use your Chrome browser or your Firefox to see what exactly an extension is communicating, what kind of API it is calling, what kind of operation it is doing, there is no such tool. 247 00:19:58,970 --> 00:20:06,750 We have also covered the same in one of the initiatives that we run as a company, Year of Browser Bugs, where every month we talk about these things. 248 00:20:06,750 --> 00:20:15,650 So what we have done to tackle this, we have taken a Chromium fork, we have modified it to make it act as a MITM proxy. 249 00:20:15,690 --> 00:20:20,710 So when you do that, you are able to intercept all the API calls that extension is making. 250 00:20:20,710 --> 00:20:26,830 You are able to intercept all the responses and the requests that this extension is making. 251 00:20:26,890 --> 00:20:32,930 And because you are sitting in the browser, you really don't have to worry about the SSL interception and all of that. 252 00:20:32,930 --> 00:20:34,930 You can pretty much see everything. 253 00:20:34,930 --> 00:20:38,670 So what you are seeing on the screen is the API call log. 254 00:20:38,670 --> 00:20:42,170 And we also timestamp it so that we can do correlation. 255 00:20:42,290 --> 00:20:44,430 So this is for the API calls. 256 00:20:44,430 --> 00:20:47,290 Second one is for the network traffic. 257 00:20:47,390 --> 00:20:54,930 So it is seeing what kind of traffic it is sending, what kind of responses are coming back, and it is also timestamped. 258 00:20:54,930 --> 00:20:58,250 And then the third one is the emulation part. 259 00:20:58,250 --> 00:21:05,810 So we are using an AI agent which emulates some activity like a user will do. 260 00:21:05,810 --> 00:21:08,450 Because a lot of these extensions are very smart. 261 00:21:08,450 --> 00:21:14,010 A lot of them are designed in such a way that till the time a real user does something, it is not going to perform anything. 262 00:21:14,010 --> 00:21:15,450 It is not going to report anything. 263 00:21:15,450 --> 00:21:17,970 It is not going to go to any URL. 264 00:21:18,250 --> 00:21:22,630 So to make sure that we are catching that as well, what we do, we have an AI agent. 265 00:21:22,630 --> 00:21:28,310 We pass it the information about this extension so that it is context aware. 266 00:21:28,590 --> 00:21:31,550 It understands what this extension is supposed to do. 267 00:21:31,550 --> 00:21:34,330 And then accordingly it creates a dynamic profile. 268 00:21:34,450 --> 00:21:38,930 And that dynamic profile is run on the special browser that we have crafted. 269 00:21:38,970 --> 00:21:43,430 And then you get this log of what it does. 270 00:21:43,430 --> 00:21:44,670 So now you have three things. 271 00:21:44,670 --> 00:21:50,190 You have API logs, you have network logs, and then you have the actions that the AI agent is performing. 272 00:21:50,190 --> 00:21:52,330 You put them all in one timeline. 273 00:21:52,330 --> 00:21:55,610 You pass this to an LLM or an AI agent. 274 00:21:55,610 --> 00:21:57,130 And there you go. 275 00:21:57,210 --> 00:22:00,010 Now you can see what you did and what happened. 276 00:22:00,910 --> 00:22:02,970 Reaction to your actions. 277 00:22:02,970 --> 00:22:08,370 And that is where you can catch a lot of things which are generally missed in SAS and Static Analysis. 278 00:22:10,310 --> 00:22:14,950 And then when you pass this to the LLM, again it will give you a verdict. 279 00:22:14,950 --> 00:22:18,090 It will tell you why exactly it is going to do this. 280 00:22:18,090 --> 00:22:19,630 Now can we do this manually? 281 00:22:19,670 --> 00:22:21,370 Can we do it as a human? 282 00:22:21,370 --> 00:22:23,670 Can I take a look at this and say this? 283 00:22:23,670 --> 00:22:24,870 Obviously yes. 284 00:22:24,910 --> 00:22:26,850 But do you know how many extensions are there? 285 00:22:26,990 --> 00:22:31,510 In Chrome store alone we have 150,000 extensions. 286 00:22:31,510 --> 00:22:34,890 If you have to analyze all of them, and again they update. 287 00:22:35,350 --> 00:22:39,150 A lot of them update on a very regular period. 288 00:22:39,150 --> 00:22:43,250 Every single day you have like hundreds or thousands of these updating. 289 00:22:43,250 --> 00:22:52,190 So you also have to do the change tracking and the data analysis and that is the last nail in the coffin of these malicious extensions. 290 00:22:52,270 --> 00:23:03,150 So what we do as soon as any extension is updated, if you are tracking it, we will automatically go, take it, do a delta comparison and you know you guys all have used GitHub. 291 00:23:03,150 --> 00:23:09,270 You know that if you have two directories of code, you can pretty much do a depth on it. 292 00:23:09,270 --> 00:23:10,850 You will know what are the additions. 293 00:23:11,010 --> 00:23:17,070 And if you can put all of this into the AI agent, again you are hearing AI agent again and again and again. 294 00:23:17,110 --> 00:23:18,910 But I hope you are habitual to this. 295 00:23:18,950 --> 00:23:20,210 You have been to Black Hat. 296 00:23:20,310 --> 00:23:21,570 Everyone is talking about it. 297 00:23:21,570 --> 00:23:26,290 This is the new technology that everybody is leveraging to solve second order problems. 298 00:23:26,430 --> 00:23:27,890 So that's what we are doing here. 299 00:23:27,890 --> 00:23:31,610 You pass it to them and it gives you the verdict. 300 00:23:31,890 --> 00:23:39,690 And it will be able to catch very simple to complicated things depending on what kind of code is being used. 301 00:23:40,090 --> 00:23:43,390 And it can mark them in risky, malicious and benign. 302 00:23:43,810 --> 00:23:52,890 So these are the six pillars which we feel will be able to catch an extension mark it between risky and malicious and benign. 303 00:23:52,890 --> 00:23:55,090 Now, is it perfect? 304 00:23:55,090 --> 00:23:56,150 Obviously not. 305 00:23:56,930 --> 00:24:00,430 In cyber security, in security there is no silver bullet. 306 00:24:00,430 --> 00:24:01,710 It's a cat and mouse game. 307 00:24:01,710 --> 00:24:02,850 It's a whack-a-mole. 308 00:24:02,850 --> 00:24:04,310 We are fixing this. 309 00:24:04,310 --> 00:24:11,830 Obviously if someone will tailor their extension to bypass our framework , most probably they will be able to. 310 00:24:11,830 --> 00:24:13,430 So you can tailor made it. 311 00:24:13,430 --> 00:24:17,750 But this is what we are envisioning for the broader scale . 312 00:24:17,790 --> 00:24:22,450 Not all of your 150,000 extensions are going to do this. 313 00:24:22,450 --> 00:24:24,210 Not everyone is going to craft it. 314 00:24:24,210 --> 00:24:27,710 And even if they do, we can again play that game. 315 00:24:28,130 --> 00:24:31,150 So here is the scoring table. 316 00:24:31,190 --> 00:24:33,710 We are doing weightage scoring for it. 317 00:24:34,050 --> 00:24:38,330 So each of these modules that you saw it contributes to that score. 318 00:24:38,330 --> 00:24:46,390 And that score in the end tells us if this is a risky one, if it is a malicious one or if it is a genuine one. 319 00:24:46,390 --> 00:24:50,650 And now just a simple demo of the platform. 320 00:24:53,210 --> 00:24:55,870 So this is the analysis for one of the extensions. 321 00:24:56,730 --> 00:25:00,010 You can see the first page is focused on the metadata. 322 00:25:00,610 --> 00:25:03,870 You are able to see the extension permission on this side. 323 00:25:03,870 --> 00:25:08,390 It is also giving the justification why it feels it should be there or it should not be. 324 00:25:08,970 --> 00:25:10,650 So this is the first part. 325 00:25:11,650 --> 00:25:16,310 It also tells you what the extensions are because some people... there are like 50 plus of these. 326 00:25:16,310 --> 00:25:18,130 So you cannot remember, right? 327 00:25:18,650 --> 00:25:20,650 You can pretty much open up Google Earth. 328 00:25:20,650 --> 00:25:25,910 Obviously a very simple thing to do but comes handy when it is done for all the extensions. 329 00:25:26,810 --> 00:25:32,530 So you can pretty much see in some cases you are also able to do the street view. 330 00:25:33,830 --> 00:25:36,170 Then there is the code analysis part. 331 00:25:36,670 --> 00:25:40,490 You have passed most of these important ones to the LLM. 332 00:25:40,490 --> 00:25:43,490 You have this analysis and the reasoning for it. 333 00:25:43,670 --> 00:25:45,170 Then there is composition analysis. 334 00:25:45,170 --> 00:25:49,010 You can see what kind of files are there, what are the size, what are the numbers. 335 00:25:49,910 --> 00:25:51,870 Then there is dynamic analysis. 336 00:25:51,890 --> 00:26:01,650 So this is the API calls, then the network calls and then in case of agentic simulation you are also seeing the logs that the agent has created. 337 00:26:02,270 --> 00:26:05,710 And based on that you can see that this one was marked benign. 338 00:26:05,830 --> 00:26:08,150 So there are three kind of simulations that we do. 339 00:26:08,170 --> 00:26:09,710 First is zero simulation. 340 00:26:09,710 --> 00:26:12,150 Just install the extension and done nothing. 341 00:26:12,150 --> 00:26:13,550 Second one is static. 342 00:26:13,550 --> 00:26:15,950 The activity that we are performing is static. 343 00:26:16,010 --> 00:26:20,410 The third one is the agentic one where it is all tailor made to the extension. 344 00:26:20,670 --> 00:26:30,830 And then there is this delta analysis which tells you if the additions that are done, if this seems risky, if this seems malicious and you can pretty much see the change log as well. 345 00:26:30,950 --> 00:26:37,890 So what agent cannot find out, maybe we can find out it by taking a look at it. 346 00:26:38,970 --> 00:26:49,870 So we made it easy to go through the code, to search something, even mark the vulnerabilities that are being pointed out by these tools that we use in SAST and DevSecOps. 347 00:26:50,890 --> 00:26:54,050 So this is more for the developer side. 348 00:26:54,350 --> 00:26:59,990 And again you can see the code, quickly search around it. 349 00:27:00,050 --> 00:27:04,590 So that is the tool that is there, that is the platform that is going to be. 350 00:27:06,490 --> 00:27:13,710 Now in the second example we will show you how this dynamic analysis actually helped us cover one of the malicious extensions. 351 00:27:19,780 --> 00:27:22,220 So this is the one that was in the media. 352 00:27:22,220 --> 00:27:30,920 It was a very simple color picking extension which is used to select the color to get the hex code for it. 353 00:27:31,260 --> 00:27:34,800 And it was installed more than 100,000 times. 354 00:27:34,800 --> 00:27:39,720 It was all good, all benign and one day it went rogue. 355 00:27:39,720 --> 00:27:50,560 And when the modified version was uploaded, what it was actually doing, it was reporting all the pages you are opening to its master, to its CNC. 356 00:27:50,560 --> 00:28:02,740 And then it also had a functionality where the attacker can send a URL and it will open up that URL for the user, send the user there, and because it has contextual awareness, it knows the user is going on Facebook. 357 00:28:02,740 --> 00:28:04,560 So it can be that URL, right? 358 00:28:04,560 --> 00:28:09,400 And then the user can land there and fall for the thing. 359 00:28:09,400 --> 00:28:21,000 So here, in the network logs, and in the browser automation, the AI agent logs, you are seeing that the agent has opened GitHub and it is being reported by the extension. 360 00:28:21,840 --> 00:28:24,740 This is the benefit of your dynamic analysis. 361 00:28:24,880 --> 00:28:27,700 Second thing, the agent has opened Google. 362 00:28:28,160 --> 00:28:32,820 Again, the extension went ahead and also reported that Google is being used. 363 00:28:33,080 --> 00:28:43,360 So same way, when you pass all of this as a single timeline to an AI agent, it actually tells you that it is malicious, it's a spyware, it is spying on you. 364 00:28:46,080 --> 00:28:48,300 So yeah, that's all from our side, folks. 365 00:28:48,300 --> 00:28:50,540 If you have any questions, we will take those. 366 00:28:50,740 --> 00:28:52,080 Thank you for coming to the talk.