Okay now and the last video when the user logged into our network and put the username and password
we only captured the username we didn't get the password but instead we got something called the challenge
and we also got a response.
Now the reason for this is because like I said the network that we created the fake network that we
created uses a proper WPA enterprise authentication.
Therefore when a user tries to connect to that network and authenticate they'll use what's known as
a challenge response authentication.
So in order to understand what we mean by a challenge and a response here let's have a look on this
very simple diagram that I made I'm trying to keep this as simple as possible so that we don't get carried
away talking about algorithms encryption and all of that because that on its own needs a full course.
So basically what happens when a client tries to connect to a network that uses WPA enterprise.
We said this is managed through a radius server.
So what happens is the client sends a request saying I want to connect the server says OK no problem
solve this challenge for me.
So it gives the client a challenge to solve.
And this is what you see in here.
So we can see this is the challenge that the server that we are running because in this case we have
fake access point.
So that's the challenge that the server sent to the client to solve.
The client goes ahead and solves the challenge it solves.
It solves it by encrypt in the challenge used in the password that you put.
So basically the password that you put in the log in box will never be sent to the server.
What happens is that password is used in a certain manner so that it converts this challenge encrypts
it and convert it into a response that the radius server will be able to understand and verify if the
password was correct.
So you say I want to connect server says no problem.
So the challenge for me challenge is solved based on the password that you enter and it's sent to the
radius server.
Now when we look at this we can see the challenge and the response sent.
Now this challenge is encrypted use and net and TLM version 1.
Now this is strong encryption and for us we can't actually just encrypted based on the response on its
own.
So we actually to use the response and the challenge and we'll also need to run a dictionary attack
the way this dictionary attack is going to work is it's going to go over a list of a lot of words.
It's going to take each one of these words it's going to try to create a response based on these words
and compared to this response if the response generated using the word and the word list is correct
then the word used to generate that response is the password.
Otherwise it will try the next word.
So again the way the word this attack is going to work is it's going to go through a list of a lot of
passwords that we're going to give to the program.
It's going to take each one of these passwords.
It's going to apply the formula and try to solve the challenge to generate a response the response generated
is going to be compared to this response right here if the response is valid then the password used
to generated is the valid password.
Otherwise it's going to try the next password.
Now there is a number of tools that can run a dictionary attack against net and TLM hushes the one that
I want to use is called a s.l c.a.p.
Now you can use hashcash and John for that but this tool is just simpler and that's why I'm going to
go for it now before using this tool.
Let's have a look on its Helpmann you.
So we're going to do a cell UAP help
so you can see the options here are very simple and you can see the usage is you literally just typing
in the tool name followed by the options.
So first of all let's type in the name of the tool which is a S L A P.
Then we want to use the dash C option to give the challenge.
So we have the challenge in here.
I'm going to copy it and I'm going to do.
Dicy and put the challenge next option that I want to use is the response which is dush or and here.
So again I'm going to do a dash capital R and then I'm going to put the response that we got which is
this one in here.
So I'm just going to copy it and pasted.
Finally we want to specify a dictionary to use to crack this harsh and to do that we're going to do
that w and I've already created a dictionary using crunch.
So you can create your own dictionary or download dictionary online.
The dictionary that I have is stored in root and it's called wordlist and that's it.
So the command is going to be a cell UAP.
We're doing dashi to give the challenge followed by dush or to give the response.
And finally we're given the wordlist.
So again what's this still going to do is it's going to open this wordlist.
It's going to go on it word by word generate a response based on this challenge and compare the response
with this response right here if the response generated from the word and the word list is valid then
that word is the password.
Otherwise it's going to try the next word.
So I'm going to hit enter and let this run until it gets me the password.
And as you can see this was quite fast and it got me the password right here.
The password is 1 2 3 4 A B C D and that's actually the password that I used.
So right now we have the user name which is zayd and the password which is 1 2 3 4 for ABC the.