Hello everybody and welcome back.
And let me show you in this tutorial how you can perform a powerful attack using the B framework.
And the man in the middle attack framework.
Now B framework is basically a tool used for Browser Exploitation.
It can be right here.
The simple use of that attack or the practical matter of that attack is basically hooking other people
or hooking other browsers to connect to the page which is running the code for the redirection to the
DOT JavaScript file which then basically creates a zone on a zombie army of all the battle of the machines
that are currently connect on the local net local network.
And if there are some browsers on those machines that are outdated you can perform various types of
attacks on them and actually exploit them.
Now in order for you to run beef you need to first open up your terminal.
You can run it through a terminal all through the applications right here.
I believe it is anything spoofing.
OK.
It is not there exploitation here in exploitation tools.
Here it is beef access as framework.
I will run it from the command.
Also just type your beef minus access and run it and what you want to do from here is basically copy
this script right here and put it into your Apache website.
Now I will show you the entire process right here.
Let me just open up the beef.
So this opened automatically and the username and password for this page are both beef.
So just type your beef and then beef once again click on the log in right here and you will be prompted
with page looking like this.
Here you have online browsers and off site browsers.
You can read this if you want to basically teach us something about the new users.
You can read if you are not familiar with the beef since we didn't cover it before but right now what
I want to show you is what you need to do in order to hook other people for this type of attack.
So you need to let me just zone zoom in so see it better.
There is this thing called the hook but you want to do is this.
So you want to create a simple HDMI file or any fake page or basically anything you want which is an
HDMI file and put it on to your Apache to Web site on your calendar next machine or on other machine
that you run.
What you want to do is include this script which is javascript code into that HDMI all code on your
Apache too.
And every time someone opens your Apache web server or web site and through their Google browser or
search bar or anywhere else they will be running this javascript code which will be law and which will
allow us to actually exploit them if their browser is out dated.
We will see them in our PIF framework on that page that we logged in previously.
So let me just show you how you can do that.
So as I said before your Apache tool folder is in var w w w and then age the amount.
Here you have files basically files that will display on the page.
Once someone types in your IP address.
Now for this attack I will use the Apache tool on my laptop but I will show you how you can create the
the attack with Apache too on your calendar machine.
So here we have the 1.0 HCM Al file which I actually want to delete for now on and what I want to do
is Nano.
So we will create a new HDMI file including the script code.
So now no script not notice them out.
Now you can call it anything you want.
It doesn't matter or actually it does matter you need to call it indexed not HDMI.
So let me just rename it so index to teach the AML as I said before.
If you're it's the email file on your Web Apache to server is it called into is the email.
It will not display it.
So call it index not h the email save file under different name yes.
And now we can write to the file so we will create the most simple the most simple version of the of
the email file so just follow what I type right here.
It doesn't matter if you do not understand it.
You can basically just copy any page and type add the same thing which I will show you in just a second.
I will just type a small code right here.
Here we can add a title which will be test now for those of you that actually know the age the amount
is will be very simple for you.
For those of you who don't.
You will also understand it it's really not that hard to understand.
We just created the body tag and the head stack and these.
Each one represents the header which we will display on our page and let's say it says just hello.
We closed the header with the h1 tag and the slash.
And then we close the body header.
Yeah.
The body art.
We all send the HDMI out part.
Now let us say this.
Control oh and then control X to exit.
Now we still didn't have the hook.
But let me just show you
or let me actually at the hook first so you can see it.
We not need to nano.
He will need to manually intercept CML.
And what you want to do is at the hook that you copied from the from the beef framework so that JavaScript
code.
Now it is the same for everyone where you want to add.
You want to add it to the hash tag.
So somewhere between this part right here and somewhere between this part right here.
So let us set it right below the title so we can actually edit above the title so just type your script.
Now this script right here is referring to the our script code and this C R C right here is basically
source.
So what this page will do is it for the source the script to the IP address that you specified toward
the folder that we specified to and it will run that script that it finds there.
Now my script is located on my
basically on on your own IP address.
So what you want to do is basically just check out your IP address first which you can do simply with
the config.
So what you want to do I have config my IP address is one I did two that once said that one but seven.
So what you specify right here is equal then.
Double quotes and then age TTP to dot slash slash.
And then your IP address once you state that one that's seven and then you again specify two dots and
then you specify the port which is always three thousand.
It should be three thousand by default if it is not you can change the configuration file but it should
be three thousand for you.
And after that you specify slash and then hook dot J S which stands for JavaScript file.
So this is the following.
Let me just.
Why is it OK.
So this is the following.
And what you want to do right after is called the double quotes like this and then closed the entire
script code.
So.
Script.
You are good to go.
So right now you save this say modify modified buffer.
And if you can see this is the entire code that you need.
So you need to put this in this directory right here so slash var slash w w w slash h the amount and
you will be good to go.
Now another thing that you want to do in case yours Apache 2 is in training.
You need to set it to run.
So in order to check if you're Apache who is running just type service Apache to a status and here we
can see you loaded active inactive.
So we need to run the Apache tool first so service Apache to start.
So we started the Apache too and now let me show you what happens when someone visits that page.
Now as I said I only showed you how to do this.
I won't be using the Apache tool from my clinic's machine I will use it on my laptop where I have Apache
to running and where I have the same file that I showed you right here on my Apache tool so it will
display halo.
And it also has a script in the head tag with the hook to the javascript file.
So what happens when we visit the vet page.
So let me just first open this right here as we can see we do not have any problems connected but if
you type right here one ninety two not 160 K Dot 1 and 15 which is the IP address where I am running
the file with the script of a hook.
So we plan press here enter as we can see right here oh wait I didn't rename it to the index that HDMI
also just give me a second.
As I said it had the file that you have in this large file stage WWE obviously abuses the amount folder
needs to be named indexed HDMI out in order for it to explain.
So I renamed it on my laptop and let me just refresh the page.
And here we can see it just this place Halo which can be really normal for our users so you just notice
nothing is happening.
You can close this right now but what happened in our beef.
Now we have our browser hooked which means we can perform any kind of exploitation or any kind of the
attack.
If that browser is out dated here we can see browser is Windows and TV understand windows 64 Mozilla
you can see it is over Chrome so basically you just get a bunch of these information right here.
The host the name IP you all kinds of stuff.
And what you want to what you can do right here is basically just go to the comments and here you have
the attacks that you can perform on the browser.
So here are social some social engineering attacks through jacking fake class pass creepy simple hijacker
and some other you can have browser attacks.
Webcam you can hook it you can play sound.
There are just too much of these options right here.
We will not cover basically these attacks.
I just want to show you how you can hook a browser and knew now can experiment with all of this.
Now if the browser is outdated this is a very powerful attack since now you can basically do anything
on the target P.C. P.S. There are some of the methods to modules.
I believe there is only one right here but there are some exploits right here which you can also use
shellshock.
We covered Shellshock is that is the famous command ejection attack.
There are some of the other PSP dos.
So there are a bunch of these options right here that you can perform but more about that later.
I just want to show you how you can hook a browser.
Now you might be asking right now so what is the point.
We actually need to get someone to type the IP address of that machine in order for it to load that
page and in order for it to hook to our B framework.
Now that's where the man in the middle comes in.
So what you can do is basically you can actually let me show you.
So let's go to the man in the middle.
And what you can do.
So let's type it does this help what you can do is you can actually redirect everyone on the local network
to that Web site.
So let's perform that.
I'll show you how you can do it.
Basically all you need to do is use captive portal.
Now captive portal you can use as it says right here.
Be a captive portal so captive load plug in captive portal.
And we need to specify the URL where it where the portal is located.
So the current to your hour my portal is located will be my IP address of a laptop since there is the
javascript file that we need in order to hook browsers.
So what we need to do is basically just have my TMF minus my minus eye for the interface and then we
specify the minus minus minus minus half.
So we are performing the ARP spoofing and all we need to do after the Gateway which is let me just see
when I get to that 168 at 1 1.
We need to specify captive and then portal you URL and then we specify a GDP.
When I do that on set to fund funded 15 and that should be it.
So right now if I just press here run
you can see it is running the ARB spoofing attack.
And now if I go to my browser and they want to for example refresh this page which is from the previous
attacks and I just refresh it you will see that I get redirected to the Halo page.
Now this is just a redirection but in the background the actual event the yellow script code from that
hook file and it actually to the browser or the P.C. on our BS framework.
So we have it right here now.
It is not hooked twice and I already have it right here.
But if I were to run it from for example my laptop right here.
So let me just visit the same HDP page from my laptop and you will see it also appear right here.
So I will visit the same page that just go to my laptop.
Now let's
go right here and in a few seconds here is my laptop as we can see my laptop is Linux running Mozilla
boon to Linux 64 you have some of the options and now you can actually perform attacks on both of these
machines and soon enough all of the machines on the local network will start appearing here since any
website you visit will get redirected to this page basically normal.
No one will be able to go to any other Web sites that are HDP or HDP or SSL.
They will all be redirected to this page and then their browsers will be hooked where you can perform
a different types of attacks.
So that will be it about this tutorial.
Now I will not be showing these attacks right here you can just test them yourself.
They are not that too.
They are not that hard to perform.
See this is go here and you just need time stamped right here.
And then the attacks will work if the boundaries are outdated so you can try it out on yourself.
And we will cry.
We will try a few other different attacks before we move to the next tool in the next story.
And I hope I see you there by.