Series Part of Cybersecurity for Everyone · Episode 04 of 10
View 10-Part Syllabus →
Episode 04 · Session Security & Token Theft · September 26, 2026 · 7 min read

Your Password Wasn't Hacked. Your Session Was Stolen.

MFA PASSED SESSION TOKEN sid=98fbc4e207a1... ! Adversary Replay No password needed Bypasses Login Gate
Episode 04 Session Hijacking Cookie Theft AiTM Phishing DBSC · 7 min read
💬 Feedback
10,000+
Organisations Targeted
Documented in Microsoft AiTM cookie theft & BEC campaigns
Post-MFA
The Stolen Asset
Attackers siphon the live session after identity checks succeed
DBSC
Hardware-Bound Defense
W3C & Google standard binding session tokens to device TPMs

You’ve done everything you were told to do.

Your password is strong. You don’t reuse it. You turned on Multi-Factor Authentication (MFA). Maybe you even set up a modern passkey.

So when you see a login notification you don’t recognise, the first question is obvious:

“How did someone get my password?”

But what if they didn’t?

What if your password was never cracked, your MFA code was never guessed, and the attacker never actually logged in the way you normally would?

There’s another possibility that doesn’t get talked about nearly enough:

They stole your session.

And to understand why that matters, we need to look at what happens after you successfully log in.

What Happens After You Log In?

Let's say you're signing into your email.

You enter your password. Your phone asks you to approve the login. You approve it. Done.

But your email provider can't ask you to repeat that entire verification ceremony every time you click another message, refresh the inbox, or open an attachment. So once you've proved who you are, the service creates a session.

That session is basically how the website remembers:

“This person has already authenticated. Let them continue.”

Usually, your browser carries information associated with that session, often through a session cookie.

The Open Web Application Security Project (OWASP) formally describes session management as the mechanism that allows a web application to associate multiple sequential requests with the same authenticated user.

So the actual login lifecycle is really closer to this:

Password → MFA → Authentication Successful → Session Created → You Stay Logged In

That final part is critical.

Because if an attacker can obtain a usable authenticated session, they may not need to start again at the password screen.

The Hotel Key Card Analogy:

Think of checking into a hotel. Reception inspects your booking and government ID, then hands you an electronic key card. You don't show your passport every time you return to your room or step into the elevator. You swipe the card because the identity check has already taken place.

Your browser's session works on the exact same principle. And attackers know that.

PHYSICAL WORLD (HOTEL) Passport / ID Checked once → Room Key Card Grants access Anyone holding the card opens the room door. DIGITAL WEB (BROWSER) Password + MFA Verified once → Session Cookie Keeps you signed in Anyone holding the token accesses your account.

“But I Have MFA. How Can They Get In?”

This is where things get interesting.

Multi-Factor Authentication is still one of the best defenses you can add to an account. If somebody steals your password from an old breach and attempts to log in from across the world, that second factor can stop them in their tracks.

But MFA mainly protects the authentication process.

A session exists after you've completed that process.

One technique that takes full advantage of this gap is called Adversary-in-the-Middle phishing, or AiTM.

Imagine you receive an email saying an urgent financial document has been shared with you.

  • You click the link.
  • A legitimate-looking Microsoft 365 or Google login page appears.
  • You enter your email address and password.
  • Your phone pops up with a genuine push notification or asks for an authenticator code.
  • You approve the notification.

At that point, most of us would assume everything must be legitimate. After all, Microsoft asked for MFA, your app pinged you, and you verified it.

But an attacker can place phishing infrastructure between you and the real service.

Your credentials are forwarded directly to the legitimate service. The real service asks for MFA. You complete it. Authentication succeeds. The attacker doesn't care about intercepting your temporary 6-digit code—they are interested in what happens immediately next: the authenticated session.

1. You Enter password & Approve MFA 2. AiTM Proxy Attacker infrastructure Captures Cookie Relays live traffic 3. Real Service MFA verifies Issues valid token 4. Attacker Replays cookie Bypasses password

A simplified version looks like this:

You ↓ Phishing / AiTM proxy ↓ Real login service ↓ MFA completed ↓ Session created ↓ Session captured ↓ Attacker attempts to reuse it

Microsoft documented this exact operational pattern in a campaign that attempted to target more than 10,000 organisations. The attackers intercepted credentials and session cookies, allowing them to bypass MFA and subsequently use compromised mailboxes for Business Email Compromise (BEC) financial fraud (Microsoft's investigation into AiTM phishing and cookie theft).

The important point isn't that MFA somehow became useless.

It's almost the opposite:

The victim successfully completed MFA. The attacker targeted the session created afterwards.

Phishing Isn't the Only Way: Infostealers

Now imagine you never clicked a phishing link.

Your password was never entered anywhere suspicious. You still aren't necessarily completely safe from session theft.

Another common route is infostealer malware.

An infostealer (such as Lumma, RedLine, or Vidar) is lightweight malware designed to harvest valuable information directly from an infected computer. Browsers are extraordinarily attractive targets because they hold open doors to virtually our entire digital existence:

📧 Email Inboxes
Work & personal messages
🏢 Work Systems
Slack, Teams, internal tools
☁️ Cloud Storage
Google Drive, OneDrive, files
💳 Financial Portals
E-commerce, saved cards, billing

And many of those accounts are already logged in.

Instead of asking: “How can I convince this person to give me their password?”, an attacker can simply extract information that is already stored or maintained on the compromised machine.

Google has specifically cited malware stealing authentication cookies from local browser storage as one of the primary motivations behind its work on stronger, device-bound sessions (Google Security on cookie theft and Device Bound Session Credentials).

This is a fundamental shift in how we think about account security:

Your password isn't the only valuable thing sitting on your computer. Your already-authenticated browser can be valuable too.

And Then There Are Browser Extensions

This is probably something most of us don't think about enough.

How many browser extensions do you have installed right now?

Maybe an ad blocker. A screenshot tool. A grammar checker. A VPN. A shopping coupon finder. An AI assistant. And perhaps a productivity timer you installed six months ago and completely forgot about.

Extensions aren't automatically dangerous. Most are installed because they are genuinely useful.

But they are still software running inside one of the most sensitive applications on your computer.

Some extensions need permissions such as activeTab, scripting, or storage simply to provide their normal features. That creates an interesting security dilemma: a permission isn't automatically suspicious just because it's powerful.

The better question is:

“Does this extension actually need that level of access for what it is supposed to do?”

A screenshot extension interacting with the web page you're viewing makes sense. A basic calculator wanting broad access to read and change data on all websites is much harder to justify.

And there's another problem: a malicious extension doesn't necessarily look broken.

A timer can still count down from 25 minutes. A to-do list can still save your tasks. The visible feature can work perfectly while something very different happens behind the scenes.

That's why “it works” and “I downloaded it from an official extension store” shouldn't be our only tests of trust.

Why Are Cookies So Important?

At this point, it's worth understanding what a browser cookie actually does.

Cookies aren't malware. They're a normal, essential part of the modern web.

When you log into an application, the server generates a unique session token and tells your browser to store it as a cookie. Every time you navigate to another page on that domain, your browser sends that cookie back in the HTTP headers, allowing the application to recognise your session.

Developers can—and should—add defensive flags to sensitive cookies:

  • HttpOnly: Prevents client-side JavaScript (like scripts injected via XSS) from reading the cookie directly.
  • Secure: Restricts transmission of the cookie strictly to encrypted HTTPS connections.
  • SameSite: Controls whether the cookie is sent along with cross-site requests, mitigating Cross-Site Request Forgery (CSRF).

Those controls matter immensely. But none of them means: “This session can never be stolen.”

Different controls protect against different threat vectors. For example, HttpOnly stops a malicious script in the browser tab from reading document.cookie, but it does nothing to stop malware running on the operating system from reading the SQLite database file where Chrome or Edge stores cookies.

That's why OWASP recommends multiple complementary layers of session protection, including secure cookie flags, appropriate expiration intervals, automatic session rotation, and re-authentication for sensitive actions (OWASP Session Management Cheat Sheet).

There are even more subtle architectural problems involving how cookies are scoped to domains and paths.

What About Cookie Tossing?

This was one of the more interesting technical concepts in the research behind this episode.

Cookies don't just have names and values; they also have scoping rules that determine where they are valid.

Imagine a company operates multiple subdomains:

example.com
login.example.com
shop.example.com
support.example.com

Depending on how cookies and domain scopes are configured, applications need to be very careful about which cookie they are trusting and where it originated. Related techniques such as cookie tossing or cookie shadowing can exploit weaknesses when a less secure subdomain sets a cookie that overwrites or interferes with a cookie on the primary authenticated domain.

There is also session fixation. Instead of stealing your session after you log in, an attacker tries to establish or influence a session identifier before authentication. If the application continues using that exact same session identifier after you successfully log in, the attacker may already know the token associated with your now-authenticated session.

That is why secure applications must always rotate session identifiers whenever a user's privilege level changes (such as completing login).

This isn't something an ordinary user is expected to fix—it is a developer and platform architecture problem. But it shows just how much security happens quietly after you press Sign in.

So, Is Changing Your Password Enough?

Let's say you realise you've fallen for a phishing page.

You immediately change your password. Good. That's exactly something you should do.

But don't stop there.

If the incident involved an authenticated session, you also want to deal with that session. Depending on the service, changing a password does not always terminate active session tokens held on other machines.

Go directly to the account settings and check:

  • Active sessions & connected devices: Look for “Sign out of all sessions” or “Sign out everywhere”.
  • Recent logins: Review login history and revoke access to any unknown browser or device.
  • Registered MFA methods: Verify that an attacker didn't register an extra authenticator or security key.
  • Inbox rules & forwarding addresses: For email accounts, check that incoming mail isn't being forwarded to an external inbox.

Why check inbox rules? Because an attacker doesn't always want to announce that they've compromised your account. Quiet access can be far more valuable.

They may watch financial correspondence, monitor contract negotiations, wait for payment instructions, or create hidden rules that divert alerts. Microsoft has documented compromised accounts being used for follow-on phishing and Business Email Compromise, emphasizing that session revocation is an indispensable part of incident response (Microsoft's multi-stage AiTM phishing investigation).

The Post-Phishing Response Formula:

After any serious phishing encounter, think beyond: “I changed my password.”
Think: Password changed + sessions revoked + devices audited + MFA verified + connected apps pruned + email rules checked.

And if it's a work account, notify your IT or security team immediately.

Can We Stop Stolen Sessions From Working? (DBSC)

This is where the industry is starting to make real progress.

The fundamental flaw of traditional session cookies is that they are bearer tokens: whoever holds the token can present it to the server and be accepted as the legitimate user. If an attacker copies the cookie string to another computer, the server often can't tell the difference.

So researchers and browser vendors have been developing ways to tie sessions cryptographically to the physical device where they were created.

The leading approach is called Device Bound Session Credentials, or DBSC.

The name sounds intimidating, but the concept is straightforward:

Instead of the server only asking: “Do you possess the correct session cookie?”, it also requires cryptographic proof generated by a private key locked inside the device's secure hardware (such as a TPM).

❌ Today's Bearer Tokens
1. Steal session cookie
2. Copy to attacker machine
3. Inject into browser
4. Attacker gains account access
✅ Device-Bound (DBSC)
1. Steal session cookie
2. Copy to attacker machine
3. Server asks: “Where is device proof?”
4. Replay fails; access denied

Even if malware manages to dump the cookie from your disk, that cookie is useless on the attacker's machine without the hardware-protected key. The World Wide Web Consortium (W3C) has been developing DBSC as an open web standard specifically designed to neutralize cookie theft hijacking.

It won't solve every single account takeover vector. Nothing does.

But it represents an indispensable evolution in defense:

For years, we concentrated on making authentication harder to steal. Now we're also making the result of authentication harder to steal and reuse.

What Should You Actually Do?

You don't need to start inspecting raw HTTP headers or decrypting SQLite databases. The practical defensive habits are much simpler:

  • Keep using MFA: Prioritize phishing-resistant options where available, such as passkeys or FIDO2 hardware keys. Because passkeys bind to the genuine domain in your address bar, they defeat AiTM reverse proxies automatically.
  • Keep your browser and operating system updated: Patches fix local privilege vulnerabilities that infostealers exploit to read protected data.
  • Be extremely careful with downloaded software: Cracked software, cheat utilities, and random executables are the #1 delivery mechanism for infostealer malware.
  • Take five minutes occasionally to audit browser extensions:
    • Do you actually use all of them?
    • Does a simple utility request permissions that seem excessive for what it does?
    • Do you recognise and trust the publisher?
    If you haven't used an extension for months, removing it is far safer than leaving unnecessary code running inside your browser.
  • When an account is compromised, look beyond the password: Check active sessions, devices, and recent security logs.

Interactive Session & Extension Security Inspector

Diagnose how sessions get compromised and walk through the exact steps to audit and evict unauthorized access across your accounts:

🛡️ Session Threat & Eviction Playbook

Select a session threat vector to understand the mechanism and execute the eviction checklist:

The Bigger Picture

We used to think about account security almost entirely like this:

Username + Password = Access.

Then we added MFA. Now passkeys are improving authentication even further.

But the complete security lifecycle is closer to:

Password → MFA or Passkey → Authentication → Session → Browser → Account

Attackers don't have to break down every single door. They only need to find one layer that works.

  • If passwords become harder to steal, phishing evolves.
  • If MFA blocks ordinary stolen-password logins, attackers target authenticated sessions.
  • If session replay becomes harder through device binding, attackers will look for weaknesses elsewhere.

That is the constant cycle of cybersecurity.

So if someone gains unauthorized access to an account protected by MFA, don't immediately assume they somehow cracked the encryption or guessed your code. Maybe they didn't. Maybe your password wasn't hacked either.

Maybe you authenticated successfully. Your MFA worked. The website trusted you. And then the attacker targeted the proof that all of those checks had already happened:

Your session.

That's why protecting an account doesn't end when you press Sign in. In modern web security, that's only half the story.

The 4 Golden Rules of Session Security
  • MFA protects the front door; session management protects the hallway. Understand that authenticated cookies exist after login.
  • After phishing, revoke sessions immediately. Changing passwords alone won't always disconnect an attacker holding an active cookie.
  • Audit your browser extensions. Treat extensions as running code that can inspect active tabs and local storage.
  • Embrace phishing-resistant auth (Passkeys / FIDO2). Hardware-bound authentication cryptographically neutralizes reverse-proxy interception.

Sources & Further Reading

The threat analysis, technical mechanics, and defense architectures cited in this episode are grounded in documentation from Microsoft Threat Intelligence, Google Security, the W3C standards group, and OWASP:

🔬
Microsoft Security — From Cookie Theft to BEC (AiTM Phishing)
In-depth investigation detailing adversary-in-the-middle reverse proxies extracting authenticated session cookies to bypass MFA and deploy wire fraud.
Read Microsoft AiTM Research ↗
📊
Microsoft Security — Detecting & Mitigating Multi-Stage AiTM Campaigns
Operational case study tracing stolen cookie replay across cloud environments without generating interactive MFA alerts.
Read Multi-Stage BEC Case Study ↗
🛡️
OWASP Foundation — Session Management Cheat Sheet
Authoritative web application security guidelines governing session token entropy, idle timeout thresholds, and cryptographic invalidation.
OWASP Session Management Guide ↗
🍪
OWASP Foundation — Cookie Theft Mitigation Cheat Sheet
Architectural countermeasures against local browser extraction, Cross-Site Scripting (XSS) harvesting, and unauthorized token replay.
OWASP Cookie Theft Mitigation ↗
🔑
W3C — Device Bound Session Credentials (DBSC) Specification
Web standard anchoring sessions to local hardware TPM/enclave keypairs so stolen cookies cannot be replayed on unauthorized machines.
W3C DBSC Specification ↗
💻
Google Security Blog — Protecting Cookies with Device Bound Credentials
Chromium engineering blueprint detailing hardware-backed session binding designed to disrupt the commercial infostealer malware ecosystem.
Google DBSC Architecture ↗
⚠️
CISA Advisory (AA23-158A) — Session Cookie Exploitation to Bypass MFA
Federal alert documenting threat actor exploitation of active session tokens to gain unauthorized access to cloud mailboxes and code repositories.
CISA Session Hijacking Alert ↗
📜
IETF RFC 6265bis — Cookies: HTTP State Management Mechanism
Core Internet protocol standard defining security flags including SameSite=Strict/Lax, HttpOnly, Secure transport, and cookie prefixes.
IETF RFC 6265bis Standard ↗
🔎
Mandiant Threat Intelligence — The Evolution of Infostealers
Forensic analysis examining Lumma, RedLine, and Vidar stealer malware targeting local browser SQLite databases and session stores.
Mandiant Infostealer Research ↗
🆔
Okta Security — AiTM and Session Token Defense in Cloud Identity
Identity architecture analysis evaluating Continuous Access Evaluation Protocol (CAEP) and device-bound token enforcement.
Okta Session Security Whitepaper ↗
Next Episode in Series · Episode 05

Why the Padlock Doesn't Mean a Website Is Safe

The padlock icon in your browser means the connection is encrypted — not that the website is trustworthy. Why over 80% of phishing sites use HTTPS, the armoured van analogy, and how to verify your real destination.

Read Episode 05 →
PS
Poorna Sujampathi Rathnayaka
Writer · Cyber Insight · Digital Literacy

I started Cyber Insight because everywhere online people only talk about cybersecurity in technical terms — and most people are left without a proper understanding of how the digital world works. I work in cybersecurity, but I write here for everyone. No jargon. Just clear, honest explanations.