Security flaw in top SSH client could let hackers recover cryptographic private keys
Multiple versions of the PuTTY SSH client were found to be vulnerable to a high-severity flaw which allowed, in certain scenarios, threat actors to exfiltrate private keys used to generate cryptographic signatures.
As a result, the attackers could gain unauthorized access to SSH servers, or could be allowed to sign commits as a developer.
As reported by BleepingComputer, the vulnerability in versions PuTTY versions 0.68 to 0.80 is tracked as CVE-2024-31497, and affects at least these software:
FileZilla 3.24.1 – 3.66.5 (fixed in 3.67.0)
WinSCP 5.9.5 – 6.3.2 (fixed in 6.3.3)
TortoiseGit 2.4.0.2 – 2.15.0 (fixed in 2.15.0.1)
TortoiseSVN 1.10.0 – 1.14.6 (mitigation possible by configuring TortoiseSVN to use Plink from the latest PuTTY 0.81 release)
There could be others, the researchers warned, depending on the version of PuTTY used, urging users to double-check their tools.
Needing signatures
The researchers who discovered the flaw are Fabian Bäumer and Marcus Brinkmann of the Ruhr University Bochum. PuTTY is a free, open-source terminal emulator, serial console, and network file transfer application. It supports different network protocols, such as SCP, SSH, Telnet, and others. It can also connect to a serial port.
Companies typically use the service to access and manage servers, and other network-connected devices, remotely, over SSH.
Sign up to the TechRadar Pro newsletter to get all the top news, opinion, features and guidance your business needs to succeed!
The problem, as the researchers explained, stems from how PUTTY generates ECDSA nonces for the NIST P-521 curve, used for SSH authentication:
“PuTTY’s technique worked by making a SHA-512 hash and then reducing it mod q, where q is the order of the group used in the DSA system. For integer DSA (for which PuTTY’s technique was originally developed), q is about 160 bits; for elliptic-curve DSA (which came later), it has about the same number of bits as the curve modulus, so 256 or 384 or 521 bits for the NIST curves,” they said.
“In all of those cases except P521, the bias introduced by reducing a 512-bit number mod q is negligible. But in the case of P521, where q has 521 bits (i.e. more than 512), reducing a 512-bit number mod q has no effect at all – you get a value of k whose top 9 bits are always zero.”
The only caveat here is that the attackers need 58 signatures to be able to calculate their target’s private key. The best way to do that, it was said, was through Git commits. Git can be configured to use OpenSSH to sign Git commits with the SSH key provided by Pageant.
The ssh-agent of PuTTY then generates the signature, which can then be recovered. Version 0.81 addressed the flaw.
More from TechRadar Pro
Multiple versions of the PuTTY SSH client were found to be vulnerable to a high-severity flaw which allowed, in certain scenarios, threat actors to exfiltrate private keys used to generate cryptographic signatures. As a result, the attackers could gain unauthorized access to SSH servers, or could be allowed to sign…
Recent Posts
- Security flaw in top SSH client could let hackers recover cryptographic private keys
- Stability AI is giving more developers access to its next-gen text-to-image generator
- Amazon Music is coming for Spotify’s AI playlists with new Maestro feature
- Samsung Galaxy Book4 Ultra Review: A Powerful Laptop
- NASA has greenlit plans to send a giant drone to Saturn’s largest moon
Archives
- April 2024
- March 2024
- February 2024
- January 2024
- December 2023
- November 2023
- October 2023
- September 2023
- August 2023
- July 2023
- June 2023
- May 2023
- April 2023
- March 2023
- February 2023
- January 2023
- December 2022
- November 2022
- October 2022
- September 2022
- August 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- April 2021
- March 2021
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- August 2020
- July 2020
- June 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- December 2011