tags:

views:

290

answers:

1

If it's true,and I know the value of PHPSESSID,can I fake that user?

+3  A: 

Kind of. If you know the Session ID you can hijack her session.

You could also transparently pass the Session ID via the URL by enabling --enable-trans-sid in your PHP Ini, which makes accidental session hijacking more common, e.g. when people send links around that contain the SID. So you're better off with Cookies as they are much harder to steal.

However, you can rename PHPSESSID to a different key to make attempts at guessing the key somewhat harder or use custom session handlers that do additional checking on the request, e.g. check the IP or against another cookie.

See

Gordon