In this lecture we'll discuss rainbow tables! As we've already seen passwords are normally stored
in one way hashes. When a passport is created the user types the password in so called "plain text”
or “clear text” form.
Then the computer calculates and the stores a one-way hash of the password so that no one, not even
the admin could see the clear text password. For example
this is the hash of the password of User 1. Hashes are made to be one way, which means they cannot be
reversed or in simple words
if you have the hash you cannot find out from what password was the hash generated.
A hacker has to crack those hashes.
Normally when someone cracks a password hash he generates the hash form a word.
then compares it to see if there is a match.
If there is the word is the password.
If not the hacker will repet this operation.
This proves to be really time consuming; it can take days, weeks or even years
if we are dealing with a strong password. Rainbow tables on the other hand are based on the principle
of a time memory tradeoff.
This means that hashes are pre generated by a computer and stored in a large rainbow table file with
all of the hashes and words that correspond to them. A rainbow table can be thought of like a dictionary.
It holds combinations of characters on one side and their hashed form on the other.
Rainbow table cracking can greatly reduce the amount of time it takes to crack a password hash.
Plus you can keep the tables so you only have to generate them once.
The downside of using rainbow tables is that it takes a very long time to generate them and occupies
a lot of storage; but once they are generated they can be easily used.
There are a lot of rainbow tables available on the Internet, both free or not.
For example you can find a lot of rainbow tables that are free to download at freerainbowtables.
com. Each rainbow table is for a specific hash algorithm and we notice how much space they require.
For example the rainbow table for all alphanumeric passwords, with a length of 1 to 9, occupies 1 terabyte.
The hash algorithm is md5, which is by the way an old and obsolete hashing protocol.
If they would use a new protocol like sha512 the size of the rainbow tables would be much larger.
Another interesting website is crackstation.net. Crack station uses massive pre computed lookup
tables to crack password hashes; crack station lookup tables were created by extracting every word from
the Wikipedia databases and adding it to every password list they could find.
They also applied intelligent word mangling or brute force hybrid to those word lists to make them
much more effective; only for md5 and sha1 hashes the rainbow table is one 190 gigabytes.
It also supports a lot of hashing algorithms. The old ones like md5 and sha1, but also new ones
like sha256 and sha512. Let's
see how it works. I suppose that the user sets his password as being "apple" and uses md5 as the hash
algorithm.
Using this online tool I'm selecting md5 and the password "apple".
This is its hash that will be stored in a file.
I'll paste the hash in crackstation.net.
Another user has as password "greenapple".
It's calculated using sha1 index stronger having a length of 10 characters so "greenapple". I'll paste
the hash in crack station.
Let's see the hash of the third password, which is "marverde",
which means green apple in Romanian.
I'll select another hash algorithm sha256 marverde.
I'm copying the hash and then pasted in crack station;
and the last one, a stronger one,
let's say, special player, using a very strong algorithm like sha512. I'm selecting the
hash algorithm: specialplayer.
You can see that its hash is much larger.
I am pasting it here; let's crack them!
I'm not a robot and crack
hashes; wow, we noticed that all passwords have been cracked: the hash, the algorithm and the password.
Their hashes were already in the rainbow tables of crackstation.net and the application only
searched for those hashes which was a simple operation.
Now if a user takes security seriously and sets a strong password it won't be cracked so easily.
Let's try a password with a length of at least 10 characters, both lower and uppercase letters, digits
and special characters.
This is a strong password.
It has a length of 10 characters; let's try to crack it.
It couldn't be cracked.
OK.
That's all about rainbow tables for the moment. In the next lectures I'll show you how to generate your
own rainbow tables and how to try to crack hashes
using the generated tables.