This lecture we're going to learn how to create a wordlist.
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 wordless attack can become very handy so you can actually
go ahead and look for ready word lists on the Internet.
And those are some really really good ones and 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 wordlist.
So in this picture we're going to learn how you create your own wordlist using a tool called Cranch
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 a smaller number to make the wordlist smaller.
You can also use the option t which is an optional to give pattern.
So for example let's say that you are looking at the person while they were typing their password and
you've seen 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 combination
of passwords that start with an A and after that we use the minus 0 option to specify the file name.
Where are 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 start
from 6 characters to 8 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 and oh
I'll fix that in a file called wordlist and these passwords are going to start with an A and end with
a B and it'll generate passwords based on all possible combinations between the A and B so all of the
generated passwords will always start with a and with B.
So let's have an example of the tool.
Now that will actually have a lot of options other than what we've seen so far.
So if you just type in Man 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 a 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 D-minus option the minus p option tells Cranch
to generate passwords that don't have repeating characters.
For example when you specify all lowercase characters you specify A B C D.
It'll start by generating passwords made of a AAA and then a b and then a b b b b b and all of that.
So when you do this crunch will actually ignore these type of passwords and it'll only create passwords
that don't have any repeating characters and that reduce the size of the wordlist 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 for me familiar with.
Once you're done looking at the man you can just press Q 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 a maximum of eight characters and I want them to contain combinations of ABC and let's say
the digits 1 2 now and here you can actually keep lists and things you can list characters you can list
uppercase characters or even symbols if you wanted 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 that takes the.
So the command is very simple.
It's crunch minimum on 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 0 to the file that the passwords are going to
be stored in.
And then hit enter.
And as you can see now telling us that it generated four hundred and forty eight thousand passwords
approximately and they're all stored in a file called Test ATX takes you know the size of the file is
four megabytes.
And now I can open this file by doing cat
30 XTi.
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 1 to.
I also want to show you an example of using the minority option.
So I'm going to set this to only 6 2 6 so it's only six characters and we're going to use them minus
the option which is the pattern option and I'm going to tell it that I want the password to always start
with any and then I want you to fill all possible combinations of characters between the A and B.
So I want passwords that start with an A and end with a B and in the middle of the outside you can fill
all possible combinations of ABC want to go ahead and turn as you can see now the number of passwords
is much less.
It's only six hundred and twenty five passwords because I've narrowed down the possibilities of passwords.
Again if I do cat test dirty D you'll see that I have all the passwords right here.
So this is it is really useful 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
wordlist out there on the Internet.