There are four main methods used to perpetrate a session hijack. These are: •
Session fixation, where the attacker sets a user's
session ID to one known to them, for example by sending the user an email with a link that contains a particular session ID. The attacker now only has to wait until the user logs in. •
Session side jacking, where the attacker uses
packet sniffing to read network traffic between two parties to steal the session
cookie. Many websites use
TLS encryption for
login pages to prevent attackers from seeing the password, but do not use encryption for the rest of the site once
authenticated. This allows attackers that can read the network traffic to intercept all the data that is submitted to the
server or web pages viewed by the client. Since this data includes the session
cookie, it allows them to impersonate the victim, even if the password itself is not compromised. Unsecured
Wi-Fi hotspots are particularly vulnerable, as anyone sharing the network will generally be able to read most of the
web traffic between other nodes and the
access point. •
Cross-site scripting, where the attacker tricks the user's computer into running code which is treated as trustworthy because it appears to belong to the server, allowing the attacker to obtain a copy of the cookie or perform other operations. •
Malware and
unwanted programs can use
browser hijacking to steal a browser's cookie files without a user's knowledge, and then perform actions (like installing Android apps) without the user's knowledge. An attacker with physical access can simply attempt to steal the
session key by, for example, obtaining the file or memory contents of the appropriate part of either the user's computer or the server. After successfully acquiring appropriate session cookies an adversary would inject the session cookie into their browser to impersonate the victim user on the website from which the session cookie was stolen from.
Tools used by attackers Attackers often rely on specialized tools to execute session hijacking attacks. One such tool is
Firesheep, a Firefox extension introduced in October 2010. Firesheep demonstrated session hijacking vulnerabilities in unsecured networks by capturing unencrypted cookies from popular websites, allowing users to take over active sessions of others on the same network. The tool worked by displaying potential targets in a sidebar, enabling session access without password theft. Another widely used tool is
Wireshark, a network protocol analyzer that allows attackers to monitor and intercept data packets on unsecured networks. If a website does not encrypt its session cookies or authentication tokens, attackers can extract them and use them to gain unauthorized access to a victim’s account. ==Exploits==