It is currently Wed Feb 08, 2012 5:29 pm

All times are UTC + 2 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Session fixation
PostPosted: Thu Jul 24, 2008 10:19 pm 
Offline

Joined: Tue Feb 15, 2005 1:34 pm
Posts: 71
I think that the best way is that you save session ID in database and check if any session ID duplicate,send a warning for admin and regenerate session ID,It is the best way.

say we have a database that session ID of each user is saved there.

When a hacker steals session ID of another user and enter the site,Then there will be two same session ID in database

Does it make sense?

of course, It is said that it is possible prevent this attack by a token:
[PHP]
<?php $token = md5(uniqid(rand(),TRUE)); $_SESSION['token'] = $token; ?>[/PHP]


One comment about that code is:
Via the URL or POST yes. It doesn't prevent session hijacking, it simply makes it harder because it's one extra piece of information you need. You're effectively passing an authentication token around in all requests... which would be fairly easy to sniff.


But I don't understand...

Please explain for me,I disturb,

We create a session ID and a token for a User ,Then token is in session array with a special session ID.
A hacker steals Session Id of user and enters the site,

Now what would happen next?Can a hacker find the token?

I think Token is saved in server and do not transfer through the Network. Right?

Then How a hacker can access the to the token?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 2 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to: