Warning: Malware, rogue users can spy on some apps' HTTPS crypto – by whipping them with a CAT o' nine TLS
Malicious code can spy on OpenSSL, Apple CoreTLS, etc
Crypto boffins have found a way to exploit side-channel information to downgrade most of the current TLS implementations, thanks to ongoing support for outmoded RSA key exchanges.
In a paper published on Friday, "The 9 Lives of Bleichenbacher’s CAT: New Cache ATtacks on TLS Implementations," co-authors Eyal Ronen, Robert Gillham, Daniel Genkin, Adi Shamir, David Wong and Yuval Yarom describe an updated version of an attack, first outlined by Swiss cryptographer Daniel Bleichenbacher two decades ago.
The original attack was called a padding oracle attack because it uses the padding – dummy data – added to plaintext to make it fit neatly into the block size required for the ciphertext. A padding oracle is a function that leaks the validity of the padding, by throwing an error, for example. Knowing whether or not the padding is valid facilitates the recovery of the plaintext from the ciphertext.
Mitigations against padding oracle attacks have been deployed over the years, but it turns out that information available through cache-based side channels provides a way around those defenses.
The Spectre and Meltdown processor design flaws disclosed earlier this year arise from side-channel information – akin to watching a hotel window for a light to infer an person's presence in the room. The researchers who developed the CAT attack, some of whom were involved in the Spectre and Meltdown work, rely on similar techniques.
Security flushed away
One of these is called FLUSH+RELOAD, in which the attacker flushes and reloads part of the CPU cache while the victim is accessing the same area of cached memory. By measuring the time it takes for the victim's data to evict the attacker's from the processor cache, the attacker can make inferences about the victim's data.
The researchers found that using a FLUSH+RELOAD attack, in conjunction with CPU branch prediction and a technique called Browser Exploit Against SSL/TLS (BEAST), they were able to break the TLS implementations in seven of nine popular packages.
Their technique involves running multiple padding oracle attacks in parallel, the results of which get combined in a way that recovers secret encryption keys from spied-on TLS-secured connections. In theory, bypassing TLS in this manner could allow an attacker to steal a victim's authentication token to access an online account (e.g. Gmail). In other words, it is possible to snoop on a browser's connection to Gmail, and recover the user's authentication token from the encrypted connection to later log in as them. It's a way to hijack accounts.
The boffins tested OpenSSL, Amazon s2n, MbedTLS, Apple CoreTLS, Mozilla NSS, WolfSSL, GnuTLS, BearSSL and BoringSSL. And they were able to downgrade all except for the last two, BearSSL and BoringSSL.
A local hack, for local people, we'll have no trouble here
A crucial difference between the original attack and the latest version is that the original flavor worked over the network while the modern version needs to be on the same machine to scrutinize microarchitectural side channels. Therefore, only malware or a malicious logged-in user on a vulnerable system can exploit these security holes to sniff out secret encryption keys of running applications, and hijack connections and accounts.
Any software using the above vulnerable libraries, particularly OpenSSL and CoreTLS, is at risk of surveillance by rogue users or malicious code on a system via this CAT attack technique. And, sure, having malware or evil users on your computer is never a good thing. Think of this as something else they can get up to.
You like HTTPS. We like HTTPS. Except when a quirk of TLS can smash someone's web privacyREAD MORE
So while the research findings underscore the need to get rid of support for RSA key transport in the Public Key Cryptography Standard #1 (PKCS #1), they don't quite qualify as a Heartbleed-level risk.
RSA key transport has already been excluded from TLS 1.3, the latest version. But it's still used in about 6 per cent of TLS connections, according to the paper. The researchers, however, show that any TLS connection arising from the vulnerable implementations can be downgraded. So the CAT attack will need to be patched.
"We show that padding oracle attacks can be made extremely efficient, via more careful analysis and novel parallelization techniques," the researchers explain in their paper.
"Finally, we show that while the use of RSA key exchange is declining, padding oracles can be used to mount downgrade attacks, posing them as a threat to the security of a much larger number of connections (including those done via protocols that do not even support the RSA key exchange)."
The flaws identified have been assigned the following CVE designations: CVE-2018-12404, CVE-2018-19608, CVE-2018-16868, CVE-2018-16869, and CVE-2018-16870. ®