Session hijacking occurs when an attacker takes over an active communication session between a client and a server, effectively impersonating the legitimate user. Cookies and tokens are among the primary mechanisms targeted in this type of attack.
Session Hijacking
One thing that can happen with a credential replay attack or a pass the token attack is that there could be some sort of session hijacking.
Let's set up a little scenario here. Let's say we have a client machine that's connecting to a web server that's hosting an application. What you're going to do is you're going to log into this application, and it's going to then keep that connection open. So it's going to communicate back and forth through what we call a session.
These sessions between these two devices get established, and it's tracked through multiple ways: one from the TCP side, and it's also tracked on the application side. We have several mechanisms that could be shared back and forth between these to track this session and make sure it's live. An authentication piece could be a part of this as well.
Session hijacking is when an adversary takes over a session. So in this scenario right here, we have a laptop that logs into this application and they're logged in. Well, somewhere during the process, this adversary takes over the session and hijacks the session. Now they are the one that's communicating to the server as if they were this end client. So that's what session hijacking is.
Some of the mechanisms that control these sessions and the authorization of them would be cookies and tokens, and sometimes you can hear this be referred to as cookie hijacking as well.
So here's that attack card on session hijacking. It's when an adversary takes over a session. A session gets created between a client and a server, and then the adversary steps in and takes over that session and hijacks that session.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →