Friday, January 21, 2011

Sizing the Wordlist

The post on creating wordlists with crunch v2.4 receives the most hits by far on my blog and from the

queries in the comments section, it would seem that not everyone realises what the potential size can be when creating wordlists.


Check out the latest revision of crunch, bofh28 just released v2.6 03-10-2010.

Crunch is now including a size estimate when starting up the wordlist generation, so you can see what size the wordlist you are planning will be.That along with a few more new nice additions.

Download the latest crunch here;
latest revision of crunch now also included in the backtrack 4 repository.

Lets say you are working on a wordlist for a WPA key (which always have a minimum of 8 characters)

and lets say that you know for a fact that the passkey in question is an eight character combination of the following digits and letters;

(like some internet companies have on their broadband modem/routers where I am from).

To create a wordlist with all possible combinations based on the passphrase having 8 characters only,
you could use the following syntax in crunch;
./crunch 8 8 0123456789ABCDEF -o wpa-list.txt

That one line of code seems so simple, yet when you check the estimated size of the wordlist to be created
you would definately think twice about trying to create, save and use it...

The size of the wordlist can be calculated as follows ;

(x^y) * (y+1) = size in bytes

x = The number of characters being used to create the wordlist

y = The number of characters the words/passphrases in the wordlist have.

Based on the above example, we have 10 possible numeric values and 6 possible alpha values,so 16 characters in total, and we want to calculate based on a wordlist wherein the passphrases have 8 char acters. To calculate what the size would be in konsole we can use "bc" ;

echo "(16^8)*(8+1)" | bc

Or we can even just type it in google; (16^8)*(8+1)
and it will return the same result ;

Next we can check the conversions of the resulting size in KB / MB / GB etc. ;

thats quite a lot...
I put together a (very!) simple script in order to be able to quickly check what kind of size one
is looking at when thinking of creating a wordlist with the same min/max length in crunch;
After saving to your /root/ directory for instance, just run by entering ;
You need to enter ;
> the number of characters to be used when creating the wordlist. (using the above example; 16)
> the length of the words/passphrases in the wordlist. (using the above example; 8)
You cant choose to check what the results would be with any fixed patterns, or variables, (have to leave the hard stuff like that to the pro's !) but it is still an eye-opener to see the sizes involved with a 'simple' wordlist.
The result will show you the expected number of words/passphrases in the wordlist along with the estimated
file size in bytes / Kilobytes / Megabytes / Gigabytes / Terabytes / Petabytes

thanks to Mr,Tape again....

No comments:

Post a Comment