From what I understood, the possibility of having a multitude of device types connected to the computer via USB (keyboard, mouse, gadgets, sticks, webcams, ...) is a security risk:
- I connect a USB stick with malware on it.
- The malware says "I'm a keyboard" -> The OS thinks a keyboard is connected.
- The malware can execute arbitrary keystrokes.
It seems to me that it would be pretty simple to prevent this from happening by asking the user every time a USB keyboard gets connected something like "We think a USB keyboard was connected. Due to security concerns we have to ask you: Is this correct?", giving the user the possibility to answer "yes" or "no". When the user clicks on "yes" (with the mouse / with another keyboard) the device is "registered" and can be used. If the user clicks "no", it is not "registered" and thus cannot be used.
Would this work?
Is there a possibility to make Ubuntu handle USB keyboards like this?