From d8d756b9fd0bfb4b9d9514c411c7e01e8358e9c1 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 16 Jul 2015 14:36:08 -0300 Subject: Better BadUSB mitigation --- files/etc/rc.local | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/etc/rc.local b/files/etc/rc.local index b2ca780..2618f6e 100644 --- a/files/etc/rc.local +++ b/files/etc/rc.local @@ -43,6 +43,10 @@ fi # See https://links.sarava.org/tags/badusb if [ -e "/sys/module/usbcore/parameters/authorized_default" ]; then echo "0" > /sys/module/usbcore/parameters/authorized_default + + for bus in /sys/bus/usb/devices/usb*; do + echo $0 > $bus/authorized_default + done fi # Then exit -- cgit v1.2.3 From ddbce5753dbabf405fdd3477064b20fba9edc38c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 17 Jul 2015 08:16:52 -0300 Subject: Oops --- files/etc/rc.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/etc/rc.local b/files/etc/rc.local index 2618f6e..55fdcd9 100644 --- a/files/etc/rc.local +++ b/files/etc/rc.local @@ -45,7 +45,7 @@ if [ -e "/sys/module/usbcore/parameters/authorized_default" ]; then echo "0" > /sys/module/usbcore/parameters/authorized_default for bus in /sys/bus/usb/devices/usb*; do - echo $0 > $bus/authorized_default + echo 0 > $bus/authorized_default done fi -- cgit v1.2.3