Defense · Threat labs
Session hijacking
A stolen session cookie IS the session, to a server that only checks the bearer value. Cookie hardening, binding and detection are the defense.
A SELF-CONTAINED SANDBOX. The "session" you mint and replay is an INERT token — it grants no real access anywhere in the Lab. Your REAL session already has its own new-context defense (c5 device recognition on the trusted-devices page, correlated by a real ITDR detector); this is a teaching simulator alongside it.
The attack in three moves
- Steal it — mint a sandbox token, like one an XSS payload might exfiltrate.
- Replay it — present it from the attacker's own browser and watch fingerprint detection react.
- Revoke it — kill the session outright, the response to a suspected hijack.
🔒 Cookie hardening — proven live
This page just read document.cookie in your OWN browser. Compare it
against the real session cookie's reported policy.
Server-reported cookie policy (from the real cookie's own flags)
Attacker vs defender
🎭 Steal it
attackerMint a sandbox token bound to THIS context's coarse browser/OS fingerprint. It's shown once, exactly like a token an XSS payload might exfiltrate.
🕵️ Replay it as the attacker
defender watchesPresent the stolen token again. Picking a different browser simulates the thief replaying it from their OWN machine.
🗂️ Your sandbox sessions
None minted yet.
The defenses, all real
HttpOnly / Secure / SameSite
The real session cookie is invisible to page JavaScript, never sent in the clear, and never rides along cross-site. Proven live above, not asserted.
Fingerprint binding
Remembers the coarse browser/OS family that minted it — coarse on purpose, so a version bump won't false-positive. Not cryptographic: a spoofed User-Agent defeats it; production needs DBSC, Token Binding, or DPoP (this Lab already has DPoP for API tokens).
Hijack detection
A fingerprint mismatch on replay raises a real session_hijack alert an instructor triages on /soc, like every other ITDR signal.
Revoke
The response to a detected (or merely suspected) hijack: kill the session outright.
X-ray
🩻 X-ray — what actually happened live
Your own insert-only audit trail — the real server events, sanitized (never a secret), each linked to the lesson that explains it.