All righty. Hi, everybody, and welcome to Chrome Alone, a discussion about transforming a browser into a C2 platform. So I'm Mike Weber, and I've been building offensive Chrome extensions since 2018. I gave a talk back at DerbyCon about this a couple of years ago, and the reason I'm still doing it is because it is so damn effective. I currently work at Praetorian Security where I make malicious extensions and other fun tools for our red team, and it's regularly still getting them from pretty much no access at all to just GGing our clients completely in a really quick amount of time. So I'm excited to get to share this stuff with you so you can also do this on your targets and really just have a good time with Chrome. Fun fact, there are a lot of Mike Webbers in security. The list on screen is all of those who I am not. If you need an easy reminder, I'm the Mike Webber that works for Praetorian Security. Sometimes we have a Roman motif going on, and in case it's not clear from the intro slide, I love the movie Home Alone. So small note here, this is a very compressed presentation. There are going to be times where I definitely just have a throwaway sentence that's like, and then you just implement a Socks proxy in JavaScript at the end. And in those moments, if you're like, I feel like I need more information, I would direct you to the GitHub repository, which should be live now, containing a full implementation of everything that I'm about to talk about that will run on Windows with Chrome. And when that does happen, I will also throw up a friendly reminder that drawing the owl is super easy and don't worry about it. So why are we targeting the browser in the first place to do this? Why don't we just use Cobalt Strike or Nighthawk or Meterpreter or whatever your favorite implant is. And the main reason for that is the browsers are everywhere. They're running on everything. So Chrome, Edge, Firefox, whatever, everybody's going to have to run these in their enterprise. So you don't have to worry that someone said, well, you can't run the browser, because that's the only way they have to access their internal resources. So if you have a centralized single sign-on service like, say, Office 365 or Google Workspace or Okta, then the main way you're going to be accessing this is through your browser. And that's why it's a really juicy target for us to infect so we can kind of just, like, go along for the ride. And specifically from the world of browsers, we're going to target Chromium. So that's Edge and Chrome specifically. And the reason we're going to do that is it's been around for a long time and there's more built-in features than anyone is even aware of. The thing is practically an operating system, and there's two features specifically that we're going to be taking advantage here as we build out our sort of, like, browser implant. One of them is browser extensions, and the other one is something you might be less familiar with, which is isolated web applications. Browser extensions I probably don't need to explain to you. Every time you install an ad blocker or something to review your grammar or run an LLM in the browser, you're installing a browser extension. And they have a lot more capabilities built into them than you're often using in the first place, which is why it's a super common way that malicious actors are going to run around and have fun inside your browser. So tale as old as time, people have been doing adware and click fraud or crypto mining or stealing all of your cookies and your bank account creds, the simpler stuff. And more recently, you can see people executing some pretty complicated attacks using the browser as their mechanism. So there's supply chain attacks where people use their extension or infect one extension and use that to infect more extensions and spread around. Or you'll find malware families like LLM C2, which after they get on your machine, they'll actually sideload an extension in order to steal creds and do some other fun stuff. And that's the approach that we're going to take. Pen testers know that this is a thing, so there's a million tools out there. I can't call them all out. I am going to explicitly call out a malicious extension called cursed Chrome, which is a really awesome way to turn someone's browser into a sort of HTTP proxy, and you can just steal all their cookies in their session and run around their network. It's great, and we're going to do that, plus a little more. Because it's such a common exploit vector, Google has tried to lock down the Chromium source code base. You might be familiar with, hey, you know, uBlock origin doesn't seem to work anymore. The reason for this is they've been trying to restrict the number of capabilities that are allowed within extensions these days. So, specifically, there's two capabilities that we're going to miss. One is you can't man in the middle browser traffic easily anymore with a permission. That's a bummer. That was great for capturing creds. And the other one is it's a little challenging to try to hide dynamic code execution in your extension without explicitly saying you're asking for it. And the reason that that comes up is the Chrome store review, so when you have an extension and you submit it to Google so they can actually share it with everybody else, they've changed that process so there's a lot more scrutiny of the actual extensions. You pretty much need to write an essay to explain why you're asking for every permission now. You used to just be able to submit to the store. Those days are gone. And finally, they do occasionally remove capabilities from the browser. So, I know I'm talking about how there's a million legacy features that we're going to use. They take them out sometimes. So, there was this really cool thing called Chrome apps that let you do stuff like host a web server in Chrome or, you know, make an SSH connection to something else, and it got deprecated in 2025, except, you know, what is dead may never die, and now they've gifted us this thing called isolated web applications. And you might be wondering, Mike, what on earth is an isolated web app? And I'm going to steal something from Google's presentation last year at ClickOn19. Pretty much when you need to create a new API in Chrome, they have a set of restrictions that you need to follow to make sure that it's safe to add. Specifically, it still needs to be safe to visit a web page, and you have to make sure that if you're asking for something on the machine, you ask the user for meaningful consent. And shockingly, or maybe not so shockingly, they get requests from people all the time that would like to violate these principles when they add an API into the browser. So, you know, very much in the spirit of yes, and, we have gotten isolated web apps, which is pretty much a part of the browser where they're going to add these APIs that they explicitly understand are dangerous and not what you expect from a web browsing experience. So, there's permissions, once again, now we can make direct socket connections on TCP or UDP, we can have socket servers, you can hit some web USB mechanisms that have been blocked for years. Specifically, this is the example they give when talking about it. There was a testing center that wanted to run Chrome in kiosk mode, but they also wanted to make sure that users weren't running like chat GPT in another monitor, so they wanted to have a permission that lets you just dump all of the screens without ever asking the user permission to do so, because they figure a cheater will just say, no, I'm not going to let you see if I'm running chat GPT. So, there's this extra suite of powerful permissions that's now built into the browser. It's in Chrome right now. And they recognize that this is dangerous, so there's extra protections to stop you from being able to run too crazy with this stuff. Specifically, all of the code needs to be explicitly written in advance and signed. There's a whole bundling mechanism, and that is tied to a cryptographic public key. Theoretically, they'll be able to use this to lock the keys down to specific vendors, but right now you can just self-sign and run these things in any browser. Additionally, there's a lot of isolation in place. Isolated web apps are not supposed to interact with the rest of the browser, so they shouldn't be able to see your cookies, they shouldn't be able to read anything from local storage or do any browsing, to be honest. And this is mainly enforced through a really strict content security policy. Everything needs to be in the bundle, and that's it. And they even acknowledge in the slide that, you know, well, you could just embed an entire JavaScript interpreter, but we're not going to have to do anything remotely that complicated to really have fun with this. So, for those of you who are content security policy heads, if you check the specification for isolated web apps, this is the actual content security policy. For those of you who can't just read content security policy, don't sweat it. Essentially what this is saying is you're not able to dynamically execute code from the internet unless you're doing it inside WebAssembly. And that's a really great loophole that we're going to drive a train through, but we'll come back to that one later. The final bit I have about Google's opinions on isolated web apps is in the presentation, these are all quotes taken verbatim as they discuss isolated web apps, and most of this is kind of meant in a sort of joking way, but I feel if you ever ask the question who's going to use this besides malware authors, you have to consider that some malware authors will actually use this capability. So, the way that we're going to talk about this is in the form of a case study. So, we're going to talk about a red teaming scenario that you might encounter where we want to go against a hardened target, and we're going to make some assumptions for them. So, we're going to say they're running Okta for single sign on and they've got it properly configured, we can't brute force passwords. We're going to say they have amazing secrets management and the secrets we need to hit our objective are inside Vault and nowhere else, so no red teaming will get you there. They use a hardware token for multi-factor authentication over web authentication, so you need someone to click a UB key to get to our goal, and we'll even give them the bone and say, minus one exception, their endpoint detection response is totally dialed in. So, to be specific about this user that we're going to target, they log into SSO once a day in Chrome, they never log into Vault, the creds we need to hit our goal are going to be inside Vault, and in order to access that repository with our final secrets, you're going to need to have MFA authentication with a UB key as well as SSO. And now, here's the part where I rig it for me, the presenter. We're going to say that we've successfully tricked this targeted user into running one PowerShell script on a Windows host. Just to be clear, the tool that's being presented now is a post-exploitation tool. Initial access is left as an exercise to the reader, though if you can get initial access from a PowerShell script, you're probably good. But outside of that script, assume EDR is fine-tuned, the SOC is great, and Chrome has all the network traffic whitelisted, so we'll have no problem doing anything out of Chrome. So I've got this great architecture diagram, which I'm sure you can all parse and read super easily on the screen, and there's really only two takeaways that I want you to have from this. One of them is that we're going to run an isolated web application inside one instance of Chrome, and then we're going to install a Chrome extension into a separate instance of Chrome. And then these are going to both talk back to our C2 server, which is running in the cloud. I've used Amazon here. You can use whatever cloud you want. But in general, I don't think this really describes the problem, and I've mentioned I'm a fan of Home Alone, so I think we're better off describing it from the view of turning the browser into a fun house of traps, and each trap that we've set is going to solve a specific part of our challenges to go from zero to getting the win that we need at the end of the assessment. So to be a little more concise, we have a plan. First we're going to need to sideload a Chrome extension and an isolated web app. Then we're going to use that to capture SSO credentials for Okta using the Chrome extension. We're then going to tunnel all of our web traffic from the user's position via a Socks proxy implemented with isolated web apps. Then we're going to do some shenanigans to trick the user into authenticating the vault with their web authentication token using extensions, and then finally, once more, back to the isolated web apps for RDP, and don't worry, this slide is coming back. I'll keep you updated as we're going. So first things first, we've got to sideload these extensions, and the way that Chrome extensions are loaded by the browser is essentially there's a JSON file on disk that just describes, hey, here's the permissions I need my extension to run, and here's where it's stored on disk. It's just a JSON file. Individual extensions request permissions, and they often request really dangerous permissions. It's super common. So like this example I have on the right, which is going to look very similar to our final extension, is actually Adobe Acrobat. Everybody requests dangerous extensions. It's just super common. And in order to stop people from just tweaking these things constantly, there is a little bit of protection in the browser. Specifically, there's a sort of like HMAC hash, which is calculated by the browser for each blob of JSON, and normally that would be very complicated to reverse engineer, but Chromium is open source, so you can just read the source code and reverse engineer it yourself and then sign your own stuff, and this has been happening for years. You can go as far back as 2016 and find Adware people taking advantage of this. More recently, pen testers such as Nicholas Murray and Gordon Long have written public POCs for being able to calculate these hashes. That's great. We're going to have one that's implemented in PowerShell. And the final bit about side-loading Chrome extensions I'm going to cover is there's developer permissions that you can ask for by going into the UI and flicking some buttons. These are really powerful. These let us do things like read the file URIs, which lets us build out a file browser. We're just obviously going to flip all of these things on because we're side-loading, so why not? And unfortunately, isolated web apps are a bit more new, so side-loading those isn't covered, so we have to talk through what do you do to even install these things? First of all, let's say that we have a signed web app bundle that has an egg in it. In this case, I'll say Google Keep. Then we turn on a bunch of flags and we get this super-duper polished internal web UI, which you click a button and then load a signed web app bundle for. So if you do all of that, and then you take a look, we'll just grep through the entire profile folder for where our egg shows up, and it shows up in two places. It shows up in the bundle that we just loaded, that makes sense, and it shows up in this thing, sync data level DB 003.log. You might think, well, .log might be a text file, and sadly, it's not. It's not even JSON, it's some sort of hybrid mess, but we did get a hint with this level DB bit. So, it's actually just one of the many open-source Google internal data formats. In this case, it's level DB. This is used within Chrome. And all you need to know about this is it's essentially a very nice key value storage system. So, the key is very simple. It's literally just like the string web apps DT and then an ID based off of our public key for our app. But this value over here is a lot more. And luckily, once again, it's open source, so we can just read the spec. And the first seven bytes are just some, uh, a CRC32 calculation based off of the content, the length, and, uh, a type which we're gonna be lazy for, and we're just gonna say full all the way through. And that's CRC32, it's actually CRC32C, I didn't realize there were many variations of CRC32, but, uh, once again, just go to the source code, you can pull their implementation, uh, I'm an idiot, so I decided to write this myself in PowerShell, it does work, it was painful, you can use my implementation, don't worry about this. And finally we have the remaining, you know, infinite more bytes as part of that value pair. And what this is, is a Google protobuf object. Uh, protobuf, for those who aren't familiar with it, is essentially just a serialization mechanism, so you predefine these proto definitions, and then everything gets written out to disk. So, a protobuf definition looks something like this, this is right from the source code, and essentially it's a type, a name, and an offset. So, you know, at position two on our protobuf object, that's a string, that's the name of our application, at position seven is the sources object, which is a different type, because of course you can nest these, a sources object is in fact a series of bools that say how is this web app installed, was it sideloaded, is it a core system component, you better believe when we sideload, we say it's super important in core, don't you dare uninstall it. And finally, we just need to go generate an app that describes, uh, the application we're sideloading, turn that into a protobuf object, calculate the CRC32C hash for it, add that into the level DB structure, turn on a couple of flags, because isolated web apps are not enabled by default in the browser, and lucky for us, that's in JSON, so that's actually really easy to do. And then we need to calculate the isolated web app ID, run the app from the command line, so there's literally like a dash app ID flag you can run Chrome with to open an app, uh, directly, and finally when you do that, as a precaution, they make you show an interface for web apps, there's no headless mode for running isolated web apps. So we're gonna steal a page from red teaming, and we're going to use hidden desktop, uh, mechanisms, where we essentially, when we launch that Chrome process, we give it a different desktop handle, and that just, the user just never sees it. You'll see what this looks like in the demo. And obviously, uh, I don't expect all of you to be able to take that information and sideload all of this, don't worry, this is implemented in the repository I posted earlier under the doorknob project, and uh, doorknob is just a series of PowerShell scripts that are gonna let you sideload extensions and isolated web apps, and they'll generate the loader for you, and it just works, it's a lot less painful than grabbing a superheated doorknob, you run the scripts and you're good to go. So that's the first part of the plan. Now we've got all of our stuff loaded into the browser, it's time to take advantage of it. So, first things first, we need those octa creds. And this is going to be the most straightforward Chrome extension in terms of malicious extensions that you're gonna have. Uh, we're going to have a malicious extension that asks for pretty much every permission we can, we're sideloading so no one's gonna tell us no, so we're gonna ask for background permissions to make sure this runs even if the user closes Chrome, we're gonna ask for the ability to read the clipboard, we're gonna ask for cookies permissions so we can steal all of the user sessions out of the browser, we're gonna ask for declarative net requests because we're going to actually use this to turn off certain, uh, internal protections in Chrome that let us do other silly things, which I'll cover in a bit, and, uh, of course, why not ask for history so we can tell where the user's been going. And this used to be enough to also steal credentials that were being submitted, uh, in any form, but unfortunately manifest v3 stopped us from so we need to rely on another mechanism in extensions, which is content scripts. So what we're going to do is we're going to inject JavaScript into every single tab that's running and then that JavaScript is going to, uh, intercept every mechanism we care about so we can add events to forms, for example, and submission, and then we steal all of the content. And essentially there's a lot of different barriers within Chrome to stop you from doing something like this, so we're just going to add our malicious JavaScript into every single part of Chrome we possibly can and we're going to build a sort of like microservices nightmare within Chrome that lets different parts of it talk to our C2, even when they shouldn't. And, um, if you might be thinking, well, won't people notice that you're running JavaScript in every single tab, in which case I would say you have a lot of faith in the user, but additionally, we're going to do this all with WebAssembly instead of JavaScript. And I don't know how many of you have tried to reverse engineer WebAssembly, but it's not fun. This is not easy to manage in any way or form from within the browser. Additionally, the way we're going to compile our JavaScript is we're going to do this through Golang, so the entire Go runtime is going to be built into this really cool file format that's super easy to parse, and I don't know how many of you used to reverse engineer Go malware, but until there was great tooling for it, it wasn't super great to reverse engineer. And lucky for us, the tooling for WebAssembly right now is not fantastic. Ghidra cannot show you hello world written in this. I mean, obviously with enough time you can figure out what's being sent, but any analyst that just sees this is probably not going to be able to pull out information very quickly to figure out what we're doing. And the way that WebAssembly permissions are asked for in the browser, it's really all or nothing. You either say you can run WebAssembly or you can't. That's it. There's no granularity to it, and even if you could turn it off, that permission we asked for earlier, we're going to use to disable content security policy processing for all websites we visit. So we're loading this in everything and no one can stop us. And if you're feeling like particularly malicious, you can actually use WebAssembly to invoke JavaScript code to load more WebAssembly, so you build this like nesting doll of WebAssembly that calls out to JavaScript to load more WebAssembly that calls out to JavaScript. You get the idea. You can really waste a lot of time with this. And as a result, like, this is essentially what it looks like when you write something in WebAssembly versus JavaScript. What you're actually seeing is the exact same code. So on the right, this is JavaScript to load WebAssembly, and this is the only thing that any analyst will be able to see in all of those tabs we're running. It's just there's a WebAssembly file, it's being run. And then you can throw a bunch of decoy code in there from whatever an LLM decides to shit out, but this is essentially the part that's important. In Go, I don't expect people to be able to read this and understand it immediately, but we're doing the same thing, and there's an interop object within WebAssembly that we can use to call back out to JavaScript and do the exact same things. It's a little more verbose, but ultimately, you can replicate probably 90 to 95% of what you can do in JavaScript within Go, and then you're off to the races. So as a result of this, uh, there's absolutely no way that you can expect a malware analyst to take a look at this. What will happen is they'll poke their head in, they'll see it's WebAssembly, and then sort of throw up their shoulders and shrug, and either it gets in or it doesn't. I can say that we've submitted malicious extensions into the Chrome store using this approach, and it's never been blocked. We've got plenty of extensions, more than we need. This is very effective. So, now we've got our extension, like what are we actually doing with it? And this is where, you know, JavaScript comes to the rescue. We just add event listeners to the submit function on forms. We can add it to a couple of places, like hitting the key or clicking a mouse button. We can even intercept or man-in-the-middle certain functions, like when you call web authentication. We'll cover that later. Uh, essentially, every site that you visit, we can identify the form, add our listener to it, and then JavaScript gets the ability to process all of its results. And obviously, just to be clear, the implant that you're able to get on GitHub does not pop up an alert window and highlight it in the big red box, it just sends it to the C2. And just like in the movie Home Alone, sometimes the most cleverly laid traps are not enough, and we need an old man with a shovel to come beat the shit out of someone. And that's where the shelling out capability, uh, within Chrome is really helpful for us. And this presentation's more about using Chrome, but for those of you who want to go a little farther, let's talk about our old man with a shovel, native messaging. And native messaging, in a nutshell, is pretty much just a way to tell Chrome, hey, when I invoke this JavaScript piece, I want you to run an executable on disk. And normally, you need to, like, install a registry key, and have a file on disk, and the registry key points to a JSON file, but because we're sideloading, all of this is handled. So once again, doorknob, or the sideloader piece, will just be able to install all of this for you. So you'll have a registry key, or on macOS it's a file on disk, that points to a JSON file, that JSON file is very short, it's pretty much just a name and a path to the executable you want to run, and then in your JavaScript code, you open a connection to your native messaging host, and it ends up looking something like this. Which is Chrome just straight up shelling out, and then running whatever binary you've told it to. So, I will say, this is not subtle, like, I wouldn't expect a SOC analyst to miss this, it's pretty blatant, but you still can't block it, because this is the only way that Chrome interacts with native messaging hosts. So if you use, say, one password, the way that it interacts with the one password on host is the same mechanism. So they can't block it. For red teamers who want to get fancy, what you probably would do is instead of embedding a binary to just interpret shell commands, what you'd want to do is have a whitelisted application that you have a DLL you can sideload, and in that sideloaded DLL, that's where you would run your code to, I don't know, run, maybe that's when you run your cobalt strike beacon, or whatever stage 2 implant you actually want to run. So this is all collected in Hot Wheels, which is a weaponized web assembly browser extension, and that will give you credential jacking, shelling out, session theft by stealing cookies, file read operations, and the ability to read arbitrary history. And this extension will run on both Edge and in Chrome. Obviously this is implementation via Chrome, but it works on both. So that's how we're getting creds. Now we need to figure out how we're going to tunnel our traffic. And normally I would say let's just use curse Chrome, that's exactly what it's for, but it only does HTTP, and we just spent 10 minutes talking about isolated web apps, so let's actually use the damn things. And the way that we're going to do this is through the direct sockets permission, which this is the main feature we're going to abuse. So if you go read the explainer for direct sockets, it tells us that the use case for using direct sockets is when you want to speak to an SSH server, or RDP into something, or touch virtual desktop infrastructure, all of the things that we would want to do in an offensive context as a red teamer. This is perfect, it's like our shopping list. So the first thing you might think, or what I tried to do was, oh great, I'll turn Chrome into a version of Responder that listens for NTLM hashes and we'll just start jacking creds and that'll be super cool. And then I realized that the isolated web app API implementations are a little more janky than that, and you have to read the spec carefully. So for example, when I try to listen on port 135, I find out that it has to be over port 3276, or 678. And I don't know why that is, but it doesn't really matter, because we can still make arbitrary connections outwards, and that's just as important. So once again, your first reaction might be, oh great, I'm gonna write like an SMB client, and an RDP client, an SSH client, but then it's like, uh, just slow down and write a SOCKS proxy, and then connect through that through all of your local hosts. It's a lot less implementation work, it's a lot less complicated, and it's much more straightforward. So that's what we're gonna do. We're going to write a SOCKS server, and then we just need to like overcome that, that isolation issue, where isolated web apps aren't supposed to talk with anyone else. But because we can make SOCKET servers, we just write a SOCKET server in JavaScript, and have our Chrome extension connect back to it. This is the, that building out of that microservices nightmare I was talking about earlier. So, by their powers combined, we're, we're just done. That's it, that's all you need to do. And uh, yeah, right, this is the part where this talk would be two hours if I didn't do this, I'm sorry. So, lucky for you, we've got the blowtorch capability. Uh, I've named it this because this is the most overkill part of the project, really. Uh, this gives us full SOCKS proxying out of the browser, so if we wanted to replicate what Cursed Chrome does, we would dump the cookies from the target browser, uh, using Hot Wheels, and then import that into our browser, which is locally on the attacker machine, and then we just pointed at our SOCKS proxy, and now we've replicated the same features you would have in Cursed Chrome. Except now we can RDP into things, and that's pretty cool. Which brings us to the final part of the plan. We also need to solve this tricky bit with web authentication and clicking buttons. And when I say this, what I'm talking about is, like, maybe you're more familiar with Fido or U2F or, you know, pass keys or whatever, but essentially there is a device or a piece of software on your machine that stores a key, and in order to sign a request, the user needs to interact with something, say like a little button that you press on the side of your machine. And there's even a few other security components to it, like you can only run it from, uh, the website that you request the web authentication request on. It's got the same origin protect, uh, policy protections, and, uh, even if they were different, then, uh, you know, the user would get an indication. So my first thought was, well, in 2018, someone gave a DEF CON talk about abusing web USB to do this, and isolated web apps have this really cool thing called unrestricted web USB. Why don't I just use that? And, um, unfortunately, I couldn't get it to work. I don't know if that's a side effect of it being new, or they knew, let's make it unrestricted except for the bad stuff. Could be a skill issue. I, I don't know. But the answer was, isolated web apps are cool, but we still got Chrome extensions, so let's try taking advantage of it through that. So the first thing that we want to do is break that same origin policy restriction. And we have JavaScript running in literally every tab, so what we can do is pick a tab and then open an iframe for the site we actually want to run. And then our injected content script can watch for some sort of, like, query token that triggers the web authentication request. So that ends up looking like this. You know, here we're on, like, demo.ubico.com, and now it's made a web authentication request to our key for octa.com. That's cool. But also, a user might notice this, and that's not great. I mean, I think plenty of users would miss this, to be honest, but, you know, let's be thorough. And to take advantage of this, uh, there's another question we need to answer, which is, if you trigger multiple web authentication requests in Chrome, and you do it in different tabs, what's the order that it's resolved? And here's where I was a little surprised. So say we've opened octa.com in one tab, and then we go to a new tab and open, you know, something different. And then when you, your YubiKey's flashing, you press the button, it actually resolves the first tab that you press, not the active tab. So from your perspective, you've just pressed your YubiKey and it didn't work, so you press it again, and now it works. But you don't realize that you've actually signed two requests instead of one. And this makes sense, you know, the YubiKey has no, uh, awareness of what's going on within Chrome, it just knows I got a request for octa, and then I got a request for Yubico. So, I, I don't really know exactly who would be the responsible party for fixing this, it's a reasonable way to do it. But what we're gonna do, it doesn't matter who needs to fix it, we're gonna abuse it, is we're going to hook that navigator dot credentials dot get function, so that whenever they normally would have to click their YubiKey, we're going to then find an inactive tab and trigger another web authentication request for our actual target, and then they'll click the button twice and trigger it. And the only indication they're gonna get in the UI component is a little dot on that icon there, which says there's a notification running on this tab. And if they've opened way too many tabs, they're not even gonna get that. So I think that it's reasonable to expect that this will probably work on just about any user. So, you know, the final attack chain, because these web authentication requests also expire, is you write a script that like logs in every five minutes and gets a challenge, you push that down to your infected browser, and then you just wait. We play this waiting game until they click the button and then we win. Alternatively, if you don't care about being sneaky, you could also be really obnoxious and just trigger it to open the request on every single tab the user's in until they click the button, that would also probably work. But, you know, ultimately we're looking to be sneaky and not too blatant. So, this is the paint bucket capability within uh, within the Chrome alone framework. And uh, the reason it's paint bucket is the first one might miss you, but the second one will definitely get you in the head. So, we can secretly coerce our target into answering whatever web authentication challenges we want and uh, and we're good. So the final thing we need to do is just, you know, RDP into the target. We've already talked about socks. Let's see what this actually looks like. So what we're looking at is a clean install. This is just a normal Chrome browser, nothing else fancy is going on and we're going to say we just coerced the user into running our script. So, they run our script and this is actually pretty quick how it happens. What's going to happen is it's going to very quickly close the browser and restart it. We've side loaded our extension. That's it. The user normally wouldn't see this as well. They might see Chrome flash. In the background, we've now launched a separate instance of Chrome that's running an isolated web application and we need to kill that and restart it a few times because Chrome. But uh, ultimately, in the background, there is now a second instance running on a separate desktop that's running our isolated web app that's handling all the socks proxying for us. So, the biggest giveaway for this is if you take a look at the command argument for it, you can see it's been hardcoded to run, you know, whatever our app ID is. But that's about it. That's all you see. So, now we're going to pop over to our C2 and there's a separate component within the repository called battle plan. This is just uh, like the, the Node.js server that we're going to push to AWS and a nice little uh, vibe coded uh, you know, web UI that's going to help us interact with it. So, obviously, the first thing we should do with all installed implants is pop calc. That's the way that you prove you've got shell access. So, we have an interactive shell. In this case, we're just going to run, you know, command dot exe with uh, calc. We can take a look at the user's machine. There we go. We've got calc. You could shell out. But that's not why we're here. This is really blatant. We're actually here for creds. So, what does that actually look like? So, say that they've gone to GitHub. They're typing their credentials in. They hit enter. Obviously, those creds don't exist. But it doesn't matter. We still capture the data. Every time that that's sent, it gets pushed back to our C2 and we capture it. So, now let's actually capture the creds we care about. This user is Harry. He's a cool guy. He's got a password he uses for everything. He's entering it in. And uh, let's see if we caught that. We don't worry about web authentication yet. That's coming soon. And uh , we can see it's wet bandits forever. Harry's a really cool guy. And now we've got his pa - his password. So, let's see if it works. We know that we've got, we've got this internal vault website that we normally can't access. So, we're going to force a socks proxy through his browser. And now, of course, we get internal DNS and all of the goodies that come with that. So, here's our vault instance. And let's try to log in as Harry. So, into Okta we go. You get to see how slow I type. How fast can I type wet bandits forever? Let's find out. Super fast. But also, once again, oh no, MFA. I guess it's game over. But it's not because we got a small Python script we've written. This is also in the demo repository. And what this is going to do is it's going to take those creds. It's going to hit Okta. And it's going to get that challenge. And we're going to push that challenge down to the user's browser. So, we're just waiting for a response right now. The user, meanwhile, goes to a totally different page and authenticates. And you might notice, in that background tab, we've got that notification. So, the user doesn't see it though. And they're clicking their Yubi key. I literally had to click the button like four times during this because it's so easy to misclick these things. So, no one thinks anything about clicking the button. But we've completed the entire login process and now we've got a client token to log into Vault. The user never visited Vault, but it doesn't matter. We've still got their challenge. And now we can just log directly into it. Uh, in Vault's case, there's a token, but obviously you would adapt this for whatever your target is. There's a shared key. Uh, there's this secret called SilverTuna. That's for all the Home Alone heads out there. I'm sure all five of you recognize it. Um, and then we've got the final credentials that we need to hit our objective. Uh, this is just a standard game of Active Directory, uh, login credential. We're going to force, uh, a Socks proxy to tunnel our RDP access along with all of those credentials to connect to the final target . So, here we're connecting, we're giving it the domain of Seven Kingdoms. And we're giving the super secret password a password. And then that's gonna get us, uh, an RDP connection into our domain controller. So, we're pretty much there. Uh, and just to demonstrate, this is going up to AWS and then tunneled through the browser's, uh, Socks proxy. But it's still very responsive. RDP's totally usable. SSH is totally usable. We can go onto the desktop and we can dump out the contents of our final flag. And boom. There we go. We've won. That's it. So, obviously this isn't a perfect technique. First of all, you need to be writing a script to automate, uh, that final pushing component for the, uh, the web authentication piece. But, uh, you know, hard things aren't free. It's also worth noting that Edge and Chrome are not perfectly identical implementations. So, for example, WebUSB within Edge, uh, the unrestricted permission, it doesn't exist. Obviously it doesn't really matter for us because we couldn't make it work. But I would expect those two browsers to sort of fork in the future. So, there might be some features that only Edge can handle versus Chrome. Uh, isolated web apps until very recently, they wouldn't even load in Edge. If you tried to load them, it just opened the window a hundred thousand times until it crashed your machine. But, uh, like two weeks ago I was just double checking and they work now. So, uh, look for Edge to become a valid infection vector in the near future for this repo as well. It is worth calling out that isolated web apps are constantly changing. They're still very new in the scheme of things for any product within Chrome. I would be unsurprised if suddenly it became a little more challenging to sideload isolated web apps in the future. Maybe they'll lock down those keys to only a couple of users. Uh, I would be surprised if they did that though because then I don't know how anyone would ever actually develop an isolated web app. So, they would have just created this functionality for no one to use. So, I don't really expect that's gonna be the case. The bigger thing I expect to watch for is them adding more dangerous APIs for us to run with and I'm very interested in that. The only other limitation right now is doorknobs implementation is Windows and Chrome only. So, if you go to that GitHub repo, you'll only find that implementation. But, you know, watch this space. If you're a defender and you're wondering how on earth would I stop this, I've got good news and bad news for you. The good news is Chrome extensions are very straightforward to block. There's a policy item that you can set. It's very easy to do. You can do this in Windows or Mac OS. You essentially just say, don't allow Chrome extensions to be installed if I haven't whitelisted them. That's done by two policies. Extension install block list and extension install allow list. And when our clients do this, we cannot install malicious extensions. You can't sideload them, you can't convince them to install it through the store. Very effective. So, you should absolutely do that. When it comes to isolated web apps though, it's too new. There is no policy for this yet. So, there's nothing that you can set. There's technically some policies you can set for specific permissions on like, if you're running Chrome OS, but most people here probably aren't doing that, so I don't think that's a sufficient fix. So, we're going to have to go to secondary indicators of compromise instead. So , you're going to watch for when applications that aren't Chrome start editing the secure preferences file, the preferences file, your local state object or your level DB files. Those are all things that no one should touch but Chrome. Ditto with any of the registry keys or files on disk. Is there anything to stop someone from injecting into Chrome and then doing exactly this? No, but we need every tool that we have in order to try to stop people from running with this. And with that in mind, thank you so much. If you would like to get access to this, I'll take claps, whatever, I've got five minutes, clap as long as you want. All the codes available online right now, unless something horrible has happened, theoretically that QR code is there. If you have any questions, or you have any examples of success stories using this tool, please hit me up. It motivates me to live. It is wonderful. I love watching people own stuff with this. So, hit me up, I'm Bouncy Hat on Twitter and Mastodon on the InfoSec Exchange Mastodon. Thank you so much and have a wonderful DEF CON.