Man In the middle attack is a very popular attack. Man in the middle attack is a very dangerous attack, with the help of the man in the middle attack the attacker can theft the credential like passwords and username, phishing attack, DNS spoofing, cookie theft and many more. Before you know how to perform Man in the middle attack, take a look at how the man in the middle attack work.

How Normal Communication Work 

When you browse the internet through wifi that means you are having a router or modem which is connected to the internet and every request you are doing it sent to the router and router send it to the internet and get the reply and forward it to you.


As shown in the picture above when the user tries to open FB.com, The request is forwarded to the router and router send it to the FB server, When FB server gets the request, it replies back to the router and router take the request and show the result on your screen.



How Man In The Middle Attack Work

Man in the middle as the name suggests the man in the middle means man in the middle of your conversation.
In the case of the man in the middle attack, the user request is forward to the attacker machine instead of router and attacker then forward it to the router but if the attacker drops the request which means if the attacker wants he can stop the request and won't send the request to the router. Now every reply from the router will be forwarded to the attacker and attacker can change the reply or even won't forward it to the user.




How To Perform Man In The Middle Attack

To perform Man in the middle attack you need a Linux machine whether it is a Kali Linux or Parrot. Once you have Kali Linux installed you can install the Man in the middle tool form your terminal itself, Just type the "apt-get install mitmf" If you get any error from this command that means you have not updated kali Linux your repository. It will approximately 1 to 2 minutes to install it, After completing the installation process you can open via "mitmf" command in your terminal When you hit enter it will display all the commands for the mitmf tool.
To become the man in the middle type the following command in the terminal
"mitmf --arp --spoof --gateway 192.168.0.1 --target 192.168.0.111 -i eth0/wlan0

Now to know about your gateway type the ifconfig in your terminal,
To know your target IP address you can use nmap, hping3 or netdiscover.
-i is for the interface for you Kali Linux machine eth0 is it is connected to the ethernet and wlan0 if it is connected to through wireless.


 You can join our telegram channel to get the new update