Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added linux support #31

Closed
wants to merge 4 commits into from
Closed

Added linux support #31

wants to merge 4 commits into from

Conversation

michajlo
Copy link

Added basic linux support using what's available in libpcacp. I have it running on my laptop and i can see my sessions getting picked up, though i don't have an unencrypted network to test it on for external sessions, but I'm pretty confident it will work.

Note, you will need to run firesheep-backend --fix-permissions as root manually, I couldn't think of a common linux privilege escalating scheme except 'su'.

Finally, it shouldn't conflict with OSX or windows versions, though I don't have the environments handy to build and check.

@jeremysalwen
Copy link

Hi,

I've just built this plugin on Debian amd64 linux, with xulrunner 1.9.2 and iceweasel 3.6

I then ran sudo xul/platform/.../firesheep-backend --fix-permissions

After this, firesheep-backend would seem to run correctly. I then zipped the folder, and added it as a firefox plugin. On start, firefox segfaulted on

Program received signal SIGSEGV, Segmentation fault.
elf_dynamic_do_rela (scope=<value optimized out>, 
reloc_mode=<value optimized out>, consider_profiling=<value optimized out>)
at do-rel.h:120
120 do-rel.h: No such file or directory.
in do-rel.h

@kikov79
Copy link

kikov79 commented Oct 27, 2010

I did it by myself and it's pretty similar than yours... indeed, your seems better (I used ifstream("/proc/net/dev") to get the interfaces).
And I have the WEP thing too... try to reroute the traffic to your linux laptop from the other box to test it.

@codebutler
Copy link
Owner

Hi everyone,

Thanks for working on this!

For elevating privileges check out PolicyKit, I believe its designed for this exactly.
http://hal.freedesktop.org/docs/PolicyKit/

@michajlo
Copy link
Author

@jeremysalwen - Sorry I should have been more clear, I had to run firesheep-backend --fix-permissions once it was installed (cd ~/.mozilla/firefox/......./Linux_x86_64-gcc3; sudo ./fireshee-backend --fix-permissions). I also just installed the xpi file that the makefile generated, in build. Maybe see if that works?

I'll try to check out PolicyKit tomorrow.

@jeremysalwen
Copy link

@michajlo

After running it from the right place, I can get firesheep-backend to start dumping local cookies (although tcpdump also only seems to be noticing local traffic even on unencrypted wifi, so that seems right). However, I still get the same segfault.

@bassman998
Copy link

I've also managed to get firesheep-backend to work properly on Linux (Backtrack 4). However, the actual firefox extension gives an error about "Cc is not defined." It looks like it uses a component called MozPopen to read the output of the backend, and I haven't been able to get that to compile. Has anyone had any luck with that part?

@michajlo
Copy link
Author

@bassman998 Perhaps it's missing dependencies? I had to install xulrunner-devel, and the firefox development libraries, then build using ./autogen --with-xulrunner-sdk=/path/to/xulrunner-dev && CPATH=/path/to/nspr make. On my machine these paths were /usr/lib/xulrunner-devel-??? and /usr/include/nspr, respectively.

@jeremysalwen Do you have any more details on the crash?

I'll try to upload my resultant xpi file this evening.

@bassman998
Copy link

@michajlo - I built using ./autogen.sh --with-xulrunner-sdk=/path/to/xulrunner-sdk && make. The resultant Makefile for MozPopen had no targets, and the unix version of MozPopenProcess.cpp includes a header file named MozPopen.h which doesn't appear to exist. For some reason, MozPopen.h is listed in .gitignore and therefore isn't in the source.

I'm curious as to how anyone has managed to get the extension working in Linux, since as far as my limited knowledge can tell, it's impossible without MozPopen, which is impossible to compile without MozPopen.h.

@michajlo
Copy link
Author

@bassman998 MozPopen.h is generated by the Makefile using xpidl (see mozpopen/Makefile.am). There is likely an earlier error, do you have any output?

@jnew
Copy link

jnew commented Oct 27, 2010

@michajlo The xpi you posted earlier today is giving a permission denied error when I attempt to download it.

@bhankins
Copy link

@bassman998 I think you may be having a problem with nspr header files. Is this fedora by the way?

@michajlo
Copy link
Author

@jnew Hmmm, thought that upload failed... might have only been partial/corrupted. I'll re-upload next time I get on my linux machine.

@bassman998
Copy link

@michajlo I don't have any previous experience with automake, and I neglected to add a PLATFORM_LINUX section to mozpopen/Makefile.am. Without that, there weren't any errors, the mozpopen Makefile was left without any targets, and make quietly skipped that folder since there was nothing to do. Everything compiled fine, but didn't run so well. Compiles fine now, with MozPopen. Thanks for pointing me in the right direction.

@jnew
Copy link

jnew commented Oct 27, 2010

@bassman998 Could you explain what you modified in the makefile? Make skips mozpopen when I run it too.

@michajlo
Copy link
Author

PLATFORM_LINUX should already be in there... see http://github.com/michajlo/firesheep/blob/master/mozpopen/Makefile.am. Are there any warnings/errors during autogen? Try a make clean first?

Also, I just reuploaded the XPI which can save you the compiling. Once installed in firefox you'll need to navigate to the firesheep-backend in ~/.mozilla/firefox/... (forget the exact locations) and run it with fix-permissions as root.

@jnew
Copy link

jnew commented Oct 27, 2010

@michajlo Thanks! However, I did have to add "em:targetPlatformLinux_x86-gcc3/em:targetPlatform" to install.rdf for it to work. I guess my platform is identified as such.

@jnew
Copy link

jnew commented Oct 27, 2010

Ok, when I run fix permissions as root, I'm getting this error: ./firesheep-backend: 1: Syntax error: "(" unexpected. And, when I open the extension I get the Cc error. Is there something I missed?

@jeremysalwen
Copy link

@michajlo

here's the full backtrace:

Program received signal SIGSEGV, Segmentation fault.
elf_dynamic_do_rela (scope=<value optimized out>, 
reloc_mode=<value optimized out>, consider_profiling=<value optimized out>)
at do-rel.h:120
120 do-rel.h: No such file or directory.
in do-rel.h
(gdb) backtrace
\#0  elf_dynamic_do_rela (scope=<value optimized out>, 
reloc_mode=<value optimized out>, consider_profiling=<value optimized out>)
at do-rel.h:120
\#1  _dl_relocate_object (scope=<value optimized out>, 
reloc_mode=<value optimized out>, consider_profiling=<value optimized out>)
at dl-reloc.c:268
\#2  0x00007ffff7df0d23 in dl_open_worker (a=<value optimized out>) at dl-open.c:367
\#3  0x00007ffff7dec5e6 in _dl_catch_error (objname=<value optimized out>, 
errstring=<value optimized out>, mallocedp=<value optimized out>, 
operate=<value optimized out>, args=<value optimized out>) at dl-error.c:178
\#4  0x00007ffff7df060a in _dl_open (
file=0x7fffe2df2708 "/home/jeremy/.mozilla/firefox/59nnkup9.default/extensions/firesheep@codebutler.com/platform/Linux_x86_64-gcc3/components/MozPopen.so", 
mode=-2147483647, caller_dlopen=0x7ffff25e2e49, nsid=-2, argc=1, argv=0x22, 
env=0x7ffff6d6e140) at dl-open.c:583
\#5  0x00007ffff7bdbf66 in dlopen_doit (a=<value optimized out>) at dlopen.c:67
\#6  0x00007ffff7dec5e6 in _dl_catch_error (objname=<value optimized out>, 
errstring=<value optimized out>, mallocedp=<value optimized out>, 
operate=<value optimized out>, args=<value optimized out>) at dl-error.c:178
\#7  0x00007ffff7bdc2ec in _dlerror_run (operate=0x7ffff7bdbf00 <dlopen_doit>, 
args=0x7fffffff7d20) at dlerror.c:164
\#8  0x00007ffff7bdbee1 in __dlopen (file=<value optimized out>, 
mode=<value optimized out>) at dlopen.c:88
\#9  0x00007ffff25e2e49 in ?? () from /usr/lib/libnspr4.so.0d
\#10 0x00007ffff25e2f50 in PR_LoadLibrary () from /usr/lib/libnspr4.so.0d
\#11 0x00007ffff64ab2f0 in nsLocalFile::Load (this=<value optimized out>, 
_retval=0x7fffe23a3058) at ../../../xpcom/io/nsLocalFileUnix.cpp:1575
\#12 0x00007ffff64b4957 in nsNativeModuleLoader::LoadModule (
this=<value optimized out>, aFile=0x7fffe2d46a40, aResult=0x7fffffff8340)
at ../../../xpcom/components/nsNativeComponentLoader.cpp:159
\#13 0x00007ffff64b0da3 in nsComponentManagerImpl::AutoRegisterComponent (
this=0x7ffff6dd2140, aComponentFile=0x7fffe2d46a40, aDeferred=..., 
minLoader=-1) at ../../../xpcom/components/nsComponentManager.cpp:3113
\#14 0x00007ffff64b1449 in nsComponentManagerImpl::AutoRegisterDirectory (
this=<value optimized out>, inDirSpec=<value optimized out>, aLeftovers=..., 
aDeferred=...) at ../../../xpcom/components/nsComponentManager.cpp:3046
\#15 0x00007ffff64b158a in nsComponentManagerImpl::AutoRegisterImpl (
this=0x7ffff6dd2140, inDirSpec=0x7fffe2d46b00, aLeftovers=..., aDeferred=...)
at ../../../xpcom/components/nsComponentManager.cpp:2915
\#16 0x00007ffff64b22df in nsComponentManagerImpl::AutoRegister (
this=0x7ffff6dd2140, aSpec=0x0)
at ../../../xpcom/components/nsComponentManager.cpp:3435
\#17 0x00007ffff648eb74 in NS_InitXPCOM3_P (result=<value optimized out>, 
binDirectory=<value optimized out>, 
appFileLocationProvider=<value optimized out>, 
staticComponents=<value optimized out>, componentCount=<value optimized out>)
at ../../../xpcom/build/nsXPComInit.cpp:773
\#18 0x00007ffff5bdb910 in ScopedXPCOMStartup::Initialize (this=0x7fffffff8d70)
at ../../../toolkit/xre/nsAppRunner.cpp:1119
\#19 0x00007ffff5bde7e4 in XRE_main (argc=<value optimized out>, 
argv=<value optimized out>, aAppData=<value optimized out>)
at ../../../toolkit/xre/nsAppRunner.cpp:3283
\#20 0x00000000004024e5 in ?? ()
\#21 0x00007ffff7368c4d in __libc_start_main (main=<value optimized out>, 
argc=<value optimized out>, ubp_av=<value optimized out>, 
init=<value optimized out>, fini=<value optimized out>, 
rtld_fini=<value optimized out>, stack_end=0x7fffffffe848) at libc-start.c:228
\#22 0x0000000000401cb9 in ?? ()
\#23 0x00007fffffffe848 in ?? ()
\#24 0x000000000000001c in ?? ()
\#25 0x0000000000000001 in ?? ()
\#26 0x00007fffffffeaf1 in ?? ()
\#27 0x0000000000000000 in ?? ()

@michajlo
Copy link
Author

@jnew Since the XPI was compiled on x86_64, I think firefox is having a hard time with the shared object. You'll probably have to compile for your platform, and in configure.ac, and the Makefile.am's change any occurences of x86_64 to x86.

@jeremeysalwen Is this from the one you compiled yourself or the xpi I uploaded?

@jnew
Copy link

jnew commented Oct 27, 2010

@michajlo Ok. I changed all occurrences to x86, then attempted to compile. I hit some errors. I'm not exactly the most experienced, so I'll put the output here and if possible, could someone point out a mistake?

john@john-1005HA:~/Desktop/michajlo-firesheep-9bf5b15$ ./autogen.sh --with-xulrunner-sdk=/usr/lib/xulrunner-devel-1.9.2.11
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf2.50 line 196.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf2.50 line 196.
autoreconf2.50: Entering directory `.'
autoreconf2.50: configure.ac: not using Gettext
autoreconf2.50: running: aclocal --force 
autoreconf2.50: configure.ac: tracing
autoreconf2.50: configure.ac: not using Libtool
autoreconf2.50: running: /usr/bin/autoconf --force
autoreconf2.50: configure.ac: not using Autoheader
autoreconf2.50: running: automake --add-missing --copy --force-missing
configure.ac:29: installing `./config.guess'
configure.ac:29: installing `./config.sub'
configure.ac:25: installing `./install-sh'
configure.ac:25: installing `./missing'
automake: SOURCES was already defined in condition PLATFORM_LINUX, which is included in condition TRUE ...
mozpopen/Makefile.am:19: ... `SOURCES' previously defined here
autoreconf2.50: Leaving directory `.'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... none
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for xpidl... /usr/lib/xulrunner-devel-1.9.2.11/bin/xpidl
configure: creating ./config.status
config.status: creating Makefile
config.status: creating backend/Makefile
config.status: creating mozpopen/Makefile
config.status: executing depfiles commands

john@john-1005HA:~/Desktop/michajlo-firesheep-9bf5b15$ CPATH=/usr/include/nspr makeMaking all in mozpopen
make[1]: Entering directory `/home/john/Desktop/michajlo-firesheep-9bf5b15/mozpopen'
mkdir -p ../xpi/components
/usr/lib/xulrunner-devel-1.9.2.11/bin/xpidl -m typelib -I /usr/lib/xulrunner-devel-1.9.2.11/idl -e ../xpi/components/MozPopen.xpt MozPopen.idl
/usr/lib/xulrunner-devel-1.9.2.11/bin/xpidl -m header -I /usr/lib/xulrunner-devel-1.9.2.11/idl -e MozPopen.h MozPopen.idl
mkdir -p ../xpi/platform/Linux_x86-gcc3/components
g++ -shared -fno-rtti -fPIC MozPopenModule.cpp unix/MozPopenProcess.cpp  -Iunix/ -I. -fshort-wchar -I/usr/lib/xulrunner-devel-1.9.2.11/include -L/usr/lib/xulrunner-devel-1.9.2.11/lib -L/usr/lib/xulrunner-devel-1.9.2.11/bin -Wl,-executable_path,/usr/lib/xulrunner-devel-1.9.2.11/bin/xulrunner-bin -lxpcomglue_s -lxpcom -lplds4 -lplc4 -lnspr4 -lpthread -ldl -o ../xpi/platform/Linux_x86-gcc3/components/MozPopen.so
/usr/bin/ld: warning: cannot find entry symbol xecutable_path; defaulting to 00000000000062e0
make[1]: Leaving directory `/home/john/Desktop/michajlo-firesheep-9bf5b15/mozpopen'
Making all in backend
make[1]: Entering directory `/home/john/Desktop/michajlo-firesheep-9bf5b15/backend'
make[1]: *** No rule to make target `deps/http-parser/http_parser.c', needed by `../xpi/platform/Linux_x86-gcc3/firesheep-backend'.  Stop.
make[1]: Leaving directory `/home/john/Desktop/michajlo-firesheep-9bf5b15/backend'
make: *** [all-recursive] Error 1

@michajlo
Copy link
Author

@jnew You need to get the http-parser dependency, do 'git submodule update --init'. Also, won't hurt to install libtool.

@jeremysalwen
Copy link

@michaejlo

This is from my compilation. The download you posted allows firefox to load, but gives the undefined reference error "Cc" when I click on preferences.

@jnew
Copy link

jnew commented Oct 27, 2010

@michajlo Alrighty, that's done. Thanks for all the help so far. However, make failed again. Here's an excerpt. I should probably mention this is my first time using git, so I'm learning a ton in the process hahaha.

john@john-1005HA:~/firesheep$ CPATH=/usr/include/nspr make
Making all in mozpopen
make[1]: Entering directory `/home/john/firesheep/mozpopen'
mkdir -p ../xpi/components
/usr/lib/xulrunner-devel-1.9.2.11/bin/xpidl -m typelib -I /usr/lib/xulrunner-devel-1.9.2.11/idl -e ../xpi/components/MozPopen.xpt MozPopen.idl
/usr/lib/xulrunner-devel-1.9.2.11/bin/xpidl -m header -I /usr/lib/xulrunner-devel-1.9.2.11/idl -e MozPopen.h MozPopen.idl
mkdir -p ../xpi/platform/Linux_x86-gcc3/components
g++ -shared -fno-rtti -fPIC MozPopenModule.cpp unix/MozPopenProcess.cpp  -Iunix/ -I. -fshort-wchar -I/usr/lib/xulrunner-devel-1.9.2.11/include -L/usr/lib/xulrunner-devel-1.9.2.11/lib -L/usr/lib/xulrunner-devel-1.9.2.11/bin -Wl,-executable_path,/usr/lib/xulrunner-devel-1.9.2.11/bin/xulrunner-bin -lxpcomglue_s -lxpcom -lplds4 -lplc4 -lnspr4 -lpthread -ldl -o ../xpi/platform/Linux_x86-gcc3/components/MozPopen.so
/usr/bin/ld: warning: cannot find entry symbol xecutable_path; defaulting to 00000000000062e0
make[1]: Leaving directory`/home/john/firesheep/mozpopen'
Making all in backend
make[1]: Entering directory `/home/john/firesheep/backend'
mkdir -p ../xpi/platform/Linux_x86-gcc3
rm -f ../xpi/platform/Linux_x86-gcc3/firesheep-backend
g++ -DHAVE_STDARG_H -Wall -include src/config.h -g   -DPLATFORM_LINUX -lpcap -I deps/ -I deps/http-parser -I deps/json_spirit       -o ../xpi/platform/Linux_x86-gcc3/firesheep-backend src/main.cpp src/http_sniffer.cpp src/http_packet.cpp deps/http-parser/http_parser.c   src/linux_platform.cpp
In file included from src/http_sniffer.hpp:28,
                 from src/main.cpp:23:
src/http_packet.hpp:30: fatal error: boost/algorithm/string.hpp: No such file or directory
compilation terminated.
src/http_sniffer.cpp:4: fatal error: boost/format.hpp: No such file or directory
compilation terminated.
In file included from src/http_packet.cpp:23:
src/http_packet.hpp:30: fatal error: boost/algorithm/string.hpp: No such file or directory
compilation terminated.
src/linux_platform.cpp:24: fatal error: pcap/pcap.h: No such file or directory
compilation terminated.
make[1]: *** [../xpi/platform/Linux_x86-gcc3/firesheep-backend] Error 1
make[1]: Leaving directory`/home/john/firesheep/backend'
make: **\* [all-recursive] Error 1

@jeremysalwen
Copy link

@jnew

You most likely need to install libpcap-dev and libboost-dev

@jnew
Copy link

jnew commented Oct 27, 2010

@jeremysalwen That did it. Thanks! Everything is working as far as I can see.

@bassman998
Copy link

It works!!

I decided to start fresh with the code from michaejlo's branch. From there, I had to make some changes from x86_64 to x86. After that, it compiled and loaded into Firefox, but caused Firefox to crash. I noticed that when make tried to build MozPopen.so, it was returning a warning.

mkdir -p ../xpi/platform/Linux_x86-gcc3/components
g++ -shared -fno-rtti -fPIC MozPopenModule.cpp unix/MozPopenProcess.cpp  -Iunix/ -I. -I/root/xulrunner-sdk/sdk/include -fshort-wchar -I/root/xulrunner-sdk/include -L/root/xulrunner-sdk/lib -L/root/xulrunner-sdk/bin  -Wl,-executable_path,/root/xulrunner-sdk/bin/xulrunner-bin -lxpcomglue_s -lxpcom -lplds4 -lplc4 -lnspr4 -lpthread -ldl -o ../xpi/platform/Linux_x86-gcc3/components/MozPopen.so
/usr/bin/ld: warning: cannot find entry symbol xecutable_path; defaulting to 0000000000008060

It looked like the "-Wl,-executable_path,/root/xulrunner-sdk/bin/xulrunner-bin" portion was telling it to use xecutable_path as the entry point, so I deleted that from the Makefile, since I couldn't tell where it was coming from in the autogen process. Now it compiles, loads, and captures.

@jeremysalwen
Copy link

After manually deleting xpi/platform/linux.../MozPopen.so (make clean does not delete it), I got it to actually rebuild the entire plugin. However, I noticed the same warning bassman had. I made the same changes he did, and it compiled without warning.

Now it seems to be working. I am able to capture local ethernet cookies. However, it doesn't seem to be listing my wifi device. It instead has a blank name under the preferences tab. I will have to test if that blank entry will really work with my wifi card.

@jnew
Copy link

jnew commented Oct 27, 2010

Have we established the ability to capture external sessions? I just tested with an open network, and I was not able to capture any but my own. I have an Atheros card in an Eee 1005ha, fairly certain it supports promiscuous mode.

@jeremysalwen
Copy link

@jnew From what I can tell, I think you need to put it in monitor mode to capture other computers' packets, but then you will be unable to access the network yourself. To put your card into monitor mode, do
sudo iwconfig wlan0 mode monitor
sudo ifconfig wlan0 up

@FuegoFro
Copy link

FuegoFro commented Nov 4, 2010

I wrote a tutorial-for-dummies to install this on a linux system, aimed specifically at Ubuntu (because that's what I'm on). I tested it from scratch on a fresh install of Ubuntu 10.10 64-bit, and it works, but Its pretty long so I'm not sure if I should post it here. If not, I'm not sure what a better place would be for it.

@falseteeth
Copy link

@FuegoFro Upload it to some site like www.pastebin.com if you don't own your own. Just paste the link here.

@FuegoFro
Copy link

FuegoFro commented Nov 4, 2010

@falseteeth Thanks for that site!

Here is the tutorial I made. Hope some people find it useful!
http://pastebin.com/mDBm6jyD

@Kamek
Copy link

Kamek commented Nov 4, 2010

@FuegoFro, concise guide man however I still have two problems.

  1. When compiling MozPopen I still get this erro:
    /usr/bin/ld: warning: cannot find entry symbol xecutable_path; defaulting to 00000000000062e0
  2. After compilation I open the prefs and get the Cc error as well as other errors when opening other dialogs, and no interfaces shown.

@michajlo, I finally had time to try your suggestions here is the output of the commands you suggested:
objdump -a MozPopen.so

MozPopen.so: file format elf32-i386

ldd MozPopen.so

            linux-gate.so.1 =>  (0xb770b000)
/usr/lib/xulrunner-devel-1.9.2.12/bin/xulrunner-bin (0xb76e2000)
libxpcom.so => not found
libplds4.so => /usr/lib/libplds4.so (0xb76ca000)
libplc4.so => /usr/lib/libplc4.so (0xb76c5000)
libnspr4.so => /usr/lib/libnspr4.so (0xb7691000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7677000)
libdl.so.2 => /lib/libdl.so.2 (0xb7673000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7586000)
libm.so.6 => /lib/libm.so.6 (0xb755f000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7543000)
libc.so.6 => /lib/libc.so.6 (0xb73e5000)
libmozjs.so => not found
libxpcom.so => not found
libxul.so => not found
libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb7014000)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xb6ff9000)
libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0xb6f0d000)
libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb6ee7000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb6e6f000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb6e3f000)
libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb6da8000)
libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0xb6d9c000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb6d83000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb6d40000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb6c8d000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb6c4b000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb6c47000)
libpng12.so.0 => /lib/libpng12.so.0 (0xb6c22000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb6c1c000)
librt.so.1 => /lib/librt.so.1 (0xb6c13000)
libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0xb6b44000)
libstartup-notification-1.so.0 => /usr/lib/libstartup-notification-1.so.0 (0xb6b3b000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb6a1e000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb6a0d000)
libasound.so.2 => /usr/lib/libasound.so.2 (0xb6947000)
/lib/ld-linux.so.2 (0x002ad000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb693d000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb6939000)
libXi.so.6 => /usr/lib/libXi.so.6 (0xb692b000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb6923000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb6918000)
libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0xb6914000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb6910000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb690a000)
libz.so.1 => /lib/libz.so.1 (0xb68f5000)
libpcre.so.3 => /lib/libpcre.so.3 (0xb68bf000)
libresolv.so.2 => /lib/libresolv.so.2 (0xb68ab000)
libselinux.so.1 => /lib/libselinux.so.1 (0xb688f000)
libexpat.so.1 => /lib/libexpat.so.1 (0xb6868000)
libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0xb6807000)
libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0xb6803000)
libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0xb67fb000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb67e1000)
libxcb-aux.so.0 => /usr/lib/libxcb-aux.so.0 (0xb67dd000)
libxcb-event.so.1 => /usr/lib/libxcb-event.so.1 (0xb67d8000)
libxcb-atom.so.1 => /usr/lib/libxcb-atom.so.1 (0xb67d3000)
libSM.so.6 => /usr/lib/libSM.so.6 (0xb67ca000)
libICE.so.6 => /usr/lib/libICE.so.6 (0xb67b1000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb67ac000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb67a6000)
libuuid.so.1 => /lib/libuuid.so.1 (0xb67a1000)

Everything appears ok to me, any suggestions?

@Wyko
Copy link

Wyko commented Nov 4, 2010

@FuegoFro

Forgive me, but I am entirely new to the realm of linux and am trying to follow your instructions. When I run your first line of code in the terminal ("sudo apt-get install build-essential autotools-dev automake autoconf git xulrunner-1.9.2-dev libpcap-dev libboost-dev aircrack-ng") I get this message:

Package git is not available, but is refered to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source.
E: Package git has no installation candidate

What should I do?

@jimbauwens
Copy link

I am using bassman998 xpi on my acer aspire one (maverick, firefox 3.6). It works good, captures my data and data of other people using arpspoofing. I have the same problem that it doesn't work in monitor mode, but that isn't really bothering me. The xpi doesn't work in firefox 4, it gives you a cc error, so I was thinking that the cc errors other people here are getting might be because of a wrong firefox version.

@falseteeth
Copy link

@jimbauwens It is NOT designed to only capture other people's data with ARP spoofing. Yours is not working properly.

@michajlo
Copy link
Author

michajlo commented Nov 4, 2010

@falseteeth I wouldn't go so far as to say that firesheep is not working properly, it seems to be doing exactly what the code intends. It helps you pick an interface, anything that will have ethernet headers, and then passes that interface to http_sniffer, which does the session reconstruction. Firesheep backend sends these reconstructed sessions to firefox via mozpopen, where they are searched for session cookies.

That interface can be anything as long as pcap can open it. I'm fairly certain that the reason people are having trouble with their interfaces not picking up all traffic is not firesheeps fault, but something to do with some obscure kernel settings, other processes mucking with the wireless card, or some hardware feature (my next stop is to start checking datasheets).

@mickflemm If your modifications do what it sounds like they do, that's awesome :)

@jamesadney
Copy link

@Wyko Try changing "git" to "git-core".

@mickflemm
Copy link
Contributor

@michajlo how can i send them to you ?

@FuegoFro
Copy link

FuegoFro commented Nov 4, 2010

@Kamek I didn't run into that problem when I tested the tutorial on a fresh install so I don't have first hand info, but if you look earlier in this thread you'll find that bassman998 was able to fix this issue by deleting the offending line (eg.: -Wl,-executable_path,/usr/lib/xulrunner-devel-1.9.2.12/bin/xulrunner-bin) from the "Makefile" file (note that that's different from "Makefile.am").
Just a side note, try searching through the tread before you post about something. We're welcome to help you, but you also need to do some work and try to help yourself first.

@falseteeth
Copy link

Can someone go into detail and explain where I'm supposed to find MozPopen.so? I do not see a file named that anywhere in my Firesheep folder. Does this mean it didn't install/compile properly?

@mickflemm
Copy link
Contributor

A few infos on what i've done...

I changed firesheep-backend to use 802.11 monitor interfaces with radiotap headers (mac80211 provides this, just use iw command to add it and give it the same ip with your wlan -it won't send or receive anything so no problem, if you have one use route command to clean it up-). The thing is that monitor interfaces don't provide ethernet packets that firesheep-backend can handle, they provide raw 802.11 frames with radiotap header and SNAP encapsulation so I had to change the code to accept monitor interfaces and deal with different headers etc (802.11 header is of variable length) and malformed packets (I skip all header checks for now but I have to add some error checking stuff). My current code is prety nasty and i don't have much time to clean it up, I just wanted to see that it works and after it did (and I got all fb accounts on the local hotspot -notifying their owners to use ToR-) i left it.

Using monitor interfaces you can get packets from any open wireless network your card can see, it's not like promisc mode when you see only packets on your own network.

@cromadon
Copy link

cromadon commented Nov 4, 2010

I am having a similar problem as Kamek.

  • getting the "ReferenceError: Cc is not defined" on opening the preferences.
  • list of interfaces is empty
  • "start capturing" does nothing
  • No compilation errors.
  • "sudo ./firesheep-backend --list-interfaces" seems to work correct in listing all interfaces with names

@Kamek did u solve that problem?

@Gardn
Copy link

Gardn commented Nov 4, 2010

@mickflemm

Brilliant. Now, I'm a little lost in using iw after installing. Which command did you run and how? I don't want to break it, an I can see where to plug in the wlan0 device, but I'm not sure how it connects to the firesheep backend. Can you give us some more specifics? Messy code is fine, if it runs. ;)

@Gardn
Copy link

Gardn commented Nov 4, 2010

@Kamek, cromadon

This was talked about above. You did not symlink the libraries from the /.mozilla/firefox-[version]... /lib/ foler to the /usr/lib folder. you also need to fix permissions on the firesheep-backend to get the interfaces.

@Gardn
Copy link

Gardn commented Nov 4, 2010

General question:
I just bough a 64 bit machine. When I get Ubuntu 10.10 running, will I have to deviate from these directions to get it running?

@Wyko
Copy link

Wyko commented Nov 4, 2010

I am having a similar problem as Kamek.

* getting the "ReferenceError: Cc is not defined" on opening the preferences.
* list of interfaces is empty
* "start capturing" does nothing
* No compilation errors.
* "sudo ./firesheep-backend --list-interfaces" seems to work correct in listing all interfaces with names

Same here.

@Kamek
Copy link

Kamek commented Nov 4, 2010

@FuegoFro, wow that from a guy who couldn't git clone a repo. I'm stunned. bassman was unclear in his post about what he changed and where he changed it, so I was asking for clarification. It seemed to me as if he was saying to only take out the -executable_path to me, as all he said was this "part" and that executable_path was messing something up. I'll rtfm if you will.

@Kamek
Copy link

Kamek commented Nov 4, 2010

@cromadon, no sorry I haven't had alot of time lately. Hopefully I'll mess with it this weekend.

@FuegoFro
Copy link

FuegoFro commented Nov 4, 2010

@Kamek Point taken. I'm sorry, I didn't mean to be rude.

@falseteeth
Copy link

@FuegoFro I used your guide, followed every instruction, and I run ./firesheep-backend at0 tcp 80, but it still only shows packets sent to/from my computer. What am I doing wrong?

My card fully supports monitor mode (and packet injection) by the way.

I also ran dmesg, and at0 is indeed entering promiscuous mode. It's not picking up anything from anyone else, though.

@mickflemm
Copy link
Contributor

btw @executable_path is only used on Mac OS X as far as i know, it's the place where it expects to find XUL library (binary). I tried to compile firesheep on 10.4 but with no luck... I'm cleaning up the code and i'll post them so you can test.

@Kamek
Copy link

Kamek commented Nov 4, 2010

@FuegoFro, no problem. I didn't see the part about symlinking the lib's to /usr/lib, is there any way you could update your guide to include this? Sorry to be a dick, it's been a long day. I was thinking perhaps someone should make a forum or something where we can discuss this, as this page is getting way too unorganized.

@mickflemm
Copy link
Contributor

I used michajlo's work and added Linux support from scratch fixing various autoconf/automake isues, adding policykit support etc.

Instructions:
git clone git://github.com/mickflemm/firesheep.git
cd firesheep
./autogen.sh --with-xulrunner-sdk="path to xulrunner sdk"

git submodule update --init
make

I'll put 802.11 monitor support asap ;-)

@Wyko
Copy link

Wyko commented Nov 5, 2010

@mickflemm

I'm having trouble finding the SDK. Where should I be looking? I tried:
./autogen.sh --with-xulrunner-sdk=/usr/lib/xulrunner-1.9.2.12/

But it did this:

autoreconf: Entering directory .' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force autoreconf: configure.ac: tracing autoreconf: configure.ac: not using Libtool autoreconf: running: /usr/bin/autoconf --force autoreconf: configure.ac: not using Autoheader autoreconf: running: automake --add-missing --copy --force-missing configure.ac:30: installing./config.guess'
configure.ac:30: installing ./config.sub' configure.ac:26: installing./install-sh'
configure.ac:26: installing ./missing' autoreconf: Leaving directory.'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... none
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for xpidl... no
configure: error: xpidl compiler not found

-Wyko

@mickflemm
Copy link
Contributor

for me it was /usr/lb/xulrunner-devel-1.9.2/

@mickflemm
Copy link
Contributor

added monitor support...
please test
#70

@Kamek
Copy link

Kamek commented Nov 6, 2010

Note, you must disable the default firefox apparmor profile or it won't let the plugin run.

@codebutler
Copy link
Owner

I'm going to mark this issue closed since development has moved here:
https://github.com/codebutler/firesheep/issues#issue/70

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet