Added Linux support (again)#70
Conversation
* Needs policykit installed (no need to manualy set permissions on backend)
…(that means radiotap header + 802.11 header + LLC + data) * Added __packed__ atribute on all structs that we map directly to the packet buffer (headers mostly). Without it compiler aligns their elements based on cpu/os etc to optimize performance and this can result bad mapping. On visual studio we use te __pragma(pack()) attribute (but haven't tested it, it should work).
|
Done ! Some instructions: Compile/Install: git submodule update --init grab build/firesheep.xpi and install it on firefox Setup a monitor interface: now you should see sessions from any open network your card can hear (not just the one you are connected) The first time you run it you should press "Start Capturing" and polkit will ask for your root password in order to set proper permissions to firesheep-backend. Then you'll be able to choose interfaces and play with it. If polkit doesn't work for you just do it manualy cd ~/.mozilla/firefox/wmv3s5gw.default/extensions/firesheep@codebutler.com/platform/Linux_x86-gcc3/ sudo ./firesheep-backend --fix-permissions |
|
Awesome, thanks for collecting this all into one commit. A few questions:
Thanks again, EDIT: Reviewed this right before your second commit, haven't had a chance to look through it yet. |
|
I'll work on pkg-config asap, haven't looked at it much (i have an x86_64 to test so no problem there). As for the polkit API yes there is one but it's complicated (plus I think we need to install a policy file on /etc/polkit) and i don't have much time right now to look at it. Polkit is the only desktop-independent way to do this without command line (works on both gnome/kde). I'll think of a way to handle the return code, as for the hardcoded path it shouldn't be a problem, all distros install pkexec on /usr/bin (but we can get it with "which pkexec" and use that instead I guess). Thanks for your work ;-) |
|
btw this is what --list-interfaces return, most of the time there is no description from pcap... I don't know if we should use devicekit but i'll look into it... |
|
DeviceKit is new and poorly documented, I'll go with HAL, everyone supports HAL. However i don't expect much on my system Network Manager, DeviceKit, HAL all report things like "WLAN interface" or "Networking Device" etc :P Something is probably missing... |
|
I finally figured out where the SDK was! (/usr/lib/xulrunner-devel-1.9.2.12/) However, when I "Make," it gives me a long string of errors. I figured I post the errors in pastebin rather than spamming this board. :) |
|
mon0 isn't coming up in preferences. Ideas to fix that? everything else went through, though I did have to run iw and ifconfig as root. dunno if that matters. Thanks so much for your work, this will be epic. :D |
|
oh. and after running everything, I was getting errors running make, so I couldn't grab your xpi so I used the one from the previous thread. would that make a difference? |
|
@Wyko I don't know if it will completely fix your problem by trying running: |
|
@FuegoFro That solved everything! It built perfectly and runs well. Thanks! I just have two questions: One; I was unable to get Firesheep to capture cookies from my network... until I decided to try changing the network from a WEP encrypted one to a totally unsecured network. Then it worked! Does Firesheep not work on WEP networks that you already have a key for? And question number two: Can Firesheep (used and built in the manner that you describe in the first post) catch logins from people not on your network, but on nearby networks? Because a minute or two after I opened my network publicly and I finally began to have Firesheep work, I also randomly caught a login from a stranger on facebook. I suppose she could have logged in to my network, but my router's security page don't see her as connected to my wireless AP. Is there an easy way to tell in linux who is connected to a particular wireless ap? Thanks for all of your help guys! |
|
It should pick up cookies from any wireless network your card can 'hear', is my understanding, so a nearby network you're not connected to, but could be, (unsecured network) would produce firesheep traffic. I'm not finding anything on google for my error: Making all in mozpopen can anyone help? |
1 similar comment
|
It should pick up cookies from any wireless network your card can 'hear', is my understanding, so a nearby network you're not connected to, but could be, (unsecured network) would produce firesheep traffic. I'm not finding anything on google for my error: Making all in mozpopen can anyone help? |
|
Incredible. It actually works. Do I need to recreate the mon0 interface every time I restart, though? |
|
I just woke up and finished with pkg-config stuff, no need to use --with-xulrunner-sdk anymore it's automaticaly detected, also pcap doesn't have pkg-config files but pcap-config instead. I couldn't find anything for boost though ;-( Also I'm almost done with getting interface descriptions from HAL (info.product) so we 'll have sane descriptions instead of wlan0. Policykit is next (hope i can find some time durring the weekend)... About the monitor interface: a) Your card should support it, for a list of supported cards/drivers visit wireless.kernel.org |
|
Oh also about the amd64 flag, it seems newer gcc versions removed it, amd64 was a generic flag to support both amd and intel 64bit cpus. I switched to -march=athlon64 -mtune=generic and wish it'll also work on 64bit intels. |
|
I still can't get it to compile though. |
|
I haven't pushed the changes yet, I'll do it later today. |
* Use pcap-config for pcap library paths * Use boost.m4 for boost library paths * Change -march to more generic 32bit and 64bit flags (note amd64 flag is gone on newer gcc versions)
|
@codebutler: Done with pkg-config stuff, xullrunner, pcap (through pcap-config) and boost (through boost.m4) all ready ! ;-) Tested on x86 (Gentoo) and x86_64 (Ubuntu). It should work on windows too but i can't test it (i was more optimistic on OS X but I also can't test it) ;-( @ALL no need for --with-xulrunner-sdk anymore plus it'll tell you when you don't have a required lib. |
|
Nice work mickflemm! I really want to try your software, but how do I remove the version of michajlo? I am just making the transition from Windows to linux and I have no clue about how this works. I normally install software with 'sudo apt-get instal [name]' and remove it with 'sudo apt-get remove [name]'. Download sources and compile it was kind of new to me, but remove software is another thing. How does it work? |
|
Note, you must disable the default firefox apparmor profile or it won't let the plugin run. |
|
Just follow the instructions on the first post but instead of ./autogen.sh --with-xulrunner-sdk="path to xulrunner sdk" just type ./autogen.sh. Also make sure you have the following packages: autoconf |
…lter is set but let's be safe) * Silence compiler (init ip and ipv6 structs to NULL)
|
Works like a charm. Brilliant! :) |
|
I have tested on archlinux x86_64 (2.6.35-ARCH) with "Ralink RT2870" wireless usb adaptor and it works... |
|
Thanks for your work, mickflemm ! I get an error runing the autogen : "No package 'hal' found So the makefile is not created and make will not run... I checked /usr/lib/pkgconfig : hal.pc is missing, and I haven't a clue how to create it. |
|
As I understand it, most people only set 1 wep key index which means that firesheep should be able to hear another wireless client and decrypt it's traffic even on a wep secured network (if you could call it that) in that event. |
|
I get an error with firesheep-backend on CentOS5: ./firesheep-backend --fix-permissions./firesheep-backend --list-interfacesterminate called after throwing an instance of 'std::logic_error' It tried as sudo user and root, no difference |
|
I created an account just to tell the developers that they are geniuses. Thanks this has been a fun learning experience for someone new to Linux. |
|
Could someone please compile and post this. I'm using backtrack 4 and cant get the latest xulrunner, so it wont compile. |
|
My trouble is coming from the adding monitor part. I'm fairly new to Linux and may be missing something simple, but here is what I am entering into terminal as well as what is being returned: I enter: :~$ sudo iw wlan0 interface add mon0 type monitor and I am getting back this message: command failed: Too many open files in system (-23) Can anyone explain to me what is going on and why? Thank you all very much. |
|
@ TrojanWin32 : About WEP : |
|
@ mickflemm : @ VoiceOfWisdom & bugbegone : Tell us if it works ! |
|
Through some searching and trickery (airmon-ng), I managed to get this from lo no wireless extensions. eth0 no wireless extensions. wlan0 IEEE 802.11bg Mode:Monitor Frequency:2.462 GHz Tx-Power=20 dBm mon0 IEEE 802.11bg Mode:Monitor Tx-Power=20 dBm ...which I thought was great, but I am unable to connect while wlan0 is in monitor mode, so I turned that back to managed mode and left mon0 the way it is. Seemed like it should have worked, but there is still nothing under interfaces on F/sheep. Am I even close? |
|
Using Raa42's xpi I was able to install the addon. However whenever I run the fix permission thing I get this error "./firesheep-backend: /usr/lib/libstdc++.so.6: version 'GLIBCXX_3.4.11' not found (required by ./firesheep-backend)". |
|
hey, getting an iw error on my brand new laptop.... :-\ one I didn't get on the other machine. nl80211 not found. From googling furiously I find that this means I don't have the driver. However, under administration there is a windows wireless drives option, and I know where the windows drivers are stored (dual booting). Can I run through the drivers till I find one that works? |
|
@ VoiceOfWisdom : |
|
Whenever I run "sudo apt-get install libstdc++6" I get the message "libstdc++6 is already the newest version". And the whenever I try to run "sudo apt-get install libstdc++6-4.4-dev" it cant find it. |
|
Okay I did a search of my apt-cache and found that the latest version of libstdc++ is 6-4.3 . Is there any way I can get the latest version for backtrack? |
|
Just a quick heads up for Ubuntu users. I needed the following packages to make it compile and run on Ubuntu 10.10 amd64: |
|
When running "iw wlan0 interface add mon0 type monitor" I get nl80211 not found, which I guess relates to it not supporting 802.11 monitor interfaces (yet) |
|
@ Raa42 Your xpi works out of the box for me. Acer Laptop, 10.04 lts and a built in atheros wireless card that runs on MadWifi drivers. Installed your xpi ifconfig ath0 down both ath0 and ath1 was created sudo ifconfig ath1 up sudo firefox (will fix permissions after writing this) Then point firesheep to ath1 in preferences. Thanks a lot man! |
|
@Raa42 [Javascript Application] And I can't choose any interfaces, since none show up. wifi card in monitor mode, running on BT4 any help appreciated! |
|
@joethetrader |
|
hal and libhal-dev installed. Still seeing same error. Any other suggestions? |
|
libpcap-dev and libboost-dev |
|
Those were also previously installed. No dice. |
|
Really don't know, I just have basic knowledge about linux, and are just result oriented, no science at all here. I use trial and error until I succeed. I will install BT4 on the kids machine and try it out there as well. If I succeed Iäll let you know |
|
Just installed it, and it works like a charm. |
|
I tried to put my wi fi card into monitor mode this way: but since that didnt work i did this cd ~/.mozilla/firefox/wmv3s5gw.default/extensions/firesheep@codebutler.com/platform/Linux_x86-gcc3/ changing my directories from his. however when i run this: sudo ./firesheep-backend --fix-permissions |
|
Hi, thought I would just join in and give my experience... I used Raa42's xpi. Installed it in firefox. I then closed Firefox, and then used sudo apt-get to download hal, libhal-dev, ibpcap-dev and libboost-dev |
|
I was able to build firesheep with the instructions here. I had to --fix-permissions in order to get interfaces to appear but they are there now. I get no results though when I start capturing, not from the same machine or from another test on the same network. I used airmon-ng to put the interface into monitor mode. I'm using the mon0 interface in firesheep. I'm using patched drivers on a WG111v3 USB. iwconfig shows monitor mode. If I set firesheep to my wlan0 interface (built in broadcom) I can pick up traffic from the local machine but nothing else. Did an injection test according to aircrack-ng but don't know how to test if the interface is picking up traffic. Any suggestions? |
|
I'm having trouble getting firesheep to compile on ubuntu 11.04. Here's dump from my ternimal: http://pastebin.ca/2040399 (In sort: make fails compiling firesheep/backend) I have made sure I have all the dependencies listed above, but maybe they changed in ubuntu 11.04. |
|
There is no 11.04. also, I can't get to your pastebin.ca link. Go through each of the steps above, and make sure you have xulrunner-dev. |
|
If Virtualbox is installed, Firesheep crashes with a HAL error: terminate called after throwing an instance of 'std::runtime_error' The solution is just to unload the Virtualbox network adapter module and all will be fine :D sudo rmmod vboxnetadp |
|
An update for newer versions of firefox is on the way ? |
I used michajlo's work and added Linux support from scratch fixing various autoconf/automake isues, adding policykit support etc. It works out of the box ;-)
Support for 802.11 monitor interfaces on the way...