Create wordlists in kali Linux.
What is a wordlist ?
A wordlist is text file that contain all the key combinations of all the possible passwords.Wordlists are used for breaking pincodes,passwords and even phone numbers.There are some inbuilt worldlists available in kali Linux.Want to check type this command. ls /usr/share/wordlists
But in this article we will create our own custom wordlists with a program called crunch. Crunch comes pre-installed in Kali Linux. Crunh is very stable and works flawlessly.
Open your terminal and type the following command.It tells a little about crunch.
root@seven:~# crunch crunch version 3.6 Crunch can create a wordlist based on criteria you specify. The output from crunch can be sent to the screen, file, or to another program.
General syntax to use crunch is :
- You have to specify minimum and maximum number of words.
- You have to specify the specific pattern.It depends on you how you want it to be.
Let's do it practically with real world examples. So fire up your terminal.And type the following command.
root@seven:~# crunch 5 5 0123456789
In the above example we specified 5 minimum and 5 maximum numbers in our first argument.So our minimum and maximum numbers are going to be 5.
Second argument numbers from 0 to 9 means crunch will use numbers from 0 to 9 to generate all the possible combinations 5 numbers
Once you hit enter you will see it starts generating combinations.So by checking output you will understand it better.
Save wordlist to a file
We must supply -o argument with path where you want to save wordlist.
root@seven:~# crunch 5 5 0123456789 -o /root/Desktop/wordlist
The -o option is for writing wordlist to a file but you must provide right path.When you execute the above command your file will be saved in desktop.
Create wordlist of lowercase characters
Now below command will generate all the possible combinations of 7 characters
root@seven:~# crunch 7 7 abcdfghijklmnopqrstyvwxyz -o /root/Desktop/wifi.txt
File will contain all the possible combinations of 7 characters. This is actually useful let's say if your router's password length is 7 characters and only uses characters then password can be found in the list.It will generate a massive file though.
Generating Wordlist with Specific pattern
With pattern option we can create wordlist with specific pattern.In the below example we will be generating phone numbers.But you must specify right pattern.
root@seven:~# crunch 10 10 0123456789 -t 9816@@@@@@ -o /root/Desktop/phone2.txt
As you can see from the above command we have added an extra parameter with -t. -t is used for pattern.9816 will not change.Only @ symbol will change.And will be replaced with different combinations of 0 to 9 number..So if you want ot generate specific pattern @ symbol can be used. Check output file.
This is new and latest features added to crunch you can actually resume your wordlist.If you are creating huge wordlists like 200gb it will a lot of time.But with resume option you can always start where you left or stopped.
Let's say you are creating huge list as shown below.
root@seven:~/Desktop# crunch 10 10 abcdfghijklmnopqrstuvwxyz01234567 -o /root/Desktop/wordlist.txt
And you stopped for some reasons and want to resume this wordlist again just type following command.
root@seven:~/Desktop# crunch 10 10 abcdfghijklmnopqrstuvwxyz01234567 -o /root/Desktop/wordlist.txt -r
Only thing you need to add is -r at the end it will resume where you stopped. Ofcourse you have to give -o command pararmeter and supply correct path.
For more options guys go to the manual page type man crunch