Another
solution is to use encrypted passwords over the network. You must use caution, however,
when simplifying this technique. Even with encryption, a sniffer can still
record the encrypted password and decipher the encrypted password at his or her
leisure. One way round
this
is to use an encryption key that involves the current time. If the sender and
receiver are closely synchronized, the sniffer must replay the encrypted
password within one tick of the two machines’ shared clock. If the sender and
receiver are widely separated, however, this technique becomes less practical and effective
because shared clocks will lack sufficient time resolution to prevent an
attacker from using a quick replay. One way around this lack of close
synchronization is to set a limited number of attempts at typing the password
correctly.
It
also does not suffice to simply encrypt the password with an algorithm using a
key that allows an attacker to determine the encryption key. The attacker would
decrypt it for repeated use at a later time. Some protocols use an encryption
technique equivalent to the one used by the Unix password program when it stores
passwords in the password file. This encryption technique is no longer
considered particularly secure against brute force cryptographic attacks where
all likely passwords are encrypted with the same algorithm used by the password
file.
Any
two words that encrypt the same must be the same. Hence, poorly chosen (for
example, dictionary words) or short passwords are particularly easy to crack by
brute force. What is required is the use of public key cryptography such as PGP.
In public key cryptography (also called asymmetric cryptography), you use
separate keys for encryption and decryption—the decryption key is not
computable from the encryption key. The server can send the client its public
key and the client can use that key to encrypt the user password.
The
server then decrypts the password to verify the authenticity of the user. This
is a variation on the classic public key system in which a trustworthy third
party holds the public keys, but it simplifies the case when no mutually
trusted third party is available. It also allows the server to use a
time-dependent public key to prevent password replay or brute force decryption
of a relatively short password.
The
use of Kerberos also prevents cleartext passwords from being sent across the
network. Kerberos is a comprehensive authentication system using a
sophisticated time varying encryption algorithm and requires that both systems
at the ends of a communication connection trust a separate security server to
negotiate the authentication. This avoids having servers trust clients to do
the authentication, as the rlogin protocol must do. See Chapter 9 for more information
on Kerberos.
No comments:
Post a Comment