Side-channel attacking browsers through CSS3 features
evonide.com
evonide.com
Habalov reported the bug to Google and Mozilla engineers,
who fixed the issue in Chrome 63 and Firefox 60.
"The bug was addressed by vectorizing the blend mode
computations," Habalov said. Safari's implementation
of CSS3 mix-blend-mode was not affected as the blend
mode operations were already vectorized.Habalov reported the bug to Google and Mozilla engineers, who fixed the issue in Chrome 63 and Firefox 60.
"The bug was addressed by vectorizing the blend mode computations," Habalov said. Safari's implementation of CSS3 mix-blend-mode was not affected as the blend mode operations were already vectorized.
> I agree and it's annoying. Is there an easy way to fix that?
Readable on mobile, and makes clear what is/isn't a quote.
And here is a demo: http://lcamtuf.coredump.cx/whack/
It has limitations which make it slightly impractical to check against a large number of sites but it's still surprising to see this hasn't been fixed.
The GDPR being deliberately vague is a response to issues like these, it serves neither the interests of the users or the regulation to say "Get consent before getting cookies and only cookies" only to have sites and services turn around and use methods like this, or:
BrowserFingerprinting - https://panopticlick.eff.org/
Super/Ever Cookies - https://github.com/samyk/evercookie
HSTS identification - https://www.owasp.org/index.php/HTTP_Strict_Transport_Securi...
or whatever the new sneaky identification via browser features hack happens to be.
It's the FB, Twitter, and other "like" and "share" buttons that are the problem.
Because the minute you throw down a technical rule it's trivial to route around it. Case in point: say you allowed only 1st party cookies (as defined by cross domain browser behavior and cookie setting). I could setup a CNAME for analytics.my-domain.com that points to FB's ad retargeting servers and they could include in the actual cookie data my id, ip or whatever else they'd need to lookup a user's information across domains.
Same with IPs: every GDPR discussion devolves into someone saying: "Well every site uses IPs! We have them in our logs, etc.! It's stupid to say that they're personal data" Which is how I thought of them until getting a glimpse into some of the ad networks/bidding where they are treated as more or less a currency for targeting, demographics, etc.
With GDPR it's not the data it's what done with the data.
What GDPR should say: things like "do not allow third-parties to track your users" or "warn users about third-party tracking". That would be exceedingly clear and actionable.
Now, "do not allow third-parties to track your users" might require some additional regarding implementation via contractual clauses. For example, if site A uses resources from site B and has a contract with B stipulating non-tracking of A's users, is that good enough? What if B is outside the EU? And so on. But aside from such side issues, "do not allow third-parties to track your users" is trivial to implement: a) only embed resources from third-parties that agree not to track your users, b) do not embed resources from any other third-parties.
"Warn users about third-party tracking" is even easier to implement: if you embed resources from third parties, you must warn.
> With GDPR it's not the data it's what done with the data.
Good! You can use contracts to manage this with all the third-parties you deal with.
Now, what about links to [non-embedded] external resources? We must not kill the web.
Here is a "plain english" translation of the GDPR that makes much of this more evident:
https://blog.varonis.com/gdpr-requirements-list-in-plain-eng...
If you dig into it, I think you'll find it lines up nicely with what you are suggesting.
My point was that it could be combined with the other tracking means (say a browser fingerprint or HSTS fingerprint or both) and that value be transferred in a "first party" domain that was really just a CNAME'd third party server -> and you have a solution that would meet the requirement to "only set 1st party cookies" but would miss the intent of the regulation.
Ideally cross-origin framing would have been disallowed by default but frames were added to the spec before people spent a lot of time thinking about the same-origin-policy implications.
[0]: https://www.contextis.com/resources/white-papers/pixel-perfe... [1]: http://blog.saynotolinux.com/blog/2014/02/05/whats-that-smel...
Click jacking is generally avoided by the `X-FRAME-OPTIONS` header or the CSP frame-ancestors option.
Having said that, I see no reason to support Like buttons OR modals and I would be fine with millions of sites being forced never to use them. We know Facebook Like buttons are over-engineered trackers whose domains are best blocked at your router. And when modals are not being abused for things users don’t want, the remaining “good” uses for modals would still be better implemented as less-intrusive and more-asynchronous things (display a modeless background message with buttons, for example).
That sounds great; are there any other side benefits available?
But we need a way to tell a browser "if you embed this page into an iframe, it needs to be the topmost content, no transform/translate/visibility or anything". Social/login iframe would set that flag, and it would prevent the clickjacks and attacks like this.
Still no up-front browser setting for disabling them. I wonder why...
I really suspect there's only one fix, and it seems reasonable to me: don't allow sites to place content over iframes, period. Allowing it opens all kinds of exploits like this and various flavors of clickjacking, all basically un-preventable since there's no limit to the techniques possible.
The issue is the ability to interact in any way with cross site resources which contain any kind of potentially sensitive information. This leads to things like clickjacking attacks, CSRF, information leaks like this, and so on.
The things that could be done to fix it:
1. Don't allow any kind of cross-site embedding (yeah, this isn't going to happen) 2. Treat any kind of cross-site embedding like private browsing mode; don't ever send any credentials along with it 3. Don't allow the embedding site to interact in any way with embedded content. Treat it like an entirely separate, opaque layer above everything else, not subject to layering anything over it
Of course, I don't think any of these are actually going to happen, because they'd break too much. But otherwise, it's going to be a game of whack-a-mole with information leaks, new kinds of clickjacking and CSRF, and so on.
I'm actually surprised to hear that this is not the fix here. Instead, they optimized the rendering code, which might not preclude more sophisticated attacks on that side channel.
[0]: https://dankaminsky.com/2015/08/09/defcon-23-lets-end-clickj...
Or one could write an extension that sets sandbox attributes on iframes. I'm not sure if one exists yet.
I wonder why they are fixing it now, when they didn't do anything for over a year
That is still more than zero delay, but a bit more reasonable.
2018-05-15 Fixed with Firefox Quantum version 60.0" That's 9 months for Chrome and more than a year for FF Quantum?
So I think "more than a year" is a little unfair to Mozilla.
> It was quite surprising for us to find out that the blend mode layers were able to interact with cross-origin iframes in the first place so we investigated this further.
Because a few years ago I was wondering the same thing; Someone figured out a side-channel timing attack using SVG filters, exploiting differing execution times of code paths in the Erode filter (probably also in the Dilate filter but they only needed one). IIRC, they could even apply it to an iframe with a source:// URL of another domain (probably FB again), of which they could control the scrollbars and scroll into view the session key that showed up in the HTML source somewhere. This raised a couple of questions with me ...
Why can we put a source:// URL in an iframe at all? Why can we control the scrolled position of content in a cross-domain iframe? And why are SVG filters capable of processing cross-domain content instead of just seeing a black square or something?
AFAIK they fixed it by changing the filters, making sure all code-paths were of equal length. Which is part of the right solution because side-channel attacks can come from anywhere (it's kind of their thing). But making the whole system more robust by just not allowing operations on cross-domain content would do a whole lot for plugging many of these bugs.
I'm kinda surprised there haven't been a lot more of these. Could be I've missed them though.
I wonder how this is the case?
Anyway, lots of interesting vulnerabilities of late that utilize the measurable time of computations, and use it to reconstruct data. I think that type of "lossy attack" is so cool and creative.
[1] https://www.evonide.com/side-channel-attacking-browsers-thro...
They're worried that someone could write a shader that would detect sensitive info (like a credit card number) and jank the render thread in an observable way to leak the number to a script running in the parent window.
Compartmentalization among multiple machines is better. Maybe sandboxing aka light virtualization can be adequate. But I'd rather go with at least full virtualization. And when it really matters, I use multiple hosts, with network isolation.