Session Hijacking
Cheat sheet · https://pcornel.dk/topic.php?topic=4960
Answer
Session hijacking takes over a user's authenticated session by stealing or predicting its session token, through XSS, sniffing or malware. Use HTTPS, Secure and HttpOnly cookies and regenerate session IDs at login.
Remember
- XSS and sniffing steal session cookies.
- Secure, HttpOnly and SameSite cookies reduce risk.
- Regenerate session IDs at login.
First checks
- Session token rotation on login — fixation defence
- Secure/HttpOnly/SameSite cookies — protection
- Token binding to device/IP risk signals — detection
Verify in this order
stolen token → reused → detected/revoked
Where it usually breaks
First mismatch in signal/report → evidence preservation → scoping/analysis → containment → eradication → recovery → validation/lessons learned; preserve identity/policy/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4960