Rainbow Tables PDF
Rainbow Tables PDF
EXPLAINED
By: Warpboy
Table of Contents
0x01: Defining Rainbow Tables
0x02: Time-Memory Trade-Off
0x03: Setting Up Software
0x04: Generating Rainbow Tables
0x05: Cracking Hashes
0x06: The End
0x07: Shoutz / Contact Info
Total Pages: 11
SDB www.securitydb.org 0x01
The traditional way to crack passwords is brute forcing, which would simply just
try all the plaintexts one by one. This was and still is a time consuming method of
cracking passwords. The implementation of Philippe Oechslin's time-memory trade-off
method of decreasing time of cryptanalysis by using precalculated data stored in
memory, is being used in rainbow tables. The idea of time-memory trade-off is to do
all cracking time computation in advance and store the result in files (rainbow tables).
The process of pre- computation of rainbow-tables does take a decent amount
of time. However, once all the tables are created, the time-memory trade-off cracker is
hundreds of times faster than a traditional brute force cracker. Time-memory trade-off
has revolutionized password cracking by decreasing the time of cryptanalysis. To
summerize, time-memory trade-off is used in rainbow tables to speed up the time it
takes to crack a ciphertext.
Let's download and setup RainbowCrack. Extract its contents to your preferred
directory; "C:\" for the tutorials sake, and rename the folder to something like
"rainbowcrack". After extracting it should look something like in Figure 1.1, below.
If it helps, you may want to take a look at the ReadMe, but this really isn't
necessary. If there were no extraction errors and the files contents match the ones in
the zip archive you downloaded from the Project RainbowCrack homepage, then you
have successfully installed RainbowCrack to your computer.
Before you can begin to crack hashes you need to have a good amount of
rainbow tables available. Therefore, during this chapter the generation process of
rainbow tables is covered. The amount of space you are willing to set aside for your
rainbow tables completely depends on your personal preference. If you have under
100gb I wouldn't recommend generating to many rainbow tables.
The program used to generate rainbow tables is "rtgen", located in the
RainbowCrack directory we created earlier. To generate rainbow tables you need to
specify specific arguements, these arguements consist of:
hash algorithm \ character set \ plaintext length minimum \ plaintext length maximum \
rainbow table index \ rainbow chain legth \ rainbow chain count \ file title suffix
Rainbow Chain Length: The length of the rainbow chain (exp: 11300)
Rainbow Chain Count: The amount of rainbow chains to generate (exp: 6000)
File Title Suffix: This is used for rainbow tables which are to be linked with
eachother to prevent duplicating (exp: 0)
Now you should be in the rainbow crack directory, like below in Figure 1.3.
SDB www.securitydb.org
Now that you are in the RainbowCrack directory you need to start 'rtgen.exe' or
the rainbow table generator and then you can start to generate the rainbow tables.
Let's start rtgen and see what happens, see Figure 1.4 below.
As you can see it's just the arguments (covered earlier) that rtgen requires to
generate a table based on the user inputted arguments. Now that we know how the
program works, let's generate our first rainbow table. Before you can generate, it's a
good idea to benchmark or figure out how long the table is going to take to be created.
To do this you use the -bench argument, see Figure 1.5 below.
SDB www.securitydb.org
After you have tested to see how long the generation process is going to take,
you're ready to start generating. The disheartening part about the generation process
is that it usually takes an incredibly long time. If you have multiple computers, then
generating sets of rainbow tables would obviously not take as long.
Sets of rainbow tables are just rainbow tables based on each other, for
example you can't have a 39 GB rainbow table because the computer can't handle
this large size. However, you can have 39 by 1 GB tables; you can do this by having
indexes on your tables. Rtgen knows that if the index is 1 and there is a 0 indexed
table then it won't re-generate the same contents that were in the first table(0 table).
Basically, rainbow table sets allow you to have multiple tables that really are one big
table, just split up into separate ones.
In Figure 1.6 below, there is a basic 1-3 character lower-alpha char. set
rainbow table generating. After its generated it should look something like Figure 1.7.
SDB www.securitydb.org
After the generation process is complete you have to sort the rainbow table
using rtsort, all this program does is organize the newly created rainbow table. See
Figure 1.8 below, where the previous rainbow table that was generated in Figure 1.7
is being sorted.
After generating and sorting is complete it's time to test the rainbow table out.
0x05
Cracking Hashes
Since the rainbow table's algorithm that we just generated is MD5 lets go
encrypt a simple plain-text with the alogrithm. There are tons of online MD5
encryptors on the net, to make it easy you can go to www.securitydb.org/cracker/ or
you can google "MD5 encryptor".
Remember when submitting the plain text, make sure it matches the character
set used in the previously generated rainbow table. For the sake of this paper, im
going to encrypt 'ad' (without quotes) with the md5 alogrithm. Then I am going to
attempt to crack the hash with the rainbow table. This is really only to test the rainbow
tables ability.
ad:523af537946b79c4f8369ed39ba78605
Now the rainbow table should be able to crack the hash and give the plaintext
'ad'. The program used is rcrack, the arguements for it are easy, you can actually load
all the rainbow tables in a directory with it, but in this tutorial we are only using one
rainbow table.
SDB www.securitydb.org
In Figure 1.9 (below) 'rcrack' is searching for the hash in the rainbow table.
In Figure 2.1 (below) you can see the rainbow table worked.
Congrats! You have successfully generated and sorted a rainbow table and
used it to crack a simple hash. With 'rcrack' there are 2 other arguments besides (-h).
You have -p which handles a password dump file, only with the lan manager algorithm
though. Then there is -l, which handles a text file with hashes. So you can crack
multiple hashes in 1 session.
SDB www.securitydb.org 0x06
The End
During this paper, the word 'crack' or 'cracking' is used; however, the hashes
are never really cracked. The MD5 and LM algorithms have not yet been cracked,
they are said to be one-way algorithms so they can only be looked up. So really when
you say "Im cracking this hash with my rainbow tables", you are incorrect. However,
with modern slang that statement could be treated as if it were valid.
Some resources for furthering your knowledge on rainbow tables:
www.antsight.com/zsl/rainbowcrack/
http://en.wikipedia.org/wiki/Rainbow_table
http://lasecwww.epfl.ch/~oechslin/publications/crypto03.pdf
www.milw0rm.com/cracker/
www.plain-text.info
0x07
Shoutz / Contact Info
---------------
Contact Info
---------------
E-mail: [email protected]
MSNM: [email protected]
Website: www.securitydb.org