What are session IDs or session cookies ?
Whenever a user sign into his/her account for eg yahoo/gmail/hotmail, it generates a unique piece of string.
One copy of it is saved on the server while the other is saved in the browser of your local computer. Both are compared and cross checked whether they match or not everytime you perform an action with your account.
This unique piece of string or login session is destroyed whenever you click the ‘Sign Out’ button basically referred to as cookie.
Note:- Session Hijacking is nothing but stealing the cookies. Sessions are stored in the browser in form of cookies.
An attacker can steal that session by convincing the victim to run a piece of code in browser. Attacker can use that stolen session to login into victim’s account without providing any username or password.
This attack is very uncommon because when the victim clicks ‘Sign out’, session gets destroyed & attacker
too also gets signed out this way.
But in case of yahoo, its not the same. The attacker doesnt get signed out when victim clicks ‘Sign out’. Though the session automatically gets destroyed after 24hrs by yahoo. Just in case if the user simply refreshes the windows in yahoo account, he gets sessions renewed for next 24 hrs.
This means, once the yahoo account session is stolen , attacker can access the account for life time by refreshing window in every 24hrs.
What is required?
1)You basically need a host to upload your contents. You can sign up for a free hosting at http://www.my3gb.com/
2)Download the following files that will help you hack the account :
How to do it?
1. Sign Up for an account at any free webhosting site. For eg my3gb.com.
2. Login to your account and go to file manager. Upload the four files that you have just downloaded. Make a new directory ‘cookies’ there
4. Once the victim runs the script, yahoo.php file containg the cookie stealing script captures the cookies and hacked.php executes the stolen cookies in browser(stolen cookies get stored in directory ‘cookies’). On the other end, your victim would again
be redirected to his/her yahoo account.
5. Now open the file hacked.php(If it asks for password enter password) and click on the username link on the left hand side and it would take you to inbox of victim’s yahoo account without asking for the id or password.
password for login: Password