Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cyber Security Cards › Revision Cards

What Is a Session – Why Hijacking Matters

What Is a Session – Why Hijacking Matters After you log in, the server makes a session and gives your browser a session ID (often in a cookie like PHPSESSID). Every next request carries that ID. The session ID is like a ticket. If someone steals it ( session hijacking ), they are logged in as you, w

What Is a Session – Why Hijacking Matters After you log in, the server makes a session and gives your browser a session ID (often in a cookie like PHPSESSID). Every next request carries that ID. The session ID is like a ticket. If someone steals it ( session hijacking ), they are logged in as you, w
What Is a Session – Why Hijacking Matters · Download PNG
Read card text

What this card says

What it is

After you log in, the server makes a session and gives your browser a session ID (often in a cookie like PHPSESSID).

Every next request carries that ID.

Why it matters for security

The session ID is like a ticket. If someone steals it (session hijacking), they are logged in as you, with no password.

Defence

Set cookies Secure and HttpOnly. Use HTTPS.

Make a new session ID at login and expire idle sessions.

Red team (attacker) doesBlue team (defender)…
Steals / guesses / fixes victim session IDHttpOnly+Secure cookies; regenerate ID on login; short TTL
Replays cookie from another browser / IPConcurrent-session alerts; bind soft signals (UA/IP)…
Targets apps that trust cookie alone foreverMFA for sensitive actions; logout server-side invalidate

Learn more in the lesson: 41.1 What Is a Session – Why Hijacking Matters

See all Ravi Sir's Cyber Security Cards