session hijacking
1 article
Session hijacking is an attack in which someone takes over a logged-in user's session, usually by stealing the token that identifies it. Once the attacker presents that token, the website treats them as the real user, with no password needed.
The attack exists because of how web logins work. The web's main protocol does not remember who is who between requests, so after a person signs in, the site hands the browser a session identifier, most often in a cookie, and the browser sends it back each time. Whoever holds that identifier holds the login. Attackers get it by listening on an unencrypted connection, by running malicious script in the victim's browser, by infecting the device with malware that copies cookies, by guessing identifiers that are too predictable, or by planting an identifier before the victim logs in, a trick called session fixation.
Sites reduce the risk by encrypting all traffic, marking session cookies so that scripts cannot read them and they travel only over secure connections, generating long random identifiers, issuing a fresh one at login, and ending sessions after inactivity or logout. Some also watch for a session that suddenly appears from a different device or place.
The subject matters because a stolen session skips every protection that guards the login step, including strong passwords and second factors. For the victim the result can be emptied accounts, read messages or changed settings, often with no sign that anyone else was there.