INTRODUCTION
The HTTPS and SSL/TLS protocols are at the essential elements of Web security and trusted ecommerce in present Scenario, but today at the Black Hat Briefings Web application security experts Robert "R Snake" Hansen and Josh Sokol identified two dozen vulnerabilities of varying criticality in the fundamental architecture of Web browsers. These flaws essentially eliminate the protections that HTTPS and SSL are supposed to bring to the browsing experience. So basic Secure Socket Layer is no more a guaranteed solution for the secure browsing and data transfer.
This post discusses weakness in SSL and how SSL certificate is exploited to make false certificate.
It also discusses how to use SSL Stripe tool to break SSL security.
WEAKNESS OF SSL
SSL heavily rely on X509 certificate structure to prove authenticity. For the SSL it is the common
name field of the X509 certificate that is used to identify authentic servers. For example , Paypal will
use www.paypal.com in the common name field. The signing process heavily relies on the above
convention. The Certificate Authorities will sign www.paypal.com, they don’t care whether you are requesting for anything.paypal.com or something.any thing.paypal.com – as long as you prove that you are paypal.com.
name field of the X509 certificate that is used to identify authentic servers. For example , Paypal will
use www.paypal.com in the common name field. The signing process heavily relies on the above
convention. The Certificate Authorities will sign www.paypal.com, they don’t care whether you are requesting for anything.paypal.com or something.any thing.paypal.com – as long as you prove that you are paypal.com.
So there is no standards for issuence of Certificate nor any rule for what the fields in them are supposed to mean and which are required for authentication . Marlinspike’s SSLStrip attack demonstrated the combination of several attack techniques to exploit the above weaknesses and fool users/client applications into thinking they were using a trusted site/server, when in fact they were using a fake version of that site/server.
STRUCTURE OF SSL CERTIFICATE
X509 certificates are commonly formatted using ASN.1 notation. In PASCAL character string the NULL characters are treated as normal characters. They don’t have any special meaning. So NULL characters can be included into the common name field of X509 certificates.
So a request of type www.paypal.com.fakeorganization.com will be treated as valid request by CA (certificate authority) and certificate will be granted.The Certificate Authority will ignore prefix and sign the root domain fakeorganization.com. Now the SSL/TLS implementation treats the field in X509 certificate as C string and in C "null" means end of string. therefore wwww.paypal.com and www.paypal.com.fakeOrganization.com are treated as identical. The owner of fake certificate can successfully present his certificate as valid secure connection intended for original paypal.com. HERE MITM HAPPENS ON SSL. (Man In The Middle).
So a request of type www.paypal.com.fakeorganization.com will be treated as valid request by CA (certificate authority) and certificate will be granted.The Certificate Authority will ignore prefix and sign the root domain fakeorganization.com. Now the SSL/TLS implementation treats the field in X509 certificate as C string and in C "null" means end of string. therefore wwww.paypal.com and www.paypal.com.fakeOrganization.com are treated as identical. The owner of fake certificate can successfully present his certificate as valid secure connection intended for original paypal.com. HERE MITM HAPPENS ON SSL. (Man In The Middle).
HOW TO CRETE AND SIGN YOUR OWN CERTIFICATE
To sign your own certificate there is field in X509 certificate which need to be set FALSE in order to restrict domain owner to act as Certificate Authority (CA= FALSE). Most of Certificate authority and web browsers implementation donot pay attention to check on this Field and certificate owner can set this field TRUE and can create their own Certificate.
SSL STRIP (A tool to perform SSL Hijaking)
- SSL strip constantly watches over Http traffic and start acting as proxy server when user initiates an Https session.
- While user think that secure session is created the SSL Stripe connects with requested server with a secure connection and all the connection between user and SSL Stripe is over http:// rather than https://.
- SSL Stripe replaces all the link with https:// in page with http://
- Thus Login details can be harvested and user security is breached .
- Thus this is how Man In Middle Attack is implemented.
Images such as Favicon are replaced by images of familiar secure lock icon, to built trust of victim client.
PROCESS OF USING SSL STRIP ON WINDOWS
For using it on windows platform a tool SSL Stripe tool is used. For Linux Firewall Managment tool iptable is used for port Forwarding. Port Forwarding is the utility in which traffic from one machine port is accepted and forwarded to another port of same machine.
PREREQUISTES :
- Install Pyhton as SSL Stripe tool works over Python platform.
- Two machines running windows on same LAN one attacker and one victim.
- on Attacker machine SSL Stripes executes , on this same machine ARPSpoof command is executed.
Enable IP Forwarding on attacker's machine
In Regedit.exe locate following
HKEY_LOCAL_MACHINE\SYSTEM\currentcontrolset\services\TCPIP\Parameter
valueName= IPEnableRouter
ValueType : REG_DWORD
VlaueData : 1 (enables TCP/IP forwarding for all Http connections to that machine)
Restart PC
STEP2
Setup iptable to redirect the traffic to SSLStripe.
Set a firewall rule that forwards HTTP traffic from the victim to hacker’s machine for modification. In Unix the an IPtables command would do that sudo 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. For windows a utility is used to redirect the traffic from victim to attackers machine and Port 10000 which is default port for SSLStripe. this utility can be downloaded with regards to blog of Kenneth Xu (http://kennethxu.blogspot.com) from the link http://code.google.com/p/portforward/downloads/list)
STEP3
ARPSpoof the target traffic to redirect to hacker machine
In this the traffic from victim's machine is forwarded to attacker's machine by poisoning the victim's MAC table. Let the IP of victim be 192.144.1.14 and IP of gateway be 192.144.1.1, then after poisoning MAC table it will send traffic to hacker's machine considering it an Original Gateway .
arpspoof -t 192.144.1.14 192.144.1.1
ARP table of victim is updated with changed Gateway.
STEP 4
Run SSL Stripe 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 Security of victim is breached.
MITIGATION
There needs to be an automated mechanism that ensures the end user's security which requires zero knowledge or participation from the end user to work. We can create such a secure mechanism with minor changes to DNS and web browsers. First, we use DNS to publish a list of websites that must operate in HTTPS through custom DNS records. Second, the web browser will automatically force a connection to an HTTPS page if instructed to do so by DNS and it will maintain a list of websites that are only to operate in secure HTTPS mode. We do this second part because we cannot always assume that DNS is trustworthy especially in the case of wireless hotspots. The DNS mechanism would only work as a toggle on to force HTTPS for all future web browsing sessions but it would not be permitted to toggle off HTTPS unless it was a trustworthy DNSSEC server. This means that once a user successfully visits a secure website for the first time, they will always remain secure for that website even if they cannot trust the DNS server they're using on public wireless hotspots.
Now that there is a real and tangible threat to HTTPS in the form of a tool like SSL Strip that hijacks any HTTPS website, the time to act on these recommendations for securing HTTPS is now. We need leadership from Microsoft, Mozilla, Apple, and Google today to secure the most important application on the Internet today. Google has already made some strides with a partial implementation, but we need a full implementation of these recommendations and we need everyone to jump on board.
THANK U
Simply desire to say your article is as amazing. The clearness in your post
ReplyDeleteis simply spectacular and i could assume you are an expert on this subject.
Fine with your permission allow me to grab your
RSS feed to keep updated with forthcoming post.
Thanks a million and please continue the enjoyable work.
My homepage ... 除甲醛
I do not even know how I stopped up here, however I thought this submit was once great.
ReplyDeleteI don't know who you are however definitely you're
going to a famous blogger in the event you are not already.
Cheers!
My blog; cure for bv
Wow that was unusual. I just wrote an incredibly long comment but after I clicked submit my comment didn't appear.
ReplyDeleteGrrrr... well I'm not writing all that over again. Regardless, just
wanted to say wonderful blog!
Also visit my blog gender selection cost (Www.Youtube.com)
I'm not sure exactly why but this blog is loading extremely slow for me.
ReplyDeleteIs anyone else having this problem or is it a issue on my end?
I'll check back later and see if the problem still exists.
Feel free to surf to my web blog - perfect gift for her
Hi there, yup this post is really fastidious and I have learned lot
ReplyDeleteof things from it concerning blogging. thanks.
my blog; gender predictor (http://www.youtube.com/)
It's very easy to find out any topic on net as compared to textbooks, as I found
ReplyDeletethis post at this site.
my webpage - perfect gift for her (youtube.com)
Hi, yup this piece of writing is genuinely good and I have learned lot of things from it
ReplyDeleteregarding blogging. thanks.
Here is my blog :: car crash compilation