21.03.2013 Views

Problem - Kevin Tafuro

Problem - Kevin Tafuro

Problem - Kevin Tafuro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.8 Throttling Failed Authentication Attempts<br />

<strong>Problem</strong><br />

You want to prevent an attacker from making too many attempts at guessing a password<br />

through normal interactive means.<br />

Solution<br />

It’s best to use a protocol where such attacks don’t leak any information about a<br />

password, such as a public key–based mechanism.<br />

Delay program execution after a failed authentication attempt. For each additional<br />

failure, increase the delay before allowing the user to make another attempt to<br />

authenticate.<br />

Discussion<br />

Throttling failed authentication attempts is a balance between allowing legitimate<br />

users who simply mistype a password or passphrase to have a quick retry and delaying<br />

attackers who are trying to brute-force passwords or passphrases.<br />

Our recommended strategy has three variables that control how it delays repeated<br />

authentication attempts:<br />

Maximum number of attempts<br />

If this limit is reached, the authentication should be considered a complete failure,<br />

resulting in a disconnection of the network connection or shutting down of<br />

the program that requires authentication. A reasonable limit on the maximum<br />

number of allowed authentication attempts is three, or perhaps five at most.<br />

Maximum number of failed attempts allowed before enabling throttling<br />

In general, it is reasonable to allow one or two failed attempts before instituting<br />

delays, depending on the maximum number of allowed authentication failures.<br />

Number of seconds to delay between successive authentication attempts<br />

For each successive failure, the delay increases exponentially. For example, if the<br />

base number of seconds to delay is set to two, the first delay will be two seconds,<br />

the second delay will be four seconds, the third delay will be eight seconds,<br />

and so on. A reasonable starting delay is generally one or two seconds, but<br />

depending on the settings you choose for the first two variables, you may want<br />

to increase the starting delay. In particular, if you allow a large number of<br />

attempts, it is probably a good idea to increase the delay.<br />

The best way to institute a delay depends entirely upon the architecture of your program.<br />

If authentication is being performed over a network in a single-threaded server<br />

that is multiplexing connections with select( ) or poll( ), the best option may be to<br />

398 | Chapter 8: Authentication and Key Exchange<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!