From the previous lectures we learned that when it comes to WPA and wpa 2 the only pockets that contains
some information that can help us with cracking the key are the handshake packets and in the last lecture
we learned how to capture the handshake and store it in a file.
Now the handshake does not contain any information that can help us to recover or recalculate the WPA
keep the information in it can only be used to check whether a password is valid or not.
Therefore what we're going to do is to create a world list which is basically a big text file that contains
a large number of passwords.
Then go through this file go through the passwords one by one and use them with the handshake in order
to check whether this password is valid or not you can actually download ready word lists from the Internet.
But in this lecture I want to teach you how to create your own world list and in the next lecture I'm
going to explain to you how the word list and the handshake are used in order to recover the password
and we'll see how to do that in practice.
So in this lecture we're going to learn how you create your onward list using a tool called crunch.
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 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 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 combination
of passwords that start with any and after that we use the minus 0 option to specify the file name where
the passwords are are gonna be stored.
So we have a small little example here that will generate a list of passwords that contain that start
from six characters to eight characters and contain these characters right here so it's going to create
combinations of one two three ABC and the dollar sign and it's going to store it in a file called word
list and these passwords are going to start with any and end with the B and it'll generate passwords
based on all possible combinations between the A and the B so all of the generated passwords will always
start with a and end with B so let's have an example of the tool 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 gonna 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 B option the minus B option tells crunched to generate passwords
that don't have repeating characters.
For example when you specify all lowercase characters you use specify ABC.
It'll start by generating passwords made of AAA and then a B and then a BBB 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'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 at these and get your self for me familiar with.
Once you're done looking at the mind you can just press Q and you'll be out of it and we're gonna run
our command here so we're gonna use crunch and again 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 1 2.
Now in here you can actually keep listing things you can list characters you can list uppercase characters
or even symbols if you wanted to once you're done with list and the characters were going to specify
the file to save it too.
And we're going to save it in a file called test that 60 so the command is very simple.
It's crunch 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 0 to the file that the passwords are gonna be
stored in.
You can hit enter and as you can see now is telling us that it generated four hundred and forty eight
thousand passwords approximately and they're all stored in a file called tester 60 now the size of the
file is four megabytes.
And now I can open this filed by doing cat
dirt the extra 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 2.
I also want to show you an example of using the minus t option.
So I'm gonna set this to only six to six so it's only six characters and we're going to use the minus
t option which is the pattern option and I'm gonna tell it that I want the password to always start
with any and then I want you to feel all possible combinations of characters between the A and the B.
So I want passwords stuck to the name and end with a B and in the middle at the outside you can fill
all possible combinations of ABC 1 2 can hit enter 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 cut test 30 60 you'll see that I have all the passwords right here.
So this is it.
Tool 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
word lists out there on the Internet.