Wordlists manipulation with Backtrack 5R2 Crunch

Keeper
12 years ago | edited 12 years ago

0

**Brief Introduction:**[/center] Ok. This tutorial is going to introduce you with a Backtrack application called Crunch. Most plainly said Crunch itself is a tool for wordlists generation. In this tutorial Im going to explain some of its main options (not all), the way to use it, charsets, pros and cons and of course how it might come in handy.
#**I. How to install**[/center] First youll need Backtrack, of course. You can either run it in virtualization on a virtual machine like vmware or virtualbox. I will not cover how to boot Backtrack, there have already been lots of tutorials. Now I assume most of the people around here know how to run applications in Ubuntu but nevertheless, Ive made a part for the installation for those who arent familiar with unix-based OS and live CD distributions. Open up a terminal and type: ```wget http://sourceforge.net/projects/crunch-wordlist/files/crunch-wordlist/crunch-3.2.tgz``` ![Image](http://i1067.photobucket.com/albums/u433/aeroxtk/D69na.jpg) Once downloaded, going to extract it. ![Image](http://i1067.photobucket.com/albums/u433/aeroxtk/2-1.jpg) ```tar xvf crunch-3.2.tgz``` Accessing directory: ```cd crunch3.2/``` Compiling and installing: ```make make install``` ![Image](http://i1067.photobucket.com/albums/u433/aeroxtk/3-1.jpg)
#**II. How to use**
Once installed we can start generating our wordlists. **Basic usage:** ```./crunch [minimum length] [maximum length] [charset / options]``` For example: ```./crunch 1 5 abc123 o wordlist.txt``` This will generate all possible combinations between the characters a, b, c, d, 1, 2, 3 with a min length of 1 and maximum of 5. Now the o [file] option enables us to save all generated combinations to a file. As well as that, when working out the charset, symbols are to be divided by a backslash "\". For example: ```./crunch 1 5 abc\!\*\( -o wordlist.txt``` ![Image](http://i1067.photobucket.com/albums/u433/aeroxtk/4-1.jpg) [center]#**Permutations**
Permutations can be created by using the p switch between words, letters, numbers, symbols. For example: ```./crunch 1 1 p example of permutation``` ![Image](http://i1067.photobucket.com/albums/u433/aeroxtk/5-1.jpg) One thing you mightve noticed is that we set min/max length again, no matter that we have a permutation, we still need to include them else rather it wont do. In that example we used 3 words, which will be a permutation of three. In other words P3 = 3*2*1 = 6 possible combinations (without any repeating). [center]#**Splitting generated combinations into separate lists with predefined size**
For this purpose well have to use the b switch which is designed to set the size of each file. So whenever crunch generates combinations that exceed lets say 10mb, for example, it will locate the next generations into a separate file. For example: ```./crunch 1 8 abcdABCD b 30mb o START``` ![Image](http://i1067.photobucket.com/albums/u433/aeroxtk/6-1.jpg) This will split all generations of combinations between a, b, c, d, A, B, C, D in separate files, none exceeding the size of 30mb. For all options and full usage of crunch visit its man page. Hope this tutorial would come in handy for members! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I decided this thread would be suitable for me to include a small project of mine written in PHP. It's again for wordlists generation, although not the best language for such. ```<?php ini_set('max_execution_time', '65'); $values = 'ABCDEF'; container(strlen($values), 0 ); function container($length, $pos, $out = '' ){ global $values; for ($i = 0; $i < $length; ++$i){ if ($pos < $length ){ container($length, $pos + 1, $out . $values[$i]); } } if(strlen($out) <= 6){ echo $out . '
'; } } ?>``` Anyone experiencing problems with the code or wants me to explain something may feel free to post a reply to the tutorial. *Thanks for reading!*
0replies
1voice
222views
You must be logged in to reply to this discussion. Login
1 of 1

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss