Disable USB human interface drivers and USB storage driver
Posted: 28 Jan 2019, 14:34
Hi there,
for security reasons, I would like to disable the use of USB keyboards/mouses as well as USB storage devices (thumb drive, external harddisk, ...). On a standard debian system, I would simply disable the kernel modules (aka drivers) "usbhid" and "usb_storage". However, running "lsmod" on my RevPi produces the following output:
pi@RevPixxxxx:~ $ lsmod
Module Size Used by
cfg80211 569765 0
rfkill 21574 2 cfg80211
evdev 12148 2
joydev 9890 0
snd_bcm2835 23454 0
snd_pcm 97861 1 snd_bcm2835
snd_timer 22848 1 snd_pcm
snd 69071 3 snd_timer,snd_bcm2835,snd_pcm
bcm2835_gpiomem 3823 0
ftdi_sio 32648 0
usbserial 29680 1 ftdi_sio
uio_pdrv_genirq 3842 0
uio 10334 1 uio_pdrv_genirq
spidev 7210 0
piControl 193129 0
ti_dac082s085 6086 0
mcp320x 11202 0
iio_mux 5216 0
mux_gpio 2464 0
mux_core 8067 2 mux_gpio,iio_mux
fixed 3061 0
gpio_74x164 3382 0
spi_bcm2835aux 4973 0
spi_bcm2835 7456 0
gpio_max3191x 9449 1 piControl
industrialio 66692 4 mcp320x,iio_mux,ti_dac082s085,piControl
crc8 1662 1 gpio_max3191x
i2c_dev 6977 0
ip_tables 13203 0
x_tables 21202 1 ip_tables
ipv6 434161 28
Neither "usbhid" nor "usb_storage" are present in this list. The only module from that list that sounds like it could have something to do with a keyboard is "evdev". Running "modinfo evdev" says that this is the "Input driver event char devices". However, after disabling it, the keyboard unfortunately still worked like a charm.
Therefore, my question is: what do I need to do to prevent the usage of USB keyboard/mouse and USB storage devices with the RevPi? Do I need to disable a driver? If yes, which one? If no, what else can I do?
Any help is greatly appreciated.
Kind regards,
fjulian
for security reasons, I would like to disable the use of USB keyboards/mouses as well as USB storage devices (thumb drive, external harddisk, ...). On a standard debian system, I would simply disable the kernel modules (aka drivers) "usbhid" and "usb_storage". However, running "lsmod" on my RevPi produces the following output:
pi@RevPixxxxx:~ $ lsmod
Module Size Used by
cfg80211 569765 0
rfkill 21574 2 cfg80211
evdev 12148 2
joydev 9890 0
snd_bcm2835 23454 0
snd_pcm 97861 1 snd_bcm2835
snd_timer 22848 1 snd_pcm
snd 69071 3 snd_timer,snd_bcm2835,snd_pcm
bcm2835_gpiomem 3823 0
ftdi_sio 32648 0
usbserial 29680 1 ftdi_sio
uio_pdrv_genirq 3842 0
uio 10334 1 uio_pdrv_genirq
spidev 7210 0
piControl 193129 0
ti_dac082s085 6086 0
mcp320x 11202 0
iio_mux 5216 0
mux_gpio 2464 0
mux_core 8067 2 mux_gpio,iio_mux
fixed 3061 0
gpio_74x164 3382 0
spi_bcm2835aux 4973 0
spi_bcm2835 7456 0
gpio_max3191x 9449 1 piControl
industrialio 66692 4 mcp320x,iio_mux,ti_dac082s085,piControl
crc8 1662 1 gpio_max3191x
i2c_dev 6977 0
ip_tables 13203 0
x_tables 21202 1 ip_tables
ipv6 434161 28
Neither "usbhid" nor "usb_storage" are present in this list. The only module from that list that sounds like it could have something to do with a keyboard is "evdev". Running "modinfo evdev" says that this is the "Input driver event char devices". However, after disabling it, the keyboard unfortunately still worked like a charm.
Therefore, my question is: what do I need to do to prevent the usage of USB keyboard/mouse and USB storage devices with the RevPi? Do I need to disable a driver? If yes, which one? If no, what else can I do?
Any help is greatly appreciated.
Kind regards,
fjulian