usb-tools / USBProxy-legacy

A proxy for USB devices, libUSB and gadgetFS - this project is unmaintained, try here: https://github.com/usb-tools/Facedancer
GNU General Public License v2.0
429 stars 102 forks source link

seg fault on missing DeviceProxy_LibUSB.so #4

Closed doug2000 closed 9 years ago

doug2000 commented 10 years ago

Building newest github master on your prior BBB image resulted in:

root@arm:/home/debian/USBProxy2/USBProxy-master/src# ./usb-mitm SIGRTMIN: 34 error opening library Segmentation fault root@arm:/home/debian/USBProxy2/USBProxy-master/src#

I tracked this down to a missing .so file and built it manually:

root@arm:/home/debian/USBProxy2/USBProxy-master/src/Plugins/Devices# gcc -c -fPIC DeviceProxy_LibUSB.cpp -I../../include root@arm:/home/debian/USBProxy2/USBProxy-master/src/Plugins/Devices# gcc DeviceProxy_LibUSB.o -shared -o DeviceProxy_LibUSB.so

Then line 35 in ./lib/PluginManager.cpp from:

    void* DeviceProxyPlugin = dlopen(string("plugins/DeviceProxy_LibUSB.so").c_str(), RTLD_LAZY);

to:

    void* DeviceProxyPlugin = dlopen(string("Plugins/Devices/DeviceProxy_LibUSB.so").c_str(), RTLD_LAZY);

allowed a good start, and was able to proxy my mouse and log some output:

root@arm:/home/debian/USBProxy2/USBProxy-master/src# ./usb-mitm -l SIGRTMIN: 34 cleaning up /tmp removing 0 Made directory /tmp/gadget-Kf7o7c for gadget Made directory /tmp/mqueue-G4Z8bj for mqueue cleaning up /tmp/mqueue-G4Z8bj removing 0 Device: 12 01 00 02 00 00 00 08 6d 04 18 c0 00 43 01 02 00 01 Manufacturer: Logitech Product: Logitech USB Optical Mouse Config(1): 09 02 22 00 01 01 00 a0 32 Interface(0): Alt(0): 09 04 00 00 01 03 01 02 00 HID: 09 21 11 01 00 01 22 34 00 EP(81): 07 05 81 03 05 00 0a searching in [/tmp/gadget-Kf7o7c] Starting setup writer thread (3740) for EP00. Starting setup reader thread (3739) for EP00. [80 06 00 03 00 00 ff 00] [80 06 00 03 00 00 04 00]: 04 03 09 04 [80 06 02 03 09 04 ff 00] [80 06 02 03 09 04 36 00]: 36 03 4c 00 6f 00 67 00 69 00 74 00 65 00 63 00 68 00 20 00 55 00 53 00 42 00 20 00 4f 00 70 00 74 00 69 00 63 00 61 00 6c 00 20 00 4d 00 6f 00 75 00 73 00 65 00 [00 09 01 00 00 00 00 00] Opened EP81 Starting writer thread (3742) for EP81. [21 0a 00 00 00 00 00 00] Starting reader thread (3741) for EP81. [81 06 00 22 00 00 74 00] [81 06 00 22 00 00 34 00]: 05 01 09 02 a1 01 09 01 a1 00 05 09 19 01 29 03 15 00 25 01 75 01 95 03 81 02 75 05 95 01 81 01 05 01 09 30 09 31 09 38 15 81 25 7f 75 08 95 03 81 06 c0 c0 81[4]: 00 fd 00 00 81[4]: 00 fb ff 00 81[4]: 00 fe ff 00 81[4]: 00 01 00 00 81[4]: 00 01 00 00

dominicgs commented 10 years ago

Fixed.

I fixed this when you reported it, but I forgot to close the issue. Thanks for the contribution.

kishinmanglani commented 9 years ago

I'm getting the same issue. Above solution does not work for me.

SIGRTMIN: 34
CP: String DeviceProxy = DeviceProxy_LibUSB
CP: String HostProxy = HostProxy_GadgetFS
Loading plugins from /usr/local/lib/USBProxy/
error opening library /usr/local/lib/USBProxy/DeviceProxy_LibUSB.so
Printing Config data
    Strings: 2
        DeviceProxy: DeviceProxy_LibUSB
        HostProxy: HostProxy_GadgetFS
    Vectors: 0
Pointer: 0
Made directory /tmp/mqueue-e7fE70 for mqueue
cleaning up /tmp/mqueue-e7fE70
removing 0
Segmentation fault

If I run above solution:

In file included from Proxy.h:32:0,
                 from DeviceProxy.h:26,
                 from DeviceProxy_LibUSB.h:31,
                 from DeviceProxy_LibUSB.cpp:25:
ConfigParser.h:33:50: error: ‘vectors’ was not declared in this scope
ConfigParser.h:33:47: error: ‘>>’ should be ‘> >’ within a nested template argument list
DeviceProxy_LibUSB.cpp: In constructor ‘DeviceProxy_LibUSB::DeviceProxy_LibUSB(ConfigParser*)’:
DeviceProxy_LibUSB.cpp:52:14: error: ‘stoi’ is not a member of ‘std’
DeviceProxy_LibUSB.cpp:52:33: error: ‘nullptr’ was not declared in this scope
DeviceProxy_LibUSB.cpp:59:15: error: ‘stoi’ is not a member of ‘std’
DeviceProxy_LibUSB.cpp:59:34: error: ‘nullptr’ was not declared in this scope
DeviceProxy_LibUSB.cpp: In member function ‘int DeviceProxy_LibUSB::connect(int, int, bool)’:
DeviceProxy_LibUSB.cpp:158:51: error: ‘libusb_set_auto_detach_kernel_driver’ was not declared in this scope
dominicgs commented 9 years ago

The way that plugins are stored and loaded has changed since this bug was opened/fixed, so the solution to it probably won't be valid for your issue.

What is stored in /usr/local/lib/USBProxy/? Are there a number of plugin .so files?

Iskuri commented 9 years ago

I'm also getting this issue with a brand new clone. If there's anything I can to do help fix it let me know.

dominicgs commented 9 years ago

@Iskuri Could you send me the output? This may be a different issue with the same outcome.

Could you try going back to a commit before I started doing silly things with python bindings?

Iskuri commented 9 years ago

@dominicgs here is the compiler output and output from when I run the command. I discovered this morning that I was actually compiling on an older version of the code, and when I compiled on the fresh clone I pulled down I didn't get a segfault but I still got the "error opening library /usr/local/lib/USBProxy/DeviceProxy_LibUSB.so" so the issues may be unrelated at this point. Anyway, here's what I got, if it helps.

[  2%] Building CXX object lib/CMakeFiles/USBProxy.dir/ConfigParser.cpp.o
[  5%] Building CXX object lib/CMakeFiles/USBProxy.dir/Criteria.cpp.o
[  7%] Building CXX object lib/CMakeFiles/USBProxy.dir/DeviceQualifier.cpp.o
[ 10%] Building CXX object lib/CMakeFiles/USBProxy.dir/HexString.cpp.o
[ 12%] Building CXX object lib/CMakeFiles/USBProxy.dir/Interface.cpp.o
[ 15%] Building CXX object lib/CMakeFiles/USBProxy.dir/Manager.cpp.o
[ 17%] Building CXX object lib/CMakeFiles/USBProxy.dir/RelayReader.cpp.o
[ 20%] Building CXX object lib/CMakeFiles/USBProxy.dir/TCP_Helper.cpp.o
[ 22%] Building CXX object lib/CMakeFiles/USBProxy.dir/Configuration.cpp.o
[ 25%] Building CXX object lib/CMakeFiles/USBProxy.dir/Device.cpp.o
[ 27%] Building CXX object lib/CMakeFiles/USBProxy.dir/Endpoint.cpp.o
[ 30%] Building CXX object lib/CMakeFiles/USBProxy.dir/HID.cpp.o
[ 32%] Building CXX object lib/CMakeFiles/USBProxy.dir/InterfaceGroup.cpp.o
[ 35%] Building CXX object lib/CMakeFiles/USBProxy.dir/Injector.cpp.o
[ 37%] Building CXX object lib/CMakeFiles/USBProxy.dir/PacketFilter.cpp.o
[ 40%] Building CXX object lib/CMakeFiles/USBProxy.dir/PluginManager.cpp.o
/home/iskuri/USBProxy/src/lib/PluginManager.cpp: In member function ‘int PluginManager::load_plugins(ConfigParser*)’:
/home/iskuri/USBProxy/src/lib/PluginManager.cpp:47:34: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [enabled by default]
/home/iskuri/USBProxy/src/lib/PluginManager.cpp:56:32: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [enabled by default]
/home/iskuri/USBProxy/src/lib/PluginManager.cpp:72:36: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [enabled by default]
/home/iskuri/USBProxy/src/lib/PluginManager.cpp:78:38: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [enabled by default]
/home/iskuri/USBProxy/src/lib/PluginManager.cpp:84:36: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [enabled by default]
[ 42%] Building CXX object lib/CMakeFiles/USBProxy.dir/RelayWriter.cpp.o
[ 45%] Building CXX object lib/CMakeFiles/USBProxy.dir/USBString.cpp.o
[ 47%] Building C object lib/CMakeFiles/USBProxy.dir/FDInfo.c.o
[ 50%] Building C object lib/CMakeFiles/USBProxy.dir/get_tid.c.o
[ 52%] Building C object lib/CMakeFiles/USBProxy.dir/HaltSignal.c.o
[ 55%] Building C object lib/CMakeFiles/USBProxy.dir/mqueue_helpers.c.o
Linking CXX shared library libUSBProxy.so
[ 55%] Built target USBProxy
[ 57%] Building CXX object Plugins/Devices/CMakeFiles/DeviceProxy_Callback.dir/DeviceProxy_Callback.cpp.o
/home/iskuri/USBProxy/src/Plugins/Devices/DeviceProxy_Callback.cpp: In constructor ‘DeviceProxy_Callback::DeviceProxy_Callback(ConfigParser*)’:
/home/iskuri/USBProxy/src/Plugins/Devices/DeviceProxy_Callback.cpp:30:76: warning: ISO C++ forbids casting betwee/home/iskuri/USBProxy/src/Plugins/Devices/DeviceProxy_Callback.cpp:32:70: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [enabled by default]
/home/iskuri/USBProxy/src/Plugins/Devices/DeviceProxy_Callback.cpp:33:100: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [enabled by default]
/home/iskuri/USBProxy/src/Plugins/Devices/DeviceProxy_Callback.cpp:34:82: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [enabled by default]
/home/iskuri/USBProxy/src/Plugins/Devices/DeviceProxy_Callback.cpp:35:91: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [enabled by default]
/home/iskuri/USBProxy/src/Plugins/Devices/DeviceProxy_Callback.cpp:36:79: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [enabled by default]
Linking CXX shared library DeviceProxy_Callback.so
[ 57%] Built target DeviceProxy_Callback
[ 60%] Building CXX object Plugins/Devices/CMakeFiles/DeviceProxy_Loopback.dir/DeviceProxy_Loopback.cpp.o
Linking CXX shared library DeviceProxy_Loopback.so
[ 60%] Built target DeviceProxy_Loopback
[ 62%] Building CXX object Plugins/Devices/CMakeFiles/DeviceProxy_TCP.dir/DeviceProxy_TCP.cpp.o
Linking CXX shared library DeviceProxy_TCP.so
[ 62%] Built target DeviceProxy_TCP
[ 65%] Building CXX object Plugins/Hosts/CMakeFiles/HostProxy_GadgetFS.dir/HostProxy_GadgetFS.cpp.o
[ 67%] Building C object Plugins/Hosts/CMakeFiles/HostProxy_GadgetFS.dir/GadgetFS_helpers.c.o
Linking CXX shared library HostProxy_GadgetFS.so
[ 67%] Built target HostProxy_GadgetFS
[ 70%] Building CXX object Plugins/Hosts/CMakeFiles/HostProxy_TCP.dir/HostProxy_TCP.cpp.o
Linking CXX shared library HostProxy_TCP.so
[ 70%] Built target HostProxy_TCP
[ 72%] Building CXX object Plugins/Filters/CMakeFiles/PacketFilter_Callback.dir/PacketFilter_Callback.cpp.o
Linking CXX shared library PacketFilter_Callback.so
[ 72%] Built target PacketFilter_Callback
[ 75%] Building CXX object Plugins/Filters/CMakeFiles/PacketFilter_KeyLogger.dir/PacketFilter_KeyLogger.cpp.o
Linking CXX shared library PacketFilter_KeyLogger.so
[ 75%] Built target PacketFilter_KeyLogger
[ 77%] Building CXX object Plugins/Filters/CMakeFiles/PacketFilter_MassStorage.dir/PacketFilter_MassStorage.cpp.o
Linking CXX shared library PacketFilter_MassStorage.so
[ 77%] Built target PacketFilter_MassStorage
[ 80%] Building CXX object Plugins/Filters/CMakeFiles/PacketFilter_PcapLogger.dir/PacketFilter_PcapLogger.cpp.o
Linking CXX shared library PacketFilter_PcapLogger.so
[ 80%] Built target PacketFilter_PcapLogger
[ 82%] Building CXX object Plugins/Filters/CMakeFiles/PacketFilter_Power.dir/PacketFilter_Power.cpp.o
Linking CXX shared library PacketFilter_Power.so
[ 82%] Built target PacketFilter_Power
[ 85%] Building CXX object Plugins/Filters/CMakeFiles/PacketFilter_ROT13.dir/PacketFilter_ROT13.cpp.o
Linking CXX shared library PacketFilter_ROT13.so
[ 85%] Built target PacketFilter_ROT13
[ 87%] Building CXX object Plugins/Filters/CMakeFiles/PacketFilter_StreamLog.dir/PacketFilter_StreamLog.cpp.o
Linking CXX shared library PacketFilter_StreamLog.so
[ 87%] Built target PacketFilter_StreamLog
[ 90%] Building CXX object Plugins/Filters/CMakeFiles/PacketFilter_UDPHID.dir/PacketFilter_UDPHID.cpp.o
Linking CXX shared library PacketFilter_UDPHID.so
[ 90%] Built target PacketFilter_UDPHID
[ 92%] Building CXX object Plugins/Injectors/CMakeFiles/Injector_UDP.dir/Injector_UDP.cpp.o
Linking CXX shared library Injector_UDP.so
[ 92%] Built target Injector_UDP
[ 95%] Building CXX object Plugins/Injectors/CMakeFiles/Injector_UDPHID.dir/Injector_UDPHID.cpp.o
Linking CXX shared library Injector_UDPHID.so
[ 95%] Built target Injector_UDPHID
[ 97%] Building CXX object tools/CMakeFiles/usb-mitm.dir/usb-mitm.cpp.o
Linking CXX executable usb-mitm
[ 97%] Built target usb-mitm
[100%] Building CXX object bindings/CMakeFiles/USBProxyAPI.dir/API.cpp.o
Linking CXX shared library libUSBProxyAPI.so
[100%] Built target USBProxyAPI
SIGRTMIN: 34
CP: Vector Plugins
CP: Pointer PacketFilter_StreamLog::file
CP: String DeviceProxy = DeviceProxy_LibUSB
CP: String HostProxy = HostProxy_GadgetFS
Loading plugins from /usr/local/lib/USBProxy/
error opening library /usr/local/lib/USBProxy/DeviceProxy_LibUSB.so
Printing Config data
        Strings: 2
                DeviceProxy: DeviceProxy_LibUSB
                HostProxy: HostProxy_GadgetFS
        Vectors: 1
                Plugins:
                        PacketFilter_StreamLog
Pointer: 1
                PacketFilter_StreamLog::file: 0xb6de6540
Made directory /tmp/mqueue-7Ye4nG for mqueue
cleaning up /tmp/mqueue-7Ye4nG
removing 0

(Great work on the Shmoocon talk by the way, it was really informative)

dominicgs commented 9 years ago

Did you run make install after building? Could you run ls /usr/local/lib/USBProxy/ and check which plugins are installed?

The plugin loader expects the plugins to be in a specific place. It's on my todo list to fix this and have them picked up from a location that is either set at compile time or user specified, but my todo list is very long.

jaapcrezee commented 9 years ago

Hi all,

On 12/10/14 11:41, Dominic Spill wrote:

Did you run |make install| after building? Could you run |ls /usr/local/lib/USBProxy/| and check which plugins are installed? The plugin loader expects the plugins to be in a specific place. It's on my todo list to fix this and have them picked up from a location that is either set at compile time or user specified, but my todo list is very long.

I also had this problem once. I think the software should not crash, but display a message about it and exit anyway.

Maybe I will fix a few of these tiny issue the next days.

In 2015 I have a new project for the same customer for which I used this software before. I guess there will be more patches from my side later on. At least I will make the Intel Edison board work as well some point in time.

Kind regards,

Jaap Crezee

dominicgs commented 9 years ago

Isn't that what it does? It gives an error message about not finding the .so and then exits cleanly as well as logging the contents of the config object.

dominicgs commented 9 years ago

@jaapcrezee I would very much appreciate any patches that you would be willing to provide, especially if they add support for more hardware platforms.

jaapcrezee commented 9 years ago

On 12/10/14 11:48, Dominic Spill wrote:

Isn't that what it does? It gives an error message about not finding the .so and then exits cleanly as well as logging the contents of the config object.

I thought I had at least once seen a segfault there. Will check it later :)

Jaap

dominicgs commented 9 years ago

I had hoped that I had fixed that issue, but if you still see it I would be very happy to try to fix.

Thanks, Dominic

Iskuri commented 9 years ago

Hi Dominic,

I definitely ran make install. Unfortunately, I'm at work right now so can't check that directory but will definitely do it as soon as I get home. If your to-do list keeps growing I'd be really happy to help in any way I can, especially as this project can help me with almost all the projects I'm working on.

Chris.

Iskuri commented 9 years ago

Hi Dominic,

Here's the contents of /usr/local/lib/USBProxy/ :

total 308
-rw-r--r-- 1 root staff 16175 Dec  9 21:15 DeviceProxy_Callback.so
-rw-r--r-- 1 root staff 17971 Dec  9 21:15 DeviceProxy_Loopback.so
-rw-r--r-- 1 root staff 16182 Dec  9 21:15 DeviceProxy_TCP.so
-rw-r--r-- 1 root staff 29771 Dec  9 21:15 HostProxy_GadgetFS.so
-rw-r--r-- 1 root staff 17949 Dec  9 21:15 HostProxy_TCP.so
-rw-r--r-- 1 root staff 17562 Dec  9 21:16 Injector_UDP.so
-rw-r--r-- 1 root staff 18284 Dec  9 21:16 Injector_UDPHID.so
-rw-r--r-- 1 root staff 13045 Dec  9 21:15 PacketFilter_Callback.so
-rw-r--r-- 1 root staff 17237 Dec  9 21:15 PacketFilter_KeyLogger.so
-rw-r--r-- 1 root staff 56550 Dec  9 21:15 PacketFilter_MassStorage.so
-rw-r--r-- 1 root staff 15755 Dec  9 21:15 PacketFilter_PcapLogger.so
-rw-r--r-- 1 root staff 11621 Dec  9 21:15 PacketFilter_Power.so
-rw-r--r-- 1 root staff 11521 Dec  9 21:15 PacketFilter_ROT13.so
-rw-r--r-- 1 root staff 13451 Dec  9 21:15 PacketFilter_StreamLog.so
-rw-r--r-- 1 root staff 13137 Dec  9 21:15 PacketFilter_UDPHID.so

Thanks

dominicgs commented 9 years ago

As expected, it's not installed. Sorry for asking you to list out the directory, I should have seen from the build output that it wasn't built.

Are you using the OS image from the GitHub releases page? What is the output when you run cmake .. from a clean build directory?

I suspect that it wasn't built because it couldn't find libUSB 1.0 on your system.

jaapcrezee commented 9 years ago

Hi,

On 12/10/14 19:39, Christopher Wade wrote:

Here's the contents of /usr/local/lib/USBProxy/ :

total 308 -rw-r--r-- 1 root staff 16175 Dec 9 21:15 DeviceProxy_Callback.so -rw-r--r-- 1 root staff 17971 Dec 9 21:15 DeviceProxy_Loopback.so -rw-r--r-- 1 root staff 16182 Dec 9 21:15 DeviceProxy_TCP.so -rw-r--r-- 1 root staff 29771 Dec 9 21:15 HostProxy_GadgetFS.so -rw-r--r-- 1 root staff 17949 Dec 9 21:15 HostProxy_TCP.so -rw-r--r-- 1 root staff 17562 Dec 9 21:16 Injector_UDP.so -rw-r--r-- 1 root staff 18284 Dec 9 21:16 Injector_UDPHID.so -rw-r--r-- 1 root staff 13045 Dec 9 21:15 PacketFilter_Callback.so -rw-r--r-- 1 root staff 17237 Dec 9 21:15 PacketFilter_KeyLogger.so -rw-r--r-- 1 root staff 56550 Dec 9 21:15 PacketFilter_MassStorage.so -rw-r--r-- 1 root staff 15755 Dec 9 21:15 PacketFilter_PcapLogger.so -rw-r--r-- 1 root staff 11621 Dec 9 21:15 PacketFilter_Power.so -rw-r--r-- 1 root staff 11521 Dec 9 21:15 PacketFilter_ROT13.so -rw-r--r-- 1 root staff 13451 Dec 9 21:15 PacketFilter_StreamLog.so -rw-r--r-- 1 root staff 13137 Dec 9 21:15 PacketFilter_UDPHID.so

Can you also give the output of the usb proxy binary when starting?

And maybe a strace log, maybe also ltrace?

Jaap

Iskuri commented 9 years ago

Hi, I didn't realise that there was an image on the releases page. I was using a stock image from the beaglebone black website and using that. Would you like me to download that image and give it a go?

As for the cmake output, it is as follows:

-- The C compiler identification is GNU 4.6.3
-- The CXX compiler identification is GNU 4.6.3
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found.
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") 
-- checking for module 'libusb-1.0'
--   package 'libusb-1.0' not found
-- Could NOT find LIBUSB (missing:  LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR) 
-- Could NOT find LORCON (missing:  LORCON_LIBRARIES LORCON_INCLUDE_DIR) 
-- Pcap include dirs set to /usr/include
-- Pcap library set to  /usr/lib/arm-linux-gnueabihf/libpcap.so
-- Looking for pcap_version
-- Looking for pcap_version - found
-- Looking for pcap_open_dead
-- Looking for pcap_open_dead - found
-- Looking for pcap_freecode
-- Looking for pcap_freecode - found
-- Looking for pcap_breakloop
-- Looking for pcap_breakloop - found
-- Looking for pcap_create
-- Looking for pcap_create - found
-- Looking for pcap_datalink_name_to_val
-- Looking for pcap_datalink_name_to_val - found
-- Looking for pcap_datalink_val_to_description
-- Looking for pcap_datalink_val_to_description - found
-- Looking for pcap_datalink_val_to_name
-- Looking for pcap_datalink_val_to_name - found
-- Looking for pcap_findalldevs
-- Looking for pcap_findalldevs - found
-- Looking for pcap_free_datalinks
-- Looking for pcap_free_datalinks - found
-- Looking for pcap_get_selectable_fd
-- Looking for pcap_get_selectable_fd - found
-- Looking for pcap_lib_version
-- Looking for pcap_lib_version - found
-- Looking for pcap_list_datalinks
-- Looking for pcap_list_datalinks - found
-- Looking for pcap_set_datalink
-- Looking for pcap_set_datalink - found
-- Looking for pcap_open
-- Looking for pcap_open - not found
-- Looking for pcap_findalldevs_ex
-- Looking for pcap_findalldevs_ex - not found
-- Looking for pcap_createsrcstr
-- Looking for pcap_createsrcstr - not found
-- Found PCAP: /usr/include  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/iskuri/USBProxy/src/build

@jaapcrezee I'll provide the strace and ltrace if all else fails, as it seems that it may be unnecessary.

Chris.

dominicgs commented 9 years ago

@Iskuri It looks like you don't have libUSB 1.0 installed, most Linux distros still come with older versions. We can't use the standard libUSB because we want some more recent features (this should change very soon).

I would recommend using the image from the release page, it has a kernel patch and some configuration set up to make things a little easier. You will also need to connect to it over ethernet as we have to disable the USB networking when using USBProxy.

Iskuri commented 9 years ago

That's really weird, because I thought I'd installed it, I gave it a go with the standard one and one compiled from source. I'm flashing the image now and will let you know how it goes in a few minutes.

Iskuri commented 9 years ago

It worked! Thanks a lot for the help guys, it's much appreciated.

Chris.

dominicgs commented 9 years ago

No problem, glad it's working.

@jaapcrezee I'm going to close this bug now, but you can reopen it any time if you see segfaults again.

kishinmanglani commented 9 years ago

i'll try this again later as well

metissec commented 8 years ago

Try installing libusb-1.0.0-dev. Worked for me.