Session hijacking lets an attacker with a valid token act as the signed-in user, no password, no multi-factor authentication prompt, no return trip through the login page. Verizon's 2024 Data Breach Investigations Report found that stolen credentials have appeared in 31% of breaches over the past decade, and the session cookies issued after a successful login now sit alongside passwords as high-value targets for enterprise attackers.
Knowing the distinct types of session hijacking will help you recognize where session security can fail. A legitimate sign-in can become the starting point for unauthorized access. Applications must preserve a user's authenticated state across many requests, but that convenience creates a valuable target outside the login process. Attackers who exploit that trust can impersonate users and perform unauthorized account activity. They may access sensitive data or make changes that appear to come from a legitimate account.
This article how these attacks unfold across the session lifecycle and pairs each one with the controls that reliably interrupt it. This offers a clearer view of where defenses hold and where they fall short so you can better protect access at login and throughout the authenticated session.
Key Takeaways
A valid session token is a bearer credential, so possession alone lets an attacker act as the signed-in user.
Session tokens can be planted before login, intercepted in transit, stolen from the browser or endpoint, or replayed after authentication.
Traditional multi-factor authentication typically validates the initial authentication event; stealing or replaying the resulting token can avoid another MFA prompt unless session binding, reauthentication, or other controls are in place.
Prevention works when application session hardening, endpoint controls, and fast revocation are layered together.
What Is Session Hijacking?
Session hijacking is the takeover of an authenticated web session by someone who obtains, forges, or predicts its token. When a user signs in, the server creates a session record and gives the browser an identifier, usually a long random string in a session cookie. Some architectures instead issue a self-contained bearer token, such as a signed JSON Web Token (JWT).
The application checks that token on later requests, so possession becomes identity. An attacker holding a valid token may avoid the password, login form, and multi-factor authentication (MFA) prompt because those checks already happened, although sensitive actions can still trigger reauthentication.
4 Types of Session Hijacking Across the Session Lifecycle
Trust in a session token can fail at issuance, in transit, in browser storage, during active use, or when a captured token is replayed after authentication.
1. Session Fixation and Token Prediction at Issuance
Two attacks reach the token before it becomes a secret worth stealing. Session fixation begins before the victim logs in: the attacker obtains a valid session ID, then gets the victim to authenticate while carrying it. Delivery options include a URL parameter, hidden form field, META tag that sets a cookie, manipulated HTTP response header, or injected script writing to document.cookie. If the application accepts that session ID at login instead of issuing a new one, it becomes associated with the authenticated session. That distinguishes fixation from theft of a session established after login.
Prediction attacks target the same stage differently. Weak pseudorandom generators produce identifiers an attacker can derive, whether through time-based seeds, sequential values, or seeding tied to the user's ID that leaves the identifier unchanged. Short tokens compound the problem by making guessing cheaper, and submitting many candidate IDs increases the chance of success. Both attacks exploit weak issuance practices, but fixation reuses a planted identifier while prediction discovers one the application generated.

2. Session Sniffing and Network Interception in Transit
Once issued, the token must travel, and cookie headers are cleartext unless Transport Layer Security (TLS) carries them. Sidejacking exploits sites that protect login with Hypertext Transfer Protocol Secure (HTTPS) but serve later requests over plain HTTP, or cookies that lack the Secure attribute. Anyone sharing the network segment can read the token and present it.
Adversary-in-the-middle (AiTM) positioning puts an attacker between the victim and the network. Common techniques include:
Address Resolution Protocol (ARP) cache poisoning
Dynamic Host Configuration Protocol (DHCP) spoofing
Evil-twin wireless access points
Domain Name System (DNS) manipulation
Each technique puts credentials and session tokens in the attacker's path.
Secure Sockets Layer (SSL) stripping downgrades a victim's connection from HTTPS to unencrypted HTTP through intercepted redirects or rewritten secure links, while protocol and cipher downgrade attacks instead negotiate an older TLS version or weaker cipher. These attacks share a dependence on an exposed or weakened transport path, so consistent encryption matters beyond the login page.
3. XSS, Malware, and Malicious Extensions in the Browser
Cross-site scripting (XSS) turns the application's pages into the theft mechanism. A crafted link can deliver reflected XSS, and stored XSS persists inside the application and runs for visitors to an affected page. Client-side behavior can also cause Document Object Model (DOM)-based XSS when script writes attacker-controlled input into an unsafe sink. In all three cases, injected JavaScript can read document.cookie and send the token to an attacker-controlled host, which is why a missing HttpOnly flag is a weakness.
Infostealer malware bypasses page-level browser rules by extracting cookies from storage or memory. HttpOnly does not help because the malware can read the store directly. Extensions create a similar blind spot: an extension granted cookie permissions can read tokens through privileged browser APIs. This means browser attributes can contain page-level compromise without protecting a token from software that has broader endpoint access.
Man-in-the-browser attacks extend beyond theft by manipulating an authenticated session during active use. Malware or a malicious extension can alter transaction details, form values, or what the browser displays while requests continue carrying the victim's valid token. The attacker may therefore misuse the session without exporting the cookie to another device. Token-movement signals are therefore less useful for detection.
4. AiTM Phishing, OAuth Abuse, and Token Replay at the Identity Layer
Modern session theft also happens at the identity layer. In reverse-proxy phishing, the attacker operates a proxy between the victim and the real authentication service. The victim enters credentials and completes genuine MFA, the proxy relays the messages, and the attacker captures the credentials plus the issued session cookie. Because the real service handled the authentication, the resulting token is valid for a fully authenticated session.
Replaying that cookie against a cloud or single sign-on (SSO) application is a pass-the-cookie attack. In one Cybersecurity and Infrastructure Security Agency (CISA) intrusion report, threat actors likely used browser cookies to defeat MFA through this technique. Such cookies can remain valid through idle periods and can be replayed until expiration or revocation.
Open Authorization (OAuth) device-code phishing persuades a victim to approve a code controlled by the attacker. The attacker then receives tokens for the victim's account without directly capturing the password. Self-contained bearer tokens can be replayed from another device unless bound to one, while refresh tokens can obtain fresh access tokens. These methods differ in delivery, but each abuses a token issued after successful identity verification rather than defeating the authentication factor itself.

What Can Attackers Do With a Hijacked Session?
A hijacked session is worth what that session can do. A standard user session can enable impersonation, unauthorized transactions, sensitive-data access, and persistence through newly added authentication methods or forwarding rules. These actions can appear legitimate because they use an authenticated identity.
A privileged session can support lateral movement, administrative changes, access to other users or systems, and broader data exposure. According to the Federal Bureau of Investigation's Internet Crime Complaint Center (IC3) complaint data, more than 5,100 account takeover complaints since January 2025 reported losses exceeding $262 million.
How to Prevent Different Types of Session Hijacking
Prevention works when each control is matched to the attack it interrupts because no single defense covers the entire session lifecycle.
Attack Type | Primary Defense | Supporting Defense | Limitation
|
|---|---|---|---|
Session fixation | New session ID issued at every authentication event | Accept session IDs only from cookies, never URLs or form fields | Must fire at first login and at privilege changes |
Session ID prediction or brute force | Identifiers from a cryptographically secure generator with at least 64 bits of entropy | Rate limiting and alerting on invalid session IDs | Fixed prefixes or embedded data reduce effective entropy |
Sniffing and sidejacking | HTTPS everywhere plus the Secure cookie attribute | HTTP Strict Transport Security with a long max-age and includeSubDomains | The first connection may remain exposed before the policy arrives |
XSS cookie theft | HttpOnly on session cookies | Nonce- or hash-based content security policy | Useless against malware reading cookie files on disk |
Infostealer and extension theft | Device-bound session credentials and endpoint detection | Extension permission review and allowlisting | Device binding remains a draft standard with limited availability |
AiTM phishing | Phishing-resistant authenticators scoped to the origin | Access policies tied to device compliance | Protects the login; separate controls must protect the token issued afterward |
Pass-the-cookie and token replay | Sender-constrained or device-bound tokens | Short lifetimes with server-side revocation | Timeouts do not stop immediate use of a fresh token |
Issuance and Transport Controls for Fixation, Guessing, and Interception
Regeneration must replace the existing identifier at authentication and privilege changes rather than preserve it alongside the authenticated session, and any ID arriving in a URL or request body should be discarded outright.
Sixty-four bits of entropy equal at least 16 hexadecimal characters when hex encoding is used, and custom identifiers can use 128 bits for a wider safety margin. Renaming platform-default cookie names such as PHPSESSID for PHP or JSESSIONID for Java removes a free fingerprint. Fixed prefixes and embedded values still reduce effective entropy even when a token appears long.
For transport, HSTS should be configured with a long max-age, includeSubDomains, and preload. The first connection may occur before the browser receives the policy, but preload lists can close that gap.
Browser and Endpoint Controls for XSS, Malware, and Extension Theft
Content security policies built on nonces or hashes stop XSS at the source, while host-allowlist policies often leave pages exposed. A strong cookie configuration combines a __Host- prefixed name with path /, Secure, HttpOnly, and SameSite=Strict. The prefix requires Secure, a path of /, and no Domain attribute, which prevents a compromised sibling subdomain from injecting cookies.
Cookie attributes stop DOM access, not direct access to browser storage. Endpoint controls should watch for processes touching cookie databases or browser memory, and extension governance should restrict which add-ons hold cookie permissions.
Device-bound credentials change the economics of endpoint theft. The browser generates a key pair in hardware-backed storage, such as a Trusted Platform Module (TPM), that cannot be exported, and the server issues short-lived cookies after proof of private-key possession. A freshly stolen cookie may still work until expiration unless every use is cryptographically bound to that key. The specification remains a World Wide Web Consortium (W3C) draft standard with narrow availability and falls back to standard behavior without secure key storage. Use device binding alongside endpoint monitoring and short session lifetimes.
Identity and Lifecycle Controls for AiTM, Cloud Replay, and Persistent Access
Phishing-resistant authenticators work because the credential is cryptographically scoped to the relying party's origin, and a proxy site is not that origin. Outputs that users type manually are not phishing-resistant because manual entry does not bind them to the session, so origin binding protects login but not the resulting token.
Demonstrating Proof of Possession (DPoP) constrains an access token to the sender by requiring proof of a matching private key, while audience restriction prevents replay against another resource server. NIST authentication guidelines set a reauthentication ceiling of 24 hours overall with a one-hour inactivity timeout for accounts using two authentication factors. Higher-assurance accounts tighten those limits to 12 hours overall and 15 minutes of inactivity. Shorter windows reduce persistence, although they cannot prevent immediate misuse of a fresh token.
Revocation controls close the loop. Logout should invalidate server-side session data, disabling an account should terminate every active session, and a factor change should offer to end other sessions. Administrators also need to terminate sessions for one user or all users. These capabilities limit damage after detection and prevent a copied token from surviving a browser-only logout.
How to Detect and Respond to Types of Session Hijacking
Hijacked sessions can produce suspicious telemetry before other damage occurs, provided the relevant events are logged. Signs of session hijacking include:
Impossible travel or a geographic origin inconsistent with the user's recent activity suggests cookie replay
Divergent device or user-agent fingerprints within one session can indicate that a token moved to another browser or endpoint
Concurrent sessions from geographically distant Internet Protocol (IP) addresses warrant investigation, especially when their activity overlaps
Token use without a corresponding login event can reveal replay of an authenticated session
Session use after logout or expiration means server-side termination is not being enforced
Endpoint signals include processes reading browser cookie storage or memory and document macros touching cookie file paths. Session creation, renewal, destruction, timeout, and invalid-session events should be logged, but token values should remain out of logs.
The National Institute of Standards and Technology's (NIST) incident-response lifecycle provides a structure for response. In practice, that structure plays out as a sequence:
Confirm the activity
Revoke access and refresh tokens
Invalidate sessions server-side
Clean the endpoint, then reset credentials or re-enroll authenticators if malware is confirmed
Review logs for forwarding rules and newly added authentication methods before restoring access
A separate CISA analysis recommends deciding in advance when, how, and why to reset passwords and revoke session tokens.
Real-World Context and Common Misconceptions of Session Hijacking
Real incidents show that session hijacking persists because organizations often overestimate protections such as HTTPS, MFA, HttpOnly, and browser-only logout. Firesheep demonstrated automated sidejacking on open Wi-Fi in 2010.
More recently, a CISA intrusion report described an actor who signed in with valid MFA and may have used browser cookies, while ransomware operators have impersonated legitimate users on internal networks with stolen session cookies.
Four beliefs cause much of the trouble:
HTTPS Protects Tokens in Transit: True, but separate controls must still address page or endpoint compromise and reverse-proxy phishing.
MFA Validates Login: True at sign-in, but applications can still require reauthentication for sensitive actions afterward.
HttpOnly Stops Page Scripts: It blocks browser-side JavaScript, not endpoint malware reading cookie files directly from disk.
Logout Ends the Session: Only when the server actually destroys the session server-side, not just when the browser clears local state.
Each belief guards one stage of the session lifecycle while leaving the others exposed.
Stronger Sessions Require Layered Trust
Session security is only as strong as its weakest stage, from issuance through revocation. A resilient application issues fresh, high-entropy identifiers, refuses to carry tokens over plaintext, limits theft from compromised endpoints, and can revoke live sessions quickly. Evaluating those capabilities together provides a clearer measure of session security than checking login alone.
For cloud email specifically, several of the detection signals covered above — unfamiliar devices, out-of-pattern sign-in locations, divergent account behavior — are exactly what Abnormal's behavioral AI is designed to analyze across Microsoft 365 and Google Workspace accounts. When login and device behavior diverge from a user's established pattern, Abnormal can help surface the likely compromise and automate remediation steps such as a password reset, reducing the manual work described in the revocation controls above.
Book a demo to see how Abnormal fits into your existing incident-response workflow.
Frequently Asked Questions
What Is the Most Common Type of Session Hijacking?
Cookie theft often occurs through infostealer malware or reverse-proxy phishing. Cross-site scripting and network sniffing also remain effective against applications that skip HttpOnly or use plain HTTP.
Can Session Hijacking Bypass Multi-Factor Authentication?
Yes. A stolen post-login token can avoid another MFA prompt. Step-up authentication, device-bound tokens, short lifetimes, and fast revocation narrow that window.
What Is the Difference Between Session Hijacking and Session Fixation?
Fixation plants an identifier before login and waits for the victim to authenticate with it. Hijacking more broadly includes taking over a session established legitimately.
Does HTTPS Prevent Every Type of Session Hijacking?
No. HTTPS protects tokens in transit. Page scripts, malware, malicious extensions, and phishing proxies may still access them.