BREACH

From HandWiki
Short description: Security vulnerability against HTTPS
The official logo

BREACH (a backronym: Browser Reconnaissance and Exfiltration via Adaptive Compression of Hypertext) is a security vulnerability against HTTPS when using HTTP compression. BREACH is built based on the CRIME security exploit. BREACH was announced at the August 2013 Black Hat conference by security researchers Angelo Prado, Neal Harris and Yoel Gluck. The idea had been discussed in community before the announcement.[1]

Details

While the CRIME attack was presented as a general attack that could work effectively against a large number of protocols, only exploits against SPDY request compression and TLS compression were demonstrated and largely mitigated in browsers and servers. The CRIME exploits against HTTP compression has not been mitigated at all, even though the authors of CRIME have warned that this vulnerability might be even more widespread than SPDY and TLS compression combined.

BREACH is an instance of the CRIME attack against HTTP compression—the use of gzip or DEFLATE data compression algorithms via the content-encoding option within HTTP by many web browsers and servers.[2] Given this compression oracle, the rest of the BREACH attack follows the same general lines as the CRIME exploit, by performing an initial blind brute-force search to guess a few bytes, followed by divide-and-conquer search to expand a correct guess to an arbitrarily large amount of content.

Mitigation

BREACH exploits the compression in the underlying HTTP protocol. Therefore, turning off TLS compression makes no difference to BREACH, which can still perform a chosen-plaintext attack against the HTTP payload.[3]

As a result, clients and servers are either forced to disable HTTP compression completely (thus reducing performance), or to adopt workarounds to try to foil BREACH in individual attack scenarios, such as using cross-site request forgery (CSRF) protection.[4]

Another suggested approach is to disable HTTP compression whenever the referrer header indicates a cross-site request, or when the header is not present.[5][6] This approach allows effective mitigation of the attack without losing functionality, only incurring a performance penalty on affected requests.

Another approach is to add padding at the TLS, HTTP header, or payload level. Around 2013–2014, there was an IETF draft proposal for a TLS extension for length-hiding padding[7] that, in theory, could be used as a mitigation against this attack.[5] It allows the actual length of the TLS payload to be disguised by the insertion of padding to round it up to a fixed set of lengths, or to randomize the external length, thereby decreasing the likelihood of detecting small changes in compression ratio that is the basis for the BREACH attack. However, this draft has since expired without further action.

A very effective mitigation is HTB (Heal-the-BREACH)[8] that adds random-sized padding to compressed data, providing some in the size of the output contents. This randomness delays BREACH from guessing the correct characters in the secret token by a factor of 500 (10-byte max) to 500,000 (100-byte max). HTB protects all websites and pages in the server with minimal CPU usage and minimal bandwidth increase.

References

  1. "Is HTTP compression safe?". https://security.stackexchange.com/questions/20406/is-http-compression-safe. 
  2. Goodin, Dan (August 1, 2013). "Gone in 30 seconds: New attack plucks secrets from HTTPS-protected pages". Ars Technica. https://arstechnica.com/security/2013/08/gone-in-30-seconds-new-attack-plucks-secrets-from-https-protected-pages/. 
  3. Angelo Prado, Neal Harris and Yoel Gluck. "SSL, gone in 30 seconds: A BREACH beyond CRIME". https://media.blackhat.com/us-13/US-13-Prado-SSL-Gone-in-30-seconds-A-BREACH-beyond-CRIME-Slides.pdf. Retrieved 2013-09-07. 
  4. Omar Santos (August 6, 2013). "BREACH, CRIME and Black Hat". Cisco. http://blogs.cisco.com/security/breach-crime-and-blackhat/. 
  5. 5.0 5.1 Ivan Ristic (October 14, 2013). "Defending against the BREACH Attack". Qualys.com. https://community.qualys.com/blogs/securitylabs/2013/08/07/defending-against-the-breach-attack. Retrieved 2013-11-25. 
  6. manu (October 14, 2013). "BREACH mitigation". Qualys Community. https://community.qualys.com/message/20360. Retrieved 2013-11-25. 
  7. A. Pironti (2013-09-11). "Length Hiding Padding for the Transport Layer Security Protocol". IETF Network Working Group. https://tools.ietf.org/html/draft-pironti-tls-length-hiding-02. Retrieved 2017-10-18. 
  8. Palacios, R.; Fariña Fernández-Portillo, A.; Sánchez-Úbeda, E. F.; García-de-Zúñiga, P. (April 2022). "HTB: A Very Effective Method to Protect Web Servers Against BREACH Attack to HTTPS". IEEE Access 10: 40381–40390. doi:10.1109/ACCESS.2022.3166175. Bibcode2022IEEEA..1040381P. 

External links

ja:BREACH