|
|||||||||||
|
RE: Session Fixation
From: Noam Eppel <noam(at)noameppel.com>
Date: Mon Mar 31 2003 - 16:41:21 EST
The pitfalls of relying on a client IP for session validation and authentication have been discussed in depth before. But client IP's can be used as part of an equation that is then hashed to make the initial session ID. If an attacker can guess how sessions are generated, session hijacking becomes easier. So it is best to use a few different sources in your equation. An equation with multiple sources can make it harder for an attacker to guess a valid session. Basically you want something you know is guaranteed unique (so no two sessions are the same), sufficiently random (hard to guess) and contains one secret. For example,
Current Time - guaranteed unique.
SESSSIONID = SaltedHASH(current time + random number + client IP + server secret) The hash can use algorithms such as MD5 (128b) SHA-1 (160b) or SHA-256 (256b) An attack can know the algorithm used, may know the client IP and might figure out the time the session was generated, but would not know the random number or server secret. Of course, most popular server side delveopment languages can automatically generate session ID so this is not a concern for most developers.
Noam Eppel
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:49 EDT |
||||||||||
|
|||||||||||