Most websites use an encrypted connection to transfer sensitive information, including usernames, passwords, and credit-card numbers, over the Internet.
In a presentation given this week at Black Hat DC, a computer-security conference in Washington, DC, an independent security researcher who goes by the name Moxie Marlinspike unveiled a tool that can hijack secure connections and trick users into sending sensitive information in the clear.
The attack relies on the fact that most communication over the Internet takes place insecurely. Connections become secure when needed, using the Secure Socket Layer (SSL) protocol.
The beginning of the URL shown in a Web browser's address bar reveals what kind of connection has been established. If the address starts with "http," the connection is standard and unencrypted. If it starts with "https," then the connection between the user and the website is encrypted.
But most users do not bother to type in "https" to establish a secure link. Instead, they rely on a website redirecting them to a secure connection when needed.
"People only tend to access the secure protocols through the insecure protocols," Marlinspike says.
Marlinspike has developed a software tool called sslstrip that interferes with a website's attempt to direct the user toward that secure communications channel. Sslstrip can be used once an attacker has infiltrated a network to watch passing traffic for anything that might redirect the user to a secure connection -- for example, a login button that links to an "https" URL.
When the tool sees that information, it strips out the link to the secure page and replaces it with an insecure one. The tool then sits between the user and the website's server, passing information back and forth.
But before passing on information to the server, it encrypts it, so that the Web server has no idea that anything is wrong.
Marlinspike admits that some users might notice that something is wrong because browsers often show that a connection is encrypted by placing a lock in the corner, and that would be absent. However, he says that many sites feature confusing design elements that could easily make users think that a connection is secure when it isn't.
For instance, some sites show the lock icon in the login window, informing the user that the link is supposed to lead to an encrypted page. Certain banking websites also provide no indication that they are about to switch to an encrypted connection, meaning the user may not realize that anything has gone awry.
Marlinspike even showed several ways that the attack could be made more covert, by creating an encrypted link with the user.
Marlinspike tested sslstrip by collecting data from Tor, an openly accessible network for anonymizing Web traffic. Over 24 hours, he collected login details for 117 e-mail accounts, 16 credit-card numbers, 7 PayPal logins, and 300 other postings that were intended to be secure.
He monitored to see if anyone would balk at using an insecure connection; no one did.