News for hackers. Stuff that matters.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by nitrogen on Wednesday September 12, 2012 @11:04AM (#4510969)
Is my understanding correct that the attack described there requires all of 1. cookies associated with the target, 2. the ability to monitor the length of requests to the target, and 3. the ability to send requests to the target (e.g. JavaScript injection, malicious website)?

I guess this is actually an instance where those Hollywood "guess the password one character at a time" animations would make sense.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by jgrahamc on Wednesday September 12, 2012 @11:09AM (#4511002)
You need three things:

1. To know the format of cookies used for the web site you are targetting. Specifically, whatever cookie contains authentication.

2. The ability to injection a request to the target web server while someone is connected (such as with JavaScript, an XSS, or plug-in).

3. Ability to monitor the SSL connection is it is transported across TCP.

Would have been fun if they called this the CPE1704TKS attack instead of CRIME: http://www.youtube.com/watch?v=NHWjlCaIrQo

Re:Google disables compression for OpenSSL in Chrome - SSL e... by cperciva on Wednesday September 12, 2012 @11:47AM (#4511194)
You don't even need (3) if you can do enough trials and have an accurate clock. Compression by its very nature drips timing side channels.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by __alexs on Wednesday September 12, 2012 @12:35PM (#4511498)
Due to the padding of even compressed SSL segments only having timing data will significantly complicate things. You'll be trying to measure the variance in deflate compressing different blocks with single byte differences. You better have an extremely low jitter connection!
Re:Google disables compression for OpenSSL in Chrome - SSL e... by caf on Wednesday September 12, 2012 @09:55PM (#4514372)
Low jitter is not a requirement for timing side-channel attacks. As long as the jitter is uncorrelated with the timing difference that you're after, you can filter the signal from the noise.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by JoachimSchipper on Wednesday September 12, 2012 @01:54PM (#4511931)
> You better have an extremely low jitter connection!

Like AWS. (Cite: http://dl.acm.org/citation.cfm?id=1653687.)

Re:Google disables compression for OpenSSL in Chrome - SSL e... by __alexs on Wednesday September 12, 2012 @02:11PM (#4512060)
I doubt youd even have to break SSL using that attack. Lots of people do SSL termination at the load balancer.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by Dylan16807 on Wednesday September 12, 2012 @06:08PM (#4513515)
Okay, but people don't run web browsers on AWS.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by abadidea on Wednesday September 12, 2012 @07:47PM (#4513930)
Re:Google disables compression for OpenSSL in Chrome - SSL e... by Dylan16807 on Friday September 14, 2012 @12:24AM (#4520064)
Doesn't do HTTPS, also I am skeptical of cross-site javascript shenanigans happening on the server-end of silk.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by JoachimSchipper on Thursday September 13, 2012 @05:53AM (#4515403)
People do run HTTPS clients on AWS, though. Web APIs tend to [1] require exactly that.

[1] Lala people never send sensitive data over plain HTTP I'M NOT HEARING YOU.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by Dylan16807 on Friday September 14, 2012 @12:24AM (#4520067)
Sure, they might use HTTPS, but how often do they load arbitrary pages with uncontrolled javascript?
Re:Google disables compression for OpenSSL in Chrome - SSL e... by JoachimSchipper on Friday September 14, 2012 @04:27AM (#4520736)
Pretty much never. How often do they make requests that are at least partially attacker-controlled, though? (Note that variants on https://www.someapi.com/...?username=foo contain attacker-controlled data...)
Re:Google disables compression for OpenSSL in Chrome - SSL e... by ivanr on Wednesday September 12, 2012 @11:18AM (#4511047)
To expand on your second point, if you have 3, then in many cases you also have the ability to intercept and modify non-encrypted traffic. Meaning, if the victim is using a secure web site and a non-secure site at the same time, the MITM can infiltrate the non-secure site and use it to generate requests to the secure site.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @11:38AM (#4511135)
That's why sites need to enable the Secure flag on their cookies, and to set the Strict-Transport-Security headers.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by thatwonthelp on Wednesday September 12, 2012 @04:35PM (#4513052)
Won't help in this case.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @04:46PM (#4513121)
I don't know what you're saying. If you're saying that the "Secure" flag won't defend against CRIME, nobody is saying that. I'm saying that the "Secure" flag and HSTS mitigates SSL-stripping.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by tlrobinson on Wednesday September 12, 2012 @07:04PM (#4513761)
I think both ivanr and thatwonthelp were suggesting that any non-secure site (same origin or not) can be hijacked in order to make the requests necessary for this attack.

I understand and agree with your comment about the secure flag, but if I understood ivanr's comment it doesn't apply.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by bdr on Wednesday September 12, 2012 @05:20PM (#4513291)
Oddly, GP's account was made for the purpose of writing that comment. I'm unsure what that means.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by xhrpost on Wednesday September 12, 2012 @11:33AM (#4511112)
I think you're correct here but how would you manipulate the cookies being sent when sending XSS requests from a different domain?
Re:Google disables compression for OpenSSL in Chrome - SSL e... by cstejerean on Wednesday September 12, 2012 @11:46AM (#4511182)
you don't need to manipulate the cookies being sent, only the body of the message. The browser will send the correct cookie in the header, you control the body, and use the length of the message to determine how close the cookie value in the body is getting to the one in the header.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by ivanr on Wednesday September 12, 2012 @01:35PM (#4511796)
For CRIME, I don't think that it's necessary to control the cookies. Having control of other parts of the request should be sufficient (e.g., using request headers, request body, etc).

As for manipulating cookies from the MITM perspective, here's one clunky way to do it: redirect the victim's browser to the plain-text version of the target web site, intercept that request, and set a new cookie (pretending to be the plain-text version of the target web site). The next request to the secure version of the target web site should contain the injected cookie. As tptacek mentioned in another comment, this approach would not work with a site that uses HTTP Strict Transport Security.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @01:46PM (#4511867)
The attack as Pornin outlines it does not involve controlling the cookie header, but rather on being able to get content into the client's TX stream that happens to match the cookie header; think in terms of things like query args and post data.

I think all three comments in this little subthread might be saying the same thing. Go nerddom!

Re:Google disables compression for OpenSSL in Chrome - SSL e... by thwarted on Wednesday September 12, 2012 @11:22AM (#4511064)
Would have been fun if they called this the CPE1704TKS attack

That one was not cracked one character at a time in series, portions in the middle were discovered sooner. But, yeah, would have been a more appropriate, cooler name.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by murbard2 on Wednesday September 12, 2012 @02:55PM (#4512361)
Are there credible situations where you would be able to do (2) but not able to simply read the cookie from the DOM and send it to an attacker controlled website?
Re:Google disables compression for OpenSSL in Chrome - SSL e... by amalcon on Wednesday September 12, 2012 @03:10PM (#4512483)
An attacker can build a hidden form that submits to a URL at the victim site, and submit it repeatedly using javascript. Alternatively an attacker could put the test content in the URL (we don't care if it 404s), which would work just as well and allow them to use a series of script-free pages full of images.

edit: tptacek is absolutely right; there isn't a way to defend against this in application code. All you can do is turn off TLS compression. This is NOT by any means the only approach, it's just the most obvious one.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @03:21PM (#4512563)
Careful: you're outlining the attack well, but you wouldn't want to give someone the impression that defending against CSRF also defends against attacks like BEAST.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by jgeralnik on Thursday September 13, 2012 @07:22AM (#4515595)
You can't read the cookie for the victim website from a malicious site. What you can do is send POST/GET requests to which the browser will attach the appropriate cookies.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by murbard2 on Thursday September 13, 2012 @09:51AM (#4516104)
Oops, yes of course, now I feel stupid for asking. Thanks.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @11:39AM (#4511140)
Juliano and Thai actually coined the name "Hollywood attack" for exactly this concept back when they presented the chosen-boundary attack on TLS 1.0.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by cryptbe on Wednesday September 12, 2012 @11:56AM (#4511241)
> Hollywood "guess the password one character at a time" animations

Did you see the BEAST attack? Exactly one byte at a time: http://www.youtube.com/watch?v=BTqAIDVUvrU

Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @12:09PM (#4511330)
Serge Vaudenay's CBC padding oracle attack plays out the same way, as does the simplest attack on ECB mode crypto.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by wladimir on Wednesday September 12, 2012 @11:10AM (#4511008)
As I understand it, only 2 and 3 are needed. The (secret) cookies are the part that is determined by the SSL compression exploit, by trying subsequent parts.

You're right that Hollywood "guess the password one character at a time" animation makes sense here. It also makes sense for timing based attacks. Ie, if checking "AB" against the password takes longer than "A", you know the second character is B...

Re:Google disables compression for OpenSSL in Chrome - SSL e... by nitrogen on Wednesday September 12, 2012 @11:31AM (#4511103)
What I meant was that the browser must have some cookies stored to send to the target, cookies that the attacker wants to discover.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @11:36AM (#4511127)
The attack as described by Thomas Pornin is indeed specific to HTTPS. Generalize it past HTTPS and its elements are:

1. Attacker controls some parts of plaintext

2. Attacker's content is mixed with content attacker wants to discover

3. Attacker can make repeated trials against the same plaintext (not against same ciphertext stream or key)

4. Defender compresses content on the fly

There are probably other cryptosystems that have this flaw, but it's less inherent to TLS than it is to the HTTPS security model.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by jlgreco on Wednesday September 12, 2012 @12:38PM (#4511506)
That "Guess the password one char at a time" thing also occurs in real life when people forget to use constant time comparison functions.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by bloaf on Wednesday September 12, 2012 @01:25PM (#4511772)
A better comparison function:

Variable time until some threshold number of repeat failures occurs (e.g. 3). After this, manipulate the comparison time in such a manner that someone attempting to do this sort of attack would come up with a dummy password. If they come up with said dummy password, alert the user of an attempted attack.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by krickle on Wednesday September 12, 2012 @02:33PM (#4512218)
Cool idea, but remember the botnets. I also am not sure what we gain by verifying their class of attempt if we're already defending against it.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by moxie on Wednesday September 12, 2012 @12:20PM (#4511392)
You also need the client and server to both support TLS compression. But there aren't any major sites (that I know of) which do support TLS compression.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by ivanr on Wednesday September 12, 2012 @12:43PM (#4511546)
In my quick test, about 42% of the sites in the SSL Pulse data set (~180k SSL sites in Alexa's top 1m) support compression. For example, mail.yahoo.com does.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by cryptlamex on Wednesday September 12, 2012 @03:16PM (#4512520)
Google, Yahoo, Twitter are vulnerable based on SSL Labs tool