Results 1 to 4 of 4

Thread: snoopy-ng Kali 2.X - No module named libmproxy

  1. #1
    Join Date
    2016-Jul
    Posts
    2

    snoopy-ng Kali 2.X - No module named libmproxy

    Hello. When I try to start snoopy-ng I get the following message. I have tried to install the module by reinstalling mitmproxy. But I only fall further down the rabbithole.
    Does anybody have some good input on how I should solve this?

    Running on a Raspberry Pi 3 with the latest update of Kali img.


    root@kali:~# snoopy
    ___ _ _ _____ _____ ____ _ _
    / __)( \( )( _ )( _ )( _ \( \/ )
    \__ \ ) ( )(_)( )(_)( )___/ \ /
    (___/(_)\_)(_____)(_____)(__) (__)
    Version: 2.0
    Code: glenn@sensepost.com // @glennzw
    Visit: www.sensepost.com // @sensepost
    License: Non-commercial use

    Traceback (most recent call last):
    File "/usr/bin/snoopy", line 428, in <module>
    main()
    File "/usr/bin/snoopy", line 353, in main
    plugins = common.get_plugins()
    File "/root/snoopy-ng/includes/common.py", line 24, in get_plugins
    m = __import__(plug, fromlist="Snoop").Snoop
    File "/root/snoopy-ng/plugins/mitmproxy.py", line 17, in <module>
    from includes.mitm import *
    File "/root/snoopy-ng/includes/mitm.py", line 4, in <module>
    from libmproxy import proxy, flow, platform
    ImportError: No module named libmproxy
    Last edited by dawz0r; 2016-07-27 at 20:51.

  2. #2
    Join Date
    2016-Jul
    Posts
    2
    I have been having hard time getting Snoopy-ng installed as well...

    I am running Kali-rolling as a VM and preparing to set up an image for a cubox.

    These are the steps that I have taken to still almost get it to work...

    First problem: Python-LibPcap is unavailable through apt-get, but can be installed:

    Code:
    wget http://http.kali.org/kali/pool/main/p/python-libpcap/python-libpcap_0.6.4-1_amd64.deb
    dpkg -i python-libpcap_0.6.4-1_amd64.deb
    Then I downloaded Snoopy-ng

    Code:
    Git clone https://github.com/sensepost/snoopy-ng.git
    Navigate to /snoopy-ng
    Run sh install.sh from the snoopy-ng folder to install
    Then you get your second issue, ImportError: No module named libmproxy

    I found a fix, code is below link is here: https://gist.github.com/JosephGregg/...4ddaea19bf8d35

    Code:
    apt-get install gcc make autoconf git python-pip python-dev build-essential libffi-dev libssl-dev libjpeg-dev libxml2-dev libxslt1-dev python-dev tcpdump libpcap-dev vim postgresql libpq-dev -y --force-yes
    pip install --upgrade pip 
    pip install --upgrade virtualenv
    git clone https://github.com/sensepost/snoopy-ng.git
    virtualenv ./snoopy-ng/venv
    source ./snoopy-ng/venv/bin/activate
    cd ~/snoopy-ng/
    sed -i 's/.*from gps import.*/from gps3 import gps3/' ./plugins/gpsd.py
    sed -i 's/from libmproxy/from mitmproxy/' ./includes/mitm.py 
    
    pip install BeautifulSoup Pillow cryptography epeg-cffi gps3 httplib2 mitmproxy netifaces netlib psutil pyOpenSSL pyasn1 pyinotify python-dateutil requests scapy sqlalchemy psycopg2
    
    cd ~/snoopy-ng/ && git clone https://github.com/JPaulMora/Pyrit.git
    cd Pyrit/
    python setup.py clean
    python setup.py build
    python setup.py install
    
    systemctl stop postgresql.service
    systemctl disable postgresql.service
    
    systemctl stop exim4.service
    systemctl disable exim4.service
    Then the third issue is that there is another import error: ImportError: No module named publicsuffix

    To resolve this issue I installed it:

    Code:
    Git clone http://www.tablix.org/~avian/git/publicsuffix.git
    Cd publicsuffix
    Python setup.py install
    I am the closest I have been to actually having Snoopy working, but when I run it as a server, it is able to load all the modules but I still get a traceback error, I assume when trying to run snoopy, it is still unable to write into the database...

    I am stuck at this point...

    Any help would be much appreciated, and if anyone has a kali distro/vm/image with a working snoopy install that I could just download that would be great too lol

  3. #3
    Join Date
    2016-Jul
    Posts
    2
    Found this because I was having the same problem. After fixing that, more come...

    https://gist.github.com/JosephGregg/...4ddaea19bf8d35

    [CODE]apt-get install gcc make autoconf git python-pip python-dev build-essential libffi-dev libssl-dev libjpeg-dev libxml2-dev libxslt1-dev python-dev tcpdump libpcap-dev vim postgresql libpq-dev -y --force-yes
    pip install --upgrade pip
    pip install --upgrade virtualenv
    git clone https://github.com/sensepost/snoopy-ng.git
    virtualenv ./snoopy-ng/venv
    source ./snoopy-ng/venv/bin/activate
    cd ~/snoopy-ng/
    sed -i 's/.*from gps import.*/from gps3 import gps3/' ./plugins/gpsd.py
    sed -i 's/from libmproxy/from mitmproxy/' ./includes/mitm.py

    pip install BeautifulSoup Pillow cryptography epeg-cffi gps3 httplib2 mitmproxy netifaces netlib psutil pyOpenSSL pyasn1 pyinotify python-dateutil requests scapy sqlalchemy psycopg2

    cd ~/snoopy-ng/ && git clone https://github.com/JPaulMora/Pyrit.git
    cd Pyrit/
    python setup.py clean
    python setup.py build
    python setup.py install

    systemctl stop postgresql.service
    systemctl disable postgresql.service

    systemctl stop exim4.service
    [\CODE]

  4. #4
    Join Date
    2016-Jul
    Posts
    2
    I deleted the mitmproxy files in the plugins directory. I am only interested in getting the MAC address so I was hoping that it would work without the proxy. After that snoopy starts and I can see that it detects wifi. But I do not get any input to the sqlite db.

    root@kali:~/snoopy-ng# snoopy -v -m wifi:iface=wlan1,mon=True -m sysinfo -m heartbeat -d GronaDrone -l /root/snoopy-ng/snoopy_save
    ___ _ _ _____ _____ ____ _ _
    / __)( \( )( _ )( _ )( _ \( \/ )
    \__ \ ) ( )(_)( )(_)( )___/ \ /
    (___/(_)\_)(_____)(_____)(__) (__)
    Version: 2.0
    Code: glenn@sensepost.com // @glennzw
    Visit: www.sensepost.com // @sensepost
    License: Non-commercial use

    [+] Starting Snoopy with plugins: wifi, sysinfo, heartbeat
    [+] Capturing local only. Saving to 'sqlite:///snoopy.db'
    [+] Waiting for plugin 'wifi' to indicate it's ready
    [+] Starting sniffing on interface 'wlan1mon'
    [+] Plugin 'wifi' has indicated it's ready.
    [+] Waiting for plugin 'sysinfo' to indicate it's ready
    [+] Plugin 'sysinfo' has indicated it's ready.
    [+] Waiting for plugin 'heartbeat' to indicate it's ready
    [+] Plugin sysinfo will check device status every 1800 seconds.
    Exception in thread sysinfo:
    Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
    File "/root/snoopy-ng/plugins/sysinfo.py", line 56, in run
    global_stats = sysinfo.query_system_status()
    File "/root/snoopy-ng/includes/system_info.py", line 15, in query_system_status
    uptime = int(time.time() - psutil.BOOT_TIME)
    AttributeError: 'module' object has no attribute 'BOOT_TIME'
    [+] Plugin 'heartbeat' has indicated it's ready.

    [+] Done loading plugins, running...
    [+] Plugin heartbeat had a beat ❤
    [+] Sub-plugin wifi_clients currently observing 1 client devices

Similar Threads

  1. Failed to load module "canberra-gtk-module"
    By kal in forum TroubleShooting Archive
    Replies: 1
    Last Post: 2013-12-08, 13:28

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •