If you are running a Debian-based Linux system and haven’t already caught up with the announcement that there was a major flaw with the generation of SSH, OpenVPN, DNSSEC, SSL/TLS session keys and X.509 certificate key material, you might want to update your system to address the problem.

This doesn’t just affect Debian, but Debian derivatives as well, such as Ubuntu.

The flaw was the removal of most of the entropy (randomness) from the key generation process in OpenSSL in September 2006, and wasn’t picked up on until just last week.

This means that any keys you have generated since that time should be regenerated as the only entropy present was the pid (Process ID) of the currently running process that generated the key.

This means that there are only 32,767 possible keys for each key length and there are a number of resources starting to appear that are targeting the weak key issue. One of the tools, developed by Markus Mueller, claims to defeat a 2048 bit RSA SSH key in less than 20 minutes.

H D Moore, the founder of Metasploit, points out that there are several features of Debian that make the process of brute forcing a key even simpler, given that a lot of Debian systems use sequential pid allocation and most keys are likely to have been user generated with a pid between 500 and 10,000 (which effectively reduces the keyspace to 9,500 keys).

H D Moore’s info is here: http://metasploit.com/users/hdm/tools/debian-openssl/

If administrators want to check for weak keys on their system, there is now a script that lets you quickly verify whether some of your keys are vulnerable on the Debian advisory.