文档介绍:Authentication
“What was your username again?” clickety clickety
— The BOFH
User Authentication
Basic system uses passwords
• Can be easily intercepted
Encrypt/hash the password
• Can still intercept the encrypted/hashed form
Modify the encryption/hashing so the encrypted/hashed
value changes each time (challenge/response
mechanism)
User Authentication (ctd)
Vulnerable to offline password guessing (attacker knows
challenge and encrypted challenge, can try to guess the
password used to process it)
User Authentication (ctd)
There are many variations of this mechanism but it’s very
hard to get right
• Impersonation attacks (pretend to be client or server)
• Reflection attacks (bounce the authentication messages
elsewhere)
• Steal client/server authentication database
• Modify messages between client and server
• Chess grandmaster attack
Simple Client/Server Authentication
Client and server share a key K
• Server sends challenge encrypted with K
– Challenge should generally include extra information like
the server ID and timestamp
• Client decrypts challenge, transforms it (eg adds one, flips the
bits), re-encrypts it with K, and sends it to the server
• Server does the same pares the two
Properties
• Both sides are authenticated
• Observer can’t see the (unencrypted) challenge, can’t perform
a password-guessing attack
• Requires reversible encryption
Something similar is used by protocols like Kerberos
Unix Password Encryption
Designed to resist mid-70’s level attacks
Uses 25 iterations of modified DES
Salt prevents identical passwords from producing the same
output
crypt16
Handles 16 characters instead of 8
• 20 DES crypts for the first 8
• 5 DES crypts for the second 8
Result was weaker than the original crypt
• Search for passwords by suffix
• Suffix search requires only 5 DES crypts
LMHASH
From MS LAN Manager
Like crypt16 but without the salt
• If password < 7 chars, second half is