Type : Tutorial
Level : Medium, Advanced
Some people asks "Are you sure SSL(Secure Socket Layer) port 443 can be hacked and we know the password sent over the network??"…..how to break ssl protection using sslstrip?
For more information about this, you can see my previous tutorial about SSL and HTTPS.
actually if you see my explanation about SSL in my previous post, when we try to break the encryption it’s a little bit hard to break, but here in this tutorial I will explain how to break the SSL encryption without breaking the SSL encryption using Man in the Middle Attack .
What is Man in the Middle Attack? I also have already write down about this in my previous post about "Hacking Facebook Using Man in the Middle Attack"
1. Linux OS
All of this requirements maybe have other dependencies with other packages, I suggest you to use Backtrack Linux for more easier to do this tutorial, because all of the requirement package already installed inside Backtrack Linux(except SSLStrip).
1. Set your Linux box to make it can forward every incoming port(enable port forwarding).
echo ’1’ > /proc/sys/net/ipv4/ip_forward
This code will let your Linux Backtrack have ability to forward every packet that was not intended for your machine.
2. Know your network gateway
For example i’ve already know that my gateway address is 192.168.8.8
3. Use ARP spoof to perform Man in the Middle Attack
arpspoof -i eth0 192.168.8.8
a. Change "eth0" to your network card that currently connected to the network. Usually it is eth0 or wlan0.
b. Change "192.168.8.8" to your network default gateway.
c. In this tutorial I use arpspoof to entire network. Be careful if your network have a large user connected to it, because it will crash your network and bring your network down.
Created by Moxie Morlinspike who provides a demonstration of the HTTPS stripping attacks that presented at Black Hat DC 2009. It will transparently hijack HTTP traffic on a network, watch for HTTPS links and redirects, then map those links into either look-alike HTTP links or homograph-similar HTTPS links. It also supports modes for supplying a favicon which looks like a lock icon, selective logging, and session denial. -Taken from author website-
This all happens on the fly, and is practically will invisible to users. The only way to notice is by checking the URL in the address bar where normally it would display HTTPS, it will now display HTTP instead.
1. Download SSL Strip
2. tar zxvf sslstrip-0.9.tar.gz
3. cd sslstrip-0.9
4. python setup.py install
1. We need to set up a firewall rule (using iptables) to redirect requests from port 80 to port 8080 to ensure our outgoing connections (from SSL Strip) get routed to the proper port.
iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080