In this lecture, we're going to learn how to create a word list.
This is a really handy skill to have under your belt if you want to be a penetration tester, because
you're going to face a lot of scenarios where a word list attack can become very handy.
So you can actually go ahead and look for any word lists on the Internet.
And there is some really, really good ones.
And you should you should probably use a lot of them because some of them just have the common passwords.
But in many cases, you might actually need to create your own word list.
So in this lecture, we're going to learn how you create your own word list using a tool called Crunch.
So using the tool is very simple.
All you have to do is just put the name of the tool and then you specify the minimum number of characters
for the passwords to be generated.
Then we're going to specify the maximum number of characters for the password.
Then you specify the characters that you want to generate passwords from.
For example, you can put all lowercase characters, all uppercase.
You can put numbers digits, or you can just specify a small, smaller number to make the word list
smaller.
You can also use the option T, which is an optional to give a pattern.
So for example, let's say that you are looking at the person while they were typing their password
and you see that the password will start with an A so you can tell crunch that the password will start
with an A and then give me all possible combinations of passwords that start with an A.
And after that we use the minus O option to specify the file name where the passwords are going to be
stored.
So we have a small little example here that will generate a list of passwords that contain that stat
from six characters to eight characters and contain these characters right here.
So it's going to create combinations of 1 to 3.
ABC and the Dollar Sign And it's going to store it in a file called.
That should be an oh.
I'll fix that in a file called Word List.
And these passwords are going to start with an A and end with a B, and it will generate passwords based
on all possible combinations between the A and B.
So all of the generated passwords will always start with A, an end with B.
So let's have an example of the tool.
Now, the tool actually have a lot of options other than what we've seen so far.
So if you just type in mine.
Crunch.
You'll see all the options that you can set and you'll see detailed description about all of these options.
So it's actually really, really good.
You can go ahead and spend some time to get familiar with the tool.
Now I'm going to show you the example.
And based on the example, you'll be able to run all of these commands.
But if you want to run or create some advanced word lists, then I highly recommend that you go over
this.
One of the really cool options that I want to highlight is the minus P option.
The minus P option tells Crunch to generate passwords that don't have repeating characters.
For example, when you specify all lowercase characters, you specify a BCD.
It will start by generating passwords made of a A and then a B, then a, B, B-BBEE and all of that.
So when you do this crunch, you'll actually ignore these type of passwords, and it will only create
passwords that don't have any repeating characters, and that'll reduce the size of the word list from
the number of characters to the power of the length to the number of characters factorial.
If you scroll down, you'll actually see more examples of commands and the type of word lists that will
be created.
So again, you can have a look on these and get yourself familiar with.
Once you're done looking at the man, you can just press cue and you'll be out of it and we're going
to run our command here.
So we're going to use Crunch.
And I want to generate passwords of minimum of six characters and maximum of eight characters.
And I want them to contain combinations of ABC and let's say the digits one, two now and here you can
actually keep listing things, you can list characters, you can list uppercase characters or even symbols
if you want it to.
Once you're done with listing the characters, we're going to specify the file to save it to, and we're
going to save it in a file called Test.
But tcd.
So the command is very simple.
It scrunch a minimum length of the password, the maximum length of the password, followed by the characters
that we want to use to generate passwords from and then o to the file that the passwords are going to
be stored in.
I'm going to hit enter.
And as you can see now, it's telling us that it generated 448,000 passwords approximately and they're
all stored in a file called test txt.
Now the size of the file is four megabytes.
And now I can open this file by doing cut.
The TCD.
And as you can see now, we can see all the passwords that have been generated.
I'm going to control C out of it because it's a huge file.
And as you can see, it actually contains all possible combinations of ABC one two.
I also want to show you an example of using the minus T option.
So I'm going to set this to only 6 to 6.
So it's only six characters and we're going to use the minus T option, which is the pattern option.
And I'm going to tell it that I want the password to always start with an E.
And then I want you to fill all possible combinations of characters between the A and the B.
So I want passwords that start with an A and end with a B and in the middle at the ADD sign, you can
fill all possible combinations of ABC one two, then hit enter.
As you can see now, the number of passwords is much less.
It's only 625 passwords because I've narrowed down the possibilities of passwords.
And again, if I do cut.
Test the text.
You'll see that I have all the passwords right here.
So this is it.
Tool is really useful.
It can be used in many scenarios.
I highly recommend that you spend some time with it and also have have a look on some of the existing
world lists out there on the Internet.