Now that we know how IRP spoofing works let's see how we can run this attack and redirect the flow of
data so it flows through our device.
This will allow us to intercept data and see everything sent to and from a target computer including
usernames passwords and so on.
Now there are a number of tools that can be used to run an ERP spoofing attack.
You can even build your own tool and I cover this in my Python programming course.
But in this lecture I want to show you how to use a very simple yet reliable tool called ERP spoof.
Then in the next lectures we'll use a tool called better cap because it has more features.
Basically the main reason why I want to cover a piece poof in this lecture because it is a very simple
tool but it's very reliable.
It's also ported to many operating systems including iOS and Android.
Therefore if you learn how to use it here you'll be able to use this tool on all of the other operating
systems so you can only use this tool to redirect the flow of data and make it flow through your computer
and then you'll have to use another tool like a packet sniffer like wire shark to analyze this data
and do more stuff with it and will cover all of this later on in the course.
Now use an ERP spoof is very simple.
First we're going to have to type its name so it's ERP spoof.
Then we're going to do Dash I to specify the interface that is connected to the target network and in
my case is 88 0 because that's the interface that's connected to the network.
So if I do if config you'll see 88 0 is the interface that's connected now as you can see I'm going
to be running this attack against my virtual not network.
You can run this attack against any type of network even Wi-Fi networks and I will cover that later
on in the course.
But for now just until you properly understand how this works I highly recommend you do like I'm doing
right now and test the attack against the virtual not network.
So all you'll have to do is make sure the Kelly machine and the target Windows machine are both configured
to use the same not network so we're going to do dash t to specify the target and my target is at 10
0 2 7 as we can see in here that's the IP of my target and I'm going to have to give it the IP of the
Gateway which is at 10 0 to 1.
As you can see in here now this will spoof the target telling him that I am the router we'll also need
to run this command once more in here.
So I'm going to clear the screen and again I'm going to do a sharpie spool.
I eat a zero and the target this time is going to be 10 0 to 1 and 10 0 2 7.
So right now we're going to be telling the writer that I am the victim.
So the first one will fool the victim.
The second one will fall thereafter.
Now keep in mind this attack will work against both either net and Wi-Fi or wireless networks.
I'm done in it right now against the virtual network which acts as either net or a wired network.
But the attack can be executed exactly the same against wireless networks.
All you have to do is connect a wireless adapter to the Kelly machine connect the adapter to the target
network and use it.
So the same concept as the networks kind of applies.
You need to have a wireless adapter that works well with Kelly and you need to have that adapter connected
to Carly and connect it to the target network so I'm going to hit enter here and I'm going to hit enter
here and now if we go to the target machine and run the same command a sharpie a you're going to see
that the MAC address.
Now for the router is different than what it was and this is actually the MAC address of the Cally machine.
So right now this Windows machine thinks the router is at this MAC address and every time it needs to
send requests it will send it to this MAC address which means that they will be sent to this computer
right here now this computer is not a router.
So when it gets requests it's actually going to stop them from flowing and going to the router.
This is a security feature in Linux.
So you need to enable port forwarding so that this computer would allow packets to flow through it just
like a rafter.
Now to enable port forwarding we're going to do Echo One to proc says net IP version for IP forward.
And as you can see this command gets executed with no issues.
And right now this computer will still have its internet access so we can go and browse any Web site
we want but all these requests are not going directly to the router but they are going to this computer
first and then this computer is forwarding them to the router as shown in this diagram.
And then when the responses come back they're going to go to the hacker first and then they go to the
victim.
So as you can see a very simple tool it allows us to redirect the flow of data so it flows through our
computer allowing us to become the man in the middle.
And once we're the man in the middle we can inject code in the browser of the target we can steal usernames
passwords see all the information that the person sends and receives replaced downloaded files with
Trojans and much much more.