So far we've seen how to discover this as will her abilities.
We are the look on her reflected stored and on base and we've also seen a few ways on how to bypass
security and how to address our payload so that it works on different situations.
We still haven't seen any good way of exploiting these vulnerabilities though.
All we did was run a code saying alert access or alert and the message that we want.
So in this lecture and the next few lectures we're actually going to see how we can exploit machines
that visit these vulnerable Web pages and we're going to do that using a framework called the framework
what it does it allows us to run a large number of commands to hook browsers and to hook a browser to
be if a javascript code has to be executed on that browser.
And because beef uses Javascript it's very easy for us to inject that code into Access vulnerable Web
pages and that code will be executed every time a person runs that page.
So all of this is going to become more clear.
Let us just run with and get it set up and get someone hooked to it.
In this video and in the next videos will be run in our commands and you'll see it'll become much more
clear on how to use me.
So I'm going to go to my calendar next and the first thing I'm going to do is just run be here from
it I can give it some time and it'll start.
It'll automatically start the browser for you.
So now to log in the user name is beef and the password is beef as well.
So this is the main screen of beef you can see here on the left.
You have online browsers and this will basically list all the browsers that are hooked to beef at the
moment you can see that we have nothing hooked to it.
And on the right once you click on a hooked browser you'll be able to run your commands in here again.
In this lecture and future lectures will be running some commands.
So it'll become more clear to you.
So right now let's go ahead and try to go and get some people hooked to beef.
Now there's a number of methods that you can do to hook people to be what we're interested in is how
to hook them through Access vulnerabilities.
So the main thing that we're going to be using is the code given to us by itself so it's actually telling
us what code to use.
And as you can see now this is a javascript code similar to the alert code that we were using.
So the first thing I'm going to do is copy this and we're going to paste that in a leaf pad just so
that I can show you how to modify it.
So all you have to do is just inject this code into the vulnerable pages.
One thing that you have to modify is that you have to add your IP in here.
So to get your own IP all you have to do is run ifconfig.
So I'm just going to get a terminal and I'm going to run ifconfig and as you can see now my IP is this.
So it's 10 20 40 into 0 8
and that's it now the code is ready to be executed.
So I'm going to close this.
And let's go to one of our vulnerable Web pages that we were using before so used to go and let's go
to DPW I.
So first let's just go and set the security to low.
We've seen how to bypass the security so I don't want to make this video too complicated.
And let's have a look on example on reflected one.
So if we go on a reflected exercise and remember when we used to put the name here and the name gets
displayed so we used to just put our script instead of the name.
And that gets executed as well.
So instead of doing an alert we're actually going to run it like this.
So this was our code and we used to do this to get our code to be executed so let's just have an example
on it as well.
And as you can see you get access to us.
So we're using exactly the same code exactly the same concept except we're changing the payload instead
of say an alert.
We're actually going to put this code.
We're going to ask for this code to be executed.
So we're just going to modify that and put it in here.
So this is ready now.
And you can send it to any person.
And once they execute this you are l they will be hooked to B.
And then you'll be able to run all the commands that allow you to run.
Now you can go ahead and change this or I'll use an or else shortening service just to make it look
less suspicious.
So let's just have an example I'm actually going to execute this code in my state in the same browser
which I shouldn't I should probably do it on a different machine but we'll do it just here just to show
you the proof of concept.
So we are on this here.
And if we go to beef Now
now I've actually mistyped my IP here it's it's 10 20 not 10 14:20.
So this is my IP I'm just going to fix that pasted here.
And if we go to beef you'll see that we have an online browser and a person is hooked now we can click
on this and run the commands.
But I'm going to leave that for a different lecture.