pentesting, updated

Testing for session fixation

Check whether a session ID set before login stays valid after login — letting an attacker fix a victim's session ID in advance.

Goal

Confirm the session ID is rotated on privilege change (most importantly, login).

How to test

Capture the session ID before authenticating, then log in using that same ID and see if it’s still valid afterward:

curl -sc cookies.txt https://example.com/                      # pre-auth session
curl -sb cookies.txt https://example.com/login -d "user=test&pass=test"
curl -sb cookies.txt https://example.com/account               # does the pre-auth ID still work?

What to look for

The same session ID working both before and after login — an attacker who planted that ID on the victim now shares their authenticated session.

References

§ home
~/knubertus/home/
1,1 Top