Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

Session Hijacking

Direct answer

Session hijacking takes over a user's authenticated session by stealing or predicting its session token, through XSS, sniffing or malware. Use HTTPS, Secure and HttpOnly cookies and regenerate session IDs at login.

When to use this

Use this when attackers may steal or reuse session tokens.

First 30 seconds

1. Session hijacking steals session tokens (XSS, infostealers, MITM).

2. HttpOnly/Secure cookies, TLS.

3. Short sessions, rotation.

4. Detect token reuse from new locations.

5. Revoke sessions on compromise.

Operational verification

stolen token → reused → detected/revoked

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Incident response and forensics
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformIncident response and forensics
Scope / prerequisiteUse this when attackers may steal or reuse session tokens.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Methods and defences Narrow the fault
MethodDefence
Stealing cookies via XSSHttpOnly cookies, CSP, output encoding
Sniffing on networksHTTPS everywhere, HSTS, Secure cookies
Adversary-in-the-middle phishing (Evilginx)Phishing-resistant MFA, token binding, conditional access
Session fixationNew session ID after login
Info-stealer malware exporting browser cookiesEDR, short session lifetimes, re-auth for sensitive actions
Step 2 Common mistakes Narrow the fault
  • Session cookies without Secure/HttpOnly/SameSite.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • XSS and sniffing steal session cookies.
  • Secure, HttpOnly and SameSite cookies reduce risk.
  • Regenerate session IDs at login.
Key checks
  • Session token rotation on login — fixation defence
  • Secure/HttpOnly/SameSite cookies — protection
  • Token binding to device/IP risk signals — detection
ReferenceWhy it matters1 section · depth on demand

How it works

Session hijacking takes over an authenticated session by stealing or guessing the session token — via XSS, network sniffing on unencrypted connections, malware stealing browser cookies, or session fixation — so the attacker is treated as the logged-in user.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docIncident response and forensics current

Authoritative/upstream documentation reviewed for bounded claims in Common Attacks → Session Hijacking. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://attack.mitre.org/techniques/enterprise/ · confidence 94%
Confirmation

Confirm action

Continue?