Kicksecure 18 is intended to ship USBGuard by default, with a configuration that should block likely-malicious, unknown, and unusual devices. The hope is that it won’t block so much as to significantly increase the difficulty of using Kicksecure, while also making it more difficult to use devices such as the Hak5 rubber ducky or O.MG plug (popular keystroke injection devices).
Our current USBGuard configuration is visible at security-misc/etc/usbguard/rules.d/30_security-misc.conf at master · Kicksecure/security-misc · GitHub. The original intent was to allow everything connected at boot, and then disallow everything other than mass storage devices, keyboards, and mice, while also not allowing keyboards or mice to be combined with other interfaces, and not allowing additional keyboards and mice to be attached if one is already present. However, as pointed out by Marek (the lead Qubes OS developer), this is going to cause tons of legitimate devices to be blocked: Polish USBGuard configuration · Kicksecure/security-misc@cba1687 · GitHub
We have a pretty classic security vs. usability tradeoff here. We don’t want to block so much that users disable USBGuard because they can’t live with it, but we also don’t want to allow so much that malicious devices work in common configurations. It’s already risky enough allowing keyboards and mice to be attached after bootup, since if the only keyboard and mouse present on bootup is non-USB (as is the case with most laptops if you don’t plug additional devices into them), keystroke injection devices that present themselves as only a keyboard will be able to attack the system and succeed. But blocking everything other than keyboards, mice, and storage devices may be overkill also.
Does anyone have input on what should be blocked or not blocked by default? Some USB devices to think about here are:
- Webcams
- On its own, a webcam probably can’t cause too much trouble… the worst it could do is video the user on the user’s own machine, it would probably be much more useful for an attacker to record the user with an attacker-controlled machine, which of course USBGuard can’t do anything about.
- Microphones
- Similar situation as webcams.
- Headsets/speakers/miscellaneous other USB audio devices
- Similar situation as webcams.
- Printers
- Could introduce attack surface that we don’t want, see Attacking UNIX Systems via CUPS, Part I
- MIDI interfaces
- Probably pretty rare, no idea what the risks are of allowing these to be used by default, would probably block them just in case.
- Touchscreens
- Input device, similar to a mouse, might even be handled already by allowing mice in the system. Dangers are similar or identical to allowing mice.
- Android devices
- Uses or at least used to use Media Transfer Protocol. Unsure what the risks are here.
- USB Ethernet
- Oftentimes uses RNDIS, which the Linux kernel maintainer Greg Kroah-Hartman has tried to get disabled in Linux at least three times due to supposedly unfixable security issues. (https://www.phoronix.com/news/Linux-Disabling-RNDIS-Drivers, https://www.phoronix.com/news/Linux-Disable-RNDIS-Drivers, https://www.phoronix.com/news/Linux-RNDIS-Removal-EOY2024) I would consider this very high-risk and would NOT enable it.
- Bluetooth dongles
- Could be used to attach arbitrary devices to systems remotely, but this would require some user interaction. Unsure what the implications of a malicious Bluetooth dongle would be. Internal Bluetooth cards actually use the USB bus, but they’ll be present on boot and thus allowed, if everything works as expected.
- 2FA keys
- I believe these present themselves as a human interface device, not sure how safe or unsafe this is or if it’s feasible to allow it by default.
- Anything else we should consider allowing or not allowing by default?