Archives
- ► 2012 (8)
- ► 2011 (157)
- ► 2010 (174)
- ► 2009 (12)
Which topics would you like us to cover more?
Latest comments
- How to reset you Kindle
3, eve...
Thanks for this article and the related "Inside th...
By H K - How to reset you Kindle
3, eve...
How do you drain power on the board? I dont have r...
By Grace - How to reset you Kindle
3, eve...
You're welcome!
By Bas - How to reset you Kindle
3, eve...
Thanks man....removing the battery worked like a c...
By DaveMan - nHapi
example
Hi Slypete, Thank you for your comment. This way w...
By Bas - nHapi
example
Hello, Employing .Net dynamics, one can implement ...
By slypete - Implementing MLLP in C#
Hi Mayura, I'm not sure I understand your question...
By Bas - Implementing MLLP in C#
I have used SSL stream to secure the MLLP transact...
By Mayura
Latest tweets
about 1 day ago
Using REDIPS.drag to add drag and drop to
your .Net webapplication #li #dib0
http://t.co/n8zY3s7d
about 7 days ago
http://t.co/cknQcDbo #Kindle
about 15 days
ago Freedom isn't the ability to
choose what to do or say, but the ability to choose what not to do
or say #freedom
about 29 days
ago http://t.co/61KTQknI #Kindle
12 Apr 2012
Force the use of a networking adapter using
C# #li #dib0 http://t.co/ZTJOPzOz
9 Apr 2012
http://t.co/k9yliR2t #Kindle
9 Apr 2012
Mandriva 2010.2 and USB devices in Virtualbox
http://t.co/fwq9gbHB
9 Apr 2012
Execute a http request to you own site with
PHP http://t.co/DIvWPrpd
| Security: session management the right way |
| Written by Division by Zero |
| Tuesday, 19 January 2010 12:03 |
|
From a security perspective is session management one of the
important things to do. There are four things an application has to
do: session time out (make sure a session last as short as
possible), start a new session with a new ID if an old session ID
is given, reset the session on login and reset a session on logout.
The first two are standard in most frameworks like java and .Net.
But the second two are almost always forgotten.
Why is this important? We can't prevent a hacker from stealing a session, because this happens client side. But we can help a user minimize this threat. This is done by making the session last as short as possible and use SSL for secured pages. If an attacker steals the session and the user logs in, the atacker is logged in. Therefore we have to reset the session ID after the user logs in (of course on a secure connection). This way the atacker doens't have the same session as the user does and she/he isn't logged in. If we reset the session when a user logs out, any stolen session becomes invalid. This way we minimise the time an atacker can abuse stolen sessions. Here's an example in C#: We override the session ID, so the next request from the user contains an empty session ID. The framework will generate a new ID and the old session isn't valid anymore. Remember that any stored values is the session will be lost: we need to treat an authenticated user different than a guest user. This isn't a fool proof concept, I know. But it is the only thing we can do with our session management to assist our users. Tags:
|
There never was a good war or a bad peace. - B. Franklin




