Skip to main content

CRIME

Compression Ratio Info-leak Made Easy

Related error

"This server is vulnerable to a CRIME attack. Make sure you have TLSv1.2 protocol enabled on your server and disable SSL/TLS compression."

Problem

The Transport Layer Security (TLS) protocol contains a feature (TLS compression) that allows you to compress data passed between the server and the browser. You use this feature to reduce the bandwidth and latency issues associated with encrypting and decrypting large amounts of data. TLS compression is added to the client hello message. Including TLS compression is optional.

In a Compression Ratio Info-leak Made Easy attack, the attacker recovers the content of secret authentication cookies and uses this information to hijack an authenticated web session. The attacker uses a combination of plaintext injection and TLS compression data leakage to exploit the vulnerability. The attacker lures the browser to make several connections to the website. The attacker then compares the size of the ciphertexts sent by the browser during each exchange to determine parts of the encrypted communication and hijack the session.

Solution

  • Disable server (website) TLS data compression and browser TLS data compression.

  • Modify gzip to allow for explicit separation of compression contexts in SPDY.