57 points | 5d ago | Discuss on Hacker News | Back to Radar
Even better: USB controllers are PCI-passed-through to dedicated (disposable) VM(s), so Linux kernel bugs don't expose your system to untrusted USB devices. Same with network devices, etc.
This is of course a very weak protection, since a bad actor can MITM the real device.
It is conceptually similar to sticky-MAC protections, except those raise a very loud alarm that requires admin intervention when the attacker goofs. I suspect you're not shutting down the USB port on rule violation.
> This is of course a very weak protection
Not a protection at all, the opposite. Like a network firewall: block everything by default and enable what the user wants.
By default you have zero allowed USB devices (not even a host USB controller) in a laptop setting (built in keyboards are mostly PS/2, pointing devices, wifi, etc. are PCI devices).
Best part is even if you need some USB devices in some task specific virtual machines, you still don't give the whole controller to the VM, but just the device with a USB-over-ethernet like mechanism.
> I suspect you're not shutting down the USB port on rule violation
There is no port to shut down. The host OS and the task specific VMs don't ever see the USB controller and it's ports.
USB ID is conceptually similar to network “sticky mac”, in that only approved (unauthenticated) device identifiers are allowed on the bus: others see their traffic bit-binned.
The problem is of course that the identifier is sent in plain text, and is not device-bound (an attacker can spoof it).
So the very simplest attack on such systems is to put an interposer between the trusted device and the bus, capture the “trusted” ID, and use it to impersonate.
This is relevant to OS security because rubber ducky attacks can send key streams that do all sorts of fun things.
The network analogue here— sticky mac—- can actually be made tenable; any errors in interposing will result in a loud alarm in the NOC (port gets ERR_SHUTDOWN), and you can use 802.1x. USB device ID has no equivalent: it’s just an ID, and should not be relied upon for (false) security.
So in an spherical cow like theoretical ideal world computers don't have USB controllers. But in the real world some people want to use USB devices in some of their workflows.
If you can lock the host USB controller into an empty disposable virtual machine, you are approaching the ideal. But it gives you the ability to lower your security as you wish and use the plugged in devices. Trusting USB IDs, port numbers etc. are only an optional convenience so real world people don't have to use even more insecure systems just because they want to use a mouse or a flash drive.
But it is even better: what if my USB mouse switches to be a keyboard 2 minutes after approval to be used in the host system? In Qubes OS nothing, because it is not the actual USB mouse that is passed back to the host, but only the mouse movements/click events through a very minimal, easy to audit "mouse event forwarder" system. The same is true for some other categories of USB devices, so linux kernel vulnerabilities in your "host OS" or in task specific virtual machines are not exploitable with USB devices. Only if you specifically choose to tunnel the whole USB device into a specific VM, USB-over-ethernet style, but then only that VM can be attacked.
You don't protect against that with software, but with careful supply-chain control, a faraday cage, and an armed guard who detains anyone attempting something funny.
Neither the "host OS" (no such thing really, Qubes OS is based on Xen hypervisor) or any other VM even sees the physical USB controller, let alone anything plugged into it.
Of course it does.
This is shady. It's also an issue a lot of people may not be aware of. It's best to call attention to holes lest someone fall in one. Anyone maintaining a serious air-gapped system should already be strictly controlling who has physical access to the machine. But there are a lot of less serious but very vulnerable targets that admins would be wise to consider this sort of thing. Retail displays, road signs, kiosks, etc.
Just because trespassing is a crime doesn't mean it's still not wise to lock your doors.
they made optical mice during the ps2 era too but i'm unsure about the resolution.
there are also usb-to-serial and usb-to-irda adapters.
the usb-to-irda may be convertible to visible light freqs via basic soldering.
palmos and windowsce hardware devices may be sufficiently early enough to not suffer from arm trustzone and intel amt | me or amd psp.
It’s a keyboard if you can show it to your site manager and they nod and say “OK” instead of “you’re fired.”
The other is a small self-contained computer with multiple airwave capabilities, some of its protections removed (rooting), all in an obsolete system (an old Android phone) which is itself a hive of vulnerabilities for anybody that gets access to it physical or digital.
If that was brought into my workplace there'd be serious discussions.
That is not a criticism of your creative work here, just an acknowledgement that a portion of workplaces would not take this lightly. Most who that applies to, should know, but it's still worth mentioning.
Fyi... Apple MacBook laptops and iPhones block USB peripherals (including keyboards) unless the password is first entered on the real builtin keyboard or touchscreen to approve it.
Supposedly, Apple does this to prevent gadgets like yours from brute-forcing passwords.
I wanted to do this with a Flipper Zero on a locked-down system but I refrained, a keyboard firing a script at 1000 WPM really looks like an attack, and I don't want to do something that looks like an attack on a system that is not mine.
It doesn't mean it is not useful, in fact, it may be too useful, that's the problem...
That's all I needed to see.
Some of us do: https://usbguard.github.io/
Depending on threat model (do you trust the network?), that seems less secure than keeping credentials on-device.
Comments are loaded live from Hacker News and are not stored by Mid or Real.