diff options
author | Colin Watson <cjwatson@debian.org> | 2008-05-12 23:33:01 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2008-05-12 23:33:01 +0000 |
commit | 47608c17e64138f8d16aa2bdc49a0eb00e1c3549 (patch) | |
tree | 92572d90b9aa8f45c0d9e6dbb185065667fdcea0 /ssh-vulnkey.1 | |
parent | 19ccea525446d5a3c2a176d813c505be81b91cbf (diff) |
* Mitigate OpenSSL security vulnerability:
- Add key blacklisting support. Keys listed in
/etc/ssh/blacklist.TYPE-LENGTH will be rejected for authentication by
sshd, unless "PermitBlacklistedKeys yes" is set in
/etc/ssh/sshd_config.
- Add a new program, ssh-vulnkey, which can be used to check keys
against these blacklists.
- Depend on openssh-blacklist.
- Force dependencies on libssl0.9.8 / libcrypto0.9.8-udeb to at least
0.9.8g-9.
- Automatically regenerate known-compromised host keys, with a
critical-priority debconf note. (I regret that there was no time to
gather translations.)
Diffstat (limited to 'ssh-vulnkey.1')
-rw-r--r-- | ssh-vulnkey.1 | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/ssh-vulnkey.1 b/ssh-vulnkey.1 new file mode 100644 index 000000000..9286e73c0 --- /dev/null +++ b/ssh-vulnkey.1 | |||
@@ -0,0 +1,151 @@ | |||
1 | .\" Copyright (c) 2008 Canonical Ltd. All rights reserved. | ||
2 | .\" | ||
3 | .\" Redistribution and use in source and binary forms, with or without | ||
4 | .\" modification, are permitted provided that the following conditions | ||
5 | .\" are met: | ||
6 | .\" 1. Redistributions of source code must retain the above copyright | ||
7 | .\" notice, this list of conditions and the following disclaimer. | ||
8 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
9 | .\" notice, this list of conditions and the following disclaimer in the | ||
10 | .\" documentation and/or other materials provided with the distribution. | ||
11 | .\" | ||
12 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
13 | .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
14 | .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
15 | .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
16 | .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
17 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
18 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
19 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
20 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
21 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
22 | .\" | ||
23 | .Dd $Mdocdate: May 12 2008 $ | ||
24 | .Dt SSH-VULNKEY 1 | ||
25 | .Os | ||
26 | .Sh NAME | ||
27 | .Nm ssh-vulnkey | ||
28 | .Nd check blacklist of compromised keys | ||
29 | .Sh SYNOPSIS | ||
30 | .Nm | ||
31 | .Op Fl q | ||
32 | .Ar file ... | ||
33 | .Nm | ||
34 | .Fl a | ||
35 | .Sh DESCRIPTION | ||
36 | .Nm | ||
37 | checks a key against a blacklist of compromised keys. | ||
38 | .Pp | ||
39 | A substantial number of keys are known to have been generated using a broken | ||
40 | version of OpenSSL distributed by Debian which failed to seed its random | ||
41 | number generator correctly. | ||
42 | Keys generated using these OpenSSL versions should be assumed to be | ||
43 | compromised. | ||
44 | This tool may be useful in checking for such keys. | ||
45 | .Pp | ||
46 | Keys that are compromised cannot be repaired; replacements must be generated | ||
47 | using | ||
48 | .Xr ssh-keygen 1 . | ||
49 | Make sure to update | ||
50 | .Pa authorized_keys | ||
51 | files on all systems where compromised keys were permitted to authenticate. | ||
52 | .Pp | ||
53 | The argument list will be interpreted as a list of paths to public key files | ||
54 | or | ||
55 | .Pa authorized_keys | ||
56 | files. | ||
57 | If no suitable file is found at a given path, | ||
58 | .Nm | ||
59 | will append | ||
60 | .Pa .pub | ||
61 | and retry, in case it was given a private key file. | ||
62 | If no files are given as arguments, | ||
63 | .Nm | ||
64 | will check | ||
65 | .Pa ~/.ssh/id_rsa , | ||
66 | .Pa ~/.ssh/id_dsa , | ||
67 | .Pa ~/.ssh/identity , | ||
68 | .Pa ~/.ssh/authorized_keys | ||
69 | and | ||
70 | .Pa ~/.ssh/authorized_keys2 , | ||
71 | as well as the system's host keys if readable. | ||
72 | .Pp | ||
73 | If | ||
74 | .Dq - | ||
75 | is given as an argument, | ||
76 | .Nm | ||
77 | will read from standard input. | ||
78 | This can be used to process output from | ||
79 | .Xr ssh-keyscan 1 , | ||
80 | for example: | ||
81 | .Pp | ||
82 | .Dl $ ssh-keyscan -t rsa remote.example.org | ssh-vulnkey - | ||
83 | .Pp | ||
84 | .Nm | ||
85 | will exit zero if any of the given keys were in the compromised list, | ||
86 | otherwise non-zero. | ||
87 | .Pp | ||
88 | Unless the | ||
89 | .Cm PermitBlacklistedKeys | ||
90 | option is used, | ||
91 | .Xr sshd 8 | ||
92 | will reject attempts to authenticate with keys in the compromised list. | ||
93 | .Pp | ||
94 | The options are as follows: | ||
95 | .Bl -tag -width Ds | ||
96 | .It Fl a | ||
97 | Check keys of all users on the system. | ||
98 | You will typically need to run | ||
99 | .Nm | ||
100 | as root to use this option. | ||
101 | For each user, | ||
102 | .Nm | ||
103 | will check | ||
104 | .Pa ~/.ssh/id_rsa , | ||
105 | .Pa ~/.ssh/id_dsa , | ||
106 | .Pa ~/.ssh/identity , | ||
107 | .Pa ~/.ssh/authorized_keys | ||
108 | and | ||
109 | .Pa ~/.ssh/authorized_keys2 . | ||
110 | It will also check the system's host keys. | ||
111 | .It Fl q | ||
112 | Quiet mode. | ||
113 | Normally, | ||
114 | .Nm | ||
115 | outputs the fingerprint of each key scanned, with a description of its | ||
116 | status. | ||
117 | This option suppresses that output. | ||
118 | .El | ||
119 | .Sh BLACKLIST FILE FORMAT | ||
120 | The blacklist file may start with comments, on lines starting with | ||
121 | .Dq # . | ||
122 | After these initial comments, it must follow a strict format: | ||
123 | .Pp | ||
124 | .Bl -bullet -offset indent -compact | ||
125 | .It | ||
126 | All the lines must be exactly the same length (20 characters followed by a | ||
127 | newline) and must be in sorted order. | ||
128 | .It | ||
129 | Each line must consist of the lower-case hexadecimal MD5 key fingerprint, | ||
130 | without colons, and with the first 12 characters removed (that is, the least | ||
131 | significant 80 bits of the fingerprint). | ||
132 | .El | ||
133 | .Pp | ||
134 | The key fingerprint may be generated using | ||
135 | .Xr ssh-keygen 1 : | ||
136 | .Pp | ||
137 | .Dl $ ssh-keygen -l -f /path/to/key | ||
138 | .Pp | ||
139 | This strict format is necessary to allow the blacklist file to be checked | ||
140 | quickly, using a binary-search algorithm. | ||
141 | .Sh SEE ALSO | ||
142 | .Xr ssh-keygen 1 , | ||
143 | .Xr sshd 8 | ||
144 | .Sh AUTHORS | ||
145 | .An -nosplit | ||
146 | .An Colin Watson Aq cjwatson@ubuntu.com | ||
147 | .Pp | ||
148 | Florian Weimer suggested the option to check keys of all users, and the idea | ||
149 | of processing | ||
150 | .Xr ssh-keyscan 1 | ||
151 | output. | ||