Welcome back!
In the last lecture we've discussed how Linux system stores the user's passwords.
Now it's time to talk about cracking them. Cracking the passwords means having the hash and trying
to obtain the clear text password.
There are two main ways someone can try to crack the passwords: using brute force or a dictionary attack
and using rainbow tables. A brute force attack consists of an taker that uses an automated software
that systematically checks all possible passwords until the correct one is found.
This is in fact a trial and error process in which the hacker computes the hash of each word in a dictionary
or a word list and then compares the resulting hash to the hash of the password.
If the hashes are equal the password has been found.
This classical technique is simple and straightforward but it takes a very long time,
when the used password is long enough.
In fact if you use a strong password and that means a random password of at least 12 or 14 characters
consisting of letters digits and special characters it's impossible to be cracked in a reasonable amount
of time.
Let's talk about rainbow tables!
This is the second approach.
These tables are precomputed tables used for reversing cryptographic hash functions, usually used for tracking
password hashes. Imagine that someone has already spent a lot of time and has computed the hashes of
all the words in a very large dictionary.
The hacker has the hash of the password he wants to crack and searches for that hash in the list of
precomputed hashes of the rainbow table.
If it's a there he has cracked the password.
This is a practical example of a spacetime tradeoff using less computer processing time and the
more storage then a brute force attack, which calculates a hash on every attempt. A brute force attack
takes a lot of time even years,
but that doesn't require a lot of storage,
while a rainbow table requires a lot of space, many tens or hundreds of gigabytes, but it doesn't require
a lot of time.
You search for a hash in a matter of seconds or tens of seconds depending on how big the rainbow
table is. Either way using a brute force attack or a rainbow table
the hacker should have the hash of the password.
Generally this is obtained by hacking the database that stores the password hashes. Over the years
most of the biggest email or other service providers like Yahoo, LinkedIn, YouTube, or Adobe have had security
breaches and their password databases stolen by hackers.
A nice website is
"haveibeenfound.com"
and there you could check if you have an account that has been compromised in a data breach.
If you find your e-mail address in that list it doesn't mean that the hackers have your password but
that they have the hash of your password and that they could try to crack it off line. In this lecture
we've talked about the principles of cracking passwords. In the next lecture
I'll show you how to crack passwords using a brute force attack and John the Ripper.