8 OSF DCE SIG J. Pato (GZA)
9 Request For Comments: 26.0 June 1993
13 USING PRE-AUTHENTICATION TO AVOID
14 PASSWORD GUESSING ATTACKS
19 Users select poor passwords.
21 The strength of a security system is measured by the strength of its
22 weakest link. Frequently, the weakest link is the password selected
23 by a user. Password quality filters help impose restrictions on the
24 type of password a user selects -- but ultimately a key derived from
25 a password that can be remembered and typed by a human is weaker than
26 a truly random key. Attackers frequently take advantage of this
27 property to break into systems ([Gram 84], [Seel 89], [Spaf 89]).
28 Consequently, we must develop systems that make it harder for an
29 attacker to leverage the weakness of password derived keys.
32 2. CURRENT PROTOCOL EXPOSURES
34 The Kerberos V5 protocols [Kohl 92] are subject to password guessing
37 (a) Attacks on a ticket issued for a given server principal.
39 (b) Attacks on a principal's ticket granting ticket.
41 These attacks share a common method -- the attacker obtains data from
42 the KDC encrypted using the victim's key. The data returned from the
43 KDC contains verifiable plaintext -- an attacker will be able to
44 determine if they have guessed the proper key. The format of the
45 data does not lend itself to an attacker with a pre-computed
46 dictionary in the way a UNIX "/etc/passwd" file is vulnerable, but
47 this simply increases the amount of time necessary to mount an
48 attack. The attacker can simply make a network request to obtain the
49 data and then proceed to attack it on a high speed processor.
51 In general the first attack is not as troubling as the second. In
52 the DCE, servers and human users generally do not share a principal.
53 Consequently, servers need not maintain keys that are derived from
54 passwords. Server keys are typically generated from the full 56-bit
55 DES key space and are much harder to attack than a key derived from a
56 password. Human principals can be protected from an attack on their
57 password-derived key by allowing them to act only as a client and not
58 a server. The DCE registry database maintains administrative
70 DCE-RFC 26.0 Pre-Authentication June 1993
74 information about principals that determines which may act as
75 clients, which as servers and which may be both.
77 2.1. Protecting Client Principals
79 The simplest mechanism for protecting client principals is to provide
80 each principal with a device that stores a true 56-bit random DES
81 key. The user's password then unlocks the device -- but is not used
82 in any network protocols. This insulates the password derived key
83 from network attacks. This approach, however, relies on the
84 widespread availability of the appropriate devices.
86 In the absence of hardware support, we must enhance the basic
87 authentication protocol to avoid issuing a TGT encrypted using the
88 user's key unless the KDC has been presented with proof that the
89 caller knows the user's key. With this change, the KDC will not
90 issue the data to an attacker -- and it can notice persistent
91 failures to establish a given principal's identity, recognize this as
92 an attack, and take appropriate protective action.
95 3. USING PRE-AUTHENTICATION
97 The Kerberos V5 protocol allows the initial authentication request to
98 carry optional pre-authentication data (padata). Currently the
99 specification of the protocol does not define specific uses of this
100 field, but the recent MIT Beta 2 implementation of the protocol has
101 implemented a basic prototype facility. The MIT prototype takes the
102 current time of day and encrypts it using the client principal's key.
103 This data is sent to the KDC in the padata field to allow the KDC to
104 determine that the request was timely and that the requester had
105 access to the client's key. If the buffer decrypts correctly the KDC
106 processes the request normally.
108 The following is the redefinition in ASN.1 of the prototype pre-
111 PADATA-ENC-TIMESTAMPS ::= EncryptedData
112 -- encrypted using the key of the client principal
114 PADATA-ENC-USERINFO ::= SEQUENCE {
116 cur_time [1] KerberosTime,
120 This approach has many of the benefits needed to avoid password
121 guessing attacks. It is, however, still vulnerable to attackers who
122 can listen to network messages. This weakness is due to using the
123 client's password to encrypt verifiable plaintext [Loma 89]. An
124 attacker can sniff the appropriate requests and replies on the
136 DCE-RFC 26.0 Pre-Authentication June 1993
140 network, and then attack them offline.
142 3.1. Third Party Pre-Authentication Sponsor
144 In the DCE, we have the opportunity to use a stronger approach and
145 avoid sending any data over the network that is encrypted using the
146 user's key. In the DCE, each machine has a corresponding
147 authentication principal and the machine knows the key shared with
148 the KDC. This allows us to use a key known to the local machine and
149 the KDC to encrypt data rather than a key derived from the user's
152 The "PADATA-ENC-THIRD-PARTY" pre-authentication type provides a
153 mechanism for the KDC to verify that the client knows a principal's
154 key without exposing that key to network eavesdroppers. The padata
155 contains three components: a ticket granting ticket (TGT) for the
156 third party principal; a random key encrypted using the session key
157 of the TGT; and a buffer encrypted using the client principal's key
158 then encrypted under the preceding random key. Specifically:
160 PADATA-ENC-THIRD-PARTY ::= SEQUENCE {
162 enc-subkey [1] EncryptedData,
163 -- encrypted using the ticket session key
164 enc-userinfo [2] EncryptedData
165 -- encrypted using the subkey
168 PADATA-ENC-THIRD-PARTY-SUBKEY ::= EncryptionKey
170 PADATA-ENC-THIRD-PARTY-ENC-USERINFO ::= EncryptedData
171 -- encrypted using the key of the client principal
173 PADATA-ENC-THIRD-PARTY-USERINFO ::= PADATA-ENC-USERINFO
175 When a client principal is about to initiate a KRB_AS_REQ (initial
176 authentication exchange with the KDC) it obtains the TGT for the
177 third party sponsor, a usable version of the random subkey and a
178 version of the same key encrypted under the session key in the third
179 party's TGT. The ticket identifies the third party sponsor for the
180 authentication exchange and establishes a shared key between the KDC
181 and the third party sponsor. Note that the third party sponsor must
182 obtain a TGT to the cell of the client principal, since the ticket
183 passed in this message must be understood by the authentication
184 server of the client's home cell.
186 The client encrypts the current time using the key derived from its
187 password. The full encrypted data block is then encrypted with the
202 DCE-RFC 26.0 Pre-Authentication June 1993
206 3.2. Handling Pre-Authentication at the KDC
208 The principal database is extended with a per-principal attribute
209 that determines if that principal must use pre-authentication and if
210 so, which forms of preauthentication are permitted. When this
211 attribute is set the principal is protected from initial
212 authentication password guessing attacks. The KDC will not generate
213 a "KRB_AS_REP" message for a principal that requires pre-
214 authentication if the "KRB_AS_REQ" message did not properly use pre-
215 authentication, instead it will issue a "KRB_ERROR" message with
216 status "KDC_PREAUTH_FAILED".
218 When "PADATA-ENC-TIMESTAMPS" is used, the KDC simply verifies that
219 the client knew the correct password, and then yields a normal
220 "KRB_AS_REP" message. Upon receipt of a "KRB_AS_REQ" bearing the
221 "PADATA-ENC-THIRD-PARTY" padata type, the KDC decrypts the various
222 buffers and also verifies that the client knew the correct password.
223 The encrypted portion of the "KRB_AS_REP" message, however, is not
224 encrypted using the client's key; the random subkey from the padata
228 4. DETECTING AND THWARTING PASSWORD GUESSING ATTEMPTS
230 When a principal requires pre-authentication, it is possible for the
231 KDC to detect failed initial authentication attempts. This allows
232 the system to take protective action when an attack is detected.
233 Policy attributes control the frequency of and place limits on
234 attempts at initial authentication. When the policy-driven
235 thresholds are exceeded, the KDC will mark the principal as invalid
236 for initial authentication and alert administrators.
238 The DCE (1.0.2 and later) supports weak replication of the KDC
239 database -- so the limits on attempts cannot be hard. The limits are
240 proportional to the number of replicas in the cell. When a replica
241 detects that an attack has exceeded the limits at that replica, it
242 will send an update to the master to disable that principal's access.
243 Cell policy may also be configured to have each slave replica inform
244 the master after a given number of failed attempts that is smaller
245 than the disabling threshold. This increases the amount of traffic
246 from a slave to the master, but allows the master to detect intrusion
247 attempts that attempt to circumvent the limits by trying multiple
248 replicas. When the master accumulates failed login attempts from
249 multiple slaves that exceed the limits for a principal, it will
250 automatically disable access for that principal without waiting for a
251 given replica to exceed the threshold.
268 DCE-RFC 26.0 Pre-Authentication June 1993
272 4.1. Preventing Denial of Service Attacks
274 The account lockout mechanism described above suffers from the
275 vulnerability to denial of service attacks. An attacker who wishes
276 to prevent a system administrator, or any other legitimate user, from
277 accessing the distributed system need only simulate a password
278 guessing attack to prevent the legitimate user from having access to
281 The probability of denying access to a legitimate user can be
282 lessened by adding a time period for the account lockout. Rather
283 than letting the password guessing attempt lockout the account until
284 a manual administrative action is taken, the account is locked out
285 for a configurable period of time. This period establishes the rate
286 at which an attacker can attempt to guess the given user's password.
287 The configurable period of time can be set to an infinite value if
288 manual administrative action is the desired policy.
293 Ted T'so (MIT) provided the prototype pre-authentication facility.
294 Charlie Kaufman (DEC) and Bill Sommerfeld (HP) provided comments and
295 suggestions on the third party sponsor pre-authentication facility.
296 Some aspects of this design were influenced by contributors to the
297 Kerberos mailing list during the June 1990 discussion on initial
300 DCE-RFC 26.0 was developed and written while the author was at
301 Hewlett-Packard Company.
306 [Gram 84] F. T. Grampp and R. M. Morris, "UNIX Operating System
307 Security", AT&T Bell Laboratories Tech J. 63, 8, part 2,
310 [Kohl 92] John Kohl and B. Clifford Neuman, "The Kerberos Network
311 Authentication Service", INTERNET-DRAFT RFC, revision
312 5.1, 1 September 1992
314 [Loma 89] T. Mark A. Lomas, Li Gong, Jerome H. Saltzer and Roger M.
315 Needham, "Reducing Risks from Poorly Chosen Keys", in
316 Proceedings of the Twelfth ACM Symposium on Operating
317 Systems Principles, December, 1989.
319 [Seel 89] Donn Seeley, "Password Cracking: A Game of Wits",
320 Communications of the ACM 32, 6, June 1989.
334 DCE-RFC 26.0 Pre-Authentication June 1993
338 [Spaf 89] Eugene H. Spafford, "Crisis and Aftermath",
339 Communications of the ACM 32, 6, June 1989.
344 Joseph N. Pato Internet email: pato@gza.com
345 Geer-Zolot Associates Telephone: +1-617-374-3700