• We just launched and are currently in beta. Join us as we build and grow the community.

Complete Guide on Crunch Tool

z9521

Penetration Process Innovator
Divine
Z Rep
0
0
0
Rep
0
Z Vouches
0
0
0
Vouches
0
Posts
97
Likes
83
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
White-and-Black-Simple-Technology-Investor-Update-Presentation.png


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

1-21.png


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

2-25.png

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

3-22.png

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 -o .txt

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

4-21.png


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

5-20.png

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 -o .txt

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

6-18.png


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

7-18.png


Similarly, we will take another example to create a separate wordlist.

crunch 4 4 goyal1234 -o secnhack.txt1crunch44goyal1234-osecnhack.txt

8-18.png


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

9-18.png

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

10-15.png

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

11-14.png


Great 🙂 !! Happen that we througt ! As you can see that it has successfully create a wordlist.

cat new.txt1cat new.txt

12-12.png

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

13-11.png


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

cat new.txt1cat new.txt

14-11.png

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

15-10.png


Good 🙂 !! Finally the wordlist is prepared with lowercase and uppercase letters.

cat new.txt1cat new.txt

16-10.png

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

17-8.png

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]

18-8.png


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

19-7.png

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]

20-6.png


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

21-5.png

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

22-4.png


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

23-4.png


Credit : https://www.kali.org/

About the AuthorShubham Goyal Certified Ethical Hacker, information security analyst, penetration tester and researcher. Can be Contact on Linkedin.
 

422,212

310,551

310,560

Top