Get a free trial →

Push Logo

Session hijacking: how attackers steal sessions and how to detect and prevent it

Geometry graphic

Session hijacking lets attackers bypass authentication and MFA entirely

How session hijacking works

  1. A user logs into an application and receives a session token
  2. The session token is stored in the browser and used to maintain access
  3. The attacker obtains that token through malware or a malicious extension
  4. The token is replayed from another browser or device
  5. The application treats the attacker as an authenticated user

Why most security tools fail to detect session hijacking

Diagram explaining why traditional security tools cannot detect session hijacking — stolen tokens are replayed after login, with no new authentication event to alert on.

How do you prevent session hijacking?

Push Security dashboard showing tagged browser sessions and an alert detecting stolen session token replay indicative of a session hijacking attempt.

How Push detects and prevents session hijacking

Push Security dashboard showing tagged browser sessions and an alert detecting stolen session token replay indicative of a session hijacking attempt.

Frequently asked questions

The theft and replay of a valid session token (browser cookie or OAuth token) to access an authenticated session without needing the user's credentials or MFA. The attacker obtains a token via infostealer malware, AiTM phishing, malicious browser extensions, or cross-site scripting, and replays it from a different browser.

Session hijacking bypasses every authentication control — the attacker never needs the password and never faces an MFA challenge. Push detects session hijacking through session marker injection, providing deterministic stolen-session detection.

A combination of stopping token theft (detecting AiTM phishing, ClickFix infostealer delivery, and malicious extensions) and detecting token replay when it occurs.

Push addresses both. Phishing detection catches AiTM before tokens are stolen. Session marker injection detects when stolen tokens are replayed from uninstrumented browsers. This is a deterministic detection — a session that originated in a Push browser and appears in a non-Push browser has been stolen. Complementary controls include CAE with strict location enforcement and short session lifetimes.

A tool that operates inside the browser session and can deterministically identify when a session token has been stolen and replayed. IdP-based anomaly detection flags suspicious logins probabilistically, but sophisticated attackers use residential proxies to defeat heuristics. Session marker injection provides deterministic detection.

Push injects unique markers into sessions from Push-protected browsers. When a marked session appears in an uninstrumented browser, the theft is confirmed — not suspected.

EDR may detect the infostealer malware that steals cookies — if it triggers behavioral or signature detections. But EDR doesn't detect the token replay: when the attacker uses the stolen cookie in a different browser, there's nothing for EDR to see. The theft and replay are different events at different layers.

EDR also misses session theft via AiTM phishing (captured by the proxy, never touching the endpoint) and via malicious extensions (inside the browser's sandbox). Push complements EDR by detecting both theft mechanisms and replay. Read about EDR blind spots.

Three main vectors: infostealer malware (harvests cookies, credentials, and saved data from the browser's local storage), AiTM phishing (captures session tokens through a reverse proxy during authentication), and malicious browser extensions (API access to cookies, can exfiltrate silently). Infostealers are delivered primarily through ClickFix attacks.

Stolen sessions are sold on dark web marketplaces or used directly for account takeover. Push detects all three theft vectors in the browser and detects replay through session marker injection.

Token Protection binds refresh tokens to the device's TPM, preventing replay from other devices. However, it does not address browser session cookie replay — the dominant session hijacking pattern. Token Protection supports Exchange Online, SharePoint Online, Teams, and certain native client apps, but browsers are not supported.

Its utility is against infostealer malware exfiltrating PRT/refresh tokens from compromised endpoints — a different threat from browser session cookie replay. Push detects browser session hijacking through session marker injection, covering the sessions Token Protection doesn't. Read about Token Protection limitations.

Credential theft steals the user's password — the attacker needs to authenticate, which MFA can block. Session hijacking steals a valid, post-authentication session token — the attacker replays it to access an already-authenticated session, bypassing both password and MFA entirely.

Remediation also differs. After credential theft, reset the password. After session hijacking, the stolen session token must be explicitly revoked — a password reset alone doesn't invalidate it. Push detects both: compromised credential detection catches stolen passwords at login, session marker injection catches replayed tokens. Compare attack types.

Infostealers (commonly delivered via ClickFix) access the browser's local storage files, extract session tokens, and exfiltrate them to attacker-controlled infrastructure — often within seconds. They harvest everything: saved passwords, session cookies, autofill data, cryptocurrency wallets, and extension data.

Stolen sessions are sold on dark web marketplaces or used directly for account takeover. Refresh tokens survive password resets, meaning a single infection can provide persistent access to multiple applications. Push detects the delivery mechanism (ClickFix) and the replay of stolen tokens (session marker injection).

Some help, but effectiveness varies. Continuous Access Evaluation with strict location enforcement rejects tokens from untrusted IPs within seconds. Without strict enforcement, tokens are accepted for up to 28 hours. Compliant Network via Global Secure Access blocks replayed tokens from outside the compliant network.

Token Protection — the control most cited for session hijacking — provides essentially zero protection against browser session cookie replay because browsers aren't supported. Push's session marker injection fills this gap with deterministic detection regardless of the attacker's evasion techniques.

Without browser-level session markers, detecting stolen sessions is extremely difficult. IdP-level signals are probabilistic and miss sophisticated attackers who use residential proxies. Application audit logs may show suspicious behavior after the fact, but the initial access looks like a normal session.

Push's session marker injection generates a confirmed stolen-session alert when a marked session appears in an uninstrumented browser — deterministic, not a heuristic or risk score.

Most breach notification services match email-password pairs without confirming active use. Push eliminates false positives by verifying that the credential is actually being used to authenticate, prioritizing the credentials that represent real, current risk.

Push's dark web credential monitoring surfaces credentials found in infostealer dumps and breach databases — but with behavioral corroboration. Instead of alerting on every match (which generates false positives from stale data), Push confirms whether the compromised credential is actively in use by correlating with observed login behavior. Read about credential monitoring.

Infostealers feed the session hijacking and credential stuffing pipelines. Stolen session cookies enable immediate account takeover without needing passwords or MFA. Stolen credentials are sold on dark web marketplaces for credential stuffing campaigns. Push breaks the chain at multiple points — detecting ClickFix delivery, identifying compromised credentials at login, and detecting stolen session replay.

AiTM phishing steals the session token during authentication — a reverse proxy or human-operated relay sits between the user and the real login page, passing everything through in real time. The user authenticates normally, completes MFA on the real IdP, and the proxy captures the resulting session token as it's issued. The attacker needs the user to visit their phishing infrastructure, and the theft happens at the moment of login.

Session hijacking is broader — the unauthorized replay of any valid session token, regardless of how it was obtained. Infostealers harvest cookies from the browser's local storage after the user has already authenticated. Malicious extensions exfiltrate session cookies silently via browser APIs. Cross-site scripting can expose tokens in vulnerable applications. In all these cases, the session was created legitimately and stolen afterward — no phishing page required.

AiTM is one method that leads to session theft, but they're different attacks at different points in the lifecycle. Push detects AiTM at the phishing page (behavioral detection of reverse proxy signatures) and detects the broader category of session hijacking through marker injection (deterministic detection when a stolen token is replayed from an uninstrumented browser) as well as malware delivery mechanisms like ClickFix and file downloads.