Download Password Security: UNIX Passwords, Dictionary Attacks, Salting, and Graphical Passwords and more Exams School management&administration in PDF only on Docsity!
Fast dictionary attack
EJ Jung [email protected] The University of Iowa
Announcements
Pseudo code due today
- final report due on April 28
- presentations on May 1 and 3
Feedback via email by April 3
Comments from Vigilante
ISP level solution
- super-peers running virtual machines
- separate verification host
- wide deployment for containment Too many SCA’s to verify
- DoS or lying enemies False positive
- network partitioning on selective flows
- verification process helps
- detection mechanism is necessary
Evaluation
- can’t test with the learning set
Password-Based Authentication
User has a secret password.
System checks it to authenticate the user.
- Vulnerable to eavesdropping when password is communicated from user to system
How is the password stored?
How does the system check the password?
How easy is it to guess the password?
- Easy-to-remember passwords tend to be easy to guess
- Password file is difficult to keep secret
UNIX Password System
Uses DES encryption as if it were a hash function
- Encrypt NULL string using password as the key
- Truncates passwords to 8 characters!
- Artificial slowdown: run DES 25 times
- Can instruct modern UNIXes to use MD5 hash function
Problem: passwords are not truly random
- With 52 upper- and lower-case letters, 10 digits and 32 punctuation symbols, there are 94^8 ≈ 6 quadrillion possible 8-character passwords
- Humans like to use dictionary words, human and pet names ≈ 1 million common passwords
Dictionary Attack
Password file /etc/passwd is world-readable
- Contains user IDs and group IDs which are used by many system programs
Dictionary attack is possible because many
passwords come from a small dictionary
- Attacker can compute H(word) for every word in the dictionary and see if the result is in the password file
- With 1,000,000-word dictionary and assuming 10 guesses per second, brute-force online attack takes 50,000 seconds (14 hours) on average - This is very conservative. Offline attack is much faster!
Salt
ejjung:fURxfg,4hLBX:14510:30:Eunjin:/space/ejjung:/bin/bash
/etc/passwd entry salt (chosen randomly when password is first set)
Password hash(salt,pwd,salt)
- Users with the same password have different entries in the password file
- Dictionary attack is still possible!
Basically, encrypt NULL plaintext
Advantages of Salting
Without salt, attacker can pre-compute hashes of
all dictionary words once for all password entries
- Same hash function on all UNIX machines
- Identical passwords hash to identical values; one table of hash values can be used for all password files
With salt, attacker must compute hashes of all
dictionary words once for each password entry
- With 12-bit random salt, same password can hash to 212 different hash values
- Attacker must try all dictionary words for each salt value in the password file
WSJ.com circa 1999 [due to Fu et al.]
Idea: use user,hash(user,key) as authenticator
- Key is secret and known only to the server. Without the key, clients can’t forge authenticators.
Implementation: user,crypt(user,key)
- crypt() is UNIX hash function for passwords
- crypt() truncates its input at 8 characters
- Usernames matching first 8 characters end up with the same authenticator
- No expiration or revocation
It gets worse… This scheme can be exploited to
extract the server’s secret key
Attack
username crypt(username,key,“00”) authenticator cookie Attacker Attacker
008H8LRfzUXvk Attacker1008H8LRfzUXvk 008H8LRfzUXvk Attacker2008H8LRfzUXvk Create an account with a 7-letter user name… AttackeA 0073UYEre5rBQ Try logging in: access refused AttackeB 00bkHcfOXBKno Access refused AttackeC 00ofSJV6An1QE Login successful! 1st^ key symbol is C Now a 6-letter user name… AttackCA AttackCB
001mBnBErXRuc 00T3JLLfuspdo
Access refused Access refused… and so on
- Only need 128 x 8 queries instead of intended 128^8
- 17 minutes with a simple Perl script vs. 2 billion years
Better Cookie Authenticator
Capability Expiration Hash(server secret, capability, expiration)
Describes what user is authorized to do on the site that issued the cookie
Cannot be forged by malicious user; does not leak server secret
History of password cracking:
1988 – Clifford Stoll [Clifford Stoll, “Cuckoo’s Egg”]
- default and easily guessable passwords
- the attacker copied /etc/passwd for offline attack.
1989 - Feldmeier and Karn [CRYPTO`89]
- 1092.8 crypts per second on Sun Sparc.
Further Cracking Issues
Many users and institutions do not use the full
character set in their passwords.
People who only use single Case Letters and
Digits can be cracked in under a month!
Password cracking lends itself to parallel
processing.
Numbers represent the time to exhaust all
possibilities. Not likelihood!
PGP Snowflakes [Levien 1996]
A graphical approach to displaying hash outputs
- Computed in < 200 lines of C
Random Art [Bauer 1998; Perrig & Song
1999; Dhamija & Perrig 2000]
Another approach to visualizing hash outputs
- Hash value used as seed to generate a functionf: [−1,1] 2 → [−1,1] 3
- f(x,y) is the RGB triple for pixel at (x,y)
Graphical Passwords
[Blonder 1996; Jermyn et al. 1998]
Suitable mainly for PDAs permitting stylus input
Useful for encrypting private key, or seeding its
generation
Sequence = (2,2)(3,2),(3,3),(2,3),(2,2),(2,1),(5,5) Key = hash(Sequence)
pen-up
Memorable Password Space
Comp = 24
Comp = 39
Comp = 42
Comp. Passwords 3 25 4 165 5^398 6 1, 7 7, 8 34, 9 165, 10 614, 11 2,279, 12
Surpasses size of the dictionary used in [Klein 1990].
Encryption Application for PDA
Password input Internal representation Plaintext
Internal representation Password input
Challenge of Graphical Schemes
How secure are they, really?
Can an attacker generate a key for which the
snowflake or art depiction fools someone with
non-negligible probability?
- Depends on lighting, size of representation, printer quality, …
Is the entropy of a graphical password really
better than a text password?
Only user studies will tell …
References
Clifford Stoll, 1989, “Cuckoo’s Egg”
D.C. Feldmeier and P.R. Karn, CRYPTO`89, “UNIX Password Security-Ten Years Later”
Kevin Fu et al, Usenix Security 2001, “Dos and Don’ts of Client Authentication on the Web”
Paul Bobby 2000 “Password Cracking Using Focused Dictionaries”
- http://www.totse.com/en/hack/hack_attack/162116.html
GeodSoft 2007 “Password Cracking Goals, Techniques, Relative Merits, and Times”
- http://geodsoft.com/howto/password/cracking_passwords.htm