9 ms·
Escaping the Chrome Sandbox Through DevTools
- forkerenok 2y agoThat's a neat vulnerability chain and a great writeup. Appreciated the breakdown of the vulnerable code as well! I'm always impressed by the simplicity of tricks like "Press F12 to try again", this is just so naughty :)
- lenerdenator 2y agoI live in Missouri; I pressed F12 once and the governor tried to get me arrested.
- Glant 2y agoFor those not in the know: https://techcrunch.com/2021/10/15/f12-isnt-hacking-missouri-governor-threatens-to-prosecute-local-journalist-for-finding-exposed-state-data/ https://techcrunch.com/2021/10/15/f12-isnt-hacking-missouri-...
- deleted 2y ago[deleted]
- Etheryte 2y agoGiven the severity, I can't help but feel that this is underpaid at the scale Google is at. Chrome is so ubiquitous and vulnerabilities like these could hit hard. Last thing they need to do is to send the signal that it's better to sell these on the black market.
- TheDong 2y agoIf you can trick someone into installing a malicious extension with arbitrary permissions, you can already run arbitrary code on every webpage they visit, including their logged in bank, social media, etc. You think an attacker is right now thinking "Man, I know exactly how to make a lot of victims install an extension, but I can only steal their coinbase wallet and bank accounts, if only there was a way I could run calc.exe on their machine too..." who's going to pay more than $20k to upgrade from "steal all their money" to "steal all their money and run calc.exe"?
- grokkedit 2y agothat's not entirely true: if you look at the manifest on the github repo you can see that it only requires the `tab` permission, which, when installed, will make the extension seem quite safe, since it should not have access to the content of your pages
- beng-nl 2y agoI actually think escaping the browser is a huge leap and a frequently a primary goal for a black hat. Eg someone trying to install ransomware, or a spy targeting a specific person or org. From outside the browser they can exploit kernel bugs to elevate their privilege; and they can probe the network to attempt to move laterally in the org. So while I think your comment is thoughtful, its thoughtfulness made me think of agreeing with the opposite :-)
- webXL 2y agoCorrect me if I’m wrong, but remote code execution has the advantage of being able to access information without the user being involved at all. Sure the user needs to install and trigger the exploit, but whatever code the attacker runs doesn’t require the user to interact with certain urls. If you can launch arbitrary programs, you can probably install all sorts of nasty things that are potentially more lucrative than the victim’s bank or coinbase accounts.
- therein 2y agoIt breaks the assumption that Chrome is sandboxed and something I do as a user including installing an extension will not have an impact outside of Chrome. A new process outside Chrome to call your own and do whatever you want with. You're on Windows? Download a binary, create some WMI triggers and get executed at every boot as the same user (requires no elevation for same user, if Admin, you can get NT_AUTHORITY). If you find something to elevate to Administrator you could also patch the beginning of some rarely used syscall and then invoke it and get a thread to yourself in the kernel. These things tend to almost chain themselves sometimes. At least on Windows it feels that way. Also the user doesn't have to navigate to a specific URL in the final form, just needs to open devtools after installing the extension.
- thrdbndndn 2y agoI hate that every time a vulnerability is posted, someone has to argue about whether the bounty is high enough. It’s always followed by, "blah blah, they're pushing whitehats to sell it on the black market." Vulnerabilities will always sell for more on the black market because there’s an added cost for asking people to do immoral and likely illegal things. Comparing the two is meaningless. To give a straightforward answer: no, I don’t think $20k is underpaid. The severity of a bug isn't based on how it could theoretically affect people but on how it actually does. There's no evidence this is even in the wild, and based on the description, it seems complicated to exploit for attacks.
- n2d4 2y ago> The severity of a bug isn't based on how it could theoretically affect people but on how it actually does No, it's priced on demand and supply like anything else; bug bounties are priced to be the amount that Google thinks it takes to incentivise hunters to sell it to them, vs. to black hats.
- thrdbndndn 2y agoI actually don't believe so. Not everything is priced on demand and supply -- at least not strictly. Of course the potential of abuse is part of the equation, but I think Google (or similar large companies) simply has a guideline of how the amount of the bounty is decided, than surveying the market to see what its "actual value" is. It's not exactly a free market, at least not on Google's side.
- n2d4 2y agoI assure you that when Google set those bounties, they thought about how much they would have to pay white hats to make them do the right thing. Of course, it's a highly illiquid market (usually there's just one seller and only a handful of buyers), and so the pricing is super inefficient (hence based on guidelines and not surveying on every individual bug), but the logic remains.
- luismedel 2y ago
- grokkedit 2y agothey say: `This also means that, unfortunately, the bug will not work on stable builds of Google Chrome since the release channel is set to the proper value there` So it's only working on Chromium, a way smaller attack surface than the whole Chrome users
- Thorrez 2y agoSlight correction: it worked on Chromium and on Google Chrome canary.
- alkonaut 2y agoIf it had worked for Chrome it should (and maybe would) have been a lot higher. Also: doesn't it use an extension? I was under the impression that extensions were un-sandboxed and basically just executables I trust to run with the same privilege as the browser itself (which is a lot, at least under windows).
- Etheryte 2y agoNo, extensions are tied to the browser sandbox and they also have to specify their permissions beforehand. They can request fairly wide permissions inside the browser sandbox, yes, but they have to explicitly list the permissions they require in the manifest and the browser will ask you if you're fine with those before installing. Outside of the browser itself, the extensions can't do pretty much anything outside of sending messages to applications that explicitly register to receive them from them.
- londons_explore 2y ago"what percentage of grandmas would lose their life savings if they stumble across this bug" is the metric I use to determine severity. And in this case, it requires a chain of unlikely events. The user tricked into installing an extension (probably not one from the store, which is now particularly hard on windows). The user tricked into opening devtools. It's gonna be sub-1%. Certainly still worth fixing, but nowhere near as bad as a universal XSS bug.
- gardenmud 2y agoNot only that, but it doesn't work on Google Chrome releases, only the (upstream) Chromium, and Google Chrome canary. Very few people use raw Chromium all by its lonesome and I would guess only for testing/development, not downloading random extensions.
- TRiG_Ireland 2y agoI use Chromium, because I'm on Ubuntu. (Admittedly, I don't use it very often. I tend to be loyal to Firefox most of the time.)
- edent 2y ago> sell these on the black market. How? I always see this mentioned but it seem impractical to me. I've discovered bugs which have paid out a few thousand dollars - big corporates have well publicised schemes, but I've no idea how I would go about selling it to a criminal. Even if I did know where to find them - how would I trust them? Can I tell they're not really the police doing a sting? If they paid me, how would I explain my new wealth to the tax authorities? Once the criminal knows they've paid me, what's to stop them blackmailing me? Or otherwise threatening me? Oh, and I won't be able to publish a kudos-raising blog post about it. How much would a criminal have to pay me to take on that level of risk? Should Google pay out more for this? Probably. Is the average security researcher really going to take the risk of dealing with criminals in the hope that they pay a bit more? Unlikely.
- spyder 2y ago> How? Huh... First result in google for "selling exploits" shows it's not only criminals who are buying exploits: https://zerodium.com/program.html https://zerodium.com/program.html (up to $500K for Chrome RCE, but probably not for this since requires extension install) Another result is the Wikipedia article, which also talks about these gray markets: "Gray markets buyers include clients from the private sector, governments and brokers who resell vulnerabilities."
- rafram 2y agoZerodium sells to government intelligence agencies, so I guess it depends on your definition of “criminals.”
- scotty79 2y agoI think maintaining anonimity is the key. Ensuring getting paid is the next thing. I'm not sure how you can achieve this in practice.
- z3phyr 2y agoSell it to governments. Biggest good guys bad guys.
- faangguyindia 2y agoChrome needs to be rewritten in Rust asap
- z3phyr 2y agoMalwares are going to be written in rust; What difference does it make? Also Its not memory based vulnerability but policy based vulnerability.
- echoangle 2y agoBut at least the vulnerability would be blazingly fast
- gsck 2y agoNo it doesn't? This has nothing to do with memory safety. Its a logical error, which Rust physically cannot prevent.
- j0hnyl 2y agoDid you even read the post?
- kernal 2y agoThis had nothing to do with Chrome, but rather Chromium. >Considering that I'm using plain Chromium and not the branded Google Chrome, the channel will always be Channel::UNKNOWN. This also means that, unfortunately, the bug will not work on stable builds of Google Chrome since the release channel is set to the proper value there.
- billy99k 2y agoI've made lots of money with bug bounties over the years and mostly stopped this year in favor of private consulting. Companies will try anything to get out of paying, even through the major platforms. I once found a bug where I could access all of the names, addresses, emails, and phone numbers of all users for this new contest this company was running. I even found public announcements on Twitter. They told me this was a staging environment and wouldn't pay me. It clearly wasn't as the urls were linked directly to the announcement. Another time, a company had an application that allowed other companies to run internal corporate training. I was able to get access to all accounts, information, and private rooms of all fortune 500 companies using it. They initially tried to get out of it by telling me they didn't own the application anymore (and immediately removed it from scope). I had proof it was in scope at the time I found the bugs (and even confirmed it before-hand with the platform). Luckily, the platform I went through fought this and I got my payout...6 months later. Even now, I have 50+ bugs that were triaged over the past year and the companies just sit on them and won't respond or pay out. Major platforms like Hackerone and Bug crowd don't seem to protect their researchers at all.
- alt227 2y agoIf they make excuses, sit on it, or dont pay out, release those bugs into the public domain, thats how this system works!
- billy99k 2y agoWhile I would love to do that, I still enjoy making a living in security.
- alt227 2y agoIm genuinely interested here. If you made some security bugs public due to the company not cooperating properly, would that damage your reputation in the community to the point it would jeopardise your career opportunities? From the outside looking in, it seems that the community would applaud that behavoir, but I am not familier.
- deleted 2y ago[deleted]
- EDEdDNEdDYFaN 2y agoreally sick writeup, felt like a thriller novel
- purple-leafy 2y agoGod damn that is one of the best things I’ve ever read. Super clever sleuthing
- throwawayian 2y agoAwesome vuln chain.
- est 2y agoChromium project decides to remove chrome://net-internals because the page is too complex ... and adding chrome://policy with half baked JSON edit support.
- deleted 2y ago[deleted]
- AlexDragusin 2y agoExcellent writeup and work, reading this made me be right there along with you in the excitement buildup thoughout the discoveries. Thank you! Well deserved reward!
- deleted 2y ago[deleted]
- noduerme 2y agoOof. Too late in my night to dive into the guts of what's broken in WebUI validation, but good on this person for persisting and figuring it out. It's pretty standard to question and distrust toolchains in the things we deploy, but at the same time we put way too much trust in magically convenient dev tools from large companies like Google or MS. Mostly because we want to get on with writing and testing our own code, not worry about whatever the fuck is lurking in Chromium or VSCode.
- deleted 2y ago[deleted]
- rs_rs_rs_rs_rs 2y ago>I'm Allen, a high school student with an interest in programming, web development, and cybersecurity. Very impressive!
- albert_e 2y agoOh boy What an amazing technical talent, sheer persistence, and excellent documentation and communication skills. Not to mention the work ethic of responsible disclosure. This person is going places!
- bossyTeacher 2y agoIs it bad for Chrome to have vulnerabilities? I think long-term is really good. People need to get away from the browser monopoly (because it really is only Chrome here holding the power) and support the ecosystem
- diggan 2y ago> Is it bad for Chrome to have vulnerabilities? Yes, obviously it is. Is it bad for others/the public? Probably, but not as bad as it is for Chrome. > because it really is only Chrome here holding the power I'm not sure this is true. Apple pretty much forces usage of their browser engine on iOS, and heavily try to get people to use Safari on macOS. Windows push Edge pretty hard on their OS, and their browser engine is pretty much intertwined to the OS so you can't not use it. Both of them say they let you change the default, but various links in the OS would still open Edge/Safari even if you have the default browser changed. Not sure if that's on purpose or not.
- dylan604 2y ago> and heavily try to get people to use Safari on macOS how so? on any new macOS install, I use Safari to download Firefox. After that, I never think about Safari until I'm trying to use its DevTools to look at iDevices. I never get a nag screen about Safari. I have never had default browser changed after any updates. so where exactly is this heavy handed attempt at forcing Safari down anyone's throat?
- diggan 2y agoI'm not on a macOS machine right now, so can't show you any specific examples, but scattered links/actions across Apple applications still open Safari from time to time (I think Xcode was especially gnarly for a long time), as it seems at one point Apple hardwired the links/actions to open Safari rather than the user set browser. Search for `site:discussions.apple.com wrong browser` in your favorite search engine and you'll get some actual examples.
- 2y ago
- bschne 2y ago> You may have noticed that the page URL gets substituted into ${url}, and so to prevent this from messing up the command, we can simply put it behind a # which makes it a comment Is there some validation logic or something on this policy that the URL must be passed to the "alternative browser" somewhere in the AlternativeBrowserParameters?
- igtztorrero 2y agoWow, wow and wow for a High school student.
- Sephr 2y agoReminds me of when I used this same API to debug Chrome OS's "crosh" shell and escape OS protections, also obtaining root access on developer devices. (CVE-2014-3172) The author of this post had to bypass much more challenging obstacles. This is great work!
- changexd 2y agoThanks for the writeup, very interesting and detailed! and the effort of digging through the browser code to find all this is fantastic!