This web page is about the OpenSSL vulnerability that was discovered in/with the Debian OpenSSL package.
You can find more information on the Debian Wiki page.

Because of this vulnerability some certificates and some ssh keys that are generated using the vulnerable version of OpenSSL are easily cracked using brute force attacks.

In the text below, actions or observations that might need your attention are marked in red.
The corresponding reaction on your behalf is marked in green

It is of course best to read the rest of the text as well, so that you know what is going on ;-)

Personal SSH Keys

When using a vulnerable personal ssh key, the connection will fail (you will notice this of course) and a log entry is generated of the form (we will notice this):

    Public key 04:f3:f8:bd:ea:fd:77:d1:7d:16:50:62:7f:29:2f:d8 blacklisted (see ssh-vulnkey(1))

Such entries are still present in our log files. This indicates that a (large?) number of you still use a vulnerable ssh key to connect.

It is important for all of us (not only yourself !) that access to our systems is and remains secure.

We therefore dare to ask your cooperation:

  • login to a (system group administered) Ubuntu machine
  • e.g. ssh.cs.kuleuven.be or ssh1.cs.kuleuven.be, but any other system group administered Ubuntu computer is fine
    In the Student Computer Lab all desktop computers are Ubuntu's
  • execute: /cw/www/ssl-check
  • it will warn you if you execute it on another type of computer than Ubuntu

If there is no output or it contains only lines such as:

    summary: keys found: <any-number>, weak keys: 0

then your keys (if any) are most probably not affected/vulnerable.

If the output warns about finding weak keys, you should take further action: delete the weak keys and, if necessary, regenerate new ones.
Make sure, however to read about the known_hosts file first ... just deleting (all of) your known_hosts file(s) might be the easiest solution !

Take care:

  • the ssl-check command most probably will give duplicate warnings about weak keys because more than one check is done ... when in doubt, just delete one key at a time ... some checks give the actual line number of the weak key in question, other just give the key fingerprint, which is more difficult to locate the culprit.
  • in some cases, the ssl-check command asks for a pass phrase ... there is no need to enter the exact/correct pass phrase since (that part of) the command does not know how to check the file in question anyway (it's a private key) ... you must enter something however, to let the command proceed and check the other files as well ... just hit some random keys and then press Enter.

Keep on checking your keys with the ssl-check command and taking appropriate action until no weak keys are found.

If you keep SSH keys in a non-standard location (i.e. not in the .ssh sub-directory of your home directory), please test those keys as well ... have a look at the ssl-check command to see how to check.

The known_hosts file

On MacOS X and Unix/Linux computers, special attention should be given to the known_hosts file in the .ssh subdirectory of your home directory.

This known_hosts file contains the (public) keys of all computers you connected to in the past. If such a stored key does not match the key when connecting again, the connection will be refused:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
07:18:29:3a:4b:5c:6d:7e:8f:90:a1:b2:c3:d4:e5:f6.
Please contact your system administrator.
Add correct host key in /home/barts/.ssh/known_hosts to get rid of this message.
Offending key in /home/barts/.ssh/known_hosts:51
RSA host key for <the machine you tried to connect to> has changed and you have requested strict checking.
Host key verification failed.

You will have to delete the old keys of all machines for which new keys are generated ... in the above warning, both the exact location of the known_hosts file and the exact line number where the old/offending key is located, is shown, so you can easily find and delete it.

The next time you connect to such a machine, you will have to accept the new key:

The authenticity of host '<the machine you are trying to connect to>' can't be established.
RSA key fingerprint is 07:18:29:3a:4b:5c:6d:7e:8f:90:a1:b2:c3:d4:e5:f6.
Are you sure you want to continue connecting (yes/no)? 

On Windows, this most probably also applies, but the location of the registered keys is most probably highly application dependent ... feel free to submit additional/helpful remarks about this ... we will add them here.

You should clean up (the rest of) your known_hosts file as well: delete all vulnerable keys in it because they could allow an attacker to gain access to your account on our systems.

If your known_hosts file contains only a few keys, it might be easier to just delete the entire file ... in fact, this might be a good idea in any case because most probably there is lot of old, now un-used or otherwise inappropriate information accumulated in it.

Do not forget to delete old, other versions of your known_hosts file as well (e.g. known_hosts.old, ...).

If you use a personal SSH key in a crontab or other automatic script or tool, make sure (after deleting that key from, or the entire known_hosts file) to manually use that key to connect to the intended computer to accept/register that machine's key because the crontab/automatic script will/cannot do so.

Machine SSH Keys

The system group has replaced all vulnerable ssh host keys on the machines under system-group-administration.
You might have to delete the old (public) key from your known_hosts file and accept the new key when connecting to a computer whose key was replaced.
Read the section about the known_hosts file for more information.

If you use a Debian based system elsewhere (this includes Ubuntu!), you should test your/the keys on that system as well.

Some hints how to check:

  • Feel free to copy the ssl-check script and everything that is used in/by it.
  • Make sure your computer is up to date, probably using apt-get update ; apt-get dist-upgrade
  • Install the openssh-blacklist-extra Debian package to get more blacklists ... get it here
  • ssh-vulnkey -a
  • ssh-vulnkey /etc/ssh/*
  • ssh-vulnkey ~/.ssh/*
  • ssh-keyscan -t rsa your-host | ssh-vulnkey -
  • ssh-keyscan -t dsa your-host | ssh-vulnkey -

Certificates

The system group has replaced all vulnerable certificates. Because both the old and the new certificates were/are signed by GlobalSign, you shouldn't notice this change. Your application should accept the new certificate without warning. We use certificates in our web servers, e-mail servers, ldap servers and print servers.

If you have created certificates using OpenSSL tools yourself, you should check them with openssl-vulnkey.

Some hints how to check:

  • openssl-vulnkey certificate.pem
  • openssl-vulnkey certificate.key
  • openssl s_client -connect host:port < /dev/null > /tmp/cert.$$ ; openssl-vulnkey /tmp/cert.$$