Creating Custom Dictionary Files / Word List Using CEWL For Brute Force Attack

Creating Custom Dictionary Files Word List


CEWL (pronounced as “cool”) is a custom word list generator programmed in ruby. It can create custom word lists based on the target website. What it basically do is that with a given URL and a specified depth and possible external links, give you list of words that can be used by applications like Hydra, John, Ncrack and Medusa to brute force the target system.

Here is the article Explaining Brute Force in depth.

Get SSH username & Password For Any Server easily with Brute Force Attack

Disclaimer – These tutorials are only for educational purpose and for security enthusiasts and for learning new skill. We do not accept responsibility for anyone who thinks it’s a good idea to try to use this to attempt to hack systems that do not belong to you.

How people choose their Passwords:-

Studies show that most of the people use commonly used words as their passwords. When selecting random passwords, there is very little change/randomization to the words. And as recently password database of many large sites got leaked. So we can clearly see that the common changes that people make to passwords and think that they are really clever by replacing letter “O” with “0(zero) and “E” with “3” and so on.

Well here is a shocker that attacker know this and use their tools to generate passwords accordingly.

Installing CEWL:-

CEWL is pre-installed in Kali Linux but is you are using the minimal version or other Linux distro you can install is by using:-

$ sudo apt-get install cewl

Using CEWL:-

The cwel syntax is: $ CEWL [OPTION] … URL , and the options are:
–help or -h for options ,
–keep or -k to keep the downloaded files ,
–depth <x> or -d <x> for depth (default 2)
–min_word_length <length> , -m <length> for the minimum length of words (default 3)
–offsite or -o let depth visit another site.
–write <file> , -w <file> references the result in a file,
–ua <user- agent > or -u <user- agent > specifies the user agent ,
-n –no -words or does not display the output result ,
–meta or -a included meta data and –meta_file < file > to write them to an output file ,
–email , -e included email addresses ,
–meta – temp- dir <directory> the temporary directory used by exiftool during parsing (default / tmp ) , and -v for verbosity .
This help is displayed with the –help
[email protected]:~# cewl –help

Here is the example with default setting it will gather word with max 4 character :-

[email protected]:~# cewl -w passwords.txt

After a few minutes the passwords will we saved in passwords.txt.

You can specify the length of the word that you want by using this “-m” option.

[email protected]:~# cewl -w passwords.txt -m 8

And it will get the words with the length of 8 chars.

Thanks and if you have any question do let us know.