Sessionthief linux

In response to a number of questions about how to get sessionthief running on linux, here are the steps to get it working on Ubuntu:

First, I apologize, because if anyone tried, the compilation failed due to a case-mismatch on a filename. I had not noticed because I had stored the files on a FAT-formatted partition I was using to share files between OS’s, and FAT doesn’t care about the cases.

Instead, download the source again from here sessionthief.zip, and as an act of penance, I have included the compiled linux binary. It depends on libwxgtk2.8 and libpcap.

But, if you want to compile it yourself, here’s how you do it:
First, install the development libraries for gtk2, wxwidgets, and libpcap:

# apt-get install build-essential libwxgtk2.8-dev libgtk2.0-dev libpcap-dev

Then unzip the sessionthief folder in some directory and cd into the SessionThiefSRC folder. The complete compilation can be performed in one command:

$ g++ $(wx-config --cppflags --libs) -lpcap -o sessionthief *.cpp

Run as root; just like Wireshark, you need privs to access the packets. Enjoy.

About these ads
  1. #1 by mozartklik on 18 September 2010 - 0430

    wow nice thanks… i’ll try it…

  2. #2 by Antitree on 18 September 2010 - 2347

    How about a directions for Backtrack? :)

  3. #3 by mozartklik on 19 September 2010 - 0958

    i got some errors when running on linux backtrack as root like this,

    root@bt:~/sessionthief/SessionThiefSRC# ./sessionthief

    (process:19268): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.18.2/gobject/gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

    (process:19268): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0′ failed

    (process:19268): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion `GDK_IS_DISPLAY (display)’ failed

    (process:19268): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.18.2/gobject/gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

    (process:19268): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0′ failed

    (process:19268): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.18.2/gobject/gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

    (process:19268): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.18.2/gobject/gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

    (process:19268): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.18.2/gobject/gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

    (process:19268): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)’ failed

    (process:19268): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.18.2/gobject/gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

    (process:19268): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)’ failed

    (process:19268): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.18.2/gobject/gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

    (process:19268): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.18.2/gobject/gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

    (process:19268): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)’ failed

    (process:19268): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.18.2/gobject/gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

    (process:19268): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0′ failed

    (process:19268): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.18.2/gobject/gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

    (process:19268): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.18.2/gobject/gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

    (process:19268): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)’ failed

    (process:19268): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0′ failed

    (process:19268): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)’ failed
    Segmentation fault

    any idea…????

    • #4 by scriptjunkie1 on 20 September 2010 - 2336

      I suppose it needs to be recompiled for backtrack, but the repositories do not have a -dev package.

      Which reminds me of why I do not run backtrack. Yes, the backtrack team has amassed many fine security tools together, but a backtrack CD rarely to never includes the latest version of the tools; on average the tools will be at least as old as when the version was released (usually months). I had great hopes for version 4, as they turned it into a distribution, but updates for most of the packages I use are still rarely if ever included in the repositories. Even security updates for things like firefox usually fail to make it to the repositories; it’s just too much work to well maintain a distro. So once again, the average package is far older than a standard distribution with the tools you use manually installed. Also, other support packages, such as wxwidgets development tools are unavailable.

      Unless you need a particular wifi injection patch, use a standard distribution, install tools like metasploit yourself, update them, and have the latest exploits months ahead of the next Backtrack CD. When they’re still useful. Want password crackers? Go to the developer’s site, and get the latest. Don’t get them secondhand.

  4. #5 by Gautam on 26 September 2010 - 1126

    I tried to compile it…using g++ as u instructed…
    but it gave me following warning..

    nviewFrame.cpp:6: warning: #pragma implementation for ‘nviewFrame.cpp’ appears after file is included

    when i tried to run ./sessiontheif it gave this error..

    (process:9762): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.22.2/gobject/gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

    (process:9762): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0′ failed

    (process:9762): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion `GDK_IS_DISPLAY (display)’ failed…
    Segmentation fault

    plz help….

    • #6 by scriptjunkie1 on 26 September 2010 - 1717

      The warning is normal, slight mistake on my part but it doesn’t change anything.

      What is your OS/wxWidgets version/GTK version? Are you running as root?

  5. #7 by mozartklik on 1 October 2010 - 1830

    yeah bro… i try to run it as root on ubuntu 9.10 the error like this…

    root@deadc0de:~./sessionthief

    (process:15481): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.22.3/gobject/gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

    (process:15481): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0′ failed

    (process:15481): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion `GDK_IS_DISPLAY (display)’ failed

    Segmentation fault

    • #8 by scriptjunkie1 on 2 October 2010 - 2209

      Well, I was interested to see what the problem was, so I downloaded 9.10, installed it on a VM, installed build-essential libwxgtk2.8-dev libgtk2.0-dev and libpcap-dev and upgraded the libgtk2.0 libraries to the latest, and it compiled and ran fine. Even the precompiled version ran fine. The version of GTK I have is this version: http://packages.ubuntu.com/karmic/libgtk2.0-0
      If you’re using backtrack; I don’t know what they’ve done to the libraries. Does it compile fine? What library version are you using?

  6. #9 by ColdZero on 12 October 2010 - 1906

    Lots of segmentation fault on ubuntu 10.10
    what can i do?

    also

    displays an error about firefox location

  7. #10 by ColdZero on 12 October 2010 - 1916

    When i try to compile under ubuntu 10.10 i get a warning:

    nviewFrame.cpp:6: warning: #pragma implementation for `nviewFrame.cpp` appears after file is included…

    It compiles, but then after i click APR over an IP i get:

    terminate called after throwing an instance of `wchar_t const*`
    Aborted

    Help :p

  8. #11 by gw0 on 10 March 2011 - 0944

    One segfault is the consequence of uninitialized parameter in ‘systemInterface.cpp’ that is NULL, but should be something like this:

    pcap_if_t* SystemInterface::getInterface() {
    char errbuf[PCAP_ERRBUF_SIZE];
    // Retrieve the device list
    if (pcap_findalldevs(&firstdev, errbuf) == -1 || firstdev == NULL) {

    Source: man pcap_findalldevs
    pcap_findalldevs() returns 0 on success and -1 on failure. If -1 is
    returned, errbuf is filled in with an appropriate error message.
    errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

    I was also wondering what license your code is under? Public domain, BSD/MIT, GPL or a special one?

    • #12 by scriptjunkie1 on 11 March 2011 - 0108

      Thanks; I made the change and re-uploaded it. The code is officially public domain, but if you use it, you could credit me. And if it’s a really cool project, let me know.

  9. #13 by gw0 on 10 March 2011 - 0901

    Oh, and also the g_type_init() bug is the consequence of a unneeded warning dialog for confirming to run under the root user. Imho this should be removed or corrected or at least a command line option to skip this dialog and confirm using as any user should be present.

    • #14 by scriptjunkie1 on 10 March 2011 - 2227

      My code does not create a warning dialog for confirming to run as root. That must be some kind of GTK setting, but it just runs fine for me as root without any warning. sessionthief running as root with no warnings

  10. #15 by Johny B on 8 November 2012 - 1952

    Hello,

    I just found this article and this seems really interesting.

    But I think the link for sessionthief.zip is down.

    Could you do something ?

    Cheers

    Johny B

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: