SIDE JACKING - HACKING ACCOUNT ON LAN OR WIFI

Sidejacking is the process of sniffing cookie information, then replaying them against websites in order to clone a victim’s session. We use the term “sidejacking” to distinguish this technique from man-in-the-middle hijacking(Cain and Abel). Whereas man-in-the-middle hijacking interferes with the original session, sidejacking does not. The victim continues to use his/her session blissfully unaware that we are also in his/her account (although signs such as additional e-mails in the ‘sent’ folders might give a clue).

In this tut, I will explain the process of side jacking thru various tools with special focus on Hamster and FerretDisclaimer: Only for educational purposes

Contents:
I. SideJacking without hamster
-Ethereal/Wireshark, Cain And Abel, Network Miner

II SideJAcking with Hamster and Ferret
-Preparation
-Starting Up
-Using the console

I. Sidejacking without Hamster
All you need to do in order to sidejack is sniff cookies off the wire and edit cookies. This can be done with a wide variety of tools.

You should be comfortable with using a packet-sniffer like Wireshark/Ethereal. For example, the following is a screenshot of sniffing the cookie for Slashdot:

Another useful tool is an extension for Firefox called “Edit Cookies”. The following screens show what it looks like:

Once you can make your cookies the same in the browser that you sniffed from the wire, then you have sidejacked the person’s session. Note that the above information is correct, so that you can successfully sidejack our Slashdot test

You can use this erethreal method, another method can be using cain and abel, network miner and cookie editor which you can read here -> http://tinypaste.com/2b87c2
I am avoiding pasting that part here to focus on hamster and ferret.

II. Sidejacking without hamster and ferret
Now as you saw above the above process was quite cumbersome, especially if u want to repeatedly attack different users this would take a lot of time, to delete old cookies, try new ones and check. Also reading the erethreal dump is not easy hence, hamster is our wizard. So starting with it--->
Part A: Setting UP
Download HAmster and Ferret tools Here
http://rapidshare.com/files/381668823/ham.rar
These are command line tools, but for those afraid of command line, dont worry, u wont have to do much.
Unzio these into a directory that u can goto easily e.g. C:\hamster

Note:There is one major problem with the Intel® PRO/Wireless 2200BG and some other intel adapters: it doesn’t do promiscuous mode. This means that unlike most other wifi adapters, you can’t use it for sidejacking. To get around this, you would need to buy a cheap USB wifi adapter (usually 1000 rs)

First step is to set you’re a browser’s proxy to Hamster, which will be on port 3128. I strongly recommend that you DON’T use your normal browser, because Hamster totally screws up the cookies in the browser. There are 3 options I have used:
1. used Internet Explorer for sidejacking, because Firefox is my default browser
2. created a second account called “hamster” on my computer, and did the browsing from that account
3. used the alternate “profile” feature of Firefox to have two profiles running at the same time

I'll explain the third step in detail now-->
Firefox allows two profiles to be running at the same time. You can launch them from the command line as follows:







You will have to use these at c:\Program Files\Mozilla Firefox\
The following screen will popup






Click on create profile, select any name.. Next tym u start mozilla use that one for hamster.
Now open your created profile inn Firefox, go to the [Tools / Options] menu. Select the [advanced] Tab, open Network tab under it. Under connections click on settings. Now set up as following:








Set your proxy as shown at the left hand side

and click ok.

Part B. Starting Up
To run Ferret, open command prompt ( In administrator mode is better):
Goto ferret directory (C:\ham for e.g) and type ferret-W.








Now choose your wifi or LAN interface (u can try using the company names or try again)
Now type ferret.exe –i to start sniffing cookies
e.g ferret -i 4 for above one

Note(Only for those who understand):
You might also want to capture packets at the same time:

ferret.exe –i 4 sniffer.mode=most sniffer.directory=\pcaps

The advantage of sniffing packets at the same time is that you can later replay them through Ferret in order to generate a hamster.txt. The cookies last for a long time. To run a packet capture, do something like:

ferret -r \pcaps\sniff-2007-08-04-eth.pcap
Open another command prompt without closing the previous one ( Run as Administrator necessary)
Go to hamster directory(C:\ham for e.g.)
type 'hamster' and enter to start hamster proxy.
Now if you have already done the browser configuration as above move on to next part.
else set the browser proxy to 127.0.0.1 port 3128.

Part C. Using it!!
Open your configure browser and got to http://hamster/ remember NO . com or www in the name.
(If you get server not found, you didnt set proxy correctly or you didnt start hamster in cmd)
Now u get this






As Ferret is running in the background, it will be updating this list. You’ll need to manually refresh it to see if any information has been added.

In the right-hand window, you’ll get a list of targets. Most targets will have just the IP address. Some will have additional identifying information that Ferret finds. This identifying information is only names associated with the IP address, it’s not cookie information.

When you click on an IP address, you “clone” it. At this point, all the cookie are set for that IP address. Keep that in mind – a lot of problems people have is because they set the current IP address to something else, thereby erasing the cookies of a site they want to access.

Cloning an IP address by clicking on it will cause the window to the left to be filled in, as in the following example:







You have three options here. You can view the raw cookies for this IP address (discussed below). You can click on a URL that has a HIGHER probability of being Sidejacked. Or you can choose from the URLs below, which have a lower probability of being Sidejacked.

At this point, just click the URL. For example, I clicked on the http://slashdot.org URL in the above example, and the following window popped up:




The name “sidejacking” in the mid-left of that screenshot is because I created a test account with the username of “sidejacking”. This shows how I’ve successfully cloned the cookies to get to that Slashdot account.

Clicking on the Gmail one, I get the following screen:

And here is the Facebook account:






FootNotes:
When things work well, its point-and-click. They don’t always work well.

The first thing that sucks is you have to figure out which interface to sniff on and make sure that you have a proper wifi adapter. I recommend downloading Wireshark and make sure that you’ve got the packet sniffing working with that product before you start Ferret.

Both Ferret and Hamster will crash or hang. You’ll be restarting the programs a lot. Right now, Ferret overwrites ‘hamster.txt’ every time it restarts, so if you’ve got a good session, make copies of it (or log to sniffer files, and recreate it).

The Hamster proxy is really slow. You’ll click on a link and have to wait patiently sometimes. Check the Hamster console window in order to see what’s going on.

Cloning sites is finicky. Sometimes you have to choose the right URL from the list, and choosing the wrong URL will cause the server to reset the cookies, locking you (and the original person) out from the account until a re-login. It takes practice to figure out what you can, and cannot, clone.

Finally, when the original session cookies expire, you can’t clone them. This is rarely a problem in a live environment, but if you work from capture files, it becomes more difficult.

Completed!!
That is all you gotta know... Now u can try messing up your wifi or LAN network, also works in some broadbands and internet connections like airtel.
Comments andqueries are welcome.
Thanks!!
Credits: Hamster Creator himself (I used his Help file along with my editing).

And The content in tinypaste part is from HF

0 comments: