How to protect yourself from Firesheep
Since the launch of Firesheep, it has never been easier to hijack people’s Facebook, Google, Flickr and various other web accounts. If you are a Firefox user, and you can click a button, congratulations – you can be a hacker! To put it simply, the vulnerability that Firesheep is taking advantage of (and trying to make aware) is two things:
- 1. Every request that goes through a Wireless (WiFi) Router is a broadcast (think Hubs).
- 2. Browsers will send the same cookies to http://example.com as https://example.com, unless the cookie is marked as secure only.
That means if you are checking your Facebook, or searching Google on a public WiFi network (Starbucks for example), any kid running Firesheep could gain access to your accounts with the click of a mouse. Even if the login page is on https, it doesn’t matter. The second you send a request to http://facebook.com or http://google.com your session cookies are blasted to the entire network, and are fair game.
So now that you know a little more about Firesheep and the risks of surfing on public WiFi, what can you do about it? Use an SSH tunnel. If you have access to an SSH server, which pretty much all web hosting companies give you, then you can set it up as a proxy and securely tunnel all of your web traffic through it. There are several ways to do this, and several different browser plugins to help. I’m going to show you one method using a Mac or Linux computer with Google Chrome and the Switchy! plugin.
The first step is to set up the “tunnel”. This is going to involve a proxy running on your local machine that forwards requests through your SSH server, and since SSH is a secure protocol all of that data will be encrypted. To do this, we need to open a Terminal and issue the following command.
If you don’t have public-key authentication setup then you will be prompted for your SSH password. Afterwards, there will be a SOCKS proxy available at localhost:9000. Now all you need to do is tell your browser to use it. Luckily there is a great little plugin for Chrome called Proxy Switchy which you can download from here. Once installed we need to set it up. Click on the Switchy icon in your toolbar and choose “Options”. We’re going to create a new profile; call it “SSH Tunnel” and select “Manual Configuration”. Where it says SOCKS Host, enter 127.0.0.1. Set the port to 9000 and below that select SOCKS v5. When your done, click “Save”.

Now when you click on the Switchy icon you should see 2 options. Direct Connection (no proxy), and the one we just created SSH Tunnel.

That’s it! Now whenever you’re on public WiFi just open a SSH Tunnel, select that profile from the Switchy menu and all your web browsing will be encrypted – and when you’re on a wired or trusted network you can easily switch back.