Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Pen-Test
[Top] [All Lists]

Re: How much entropy in a web app session ID?

Subject: Re: How much entropy in a web app session ID?
Date: Thu, 21 Dec 2006 11:09:36 -0500
In the past, I've used symmetric crypt key lengths as a comparison,
but am I being too tough on the developer? I'd like to have some
justification behind a finding that says, "Your session ID size of XX
bits is not big enough".

By having the same entropy as used in your SSL layer, you should be
safe, since as you note, online brute forcing is much slower.

So here are the factors that I've come up with (for the purposes of
this discussion, lets assume we've got a decent PRNG that is
generating the session IDs):

- How many concurrent sessions does the web application usually have?
(this is important if the attacker is happy to hijack *any* session,
as opposed to a *specific* session)
- Session expiration timeout and typical length of a user session
(important if the attacker is looking to hijack a specific session)
- How many concurrent guesses could the web app sustain before
crashing? (ie. will 50,000 guesses/sec from my bot army crash the
server long before I can hijack a session?)
- Is the web app infrastructure protected by an IPS product (that works)?

So, does anyone out there have any good algorithms/calculations for
justifying a particular amount of entropy in a session ID?

Well, if you can find out the things above, then try to find out those
same parameters for an offline attack against a 128 bit key.  Then
adjust your session ID length such that the time to crack is
approximately the same.

Of course, it's just easier to make them use a 16 measly bytes of (good)
entropy in their cookies, but if you do perform the calculation with
reasonable parameters, I'm sure some of us would be interested in your
results. =)

cheers,
tim

<Prev in Thread] Current Thread [Next in Thread>