Join our Newsletter — 33% off our NHI Course
Home› Guides› Session Hijacking for Beginners: Why Stolen Sessions Get…
Guide Identity Visibility, Posture & Threat Detection

Session Hijacking for Beginners: Why Stolen Sessions Get Past MFA

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 28 November 2026 14 min read
On this page

Session hijacking is when someone steals proof that you already signed in, then uses it as you.

This guide is for anyone who signs in to email, banking or work apps and wants to know how attackers get round passwords and second sign-in steps. You do not need a technical background: if your business uses online email or cloud apps, a stolen session can open them.

In short

  • After you sign in, a website gives your browser a session token, usually in a cookie, so it does not ask for your password on every page.
  • If someone copies that token while it is valid, the website may treat them as you, without your password or your second step.
  • Common ways in are fake sign-in pages that pass your details to the real site, malware on your device, and files that leak tokens.
  • Phishing-resistant sign-in, sessions tied to your device and "sign out everywhere" after a theft all reduce the risk.

What you will learn

  • Explain session hijacking in one sentence.
  • Explain why a second sign-in step does not help once a session is stolen.
  • Spot the signs of a fake sign-in page and a hijacked mailbox.
  • Check what to do first if you think a session was stolen.
Signed-in pass (session token)
a random code a website gives your browser after you sign in, so it remembers you.
Second sign-in step (MFA)
an extra check, such as a code or a tap on your phone, on top of your password.
Fake page in the middle (adversary-in-the-middle)
a look-alike sign-in page that passes your details to the real site and keeps what comes back.

What is session hijacking?

Think of a hand stamp at a gig. You show your ticket and ID once at the door. After that, staff only look for the stamp on your hand when you come back in.

Websites work in a similar way. When you sign in, the website checks your password and any second step, called multi-factor authentication (MFA). Then it gives your browser a session token (a random code that says "this person is signed in"). The browser usually keeps it in a cookie, a small piece of data the website asks it to store. On each new page, the website checks the token instead of asking for your password again.

Session hijacking means someone gets a copy of that token and uses it from their own device. To the website, they can look like you, already signed in.[1]

Where the comparison stops working: a stamp on your hand is hard to copy without you noticing. A session cookie can be copied while you keep using yours, so you may notice nothing at all.

For how sessions and cookies work in normal use, see Session Tokens and Cookies for Beginners. This page is about how they get stolen and what helps.

Why does it matter?

Many people believe a second sign-in step keeps them safe. It does help against stolen passwords, but a stolen session skips the sign-in, so the second step is not asked again. Microsoft described one campaign of fake sign-in pages that tried to target more than 10,000 organisations from September 2021.[2]

If you run a small business

What could happen: someone takes over a staff mailbox and replies to a supplier's invoice with new bank details.

Check this: agree that any change to bank details is confirmed by phone, using a number you already hold.

Next: Account Takeover for Beginners

If you look after IT for others

What could happen: you reset a password after an alert, but the stolen session keeps running.

Check this: know where your email and cloud services let you sign a user out of all sessions.

Next: How to Revoke All Sessions for a Compromised User

If you use work apps on your own laptop

What could happen: a "free" download carries malware that copies the cookies saved in your browser.

Check this: install software only from trusted sources and keep the laptop updated.

Next: Infostealers for Beginners

If you are a developer

What could happen: your signed-in session to a build or cloud tool is stolen, and with it the keys your software uses.

Check this: ask for a fresh sign-in before anyone creates new keys or tokens.

Next: Access and Refresh Tokens for Beginners

What does it look like?

Here is a made-up timeline of a hijacked mailbox, written the way a sign-in record might show it. It is short and simple.

Example only. All values are made up.

User: [email protected]
09:02  Sign-in  password OK, MFA OK   City: Leeds      Device: work laptop   (1)
09:02  Sign-in  password OK, MFA OK   via signin.example-office.invalid      (2)
09:04  Session used                   City: FAKE-0000  Device: unknown       (3)
09:06  New inbox rule "Archive" moves replies from [email protected]     (4)
09:11  Reply sent on thread "Invoice 0000"                                   (5)
  1. Darius signs in as normal on his own laptop.
  2. A second sign-in that passed through a look-alike web address. On its own, this line looks like a normal sign-in, because the fake page sent his details to the genuine site.
  3. Two minutes later the same session is used from a place and device Darius does not know. No password or MFA was asked for.
  4. A new rule hides replies, so Darius does not see the fraud.
  5. A message he did not write goes out on an existing payment thread.

Why this is risky: every sign-in check passed, so a quick glance at the record shows nothing wrong. Microsoft saw this pattern of hidden rules and invoice replies, with payment fraud starting as little as five minutes after the theft.[2]

The safer way: watch for a session used from a new place or device soon after sign-in, and for new inbox rules. Sign the user out of all sessions, then check what was changed.

How does it work?

Attacks differ in detail, but most follow these steps.

  1. You sign in. You pass the password and second step, and the website gives your browser a session token.
  2. Someone gets a copy. The three common routes are below the steps.
  3. They use the copy. They load the token into their own browser. The website sees a valid token and lets them in.[2]
  4. They act fast. They read mail, set rules, download files or create new keys before the session ends.
  5. The session ends. It ends when the token expires or the website cancels it. Signing out on your own browser does not always cancel the copy, which is why "sign out everywhere" matters.[1]
Flow diagram titled Why MFA does not stop a stolen session. Box 1, At the gate: you type your password and pass the second step (MFA). Box 2, The hand stamp: the website gives your browser a session cookie that says signed in. Box 3, Every page after: the website checks only the cookie and does not ask for MFA again. A red arrow from box 2 leads to box 4: someone copies the cookie through a fake sign-in page in the middle, malware on the device, or a leaked file. Box 5 in red: the copy may be accepted as you until it expires or is cancelled, because the MFA check already happened at step 1.
Figure 1. The second step happens at the door. A copied session skips the door.

The three common routes are these:

  • A fake sign-in page in the middle. This is called adversary-in-the-middle phishing. The fake page sits between you and the real site. It passes on your password and code, and keeps the session cookie the real site sends back. Microsoft notes this is not a flaw in MFA itself: the stolen cookie works whichever way you signed in.[2]
  • Malware on your device. Harmful software, often called an infostealer, copies cookies saved in the browser. At CircleCI, malware that antivirus did not detect stole an engineer's session, which had already passed a second sign-in step.[7]
  • Leaked files and weak websites. A token can leak in a file shared with a support desk, or through a website that does not protect its cookies properly. Security guidance says websites should send session cookies only over encrypted connections and hide them from code running in the page.[1]
Diagram titled Three ways sessions are stolen. Three red boxes on top: Fake sign-in page, a look-alike page passes your password and code to the real site and keeps the cookie it sends back; Malware on the device, harmful software copies cookies saved in the browser and sends them to a criminal; Leaked files and links, a support file, screenshot or link that holds a session token is shared with the wrong people. Under each, a green What helps box: phishing-resistant sign-in such as passkeys and security keys checks the real web address; trusted apps only, updates on, and sessions tied to the device where supported; remove tokens before sharing files, and cancel sessions that were exposed.
Figure 2. Each route has a different main defence.

Some defences are built for this problem. Phishing-resistant sign-in includes passkeys and security keys. It checks the real web address, so a fake page in the middle is much less likely to work. A US cyber agency urges all organisations to move to this kind of sign-in.[3] Newer browser and sign-in features can also tie a session to the device that created it, so a copied cookie is harder to use elsewhere. Support is still limited to some browsers, apps and devices.[4][5] If malware is already on the device when the session starts, these features may not help.[4]

Software can be hijacked too. Apps, scripts and other non-human identities (NHIs) use tokens to connect to services, and a copied token can work for whoever holds it. In the CircleCI case, the stolen session belonged to an engineer who could create access tokens for live systems. Customers were then told to change their stored keys and tokens.[7] Read our CircleCI breach page for the full story.

A worked example

Dana Fairweather runs Brookmere Lettings, a fictional letting agency with nine staff. Darius Tanaka handles rent and supplier payments.

One morning Darius gets an email: "A document has been shared with you." He clicks and sees what looks like the usual sign-in page. He types his password. A code arrives on his phone, and he enters it. The page then shows an error.

The page was fake. It passed his details to the real email service and kept the session cookie that came back. A few minutes later, someone used that cookie from another country. They added a rule to hide replies from the agency's accountant.

Two days later, a landlord rings Dana. Why did Brookmere ask for his rent to go to a new account? Dana remembers the hand stamp idea. Someone did not break in through the door. They copied the stamp.

Dana calls Vik Rinaldi, her IT supplier. Vik signs Darius out of all sessions from the email admin page. Signing out only on Darius's laptop would leave the copy running. Then Darius changes his password, and Vik removes the hidden rule. He checks the sign-in records and finds the session used from the unknown place.

Vik explains that some tokens can keep working for a short time after the sign-out, often up to an hour, until they expire.[6] So he keeps watching the records that afternoon.

Dana treats every email in the mailbox as read by a stranger. She warns landlords and suppliers to confirm bank changes by phone. Last, Vik moves the team to passkeys for email, so a look-alike page is far less likely to work again.

Myths and mistakes

What people thinkWhat is true
We have MFA, so stolen sessions are not a worry.MFA checks you at sign-in. A stolen session skips sign-in, so MFA is not asked again.
Changing the password ends the attack.It may leave the stolen session running. Sign out of all sessions as well.
Clearing my own cookies removes the stranger's copy.It removes your copy only. The website has to cancel the session on its side.
Any second step stops fake pages.Codes and app prompts can be passed on by a fake page. Passkeys and security keys are much harder to fool.
Antivirus will catch cookie-stealing malware.It helps, but it can miss new malware, as at CircleCI. Install software only from trusted sources too.

What can I do this week?

  • Turn on passkeys or a security key for email and key work accounts, where offered.
  • Find the "sign out of all sessions" option in your email admin page. Note where it is.
  • Check each mailbox for forwarding or inbox rules nobody remembers setting up.
  • Agree a rule that bank detail changes are confirmed by phone on a known number.
  • Remove apps and browser add-ons you do not use, and check that updates are on.

Checklist

  • Staff sign in with phishing-resistant methods where the service supports them.
  • Everyone knows to report a sign-in page that showed an error after they entered a code.
  • The IT team knows how to sign a user out of all sessions on each main service.
  • After a suspected theft, the order is agreed: clean the device, sign out everywhere, change the password, check rules and records.
  • Sign-ins from new places or devices soon after a normal sign-in raise an alert.
  • Session lengths are set to fit the risk of each app, with shorter limits for admin tools.
  • Creating new keys or tokens asks for a fresh sign-in.
  • Files shared with support desks are checked for tokens first.

Common questions

Does MFA stop session hijacking?

Not on its own. MFA checks you when you sign in, but a stolen session token is used after that check. Phishing-resistant MFA, such as passkeys, does make the fake-page route much harder. It does less against malware that copies cookies from your own device.

How would I know my session was stolen?

Often you would not notice straight away. Signs include sign-ins from places you have not been, inbox rules you did not set and sent emails you did not write. Another sign is a sign-in page that showed an error after you entered your code. Your IT team can check the sign-in records.

What is the difference between session hijacking and account takeover?

Session hijacking is one way to take over an account. The attacker borrows a signed-in session instead of learning the password. Account takeover is the wider result, whatever the method. See Credential Theft vs Session Hijacking.

Is public Wi-Fi a session hijacking risk?

Less than it used to be. Most websites now use encrypted connections, which protect cookies on the way. The bigger risks today are fake sign-in pages and malware. Still, avoid signing in to sensitive accounts on networks you do not trust, and check the web address before you type anything.

What should I do first if I think my session was stolen?

Tell your IT team or service provider straight away. They should sign you out of all sessions and check the device for malware. Then change your password and look for new rules or changes. Treat anything in the account as possibly seen.

Where next?

Ready for the detail? Read the practitioner guide: Session Hijacking and Cookie Theft Guide. It goes further into detection queries, session binding options and how to respond across identity providers and apps.

Also useful:

Related NHI Mgmt Group resources: Device-Bound Session Credentials (DBSC) Guide · Infostealer Logs and Session Token Abuse Guide · Entra Token Protection Guide

Key terms

Session hijacking
Taking over someone's signed-in session by using a copy of their session token, without needing their password.
Session token
A random code a website gives your browser after sign-in, so it knows you on each page.
Multi-factor authentication (MFA)
Two or more separate checks, such as a password and a code from your phone, before you get in.
Adversary-in-the-middle attack
A fake page or service that sits between you and the real site and passes your sign-in through while copying what it needs.
Infostealer
Malware that copies saved passwords, browser cookies and other sign-in data from a device and sends them to a criminal.
Phishing-resistant MFA
A sign-in check that is hard to pass on or trick out of you, usually because it is tied to your device and the real website.
Passkey
A sign-in method that uses a secret key kept on your device instead of a password, and only works on the real website.
Session revocation
Cancelling active sessions on the service's side, so copied tokens stop being accepted.

Sources and further reading

  1. Session Management Cheat Sheet. OWASP Cheat Sheet Series, OWASP Foundation. https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html, accessed 28 Nov 2026.
  2. From cookie theft to BEC: Attackers use AiTM phishing sites as entry point to further financial fraud. Microsoft Security Blog, Microsoft, 12 July 2022. https://www.microsoft.com/en-us/security/blog/2022/07/12/from-cookie-theft-to-bec-attackers-use-aitm-phishing-sites-as-entry-point-to-further-financial-fraud/, accessed 28 Nov 2026.
  3. Implementing Phishing-Resistant MFA (fact sheet). Cybersecurity and Infrastructure Security Agency (CISA), October 2022. https://www.cisa.gov/sites/default/files/publications/fact-sheet-implementing-phishing-resistant-mfa-508c.pdf, accessed 28 Nov 2026.
  4. Device Bound Session Credentials. Chrome for Developers, Google. https://developer.chrome.com/docs/web-platform/device-bound-session-credentials, accessed 28 Nov 2026.
  5. Token protection in Microsoft Entra Conditional Access. Microsoft Learn, Microsoft. https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-token-protection, accessed 28 Nov 2026.
  6. Revoke user access in Microsoft Entra ID. Microsoft Learn, Microsoft. https://learn.microsoft.com/en-us/entra/identity/users/users-revoke-access, accessed 28 Nov 2026.
  7. CircleCI incident report for January 4, 2023 security incident. CircleCI, 13 January 2023. https://circleci.com/blog/jan-4-2023-incident-report/, accessed 28 Nov 2026.

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.