Storage Security Levels
Filing System
Clear text
Dedicated Authentication Server
Clear text
Encrypted
Password + Encryption = bf4ee8HjaQkbw
Hashed
Password + Hash function = aad3b435b51404eeaad3b435b51404ee
Salted Hash
(Username + Salt + Password) + Hash function = e3ed2cb1f5e0162199be16b12419c012
Hashing
Instead of user password, store hash of password
When user enters password, compute its hash and compare with entry in password file
System does not store actual passwords
Hash function H must have some properties
One-way - given H(password), hard to find password
No known algorithm better than trial and error
Collision-resistant - given H(password1), hard to find password2 such that
H(password1)=H(password2)
It should even be hard to find any pair
p1,p2 s.t. H(p1)=H(p2)
Salting
Salting requires adding a random piece of data and to the password before hashing it
This means that the same string will hash to different values at different times
Users with the same password have different entries in the password file
Salt is stored with the data that is encrypted
Hacker has to get the salt add it to each possible word and then rehash the data prior to comparing with the stored password
Brute Force Attack
Guaranteed to work (eventually)
Determine alphabet to use in search
95 printable characters on a standard keyboard
Password policy may exclude some characters
Rainbow tables offer trade-off between time and space
Fast because of simple lookup
Requires a large amount of space
For example, around 1TB for a full character set RT with 1-7 character passwords
Large salts kill Rainbow Tables
Rainbow Table Attack
A password database usually generates a key for a rainbow table and encrypts a password before storing it
When a user enters a password for the n-th time, the password is again encrypted with the same key string and then matched with the stored value
A rainbow table is a precomputed lookup table used in cryptography for storing password hashes
It is used for recovering a password based on its hash value
Dictionary Attacks
Only works if password is in the dictionary
Determine dictionary to use
Intelligent
Select wordlists in the relevant languages
Tailor to subject (add relevant words)
Sort list by expected frequency
Define “mangling” rules for dictionary word variations
Quick and Dirty (and possibly slow)
Collect as many wordlists as possible
Lists of words in relevant languages
Lists of cracked passwords from leaks (sorted by frequency)
Remove duplicate entries (intelligent)
Wordlists
Standard wordlists
Dictionaries
Leaked password files
Lists of popular names, pop bands, films, actors, …
Dictionaries scraped from target web-site
This may include names of employees
Targeted dictionaries from reconnaissance team
Names of family members, pets, license plates, boat names, …
Special dates: birthdays (incl. family members), wedding day, …
Passwords - 10 Common Mistakes
Leaving passwords blank or unchanged from default value
Using the letters p-a-s-s-w-o-r-d as the password
Using a favourite movie star name as the password
Using a spouse’s name as the password
Using the same password for everything
Writing passwords on post-it notes
Pasting a list of passwords under the keyboard
Storing all passwords in an Excel spreadsheet on a PDA or inserting passwords into a rolodex
Writing all passwords in a personal diary
Giving the password to someone who claims to be the system administrator -Spam or phishing Email