z9521
Penetration Process Innovator
Divine
LEVEL 1
300 XP

Hey guys, in this tutorial we are going to discuss the awful wordlist generator tool called “Crunch“. It ranks among the top leading tools for generating any kind of wordlist. The Crunch tool is specifically designed to create a complexity wordlist in seconds to perform bruteforce attacks. It’s a pre-installed tool in kali linux that is used for generate a powerful wordlist, where you can specify a standard character set or a character set you specify. Crunch can generate all possible combinations and permutations and even you can make wordlist based on specified line, numbers and size.
Lets take a look

Installation
If you have any other operating system instead of kali linux then you must have to installed this tool through using the following command. Just you need to execute it.
sudo apt-get install crunch && pkg install crunch1sudo apt-get install crunch&&pkg install crunch

But as we told you that it comes pre-installed in kali linux operating system, hence we can boot this tool by entering the name of this tool.
crunch1crunch

Check Usage Guide
It does not show all its convenience by executing the help command, so we’ll take help of man command to see all the documentation and usage of this tool.
man crunch1man crunch

Create wordlist without any character
We will create a word list without giving any specific character string using the following command. Understand the first command: in the below command mentions 2 and 3 numeric strings that show the minimum and maximum length of the wordlist character, as well as the “-o” option gives us the output feature.
- <min> : What should be the minimum length of characters.
- <max> : What should be the maximum length of characters
- <-o> : Save your output in any format.
Usage

crunch 4 4 -o secnhack.txt1crunch44-osecnhack.txt

Crunch has successfully generated 456976 number of lines wordlist. We cannot show the entire txt file, so we will show you the first 30 words of the file, giving you an idea of how it works. As you can see below the wordlist starts with aaa and ends at zzzz, which means that the word list starts at our given 4, and ends at 4 length.
cat secnhack.txt1cat secnhack.txt

Create wordlist with unique character
The command will remain the same but only we will add the character “shubham” to our command. This feature has been used to create dictionaries with specific names. Now the crunch tool will create a dictionary using the keywords “shubham” which has 4 minimum characters and 4 maximum characters.
Usage

crunch 4 4 shubham -o secnhack.txt1crunch44shubham-osecnhack.txt

As you can see the crunch tool creates a word list with a given minimum and maximum length as well as given characters.
cat secnhack.txt1cat secnhack.txt

Similarly, we will take another example to create a separate wordlist.
crunch 4 4 goyal1234 -o secnhack.txt1crunch44goyal1234-osecnhack.txt

As you can see that crunch tool make a wordlist based on given characters, you can check the wordlist by using any tool.
cat secnhack.txt1cat secnhack.txt

Create wordlist with specific Pattern
This tool has a wide variety of patterns with which we can create a powerful wordlist.
- , for all uppercase letters
- @ for all lowercase letters
- % for all numeric characters
- ^ for all special characters

Create alpha-numeric wordlist with patterns
Using the following command we can create a powerful wordlist in which the given characters will remain constant and the numeric character (pattern) will continue to grow until they equal the given maximum length. We have given the “%” percent symbol three times after the “hack” character which means that the word list will start with “hack000” and end on “hack 999“.
crunch 7 7 -t hack%%% -o new.txt1crunch77-thack%%%-onew.txt

Great

cat new.txt1cat new.txt

Create special character wordlist via patterns
As we know that the “^” symbol is given to add special characters to the wordlist so we will only add “^” symbol three times after and right side of the “hack” character.
crunch 7 7 -t hack^^^ -o new.txt1crunch77-thack^^^-onew.txt

Now you can clearly see that it has created a wordlist with the inclusion of metachacker and symbol.
cat new.txt1cat new.txt

Create uppercase letter wordlist via patterns
Likewise, the “,” symbol is given to add uppercase letters in our wordlist, so we will just add the following symbol in our command and wait for the results.
crunch 7 7 -t hack,,, -o new.txt1crunch77-thack,,,-onew.txt

Good

cat new.txt1cat new.txt

Split Wordlist
The following option is given to divide a large number of wordlist into several wordlist.
crunch 7 7 -t hack%%% -b 3mb -o START1crunch77-thack%%%-b3mb-oSTART

Create with limited words
The following option is used to specifies the number of lines to write to output file.
crunch 5 5 hack@1 -c 20 -o [email protected]

As you can see that the it create a wordlist of 20 words only that we can read through cat command.
cat secnhack.txt1cat secnhack.txt

Create compressed wordlist
Suppose if you want to share your wordlist with someone else, then you have to compress it with another tool but through this feature we can create pre-compressed wordlist.
crunch 5 5 hack@1 -z gzip -o [email protected]

As you can see the wordlist has been prepared in a compressed format. If you want to decompress it then you can use the following command.
gzip -d secnhack.txt.gz1gzip-dsecnhack.txt.gz

Method to create an powerful wordlist
Now if you want to create a powerful wordlist to crack account password or zip file password then you have to add all kinds of things in your word list like: uppercase, lowercase, symbol, special character number etc. The following example might be to create a powerful wordlist.
crunch 9 9 -t h^2^sh%@, -o ok.txt1crunch99-th^2^sh%@,-ook.txt

As you can see the following output has all kinds of characters and symbols which is a perfect wordlist for performing bruteforce attack.
cat ok.txt1cat ok.txt

Credit : https://www.kali.org/
About the AuthorShubham Goyal Certified Ethical Hacker, information security analyst, penetration tester and researcher. Can be Contact on Linkedin.