Stealing private documents through a bug in Google Docs
savebreach.com
savebreach.com
His customers used Google AdSense, who started blocking them until they removed the widget. The reason? This widget used an Iframe postMessage, but appropriately specified the singular sandboxed domain. As expected, we never were able to speak with a human at Google- they just sent my clients customers intimidating emails about a security flaw on their websites.
Seeing Google abuse the postMessage API with a wildcard argument after this fiasco is maddening! If only they were held to their own arbitrary and vague standards.
There's a exploit demo here[1]. If the exploit worked in Chrome or Firefox as well as Chromodo, that would clearly indicate the problem is with the website, not with Chromodo. I find it hard to believe that no one at Google or Comodo would test the exploit page in Chrome or Firefox. There's discussion on the original bug and here[2] that Comodo did push out a fix, and it sure sounds like that was a fix to Chromodo.
Secondly, looking at the exploit demo, it looks like it does 2 postMessage()s, once in each direction, both using execCode. If it was a vulnerability purely in https://ssl.comodo.com the 2nd postMessage() looks like it would fail, because there isn't any code around to receive it.
Thirdly, looking at the exploit demo, it has a text box with which you can specify which site you want to attack. So you could change that to https://google.com or https://news.ycombinator.com . If the exploit only worked against a single site, it wouldn't make sense to provide a text box allowing you to change which site to attack.
Taviso's description is a bit misleading. It doesn't sound like the action that Comodo took is to directly disable the same origin policy, but rather to provide an API with which attackers can bypass the same origin policy. From a security perspective that does effectively disable the same origin policy, but from an attack understanding point of view, it's a bit different.
Full disclosure, I work at Google, but not on Project Zero.
[1] https://bugs.chromium.org/p/project-zero/issues/attachmentTe...
[2] https://bugs.chromium.org/p/project-zero/issues/detail?id=71...
I believe it's neither of these - I think the claim being made is that Chromodo installs a custom event listener for MessageEvents in all websites, which exposes a handful of APIs, including "execCode" and "callOuterFunction". If you look at the sample exploit (https://bugs.chromium.org/p/project-zero/issues/attachmentTe...), while it defaults to ssl.comodo.com, you can specify an arbitrary website.
(Also, if this were indeed a website bug, this would have been reproducible in normal browsers.)
We would need to find a vulnerable version of the Chromodo browser to confirm this.
It’s almost as bad as Apple’s reward program
Or most/all bug bounty programs, actually.
What would you suggest, a bounty calculated via a multiple of company stock price?
Are you sure this impacted multiple products? Reading the article the main reason he was able to exploit this for Google docs was the X-Frame-Options header. It's not clear that other products have this.
All three of those conditions are independently rare. The equivalent conditions are rare in all CJ bugs, which is a reason CJs are sort of a running joke in appsec. This bug isn't a joke (look at the target and the impact), but condition (3) is also way more unlikely than the median CJ report somewhere else.
If I understand the bug correctly --- maybe I don't --- this researcher got what might perhaps be the largest bounty ever paid for a CJ bug.
So for this to work you need to know the document ID, and also the person who owns this document. You then need to trick them into looking at their document on your domain, and then from there, need to persuade them somehow to press the send feedback button.
I'd also note that the feedback button is a button that I suspect very very few people ever press. I certainly never have. I also don't know the IDs to any documents I might find interesting but can't read, and if I find a document via some random google search that I can't look at, I generally have no way of knowing how to contact the owner so I can try to send them phishing emails to get them to look at their document on a non-google URL.
There's been a bunch of cases where google has paid out very substantial bounties, and given the extreme difficulty of both meeting the attack prereqs and then managing to pull off a very sketchy exploit process at the same time I think the sum paid is more than fair.
These exploits are often not so interesting as written and with current normal setups, but eventually become more interesting if never fixed.
1. You need to know the document ID you're targeting (Stack Exchange once worked the ID out to ~256 bits).
2. You have to get the victim to interact with a Google doc on a site that you control (you need to re-dress the Google Docs interface, get the victim to your site, and then have them treat your site as if it was Google Docs).
3. You need to get the victim to use the Google feedback feature in order to trigger the vulnerable postMessage.
What's a scenario in which an attacker gets these stars to align? (I'm sure there is one).
1. I go to a job interview at a company that uses a chromebook with a restricted account. The interviewer sits next to me as I go through the process.
2. As we go through the steps in a google document, I need something from my resume on my website. I fumble with the URL bar slightly which hopefully has the doc ID, possibly because I once closed the document "by accident" and brought it back up.
3. While discussing whatever brought us to my website, I click on something but act like I am switching tabs.
4. At the end of the process in their document, I point out how strange the Google Docs looks now and press the feedback button to show my corporate soft skills.
5. The companies hiring interview document is now floating around my school and in 10 years half of their engineering is my Alma Mater.
$3.3k is about a week's worth of time for a poorly-paid developer before overhead.
It's not reasonable. At those rates, the only people who will be able to afford to be paid to do security work on Google products will be ones who sell on the gray/black market. The whole point of bounties was to give a path without the need for that.
They could have also offered nothing, which was common up until a decade ago or so. Moreover there isn't a market for security bugs like this, so it's not like Google is underpaying relative to some independent valuation.
The only reason to pay more is out of some ethos that the reporter "deserves" more, but that's not how business works. The value Google obtains by finding any given vulnerability approaches 0. This is why, among other reasons, good product security teams spend most of their time doing things other than searching for vulnerabilities in existing code.
window.frames[0].frame[0][2].location="https://geekycat.in/exploit.html";
It's expected to me that you can change `window.frames[0].location`, since you can also change the "src" attribute of the iframe element. But you can't change the "src" attribute of an iframe inside that iframe, if it's not same-origin - so why can you change its location?Maybe we should look into whether changing this would break any websites.
window.frames[0].frames[2].location = "https://example.com";
Even if `window.frames[0]` is cross-origin.https://html.spec.whatwg.org/multipage/browsers.html#crossor...
Check this out https://youtu.be/KpkrTUHoWsQ (video about URL validation bypass and SOP)
document.getElementsByTagName('iframe')[0].contentDocument.getElementsByTagName('iframe')[0].src = "https://geekycat.in/exploit.html";
For obvious reasons (you can't access the DOM of a cross-origin iframe). So it's surprising that this works: window.frames[0].frames[0].location = "https://geekycat.in/exploit.html";This is actually quite difficult to protect against while keeping functionality intact (not granting allow-scripts to iframes would do it, but also obviously disable JavaScript).
The emerging https://github.com/dtapuska/documentaccess standard would be a defense-in-depth against this attack.
That said, this is one of those things that might be best relegated to the "Phase 0" APIs now that there is a better way to do things (e. g. postMessage).
Hats off to you, no idea why you wouldn't just sell this off considering how poorly your honesty is rewarded.
Google's SaaS apps aren't specifically in scope, but I'm not seeing exclusions, and I'm seeing potential parallel programs ("sensitive information disclosure: - MS Office (Word/Excel)") that could imply that they'd be comfortable buying SaaS Productivity Suite exploits as well.
I'm not OP. I'm only presenting this to counter the assertion that there's no market.
Wouldn't it be immoral if not straight up illegal?
Should it be illegal? Yeah, potentially. Is it? Unclear.
Conspiracy convictions usually require proof that the suspect had created a plan to commit a serious crime and has taken active steps towards the execution of that plan, even if they haven't committed the actual crime yet.
We're already perilously close to US Federal Prosecutors being able to lock up anybody they don't like indefinitely. It's so exorbitantly expensive to fight Federal charges that hardly anybody really does, much less does successfully. The last thing we need is more vague Federal criminal laws with poorly thought out evidence and mens rea requirements.
1. Principle - Some people are raised with really high morals and don't optimize for money. Depending on their own conscience, they wouldn't be able to sleep at night.
2. Obeying the law - Although one can easily make more money by using or selling these exploits, it can be a very dark path to dig yourself in. And depending on where you live the risk for life ruining litigation is very high too.
3. Brand reputation / Brand building / Professionalism - one can see that they can make more money for their own by building a solid portfolio of their achievements, and these bounties are a really strong signal when corporations look for security consulting. It also builds a good reputation which is really hard to build when doing white hat hacking for a living.
Not saying they aren't good people, they are just undervaluing their work.
My point is that there's more to it than just that. Aside from the subjective point 1 in my comment, I think points 2 and 3 are very objective and don't really depend on the pay of the bounty.
If they find the bug and try to sell it on the dark/grey market, you risk litigation. If they are smart they can derive more value from it than just the bounty, although the bounty being bigger would be nice and would encourage more white hat hackers to invest their time on these programs.
That's the most dystopian thing I've heard in a while.
Also left unsaid is that these are products that people's grandparents use. So there is some very white-hat "help the public good" here. Even if it's also to the for-profit benefit of a mega corp. That's an issue for anti-trust courts, not people trying to make the world better (people use these products right now, that's the status quo; either it can be fixed now, or it can be part of a likely ineffectual protest that only harms others).
> trying to make the world better
Indicating that Google the company doesn't care about such things
(Although most individuals working there do)
How do police departments crack open phones?
Does this mean they are breaking the law by buying these exploits?
One example: At times it seems there are more dogs in my neighborhood than humans, yet, I thankfully seldom see dog poop left on the ground.
But from the description, it doesn't sound like this vulnerability has much practical use. If you can convince someone to do all the things necessary to tee this up, you can probably just convince them to email you their password.
This also does not build your career.
Saying
>Hats off to you, no idea why you wouldn't just sell this off considering how poorly your honesty is rewarded.
Is just naïve.
3.3k for doing nothing but disclose is incredibly generous, especially for this where vector is incredibly targeted and needs private information to begin with (doc ID).
Aside from the ethical considerations you'd have to navigate, there isn't a market for vulns like this outside of bug bounties.
People on HN always cite Zerodium or whatever but don't realize those markets exist for vulns with a long half life. The expected return on a vuln which exists in one website is quite bad.
What I'm trying to ask is: does this make the hiring process easier?
Disclosure: I work at Google on their security team and reported a number of bugs to their VRP before I got hired.
Start dropping zero days on twitter if you really want to get hired:
https://nakedsecurity.sophos.com/2019/06/13/microsofts-battl...
wah wah bad person publishing zero days wah wah Irresponsible disclosure hurts everyone. wah wah
reality: https://krebsonsecurity.com/2020/04/microsoft-patch-tuesday-... got hired @Microsoft, started fixing other bugs they didnt know they had
These companies give two craps about security.
Anyway, in the past I found a way to takeover an organization account in Google cloud acquisition and they rewarded me $100, saying their "Panel" decided that, Google's VRP panel sucks, so you're right about that.
You may have some impact on your career and be judged by your peers or perhaps brought to civil court for damages, but if done right it’s totally legal to sell exploits.
In comparison, Apple paid 100k [0] for a full account takeover, using an bug so simple that it is unbelievable that it could have passed a code review and testing.
[0]- https://bhavukjain.com/blog/2020/05/30/zeroday-signin-with-a...
Apple's payout seems rather low to me. If I had a vuln like that and knew they were only paying $100k, I would probably seek to monetize it elsewhere.
$3k is almost insulting for something like this, given Google's scale. $31,337 might be more appropriate to at least avoid insult.
Requiring rare user action and document URL? Sure. Live in your bounty bubble.
> If I had a vuln like that and knew they were only paying $100k, I would probably seek to monetize it elsewhere.
But you don't. The person exploiting it knows how much it is worth.
> $3k is almost insulting for something like this
Not for you to decide. He accepted it, meaning it's not insulting.
It's a pretty odd amount too. I'm curious how they arrive at that number.
Example bounty amounts - $1337, $3133.7, $13337 and $31337
EDIT: yep, looks like I missed all the other comments pointing this out, mobile app didn’t load them for some reason. Leaving the comment anyway.
I vividly remember BBS and IRC handles with variations of 31337 in them in the 80s. I'm sure it goes back even farther.
It only a possibility but usually once you have the XSS puzzle piece, getting the data may be as trivial as some JS code
It also requires that the user know the document ID- so they would have to identify a document that they want access to, get the ID of that document, embed the document in a website that they can present to a user that DOES have access to that document (which they would be unable to know from the document itself, because the ACLs are only visible to people with view access), and then get them to click submit feedback.
I'll defer to others with more familiarity with bug bounties about the payout appropriateness, not my area of expertise, but it does seem like this would be a very difficult bug to exploit
It’s really sad that Keybase failed at building a business around this. Hopefully someone else is going to make another attempt.
Keybase as it's core was that it's a key directory that's publicly auditable. Everyone could verify the chain of verification of each other in Keybase. On top of that infrastructure, files and chat was added.
Peergos doesn't seem to show any chains or in fact auditable information at all. You can add/remove friends that is supposedly cryptographically verified, but there is no information about it, nor is there any information about where the data is actually stored, how you can get it to your local machine, how to re-verify the claims, how to add devices that have access.
You can also verify keys in person using the same protocol as Signal (via QR codes or number groups).
There are no private keys stored on any devices, so adding devices is not a thing. It is a pure capability based system.
Unlike keybase, we are fully open source and self-hostable.
There are a lot more details in our booklet- https://book.peergos.org
They should rename end-to-end encryption to client-side encryption or something else because it is not very clear what it means
Having native, non-web app would help here, but I don't think this is ever going to happen.
The problem is that encryption adds an extra layer of complexity.