Session fixation
Session fixation attacks force a user to use a session ID known to the attacker, enabling account takeover after the victim authenticates.
How It Works
Attacker obtains a valid session ID from the target site
Attacker tricks victim into using that session ID
Victim authenticates with the fixed session
Attacker uses the same session ID to access victim's account
Testing Methodology
Basic Test
1. Open target.com/login (Attacker browser)
2. Note the SESSION cookie value: abc123
3. Open target.com/login in incognito (Victim simulation)
4. Set cookie to attacker's value: abc123
5. Login as victim in incognito tab
6. Refresh attacker's browser
7. If logged in as victim → VULNERABLECheck if Session Changes on Login
Attack Vectors
Via URL Parameter
Via Meta Tag Injection
Via Subdomain Cookie
Via Cross-Site Cooking
Indicators of Vulnerability
Indicator
Status
Session ID unchanged after login
❌ Vulnerable
Session accepted via URL parameter
❌ Vulnerable
No HttpOnly flag on session cookie
⚠️ Risk factor
Session cookie domain too broad
⚠️ Risk factor
Long session timeout
⚠️ Risk factor
Verification Commands
Secure Implementation (What to Look For)
Related Topics
Last updated
Was this helpful?