airbus-seclab / usbq_core

USB man in the middle linux kernel driver
19 stars 7 forks source link

fail install the ubq_core.ko module #2

Open jinyu00 opened 5 years ago

jinyu00 commented 5 years ago
$ sudo insmod /home/hac425/workplace/usbq_core/ubq_core.ko
insmod: ERROR: could not insert module /home/hac425/workplace/usbq_core/ubq_core.ko: Unknown symbol in module

the dmesg

[ 4897.583464] ubq_core: loading out-of-tree module taints kernel.
[ 4897.583795] ubq_core: Unknown symbol usb_gadget_probe_driver (err 0)
[ 4897.583940] ubq_core: Unknown symbol usb_ep_autoconfig_reset (err 0)
[ 4897.583987] ubq_core: Unknown symbol usb_gadget_unregister_driver (err 0)
[ 4897.584031] ubq_core: Unknown symbol usb_ep_autoconfig_release (err 0)
[ 4999.461748] ubq_core: Unknown symbol usb_gadget_probe_driver (err 0)
[ 4999.461871] ubq_core: Unknown symbol usb_ep_autoconfig_reset (err 0)
[ 4999.461921] ubq_core: Unknown symbol usb_gadget_unregister_driver (err 0)
[ 4999.461966] ubq_core: Unknown symbol usb_ep_autoconfig_release (err 0)
[ 5059.658364] ubq_core: Unknown symbol usb_gadget_probe_driver (err 0)
[ 5059.658449] ubq_core: Unknown symbol usb_ep_autoconfig_reset (err 0)
[ 5059.658488] ubq_core: Unknown symbol usb_gadget_unregister_driver (err 0)
[ 5059.658525] ubq_core: Unknown symbol usb_ep_autoconfig_release (err 0)

The makefile

#ccflags-y+=-Wfatal-errors
#ccflags-y+=-include $M/ctracer.h
#ccflags-y+=-D CTRACER_ON
obj-m += ubq_core.o

KERNELDIR ?= /lib/modules/4.4.155/build
EXTRA_CFLAGS += -g -fms-extensions

all:    modules

ubq_core-y := core.o gadget.o driver.o com.o com_udp.o debug.o debug_usb.o common.o msg.o

modules:
    $(MAKE) -C $(KERNELDIR) M=$$PWD modules

modules_install:
    $(MAKE) -C $(KERNELDIR) M=$$PWD modules_install

clean:
    $(MAKE) -C $(KERNELDIR) M=$$PWD clean
z80x1 commented 5 years ago

ubq_core.ko is dependent on libcomposite module. Need to insert it at first sudo modprobe libcomposite

jinyu00 commented 5 years ago

thx, I installed it. And I want to just sniffer one usb host , how can I do it?