Weak key generation

SSH keys generated with insufficient entropy or by flawed tooling are predictable or factorable, so the private key can be derived without stealing it. The Debian OpenSSL entropy flaw produced a small, enumerable keyspace whose keys are brute-forced against authorized_keys, and low-entropy embedded devices and shared-factory keys repeat keys across units.

1 phút đọccập nhật 5 thg 10, 2026florianamette1 người đóng góp
Hỏi trợ lý của bạn (MCP)Sửa trên GitHub

CVE-2008-0166 was caused by a Debian-specific change that made OpenSSL-generated key material predictable in affected releases. Debian required regeneration of both weak OpenSSH user keys and host keys and added blacklist detection. The consequences differ: a recovered user private key may authenticate to accounts that trust it, while a recovered host private key can support server impersonation or attacks on host identity. Other low-entropy or duplicated-device-key findings require product- and firmware-specific evidence.

bash
# identify key type and size
ssh-keygen -lf authorized_keys                 # fingerprint and bit length
# on systems retaining Debian's blacklist utility, check keys against known weak sets
ssh-vulnkey target.pub
# interpret a match according to whether target.pub is a user or host key

Exploitation notes#

  • Known CVE-2008-0166 public keys can be compared with precomputed weak-key sets; impact then depends on how that key is used and trusted.
  • RSA keys below 2048 bits are obsolete under current security-strength guidance, but that does not mean an arbitrary 1024-bit RSA modulus is presently practical to factor.
  • DSA has separate algorithm and parameter concerns; identify the exact problem instead of treating every legacy DSA key as factorable.
  • Repeated embedded-device keys are a product-specific finding. A duplicated host key affects server identity; a duplicated authorized client key can affect login authorization.

Tools#

References#