This vulnerability exploits the biased ECDSA nonce generation in the ecc-ssh.c
file. The nonce is generated with
Vuln discovered by Bäumer and Marcus Brinkmann.
In order to use this exploit you must have sagemath and the python dependencies in requirements.txt
installed.
-
Extract the ECDSA signatures from 60 verified GitHub commits that used PuTTy or TortoiseGit to sign the commit content.
-
Another possible attack is to set up a rogue SSH server where victims connect (using PuTTY or Pageant) and after several connections you can retrieve the 60 signatures to recover the private key.
-
The signature file must contain the message hash, a space and the values of r and s concatenated.
-
The pubkey file input, can be in raw, PEM, DER or OpenSSH format.
This poc uses part of the malb implementation of the paper On Bounded Distance Decoding with Predicate: Breaking the "Lattice Barrier" for the Hidden Number Problem