Step 1:
Enable IP forwarding on Attacker’s Machine
Get the hacker machine into acting as a router as it needs to forward all the traffic coming to it to outside
internet.
• Start Registry Editor (Regedit.exe).
• In Registry Editor, locate the following registry key:
• HK EY _ LOCA L _ M ACHIN E\SYSTEM\CurrentControlSet\ Services\Tcpip\Parameters
• Set the following registry value:
• Value Name: IPEnableRouter
• Value type: REG _ DWORD
• Value Data: 1
• A value of 1 enables TCP/IP forwarding for all
network connections that are installed and used by
this computer.
• Quit Registry Editor. Restart the PC.
Step 2:
Set a firewall rule that forwards HTTP traffic from the victim to hacker’s machine for modification
This was most challenging and time consuming part of the experiment as I
was unable to find single command, tool or utilities to do that. In
Unix the an IPtables command would do thatsudo iptables -t nat -A
PREROUTING -p tcp –destinationport 80 -j REDIRECT –to-port 10000 It
tells all HTTP traffic from victim, coming on port 80 of hacker’s
machine to redirect it on port 10000 on the same hacker’s machine. Port
10000 is used by SSLStrip tool by default. Tired of not finding any
equivalent firewall utility for Windows to perform above rule
fortunately I stumbled upon blog of Kenneth Xu
(http://kennethxu.blogspot.com) and I finally found the following nice
Java based TCP/IP port forwarding utility – (Download here
http://code.google.com/p/portforward/downloads/list)
C:\>java -classpath commons-logging.jar;portforward.jar
org.enterprisepower.net.portforward.
Forwarder 80 localhost:10000
This command forwards all HTTP traffic received on port 80 of Hacker’s
machine to port 10000 of the same machine. SSLStrip runs on port 10000
by default.
Step 3:
ARP spoof the target traffic to redirect to hacker’s
machine
Suppose the Victim machine’s IP is 192.168.1.10 and IP of the gateway is
192.168.1.1. It will poison the victim machine (192.168.1.10) MAC table
and instead of sending the traffic to Gateway (192.168.1.1) it will
send to the hacker’s machine falsely assuming it as the real gateway.
Run the following command on attacker’s machine arpspoof –t 192.168.1.10
192.168.1.1 It will update the ARP table on Vitim’s machine with
changed gateway IP of attacker’s machine.
Step 4:
Run SSLStrip on hacker’s machine
Run the following command on Hacker’s machine python sslstrip.py -f
lock.ico You can see the log file in the SSLStrip installation folder
for logged credentials. The SSLStrip will log all the traffic coming
from
Victim’s machine and strips the all the SSL link (https://) to http://
between the Victim and Hacker. Thus the traffic between the Victim to
Hacker is transparent and in clear text Various options available with
the SSLStrip:
Options:
• w , –write= Specify file to log to
(o
• p, –post Log only SSL POSTs. (default)
• s, –ssl Log all SSL traffic to and server
• a, –all Log all SSL and HTTP traffic to and from
server
• l , –listen= Port to listen on (default
10000)
• f, –favicon Substitute a lock favicon
• k, –killsessions Kill sessions in progress
• h Print this help message.
Real life examples
The following page appears on https:// in normal situation but here it
is as http:// View page source can also reveal that links are stripped
of SSL: see Gmail on http: see An example of Log file of SSLStrip,
Mitigation
User Education: User should be educated to always use https while
requesting any sensitive page. As user only type domain.com that is
redirected to https://domain.com may be vulnerable to SSLStrip.
EV SSL Certificates: There is no reliable information to back up the
authentication of the domain name. To address this critical problem,
certificate authorities and software companies joined to form the
CA/Browser Forum and promulgate a new standard called EV SSL for
Extended Validation SSL. For instance, they must validate that the
organization exists as a legal entity, that any organization names are
legal names for that organization, and that the applicant is authorized
to apply for the certificate.
SSLStrip tool:
http://www.thoughtcrime.org/software/sslstrip/
NULL Prefix attack on SSL Certificates:
http://www.thoughtcrime.org/papers/null-prefix-attacks.pdf
Black Hat presentation:
http://www.blackhat.com/presentations/bh-dc-09/Marlinspike/BlackHat-DC-09-Marlinspike-Defeating-SSL.pdf
Real Tutorial: http://www.thehackerslibrary.com/?p=918
Author: Taqrim Ibadi
Hallo, perkenalkan saya Taqrim Ibadi seorang tenaga pengajar di salahsatu Perguruan Tinggi Kota Palembang. Saya menyukai segala hal tentang komputer. Saat ini sedang menekuni belajar dibidang UIUX, Pemrograman dan Artificial Intelligence.
what if weireless is have password, can be done?
ReplyDelete