The SSH protocol has been in use for almost 30 years. Now Bochum researchers have developed an attack that has the potential to undermine, if not even disable, cryptographic SSH protection measures. According to ShadowServer, there are over 1 million SSH servers active in Germany - several million worldwide.
The Terrapin attack is a new attack technique on the SSH protocol discovered by researchers at Ruhr University Bochum. The attack can compromise the integrity of secure SSH connections by making targeted adjustments to sequence numbers during the handshake as part of the connection setup.
This allows the attacker to remove some messages sent by the client or server when establishing a secure channel without the participants noticing.
Good news: only attack Man in the Middle
The attack may result in the use of less secure authentication algorithms and may disable certain mitigations against keystroke timing attacks in OpenSSH 9.5. To successfully exploit Terrapin, an attacker must be able to perform a Man in the Middle (MitM) attack on the client-server connection and intercept and alter traffic at the TCP/IP layer.
The SSH connection must be encrypted with Chacha20-Poly1305 or with Encrypt-then-MAC in CBC mode. Terrapin is based on a vulnerability registered as CVE-2023-48795 that affects numerous SSH implementations, including OpenSSH, Putty and AsyncSSH, as well as the libssh and libssh2 libraries. Corresponding patches already exist for many of these tools. However, for these to be effective, both the clients and the servers must be updated.
Terrapin website explains
The experts at the Ruhr University Bochum have compiled all the information about Terrapin on a special website. In addition to a detailed white paper, there is information about patches and more. There is even a vulnerability scanner for many platforms that is provided via GitHub. The use is of course only recommended for professionals. The FAQ section of the site is also very interesting, as it answers many of admins' questions on the topic straight away.
The interactive map from ShadowServers shows an overview of vulnerable servers and SSh. The numbers for vulnerable servers in Germany, Europe and the rest of the world can be accessed very quickly there.
More at Terrapin-Attack.com