d0837296baef4fc14d667832c1a5215944b54a8f46af2d5c5c TipsS And TricksS: Cookie Stealing
Showing posts with label Cookie Stealing. Show all posts
Showing posts with label Cookie Stealing. Show all posts
on Tuesday, 15 May 2012
Browser Explotation Framework is mainly used to exploit a Web-browser.When i was trying it I play a varied types of pranks with victim browser like making open a pop-up window,playing a sound,stealing cookie etc. So lets start hacking.
Follow all the steps according to my post ======>


1. First install beef by clicking on Applications->Backtrack–>Exploitation Tools->Social Engineering Tools->BEEF XSS Framework->BeEF Installer.


2. Now when beef installs open beef by going to same directory like in 1st step then click on beef and beef will start connecting.


3. Now copy the open the url written in front of hook url like in image.


4. After opening the link u will see a login page just put username beef and password beef to login.


5. Now a window will open showing you beef control pannel,now the main explotation will start.


6. Now send this link  http://127.0.0.1:3000/demos/basic.html to victim.




7. Once victim will open you will be contected to his computer through his browser and you will see connected browsers at top left bottom under the Online browser tab like in image.


8. Click on any online browser in online browser tab and you will get a page with a full information of browser.


9. Then click on Commands tab to start open various exploits and tools.


10. Now use any of commands to making pranks with the victim.


Note;---> its for educational purpose only.
While doing all this dont close the terminal that will open as opening of beef.

on Sunday, 25 December 2011
The cookie which facebook uses to authenticate it's users is called "Datr", If an attacker can get hold of your authentication cookies, All he needs to do is to inject those cookies in his browser and he will gain access to your account. This is how a facebook authentication cookie looks like:
Cookie: datr=1276721606-b7f94f977295759399293c5b0767618dc02111ede159a827030fc;

How To Steal Facebook Session Cookies And Hijack An Account? 

An attacker can use variety of methods in order to steal your facebook authentication cookies depending upon the network he is on, If an attacker is on a hub based network he would just sniff traffic with any packet sniffer and gain access to victims account.

If an attacker is on a Switch based network he would use an ARP Poisoning request to capture authentication cookies, If an attacker is on a wireless network he just needs to use a simple tool called firesheep in order to capture authentication cookie and gain access to victims account.

In the example below I will be explaining how an attacker can capture your authentication cookies and hack your facebook account with wireshark.

Step 1 - First of all download wireshark from the official website and install it.

Step 2 - Next open up wireshark click on analyze and then click on interfaces.

Step 3 - Next choose the appropriate interface and click on start.



Step 4 - Continue sniffing for around 10 minutes.

Step 5 - After 10minutes stop the packet sniffing by going to the capture menu and clicking on Stop.

Step 6 - Next set the filter to http.cookie contains “datr” at top left, This filter will search for all the http cookies with the name datr, And datr as we know is the name of the facebook authentication cookie.
Step 7 -  Next right click on it and goto Copy - Bytes - Printable Text only.
Step 8 - Next you’ll want to open up firefox. You’ll need both Greasemonkey and thecookieinjector script. Now open up Facebook.com and make sure that you are not logged in.

Step 9- Press Alt C to bring up the cookie injector, Simply paste in the cookie value into it.


Step 10 - Now refresh your page and viola you are logged in to the victims facebook account.

Note: This Attack will only work if victim is on a http:// connection and even on https:// if end to end encryption is not enabled.


Countermeasures

The best way to protect yourself against a session hijacking attack is to use https:// connection each and every time you login to your Facebook, Gmail, Hotmail or any other email account. As your cookies would be encrypted so even if an attacker manages to capture your session cookies he won't be able to do any thing with your cookies.