- What is Session Hijacking ?
TCP session hijacking is when a hacker takes over a TCP session between two machines. Since most authentication only occurs at the start of a TCP session, this allows the hacker to gain access to a machine.
- Techniques :
1. Session Fixation:
The session fixation attack is a class of Session Hijacking, which steals the established session between the client and the Web Server after the user logs in. Instead, the Session Fixation attack fixes an established session on the victim's browser, so the attack starts before the user logs in.
For detailed info on How Session Fixation works click here.
2. Session Sidejacking:
where the attacker uses packet sniffing to read network traffic between two parties to steal the session cookie. Many web sites use SSL 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.
1. First the attacker uses a network sniffer to capture a valid token session called Session ID.
2. Now he manipulates the token session to gain unauthorized access to the Web Server or hijack the victim's web session.
For detailed info on How Session Sidejacking works click here.
3. Cross-Site Scripting:
For detailed info on How XSS works click here.
- Protection :
2. Some services make secondary checks against the identity of the user. For example it will change the value of the cookie with each and every request.
3. Users may also wish to log out of websites whenever they are finished using them.
4. Encryption of the data passed between the parties; in particular the session key. This technique is widely relied-upon by web-based banks and other e-commerce services.
For educational purpose only...Do not misuse it...