🍪 CookieJar Lab

Full Code Interactive Demo
1
Login
2
Dashboard
3
Cookie Vault
4
Attack

See how a stolen cookie bypasses passwords and 2FA

Walk through a 4-step attack in 60 seconds. No setup required.

1.8B
credentials stolen by infostealers, 2025
17B
cookies exfiltrated, including session tokens
54%
of ransomware linked to prior infostealer theft
This uses sample data. Run the full lab to try the attack with real sessions you create.
Welcome, alice
Password + TOTP

Cookie Security Flags

httpOnly false

Any script or malware running on this device can read this cookie directly. Nothing prevents it.

secure false

The cookie travels over unencrypted connections. Anyone on the same network could intercept it.

sameSite None

The browser attaches this cookie to every request, even from other websites. No restrictions at all.

All three protections are turned off. This cookie is completely exposed. Any malware on the device can steal it instantly, and nothing will stop it being used from another machine.

🍪 Stolen Session Token

This token is the keys to alice's account. Whoever has it doesn't need her password, doesn't need her 2FA code, and doesn't need to log in at all. The server will treat them as alice, with full access to everything she can see and do.

🕷 What the infostealer extracted

What this gives the attacker: A username and email to target in further attacks. Confirmation that MFA was active, proof the account was “protected” and likely contains high-value data. And the session token itself: the single artifact needed for full account takeover. No brute forcing. No phishing for credentials. Just paste and access.

🎃 How infostealers grab this

Malware like RedLine, Raccoon, and Lumma runs silently after a user opens a phishing attachment or trojanized download. It reads the browser's cookie database directly from disk, an SQLite file sitting unencrypted in the user's profile folder. The entire operation takes under 2 seconds. No browser interaction, no pop-ups, no visible sign. The stolen cookies are sent to the attacker's C2 server, where they're sold on dark web marketplaces or replayed immediately.

🕷 Session Replay Attack

An attacker on a completely different device pastes the stolen token into their browser. The server sees a valid session cookie and grants full access. It has no way to know this isn't the original user.

Guided demo with sample data. Run the full lab with real sessions →