Live data from Hacker News

Timing attack against HSTS to sniff browser history in Chrome and Firefox

zyan.scripts.mit.edu

81–90 of 99 posts

Re: Timing attack against HSTS to sniff browser history in Chrome and Firefox

#81
I'm using Chrome 46.0.2490.80 without HTTPS Everywhere and it couldn't find any site I visited (tells me I visited none). I tried to visit a few and restart the test, it didn't found anything either

Edit : retried in Firefox 41.0.2, it's giving accurate results

Re: Timing attack against HSTS to sniff browser history in Chrome and Firefox

#82
post #77

Earlier quoted context omitted.

You still can insert external image into a page and poll its size either directly or detect it via layout changes. Maybe the root problem lies in HSTS and browsers using HTTP by default (because that is why we need HSTS)?

Indeed, should disallow that as well, e.g. give such external images and videos an intrinsic size of 1/3 the browser window size regardless of their actual size. And disallow (non-CORS-allowed) cross-domain JavaScript and CSS.

changing the intrinsic size of an image sounds like a "break the web" sort of change. I'm imagining all the super blurry photos / gifs / etc. that will result, and not liking the thought.

Re: Timing attack against HSTS to sniff browser history in Chrome and Firefox

#83
post #77

Earlier quoted context omitted.

Indeed, should disallow that as well, e.g. give such external images and videos an intrinsic size of 1/3 the browser window size regardless of their actual size. And disallow (non-CORS-allowed) cross-domain JavaScript and CSS.

It would be easier to disallow http-only CSP though.

this sounds like a good idea. I do have to wonder if you use CSP & https for your own site (because what site deploys CSP without deploying https first?), what sort of http-only directives would even be legal (i.e could successfully load content) under mixed-content rules.

But I don't think this solves the whole problem, as the time to "redirect + load https image" v. "HSTS redirect + load https image" is probably significant enough of a difference to timing attack. In which case you just need to time the onload of an image (or similar resource).

Re: Timing attack against HSTS to sniff browser history in Chrome and Firefox

#84
The core issue is the same that leads to cross domain search timing attacks [1] (which can be prevented with CSRF tokens)

With timing HTTP->HTTPS redirections maybe the issue is not that the response can be timed but that HTTP exists in the first place? There are other similar timing attacks that can easily be used to identify if a user is logged in to a specific website [2].

[1] https://news.ycombinator.com/item?id=10211306 [2] http://crypto.stanford.edu/~dabo/papers/webtiming.pdf

Re: Timing attack against HSTS to sniff browser history in Chrome and Firefox

#85

Earlier quoted context omitted.

It would be easier to disallow http-only CSP though.

this sounds like a good idea. I do have to wonder if you use CSP & https for your own site (because what site deploys CSP without deploying https first?), what sort of http-only directives would even be legal (i.e could successfully load content) under mixed-content rules. But I don't think this solves the whole problem, as the time to "redirect + load https image" v. "HSTS redirect + load https image" is probably si…

CSP can be useful on HTTP-only sites to prevent and log XSS attacks (e.g. somebody trying to insert a script on a page via vulnerable server script). That is SCP primary purpose IIRC.

Re: Timing attack against HSTS to sniff browser history in Chrome and Firefox

#87
post #51
post #49

Earlier quoted context omitted.

The JS code sent to kentonv's browser might be safe, but you can't really meaningfully comment on hobs' situation, since you don't have a copy of the JS code that was sent to hobs' browser.

Actually I can. The author of this code is a friend of mine who works with the EFF, and the idea that she's secretly sending malicious scripts to some people but not others from her MIT web hosting space under her own name is simply not plausible.

Unless, she's already compromised your browser and the two previous comments are in fact placed by her!

In all seriousness, I appreciate the added context your (particularly this last clarifying comment) add to the discussion.

Re: Timing attack against HSTS to sniff browser history in Chrome and Firefox

#88
post #13

Mitigation, get your site added to the HSTS Preload list. Most of the advanced webappsec security features leak information. CSP, HPKP, HSTS, etc, which was all 100% known. This talk is excellent because it puts together the attacks into real PoCs, real attacks, and great information on how it all works. These attacks in the talk are quality too, instead of being 'mostly' theoretical. This wasn't really documented al…

> Mitigation, get your site added to the HSTS Preload list.

If that could scale, we wouldn't need DNS?

Come to think of it, as ip addresses aren't distributed, why not have HSTS be a flag in DNS, rather than a header? (Yeah, I know, because DNS isn't secure - but that's the real problem, right there...).

Re: Timing attack against HSTS to sniff browser history in Chrome and Firefox

#89
post #57
post #2

Probably a good idea to edit the title to indicate that this is an example attack site as well, not my favorite thing in general to land on without warning. No js seems to mean no worries though.

While I probably would have linked HN to the slides instead of the site, I do think calling it an attack site is paranoid and disingenuous.

Does the term "example attack site" not mollify that a bit? I tried to be clear that its not a real attack site (or my comment we be much more alarming) but something that executed malicious behavior, even if it wasnt from a malicious actor.

Wasnt looking to castigate the author, just looking for a title with a warning.

Re: Timing attack against HSTS to sniff browser history in Chrome and Firefox

#90
Luckily I have taken out entire classes of attacks against the browser (this one included) using simple, baseline configs that harden the browser. I am unsure how many people take these measures and I don't know the stats for how many people are hardening their browser in some way, but I suspect large swathes of web users are at risk here.

Since this is Hackernews, my efforts to educate the masses on weaponized browser attacks like this would be futile, and I am sure many have configured their browser in some rudimentary way to merry away the assholes.

There is a certain sigh of relief and 'ha catch me if you can' that coats me when I see PoCs like this rendered obsolete and inert.

Post reply on HN