News for hackers. Stuff that matters.
Re:HTTP Immutable Responses by meandmycode on Friday September 15, 2017 @05:19PM (#15260860)
What does immutable really mean when you only rent a domain name? I think about this occasionally with domains and email addresses, they've become a trusted piece of information, but over time the ownership of that thing changes, does make me wonder about fraud in the future when sizeable companies die off and their domains free up.
Re:HTTP Immutable Responses by icebraining on Friday September 15, 2017 @06:43PM (#15261451)
In this case, if a company dies and a malicious actor gets the domain, there's not much they can do besides tell the browser to load those assets - but they could probably just take a copy of the original site and serve a copy of those assets themselves.

The attack might work the other way around: the attacker buys a bunch of domain names, serves "sleeper" malicious JS files with this on common paths (say, the paths used by Wordpress and other common CMSs), then releases the domain. When the new owner installs a CMS and start serving their site, the browser loads the malicious JS instead, which is now running under the new site's Origin (security context).

Re:HTTP Immutable Responses by joosters on Saturday September 16, 2017 @08:29AM (#15264346)
But to make this attack work, browsers would have to visit this site before the new owner takes it over, in order to receive and cache the malicious JS. And if you can make people receive malicious JS, you've already got your attack vector - immutable caching isn't needed.
Re:HTTP Immutable Responses by icebraining on Saturday September 16, 2017 @10:26AM (#15264771)
if you can make people receive malicious JS, you've already got your attack vector

No, because a malicious JS file by itself can't do much. The attack vector is the malicious JS running on the new site, with permissions to steal session cookies and interact with the application. That's why caching without verification is important: to make sure the browser uses the cached malicious JS instead of fetching the new one.

Re:HTTP Immutable Responses by prolurker on Friday September 15, 2017 @07:49PM (#15261798)
That's an interesting attack vector, in the section 3 of the RFC they recommend to ignore the directive unless it's a secure connection which would mitigate that kind of problems.

Another solution would be to use an unpredictable versioning scheme so the attacker can't anticipate the name of the resources.

Re:HTTP Immutable Responses by AgentME on Friday September 15, 2017 @08:01PM (#15261849)
The attacker who buys a bunch of domains and legitimately owns them for a period of time wouldn't have any issue getting SSL certificates for them.
Re:HTTP Immutable Responses by prolurker on Friday September 15, 2017 @08:11PM (#15261908)
Correct, but, even if not explicitly said, the cached entries should be associated to the certificate's fingerprint and immediately discarded once the certificate expires or is changed.
Re:HTTP Immutable Responses by rav on Saturday September 16, 2017 @03:33AM (#15263430)
Certificates often change for legitimate reasons, e.g. Let's Encrypt certificates which must be changed every 3 months.
Re:HTTP Immutable Responses by geon on Saturday September 16, 2017 @04:30AM (#15263601)
That would be ok.
Re:HTTP Immutable Responses by asah on Saturday September 16, 2017 @01:01AM (#15262977)
Isn't this also true for long cache control durations as well?
Re:HTTP Immutable Responses by icebraining on Saturday September 16, 2017 @10:29AM (#15264779)
Yes, although an immutable guarantee makes it more likely that the browser won't check for a new version.
Re:HTTP Immutable Responses by __jal on Friday September 15, 2017 @06:38PM (#15261414)
It is no different than, say, incorporating. If you fail to perform certain rituals each year, you can lose your legal status. The odds of this happening any time soon with Coke are slim, similarly with ownership of coke.com, but it could.

Nothing is 'immutable' if you look at it hard enough. The Bible's teachings have changed over time. On the right scale, the Earth is a temporary novelty and questions about proton decay become relevant.

Tl;dr: set your expiration dates appropriately and you won't have a problem.

Re:HTTP Immutable Responses by AgentME on Friday September 15, 2017 @08:00PM (#15261844)
The issue is that an attacker could buy a domain, serve content from it with the cache-control: immutable response, and then later someone else buys the domain, puts their own content on it, but a lot of their users (who had accessed the domain when it was owned by the attacker) have a lot of the attacker's immutable content permanently cached.

Even if the second owner follows the advice of setting expiration dates appropriately, nothing helps them.

Re:HTTP Immutable Responses by taeric on Friday September 15, 2017 @09:30PM (#15262259)
That ignores attacks on dns and certificate authorities.

I could readily see a fun novel about a nation state or isp using this trick to seed malicious code to a lot of public sites. Imagine setting it for index.html on any site with a source that merely bootstraps to the intended site. Along with the malicious code.

Re:HTTP Immutable Responses by mseebach on Saturday September 16, 2017 @06:02AM (#15263878)
In an attack where DNS and CAs are compromised, immutable caching is going to be be least of our problems, frankly.
Re:HTTP Immutable Responses by taeric on Saturday September 16, 2017 @11:27AM (#15265037)
Hasn't this happened? Several times?

I'm not trying to say it is everyday. But it is easier than you think.

Browsers are removing bad authorities. Which is good. There are a lot of them, though. Which is a larger attack surface than many folks acknowledge.