USBGuard¶
L’uso di usbguard è piuttosto essenziale per proteggersi da attacchi comuni come dispositivi dannosi, paperelle di gomma, cavi OMG o gli «equivalenti delle agenzie governative a tre lettere».
Especially thunderbolt (which can be blocked globally, see this config as to how can grant attackers access to your RAM, which means encryption keys and more.
Install USBGuard
Debian/Ubuntu or Linux mint:
sudo apt install usbguard usbutils udisks2 usbguard-notifier
Fedora:
sudo dnf install -y usbguard usbguard-notifier usbguard-selinux
Set it up
Assicuratevi che la tastiera e il mouse siano collegati.
Questi comandi autorizzano in modo permanente tutti i dispositivi attualmente collegati:
pkexec sh -c '
mkdir -p /var/log/usbguard
mkdir -p /etc/usbguard
chmod 755 /etc/usbguard
usbguard generate-policy > /etc/usbguard/rules.conf
systemctl enable --now usbguard.service
usbguard add-user $1
' -- $ACTIVE_USERNAME
systemctl enable --user --now usbguard-notifier.service