Creating Wordlists With Crunch
Crunch is a wordlist generator project which can create long and complex lists to audit the strength of passwords. This tool also affords a great level of control in creating wordlists, allowing users to control the characters used, minimum and maximum lengths, and specify certain patterns. It is designed to be used with Linux, so support for Windows/BSD/OS X is unknown.
Installation
To install Crunch, first download the latest version (currently 3.4) from Sourceforge.
http://sourceforge.net/projects/crunch-wordlist/files/crunch-wordlist/crunch-3.4.tgz/download
Then extract the files from the archive.
tar -xvf crunch-3.4.tar.gz
Finally, change into the new Crunch directory and install the tool.
cd crunch-3.4
make && make install
Usage
You can check the user manual by using the man command. Basic usage is as follows
./crunch [min length] [max length] [character set] [options]
Examples:
Create a list of all lowercase alpha passwords 3 characters in length:
./crunch 3 3
Create a list of passwords 4 characters in length using only 1, 2, 3, A, B, C, and D:
./crunch 4 4 123ABCD
Create the same list as above, including the special characters $, %, and &:
./crunch 4 4 123ABCD\$\%amp;
Send the output of the previous command to a file and zip it in the 7zip format:
./crunch 4 4 123ABCD\$\%amp; -o new_wordlist.txt -z 7z
Use the rainbow tables character sets file (charset.txt) to create a list of passwords 4-8 characters in length including upper, lower, numerical and special:
./crunch 4 8 -f charset.txt mixalpha-numeric-all
Note: charset.txt can be found here