Password cracking is one of the important factors to do as an Ethical Hacker. There are soo many methods to crack the password like a phishing attack, Dictionary attack and brute-force attack. I already explained what is phishing, Brute force, and Dictionary attack and how to perform those attack, Apart from phishing brute-force and dictionary attack required a list of password or wordlist. There are so many wordlists available on google you can download it use it for password cracking but to get a successful result this wordlist doesn’t work 90% of the time because all the wordlist on google gives common and easy password like Pa$$w0rd, 12345678 etc. Some people use this password but when you perform password attack on someone who uses easy passwords but not likes 123456 this doesn’t work. I already explained how to create a target based wordlist for password cracking with cupp tool. Today I will show you another tool for password cracking called crunch.
Crunch is a password generator tool which creates a huge wordlist to crack the password with a brute-force attack in some of the previous tutorials I already covered Crunch tool and how to use but it was a very basic way. Today we will look at how to create password list with the crunch tool in a more advanced way. Crunch is also available for mobile with the help of termux. you can learn how to install termux from here
Open your terminal and type Crunch and it will display a small guide to use it. Now I will give you some different examples to use it to create a wordlist type the following command
crunch 4 5 -o /root/Desktop/List.txt
This command will create a wordlist now 4 is for the minimum like password should be at least 4 characters and 5 is for the maximum like password should be at least 5 characters and -o is for the output to save the file and the location where you want to save the file. It will create the password list for all the combinations from a-z remember this is the default mode it will not use a capital letter or any symbols like @#$ etc.
crunch 4 5 AbcF345$% -o /root/Desktop/List.txt
This command will again create a 4 to 5 character word list but it will use our character like AbcF364 it will not create the wordlist from a to z. if you know that target will use this kind of character for passwords it can be helpful. If you use number or capital letter like A or 1 it will use A capital not small and also include the number which you specify.
crunch 6 8 -s hacker -o /root/Desktop/List.txt
This command is helpful when you know that the target person password is maximum 8 character and start from hacker but you don’t know after the word hacker it combines all the character after the word hacker like hackeraa, Hackerab etc
crunch 8 8 -t hacker%% -o /root/Desktop/List.txt
Now in this scenario suppose you know the exact length of the password which is min 8 max 8 but it starts from hacker and last 2 are numbers like 1234 but you don’t know the last digit number this will create a wordlist start from word hacker and end with any random number. the % sign in command is for a number like 123. The result will look like this hacker12, hacker 13 etc.
crunch 8 8 -t @@@@@@20 -o /root/Desktop/List.txt
result In the last scenario we used the % sign because we don’t know the number used in the target password. same we know that password is 8 character in length and end with any particular number like his Date of birth 20 and start with any character you don’t know like abced then this command will create a wordlist which ends with 20 and start with any random character from a to z like aaaaaa20, hacker20 etc. remember % sign for number and @ sign for letter.
crunch 8 8 -t ,,,,,,20 -o /root/Desktop/List.txt
This is the same command except @ to , sign. if you know that target password end with 20 and start with letters from a to z but all the letters are in the capital like AAAAAA20, HACKER20 etc.
crunch 8 8 -t ,@@@@@20 -o /root/Desktop/List.txt
You can also combine two commands when the target person password starts with a capital letter (,) and in the middle its small letter (@) and end with 20.
crunch 7 7 -t hacker^ -o /root/Desktop/List.txt
This command is helpful when you know that password starts with the hacker but end with any special character like $#% etc. ^ sign is for a special character.
crunch 7 7 -t @hack%% -l @aaaaaa -o /root/Desktop/List.txt
This is very useful when target password starts with @ but when you use @ sign command will assume that @ is for small letter rather than actual @ sign in that scenario -l is useful after -l @ which tell that don’t use the small letter for @ sign and aaaaaa length of the password.
crunch 10 10 -p hacker hacking cyber -o /root/Desktop/List.txt
If you than password is 10 character in length don’t know how it starts or ends but you know some words that can be used in the password like a hacker hacking
crunch 7 7 1234567890 -o /root/Desktop/List.txt
If you have an idea that the target is using any random number in his password you can use this command to create a wordlist it could be his DOB mobile number or any other number. every combination will be included
crunch 7 7 1234567890 -o START -b 10mb
This is the most useful command when wordlist is too big in size this command will split the wordlist after every 10MB which when list size exceeds over 10Mb it will save that list and create a new list. it’s very helpful which performing the password attack you can use multiple systems to crack the password because you have multiple word list.
crunch 7 7 1234567890 -o START -z gzip
You can even compress the file in any zip format like gzip, 7z, rar etc. it can save you storage to save the word list.
Crunch support different types of character while creating a wordlist like numeric alphabet hex and other you can check all the supported and useful character in this file with this command it will display all the character in terminal. to use any of the characters you
crunch 4 5 -f /usr/share/crunch/charset.lst ualpha -o /root/Desktop/List.txt
To use any of the characters from the charset.lst file you can use the following command above.
The following command will display the help of crunch tool. it will show you all the commands with example and other help.