views:

74

answers:

2

I was reading about Firesheep and wondering how I can protect my Spring MVC 3.0 site against attacks like this:

It's extremely common for websites to protect your password by encrypting the initial login, but surprisingly uncommon for websites to encrypt everything else. This leaves the cookie (and the user) vulnerable. HTTP session hijacking (sometimes called "sidejacking") is when an attacker gets a hold of a user's cookie, allowing them to do anything the user can do on a particular website. On an open wireless network, cookies are basically shouted through the air, making these attacks extremely easy.

Are there particular configuration settings in Spring MVC that could help protect against this kind of attack?

According to the article:

The only effective fix for this problem is full end-to-end encryption, known on the web as HTTPS or SSL.

I have a Spring site that I'm running on Google App Engine. Does this mean I need to use Google Account Authentication rather than the built-in authentication provided by Spring if I want to avoid this kind of attack?

+1  A: 

You need to setup HTTPS handshake with the webserver, not exactly sure how it is done on Google App Engine, but it's apparently possible. Here is some more information.

dekz
+2  A: 

The whole point of firesheep is that the authentication mechanism isn't the only problem. Most systems protect the authentication step with HTTPS, but not subsequent interactions with the user. Regardless of which authentication mechanism you use, you should make sure all interactions involving logged-in users take place over HTTPS. This is possible in App Engine, but only if you serve off your app's appspot domain (myapp.appspot.com).

Nick Johnson
For example, Facebook (one of the vulnerable web sites) serves its login page over HTTPS, but after the user has logged in, Facebook switches to unencrypted HTTP. Firesheep can't sniff the cookies from a connection in which HTTPS is used; sending the cookies through an unencrypted connection makes the attack possible. Unfortunately, many other web sites are affected. To protect your users, you should not use unencrypted HTTP *at all*.
idealmachine
@idealmachine I would qualify that: you shouldn't use unencrypted HTTP on any domain/path to which your users may be sending login cookies. Using HTTP is just fine for content/pages that don't require login - and a good reason many sites have separate domains for serving static content.
Nick Johnson