|
It is currently 30 Jul 2010, 11:52
|
View unanswered posts | View active topics
 |
|
 |
|
| Author |
Message |
|
PowerBlade
|
Post subject: Dictionary based rainbow tables Posted: 21 Jun 2008, 09:09 |
Joined: 11 Oct 2007, 21:17 Posts: 1218 Location: Copenhagen, Denmark
|
Hey guys! I just wanted to post the sample code for dictionary based rainbow tables. I had it finished for quite some time, but then forgot about it. :p Its a rainbowtable generator which takes a dictionary file as a source, and then does word mangling rules on the words to generate new words based on the options. (password => password12, password => PaSSword etc) It supports adding numbers in front of the word and in the end, full case permutation, title case, last character case mutation and 1337 permutations. The 1337 permutations should probably be looked at. I have a feeling its not distribution the characters evenly. Feel free to try it out. I attached both binary and source  To get help for rtgendict, just type rtgendict and it will show you the options. Edit: Files updated to reflect the optimization changes
|
|
|
|
 |
|
Sc00bz
|
Post subject: Re: Dictionary based rainbow tables Posted: 21 Jun 2008, 12:00 |
Joined: 03 Dec 2007, 11:37 Posts: 725
|
|
|
|
 |
|
Sc00bz
|
Post subject: Re: Dictionary based rainbow tables Posted: 21 Jun 2008, 12:08 |
Joined: 03 Dec 2007, 11:37 Posts: 725
|
wow... CanLeetPerm and GetLeetPerm are very slow. Try using a map (an array with 256 elements that have the mapped char in it). wow i just noticed that's messed up, fixing code. inline int CanLeetPerm(int nLetter) { // return map[nLetter] != nLetter; return mapNum[nLetter]; }
inline int GetLeetPerm(int nLetter, int nNum) { // return map[nLetter]; return map[nLetter][nNum]; }
_________________ http://www.tobtu.com/
|
|
|
|
 |
|
Sc00bz
|
Post subject: Re: Dictionary based rainbow tables Posted: 21 Jun 2008, 12:46 |
Joined: 03 Dec 2007, 11:37 Posts: 725
|
|
It "looks" like it is evenly distribution. Granted I haven't immersed myself into the code but doing the binary search thing will basically make it evenly distributed unless there is a collision in the dictionary, but this will be a rare occurrence.
btw: "pow((double)2, (double)nChar)" is the same as doing "1 << nChar" but much slower since pow deals with doubles and << is a bit shift on integers.
_________________ http://www.tobtu.com/
|
|
|
|
 |
|
PowerBlade
|
Post subject: Re: Dictionary based rainbow tables Posted: 21 Jun 2008, 13:04 |
Joined: 11 Oct 2007, 21:17 Posts: 1218 Location: Copenhagen, Denmark
|
Hi Sc00bz. I really appreciate your feedback. I will try to implement your suggestions to speedup the code 
|
|
|
|
 |
|
PowerBlade
|
Post subject: Re: Dictionary based rainbow tables Posted: 21 Jun 2008, 16:00 |
Joined: 11 Oct 2007, 21:17 Posts: 1218 Location: Copenhagen, Denmark
|
|
I've updated the source with Sc00bz suggestions and reattached new source and binary to the first post
|
|
|
|
 |
|
_haxxor_
|
Post subject: Re: Dictionary based rainbow tables Posted: 21 Jun 2008, 19:32 |
Joined: 02 Apr 2008, 15:10 Posts: 833 Location: Romania
|
|
if i have a wordlist with 100.000 words (let's say no permutation is used) and i want my rainbow table to have 100% "success " (to cover all the words in the wordlist) the chain count to be 655360 (10Mb) what would be the chain length? and how to compute that value ? thx
|
|
|
|
 |
|
_haxxor_
|
Post subject: Re: Dictionary based rainbow tables Posted: 21 Jun 2008, 19:45 |
Joined: 02 Apr 2008, 15:10 Posts: 833 Location: Romania
|
|
the dictionary based table must be sorted :-w ... include please rtsort in the archive...
|
|
|
|
 |
|
goodvirus
|
Post subject: Re: Dictionary based rainbow tables Posted: 21 Jun 2008, 20:08 |
Joined: 26 Apr 2008, 12:27 Posts: 40
|
Hi, I have some problemens bye compiling under linux. goodvirus@goodvirus-laptop:~/Desktop/rdict-src$ make g++ Public.cpp ChainWalkContext.cpp HashAlgorithm.cpp HashRoutine.cpp RainbowTableGenerate.cpp -lssl -O3 -o rtgen ChainWalkContext.cpp: In member function »void CChainWalkContext::IndexToPlain()«: ChainWalkContext.cpp:765: Fehler: »itoa« wurde in diesem Gültigkeitsbereich nicht definiert ChainWalkContext.cpp:796: Fehler: »itoa« wurde in diesem Gültigkeitsbereich nicht definiert HashAlgorithm.cpp: In function »void HashORACLE(unsigned char*, int, unsigned char*)«: HashAlgorithm.cpp:150: Fehler: »strupr« wurde in diesem Gültigkeitsbereich nicht definiert make: *** [rtgen] Fehler 1
Openssl and libcurl are installt. I use g++ 4.2.3 I heart that itoa is not C/C++ Standartconform and are only avalibel under windows, is this right? Or missed I something to include. Sincerly goodvirus Edit: I just looked around the code and found a lot of goto statements. Is this realy usefull? My programming professor would kill me... 
Last edited by goodvirus on 21 Jun 2008, 22:39, edited 1 time in total.
|
|
|
|
 |
|
_haxxor_
|
Post subject: Re: Dictionary based rainbow tables Posted: 21 Jun 2008, 20:41 |
Joined: 02 Apr 2008, 15:10 Posts: 833 Location: Romania
|
wouldn't be nice if we could use 2 other files like : prefix.txt and suffix.txt to use with the words ? not only numbers  eg : .com .net .im .org for suffix.txt www. www2. http// .. etc for prefix.txt or anything else ?
|
|
|
|
 |
|
_haxxor_
|
Post subject: Re: Dictionary based rainbow tables Posted: 21 Jun 2008, 20:56 |
Joined: 02 Apr 2008, 15:10 Posts: 833 Location: Romania
|
the optimization found by sc00bz isn't working rtgendict md5 mil-dic.txt 0 2400 6553600 test caseperm,6;1337perm,6;numprefix,4;numsuffix,4 tried this on the second upload of rdict and it creates lots of errors  on the first everything is working ok 
|
|
|
|
 |
|
PowerBlade
|
Post subject: Re: Dictionary based rainbow tables Posted: 21 Jun 2008, 22:57 |
Joined: 11 Oct 2007, 21:17 Posts: 1218 Location: Copenhagen, Denmark
|
_haxxor_ wrote: the dictionary based table must be sorted :-w ... include please rtsort in the archive... You can use the standard rtsort from rainbowcrack.
|
|
|
|
 |
|
PowerBlade
|
Post subject: Re: Dictionary based rainbow tables Posted: 21 Jun 2008, 22:58 |
Joined: 11 Oct 2007, 21:17 Posts: 1218 Location: Copenhagen, Denmark
|
goodvirus wrote: Hi, I have some problemens bye compiling under linux. goodvirus@goodvirus-laptop:~/Desktop/rdict-src$ make g++ Public.cpp ChainWalkContext.cpp HashAlgorithm.cpp HashRoutine.cpp RainbowTableGenerate.cpp -lssl -O3 -o rtgen ChainWalkContext.cpp: In member function »void CChainWalkContext::IndexToPlain()«: ChainWalkContext.cpp:765: Fehler: »itoa« wurde in diesem Gültigkeitsbereich nicht definiert ChainWalkContext.cpp:796: Fehler: »itoa« wurde in diesem Gültigkeitsbereich nicht definiert HashAlgorithm.cpp: In function »void HashORACLE(unsigned char*, int, unsigned char*)«: HashAlgorithm.cpp:150: Fehler: »strupr« wurde in diesem Gültigkeitsbereich nicht definiert make: *** [rtgen] Fehler 1
Openssl and libcurl are installt. I use g++ 4.2.3 I heart that itoa is not C/C++ Standartconform and are only avalibel under windows, is this right? Or missed I something to include. Sincerly goodvirus Edit: I just looked around the code and found a lot of goto statements. Is this realy usefull? My programming professor would kill me...  The goto statements is from the original rainbowcrack code. I didn't make those. To compile on Linux you need to remove the oracle hash routine. (Just comment out the stuff inside the hashing function in HashAlgorithm.cpp) Quote: wouldn't be nice if we could use 2 other files like : prefix.txt and suffix.txt to use with the words ? not only numbers  eg : .com .net .im .org for suffix.txt www. www2. http// .. etc for prefix.txt or anything else ? Maybe i will add it in a future release. My main thoughts of making the dictionary tables has been to perform full case mutation/leet mutation in a quick way. Quote: the optimization found by sc00bz isn't working  rtgendict md5 mil-dic.txt 0 2400 6553600 test caseperm,6;1337perm,6;numprefix,4;numsuffix,4 tried this on the second upload of rdict and it creates lots of errors  on the first everything is working ok Uhm.. im pretty sure i tested out the code before i released it.. strange.
|
|
|
|
 |
|
PowerBlade
|
Post subject: Re: Dictionary based rainbow tables Posted: 21 Jun 2008, 23:25 |
Joined: 11 Oct 2007, 21:17 Posts: 1218 Location: Copenhagen, Denmark
|
_haxxor_ wrote: the optimization found by sc00bz isn't working rtgendict md5 mil-dic.txt 0 2400 6553600 test caseperm,6;1337perm,6;numprefix,4;numsuffix,4 tried this on the second upload of rdict and it creates lots of errors  on the first everything is working ok I just tested it again, and its working fine here.. I have no idea whats wrong at your side..
|
|
|
|
 |
|
|
 |
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|