wpatoolkit / 10-Hex-Generator

Outputs a reduced keyspace of random or sequential hex digits.
42 stars 10 forks source link

10 Hex Keyspace Reducer

What's new
Version 1.5 now includes a 10 hex key analyzer (10hex.html) than can perform in-depth statistical analysis of known valids, faster piping speed and more keyspace reducing rules.

What is it?
This is a small program written in C++ that will output all possible combinations of 10 hex digits while skipping over certain combinations it believes to be invalid.

Only combinations which meet these criteria will be printed:
 • must contain 6-9 unique characters (can be expanded to 5-9 with the -5minuniques option)
 • must contain 4-8 numbers
 • must contain 2-6 letters
 • no 3 consecutive chars are sequential or reverse sequential (<10% occurrence rate)
 • no 3 consecutive chars are identical (<3% occurrence rate)
 • each character cannot appear more than 3 times (<5% occurrence rate)
 • the total difference between all chars cannot be less than 19 or greater than 79

Character 2 Traits
 • c2 is not equal to c1 (eliminates 68,719,476,736 combinations) (<1% occurrence rate)
 • c2 is not -15 to c1 (eliminates 4,294,967,296 combinations)
 • c2 is not -14 to c1 (eliminates 8,589,934,592 combinations)

Character 3 Traits
 • c2 and c3 and c10 are not identical
 • c3 is not -15 to c2 (eliminates 4,294,967,296 combinations)
 • c3 is not -13 to c2 (eliminates 12,884,901,888 combinations)
 • c3 is not +15 to c2 (eliminates 4,294,967,296 combinations)
 • c3 is not -15 to c1 (eliminates 4,294,967,296 combinations)
 • c3 is not -14 to c1 (eliminates 8,589,934,592 combinations)
 • c3 is not -13 to c1 (eliminates 12,884,901,888 combinations)
 • c3 is not +13 to c1 (eliminates 12,884,901,888 combinations)

Character 4 Traits
 • when c1 equals c3, c4 is not equal to c2 (eliminates 4,294,967,296 combinations)
 • when c1 equals c3, c4 is not +1 to c2 (eliminates 4,026,531,840 combinations)
 • when c1 equals c3, c4 is not equal to c3 (eliminates 4,294,967,296 combinations)
 • c4 is not -15 to c3 (eliminates 4,294,967,296 combinations)
 • c4 is not -14 to c3 (eliminates 8,589,934,592 combinations)
 • c4 is not +14 to c3 (eliminates 8,589,934,592 combinations)
 • c4 is not +15 to c3 (eliminates 4,294,967,296 combinations)
 • c4 is not +13 to c2 (eliminates 12,884,901,888 combinations)
 • c4 is not +14 to c2 (eliminates 8,589,934,592 combinations)
 • c4 is not +15 to c2 (eliminates 4,294,967,296 combinations)
 • c4 is not -15 to c1 (eliminates 4,294,967,296 combinations)
 • c4 is not -14 to c1 (eliminates 8,589,934,592 combinations)
 • c4 is not -13 to c1 (eliminates 12,884,901,888 combinations)
 • c4 is not +14 to c1 (eliminates 8,589,934,592 combinations)
 • c4 is not +15 to c1 (eliminates 4,294,967,296 combinations)

Character 5 Traits
 • c5 is not +15 to c4
 • c5 is not -15 to c3
 • c5 is not +14 to c3
 • c5 is not +15 to c3
 • c5 is not -15 to c2
 • c5 is not +13 to c2
 • c5 is not +14 to c2
 • c5 is not +15 to c2
 • c5 is not -13 to c1
 • c5 is not +13 to c1
 • c5 is not +14 to c1

Character 6 Traits
 • when c3 equals c5, c4 does not equal c6
 • c6 is not -15 to c5
 • c6 is not -14 to c5
 • c6 is not -13 to c5
 • c6 is not +14 to c5
 • c6 is not +15 to c5
 • c6 is not -15 to c4
 • c6 is not -14 to c4
 • c6 is not -13 to c4
 • c6 is not +14 to c4
 • c6 is not -15 to c3
 • c6 is not -14 to c3
 • c6 is not -13 to c3
 • c6 is not +15 to c3
 • c6 is not -14 to c2
 • c6 is not +13 to c2
 • c6 is not +14 to c2
 • c6 is not -15 to c1
 • c6 is not -14 to c1

Without keyspace reducing rules there are 1,099,511,627,776 (16^10) combinations in the keyspace (~13,194 GB in wordlist form).

Applying these rules brings it down to 564,561,702,612 combinations or 51.3% of the original keyspace (~6,775 GB in wordlist form).

Using the -risky parameter will bring it down even further to 367,647,332,933 or 33.4% of the keyspace (~4,412 GB in wordlist form) but with a slightly decreased chance of success.

If -no01 is used...
-without any rules there would be 289,254,654,976 (14^10) combinations (~3,471.06 GB)
-using the default rules reduces it to 183,780,015,460 combinations (or 63.5% of the keyspace) (~2,205.36 GB)
-using the -risky parameter reduces it to 134,081,483,174 combinations (or 46.3% of the keyspace) (~1,608.98 GB)

To compile on Windows (requires the Windows 7 SDK):
cl /EHsc 10hex.cpp

To compile on Linux:
g++ 10hex.cpp -o10hex

Example usage:

10hex | oclHashcat64 -m 2500 CAP.hccap
pipes its output into oclHashcat (AMD)

10hex | cudaHashcat64 -m 2500 CAP.hccap
pipes its output into cudaHashcat (NVIDIA)

10hex | aircrack-ng -w - CAP.cap -e SSID
pipes its output into aircrack-ng

./10hex | pyrit -r CAP.cap -i- attack_passthrough
pipes its output into pyrit

Parameters

You can optionally specify any of these parameters to further refine your output.

-risky
Offers significant time savings but with a higher risk of failure by using tighter differentials (the total distance between characters).

-evenonly
Will only output even numbers.

-oddonly
Will only output odd numbers.

-random
Will randomize its output while still maintaining rules.

-lower
Forces all output to be lowercase (this is the default).

-upper
Forces all output to be uppercase.

-len8
Only outputs 8-length hex digits.

-len9
Only outputs 9-length hex digits.

-no0
Ignores all combinations which have a 0 in them.

-no1
Ignores all combinations which have a 1 in them.

-no01
Ignores all combinations which have a 0 or a 1 in them.

-Xuniques
Only outputs combinations which have X unique characters in them (typically 6, 7, 8 or 9).

-Xminuniques
Only outputs combinations which have a minimum of X unique characters in them.

-startswithX
Only outputs combinations which start with X (can be 0-F).

-start X
Start on combination X (i.e. -start 100 will start on combo 100).

-stop X
Stop on combination X (i.e. -stop 200 will stop on combo 200).