Penetration Testing mailing list archives

Re: Session Hijacking over HTTP


From: "Serg B" <sergeslists () gmail com>
Date: Wed, 19 Mar 2008 09:41:56 +1100

To protect session cookies you can set the cookie property: to send
only over SSL.  Also, regenerate SID after the user has authenticated
to the application - this will safe guard their account in case the
SID was compromised prior to authentication.  The SID itself should be
custom generated and include a digest of the following client
properties (can be more, this is the minimum): IP address, port
number, agent string.  This way a session will be tied to a particular
machine and user. This is the industry best practice.

Don't worry about building "custom browser or enterprise solution"
since it will only complicate things and get you hacked, remember the
KISS principle.  This is of course excluding the fact that it sounds
like a complete bandaid solution to a problem that should be solved at
design or implementation stage of the SDLC. In regards to the "trusted
channel" - SSL is about as trusted a it gets (excluding my uber army
of specially trained carrier pidgins of course).

Serg


On Tue, Mar 18, 2008 at 10:21 PM, 11ack3r <11ack3r () gmail com> wrote:
Hello Everyone,

 I was curious to know how would webmail portals like gmail.com and
 yahoo.com protect their users from session hijacking when they use
 HTTP after authentication.

 As I see it is trivial to capture traffic over the wire including
 session cookies. In such a case can an attacker just reuse the session
 cookies in his/her browser and compromise the user account?

 WHat is the best way to protect session cookies from hijacking esp.
 due to network eavesdropping? Of course HTTPS can also be bypassed
 with MITM attacks if users ignore browser warnings.

 Looking forward to some knowledge here.

 Cheers!!

 ------------------------------------------------------------------------
 This list is sponsored by: Cenzic

 Need to secure your web apps NOW?
 Cenzic finds more, "real" vulnerabilities fast.
 Click to try it, buy it or download a solution FREE today!

 http://www.cenzic.com/downloads
 ------------------------------------------------------------------------



------------------------------------------------------------------------
This list is sponsored by: Cenzic

Need to secure your web apps NOW?
Cenzic finds more, "real" vulnerabilities fast.
Click to try it, buy it or download a solution FREE today!

http://www.cenzic.com/downloads
------------------------------------------------------------------------


Current thread: