Sinisterly
[MITM]FaceBook Cookie Stealing On Linux - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Hacking (https://sinister.ly/Forum-Hacking)
+--- Forum: Tutorials (https://sinister.ly/Forum-Tutorials)
+--- Thread: [MITM]FaceBook Cookie Stealing On Linux (/Thread-MITM-FaceBook-Cookie-Stealing-On-Linux)

Pages: 1 2 3 4 5 6 7 8 9


[MITM]FaceBook Cookie Stealing On Linux - Snipa - 05-03-2013

Here is how to access someone's facebook on your network

Facebook send a cookie to the person loggin in in order to keep him signed in
so our job is to get that cookie and use it to bypass login so we can use that facebook account without user/pass.

Since im doing it from ubuntu, i need to install all the tools needed, here they are:

______________________________________________________________________________________

Gather your tools:

[*] Add grease monkey to firefox

[*] Install the greasemonkey cookie injector script from here
Spoiler:
Copy and past the javascript and save it as Snipa@HackCommunity.user.js
Spoiler: image
[Image: decff8a639.jpg]
To install the script just drag and drop it in your firefox page
Spoiler: image
[Image: f3cec884cc.png]
A box will pop up to install the script just click install
Spoiler: image
[Image: 5bb2e89ff4.png]
(note that greasemonkey should be enabled and you need to restart firefox in order to work)


[*] Install ettercap
Spoiler:
[Image: e15cjwg.png]



[*] Install SSLstrip
Spoiler:
[Image: qEZwZsY.png]



[*] Install dsniff
Spoiler:
[Image: AIqLtuX.png]



[*] Install wireshark
Spoiler:
[Image: TlEc3fF.png]

______________________________________________________________________________________


Explanation:

To get the cookie , we need to see the traffic on our network, this is why we need wireshark
One problem oppose, we want to see data send to/from a certain ip address , this mean you need the local ip of your target ; in this case its 192.168.1.104
Now we capture the cookie, and use it to login to facebook, this is done with greasemonkey


______________________________________________________________________________________


The attack:

[*] Enable ip forwarding to be able to resend data that we get
Spoiler:
[Image: Ioyk0ey.png]



Code:
to enable ip forward: sudo sysctl -w net.ipv4.ip_forward=1 to check if done corretly: cat /proc/sys/net/ipv4/ip_forward




[*] Enable ip tables to redirect the target from port 80 to 1000 for SSLstrip to work
Spoiler:
[Image: Saa5Pwm.png]




[*] Start SSLstrip
Spoiler:
[Image: qhxunnF.png]




[*] ARPspoofing to position ourselfs between the router and the client (target)
-dsniff-
Spoiler:
[Image: uzXIry6.png]



[Image: Incty61.png]




[*] Start wireshark and select an interface to start seeing the traffic
Spoiler:
[Image: aZvaHIA.png]




[*] Type this in the filter, and wait for the target to login on facebook
Spoiler:
[Image: CrEjaF0.png]




[*] When he login, you will see this, just copy the printable text only, like i did
Spoiler:
[Image: owxX84b.png]




[*] Now inject the cookie in your webbrowser, go to facebook, and press ALT+C to see this input box, and past there
-grease monkey-
Spoiler:
[Image: 1BvVcI7.png]




[*] You can now refresh facebook, and there you go, you are logged in
Spoiler:
[Image: GCdyiyp.png]



______________________________________________________________________________________


Note : This is a Man In The Middle Attack (MITM) example, done on my personal facebook account, on my network, HackCommunity don't take resposability due to what you do with informations you got from this tutorial.


[MITM]FaceBook Cookie Stealing On Linux - Snipa - 05-03-2013

Here is how to access someone's facebook on your network

Facebook send a cookie to the person loggin in in order to keep him signed in
so our job is to get that cookie and use it to bypass login so we can use that facebook account without user/pass.

Since im doing it from ubuntu, i need to install all the tools needed, here they are:

______________________________________________________________________________________

Gather your tools:

[*] Add grease monkey to firefox

[*] Install the greasemonkey cookie injector script from here
Spoiler:
Copy and past the javascript and save it as Snipa@HackCommunity.user.js
Spoiler: image
[Image: decff8a639.jpg]
To install the script just drag and drop it in your firefox page
Spoiler: image
[Image: f3cec884cc.png]
A box will pop up to install the script just click install
Spoiler: image
[Image: 5bb2e89ff4.png]
(note that greasemonkey should be enabled and you need to restart firefox in order to work)


[*] Install ettercap
Spoiler:
[Image: e15cjwg.png]



[*] Install SSLstrip
Spoiler:
[Image: qEZwZsY.png]



[*] Install dsniff
Spoiler:
[Image: AIqLtuX.png]



[*] Install wireshark
Spoiler:
[Image: TlEc3fF.png]

______________________________________________________________________________________


Explanation:

To get the cookie , we need to see the traffic on our network, this is why we need wireshark
One problem oppose, we want to see data send to/from a certain ip address , this mean you need the local ip of your target ; in this case its 192.168.1.104
Now we capture the cookie, and use it to login to facebook, this is done with greasemonkey


______________________________________________________________________________________


The attack:

[*] Enable ip forwarding to be able to resend data that we get
Spoiler:
[Image: Ioyk0ey.png]



Code:
to enable ip forward: sudo sysctl -w net.ipv4.ip_forward=1 to check if done corretly: cat /proc/sys/net/ipv4/ip_forward




[*] Enable ip tables to redirect the target from port 80 to 1000 for SSLstrip to work
Spoiler:
[Image: Saa5Pwm.png]




[*] Start SSLstrip
Spoiler:
[Image: qhxunnF.png]




[*] ARPspoofing to position ourselfs between the router and the client (target)
-dsniff-
Spoiler:
[Image: uzXIry6.png]



[Image: Incty61.png]




[*] Start wireshark and select an interface to start seeing the traffic
Spoiler:
[Image: aZvaHIA.png]




[*] Type this in the filter, and wait for the target to login on facebook
Spoiler:
[Image: CrEjaF0.png]




[*] When he login, you will see this, just copy the printable text only, like i did
Spoiler:
[Image: owxX84b.png]




[*] Now inject the cookie in your webbrowser, go to facebook, and press ALT+C to see this input box, and past there
-grease monkey-
Spoiler:
[Image: 1BvVcI7.png]




[*] You can now refresh facebook, and there you go, you are logged in
Spoiler:
[Image: GCdyiyp.png]



______________________________________________________________________________________


Note : This is a Man In The Middle Attack (MITM) example, done on my personal facebook account, on my network, HackCommunity don't take resposability due to what you do with informations you got from this tutorial.


RE: [MITM]FaceBook Cookie Stealing using ubuntu - Ex094 - 05-04-2013

Bookmarked! The MITM Part is pretty well explained via commands Smile Good Job!


RE: [MITM]FaceBook Cookie Stealing using ubuntu - Ex094 - 05-04-2013

Bookmarked! The MITM Part is pretty well explained via commands Smile Good Job!


RE: [MITM]FaceBook Cookie Stealing using ubuntu - Psycho_Coder - 05-04-2013

you explained it very well. Great thread.I read it and learned something new. But to do this I need the local ip of the victim. That means first I have to get the IP of the user some how and then I can follow this method.


RE: [MITM]FaceBook Cookie Stealing using ubuntu - Psycho_Coder - 05-04-2013

you explained it very well. Great thread.I read it and learned something new. But to do this I need the local ip of the victim. That means first I have to get the IP of the user some how and then I can follow this method.


RE: [MITM]FaceBook Cookie Stealing using ubuntu - Snipa - 05-04-2013

@Ex094 Thank You : ) took time to make it look good

@Psycho_Coder you can get all local IPs using nmap its pretty easy.


RE: [MITM]FaceBook Cookie Stealing using ubuntu - Snipa - 05-04-2013

@Ex094 Thank You : ) took time to make it look good

@Psycho_Coder you can get all local IPs using nmap its pretty easy.


RE: [MITM]FaceBook Cookie Stealing using ubuntu - Ex094 - 05-04-2013

@Psycho_Coder If you want to ArpSpoof the whole network then you cam simply do this

Code:
arpspoof -i interface gateway

If my gateway is 192.168.1.2 and my interface is eth0 then the command is:

Code:
arpspoof -i eth0 192.168.1.2

Remember that Spoofing the network is dangerous as It might bring it down and the target admin might get alerted so use it with caution. If the network goes down then Press Ctrl + C to halt the arpspoofing. After confirming that the network is up again you can run the command again!


RE: [MITM]FaceBook Cookie Stealing using ubuntu - Ex094 - 05-04-2013

@Psycho_Coder If you want to ArpSpoof the whole network then you cam simply do this

Code:
arpspoof -i interface gateway

If my gateway is 192.168.1.2 and my interface is eth0 then the command is:

Code:
arpspoof -i eth0 192.168.1.2

Remember that Spoofing the network is dangerous as It might bring it down and the target admin might get alerted so use it with caution. If the network goes down then Press Ctrl + C to halt the arpspoofing. After confirming that the network is up again you can run the command again!