I really wish fewer sites tries to sweep this sort of thing under the rug; there's a lot that we could learn if they were more open about the security problems they encounter. I'm glad you wrote about it; I'll have a read.
Thanks, John. Friendly and trustworthy are high compliments. Much appreciated. :-)
Sorry about the OpenID implementation, Stelian. I'm busy right now with Analog, so fixing that's not a priority, but I do plan to fix it pretty soon. I'll try to also add a way for people to claim old comments when I do, or I can at least do it manually for you.
I love Arsenal's style, Radoslav, and it was super fun to be able to see a match. I don't own a TV, and I rarely get the chance to see them play at all, so it was a real treat to see them in person. That was my first (and so far, only) Premiership match.
I see what you're thinking now. Creating a fingerprint isn't very useful if you're just going to use it to make sure some HTTP headers remain consistent. For that, you can simply compare those values, and there's no reason to use md5() or salting at all.
This technique, which is valid but a little outdated, is to create a fingerprint that is stored on both the client and the server. It is passed using a different method of propagation than the cookie, so that even if the cookie and all HTTP headers are captured by an attacker, they cannot be replayed to hijack the session. Something extra is needed.
The real purpose of the article is to help you understand how sessions work, what some of the potential weaknesses are, and how you can enhance it slightly to complicate some of the more common attacks.
I'm more fond of trending these days, where you record trends in a particular user's requests and use that to detect anomalies in behavior. If you get the balance right, session hijacking becomes very difficult, and legitimate users aren't constantly being prompted for their password.
Thanks for the comment, Dan. With members from both the US and the UK, forming as a co-operative was a complex and tedious endeavor. If it wasn't so important to us, it would have been difficult to persevere. I'm glad we did, and I'm glad people like you understand why it's so important. Thanks! :-)
John, I know some great bars in Brooklyn. I may take you up on that offer. Thanks. :-)
LP, thanks for the vote of confidence. I'm looking forward to Montréal; see you there!
In your article, you mix up where the session data is stored.
No, but it seems you are.
The point of having a fingerprint in addition to the session identifier is not just a means of forcing the attacker to reproduce the HTTP headers, although that is somewhat helpful. Over the years, most attacks that have been used to steal cookies also allow access to the HTTP headers, because they involve the victim visiting the attacker's site. Having something else makes session hijacking more difficult.
This article needs updating, because I prefer other techniques now (trending, for example), but the theory is sound, and it teaches valuable lessons.
Last 10 Comments
1
2
3
4
5
6
7
8
9
10