Slashdot Mirror


BREACH Compression Attack Steals SSL Secrets

msm1267 writes "A serious attack against ciphertext secrets buried inside HTTPS responses has prompted an advisory from Homeland Security. The BREACH attack is an offshoot of CRIME, which was thought dead and buried after it was disclosed in September. Released at last week's Black Hat USA 2013, BREACH enables an attacker to read encrypted messages over the Web by injecting plaintext into an HTTPS request and measuring compression changes. Researchers Angelo Prado, Neal Harris and Yoel Gluck demonstrated the attack against Outlook Web Access (OWA) at Black Hat. Once the Web application was opened and the Breach attack was launched, within 30 seconds the attackers had extracted the secret. 'We are currently unaware of a practical solution to this problem,' said the CERT advisory, released one day after the Black Hat presentation."

11 of 106 comments (clear)

  1. Re:Piece of Cake by Anonymous Coward · · Score: 3, Insightful

    Yeah, no worries, 'cause the infrastructure providers and their NSA buddies aren't in the middle.

  2. Seems pretty dangerous by mstefanro · · Score: 5, Interesting

    This is quite an ingenious attack, but I am very surprised it has taken people so long to find it, as it is very straightforward and easy to understand conceptually. Makes you wonder "how did I not think of that".

    Although it may seem like the requirements of a successful attack are difficult to achieve, this may not be the case.
    It is usually very easy to inject some plain-text in the source code of webpages.

    On facebook:
    https://www.facebook.com/photo.php/INJECT_WHATEVER_YOU_WANT_HERE/
    If you view the source of that URL you can see the text "INJECT_WHATEVER_YOU_WANT_HERE" appears 3 times in the source code.
    By appending the query string, on youtube:
    https://www.youtube.com/watch?v=hLkugwOYbFw&INJECT_WHATEVER_YOU_WANT_HERE
    And on google:
    https://www.google.com/?INJECT_WHATEVER_YOU_WANT_HERE

    That means that an attacker can extract secret information from a lot of the HTTPS pages that you're visiting.

    When I first read about this attack, the first fix that came into my mind was to just append /* [random text of random size] */ to all text/html responses.
      But this may cause troubles: if the random padding is too large, the purpose of compression
    is defeated. If it is too small, workarounds may be found.

    Maybe it is time to start thinking of algorithms that perform compression and encryption together, not separately?

    1. Re: Seems pretty dangerous by mstefanro · · Score: 4, Informative

      This attack has little to do with SSL itself or the cryptosystems used. It's more about the preservation of size when encrypting. Combined with compression, information about the amount of entropy in the plaintext is leaked. If you are allowed to manipulate parts of the plaintext a lot of times, then amount of entropy leakage provides with an answer to the question "does the injected substring appear anywhere else in the plaintext?".

    2. Re:Seems pretty dangerous by complete+loony · · Score: 3, Insightful

      So web servers need to disable gzip & deflate compression on any https page that might contain something sensitive? Sounds like an easy enough fix to me.

      --
      09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
  3. Re:Why use HTTP Compression? by mstefanro · · Score: 4, Informative

    Open the Net panel of Firebug on this page and then refresh it a couple of times. Order the HTTP requests by Size. You will see that the HTML of this page is takes the vast majority of bandwidth. Images are simply a "304 Not modified", whereas the HTML is a "200 OK" of ~41KB at this time.
    So in case of Slashdot, HTML is the bandwidth bottleneck, not images.

  4. Re:Why use HTTP Compression? by Anonymous Coward · · Score: 4, Funny

    Browse the web without Javascript and with an ad blocker. It's like moving from dialup to broadband.

    While I loathe JavaScript on a professional level, I gotta say: It's time to give up the Lynx browser. There can't be that many interesting Gopher sites left!

  5. Re:Piece of Cake by phantomfive · · Score: 5, Informative
    Here's the list of requirements from CERT. All of these must be true for the attack to work. From this list, a creative person could think of many ways a website could avoid this exploit, but it's harder for the client.

    1. HTTPS-enabled endpoint (ideally with stream ciphers like RC4, although the attack can be made to work with adaptive padding for block ciphers).
    2. The attacker must be able to measure the size of HTTPS responses.
    3. Use of HTTP-level compression (e.g. gzip).
    4. A request parameter that is reflected in the response body.
    5. A static secret in the body (e.g. CSRF token, sessionId, VIEWSTATE, PII, etc.) that can be bootstrapped (either first/last two characters are predictable and/or the secret is padded with something like KnownSecretVariableName="".
    6. An otherwise static or relatively static response. Dynamic pages do not defeat the attack, but make it much more expensive.

    --
    "First they came for the slanderers and i said nothing."
  6. Re:Disable compression? by The+Wild+Norseman · · Score: 4, Funny

    Nevermind. RTFA for explanation.

    See? Text compression in action!

    --
    "A government is a body of people usually -- notably -- ungoverned." -Shepherd Book
  7. Re:Piece of Cake by viperidaenz · · Score: 4, Informative

    Client protection is simple. Disable HTTP content compression using the Accept-Encoding HTTP request header.

  8. Re:Piece of Cake by Score+Whore · · Score: 3, Funny

    Same network? Like the internet?

    *head explodes*

    WTF? Do you happen to know the etymology of "internet"?

  9. Re:Piece of Cake by Anonymous Coward · · Score: 4, Informative

    what do i modify it to?

    gzip;q=0,deflate;q=0