6.2.1 Session Hijacking

Session Hijacking

Session Hijacking, also known as session theft, is a security attack where an attacker illegitimately takes over a user's active session on a web app.

In this type of attack, the attacker gains unauthorized access tot he user's session token or identifier, allowing them to impersonate the victim and perform actions on their behalf.

Phase 1 - Token Acquisition

  • Session Prediction: predicting or guessing the session token, especially if it's predictable or lacks sufficient randomness.

  • Session Sniffing: intercepting the session token as it's transmitted over an unsercured network, such as an open Wi-Fi hotspot

  • Cross-Site Scripting (XSS): exploiting a vulnerability in the web app to inject malicious JavaScript code into a victim's browser, which can steal the session token.

Phase 2 - Impersonation

When the attacker has the session token, they can impersonate the victim by presenting this token during requests to the web app.

The app not protected by hijacking, treats the attacker as the authenticated user.

Impact

  • Data Theft: access and steal the victim's sensitive data, such as personal info, financial details or confidential documents.

  • Account Takeover: change the victim's account setting, passwords, or email address, locking the victim out of their account.

  • Malicious Transactions: conduct unauthorized transactions, make purchases, or manipulate the victim's data.

Last updated