Weak key generation

Flawed random-number generation can create predictable SSH keys, as in CVE-2008-0166 on affected Debian-derived systems. Distinguish user keys, which authorize clients, from host keys, which identify servers, and distinguish obsolete key sizes from keys that are practically factorable.

1분 분량2026년 10월 21일 업데이트florianamette기여자 1명
어시스턴트에게 묻기 (MCP)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#