Is it possible a wired mouse can be a malicious device? For example, could a keylogger be installed within a wired mouse that captures keystrokes and sends these to an external server via the internet connection of the computer it is connected to?
I recently ditched my wireless mouse for a wired one after learning about the "mousejacking" risk. But why should we have more trust in a wired mouse (or any USB device for that matter)? The mouse I bought was not in a sealed packet, so theoretically it could have been intercepted at any point along the supply chain and had some malicious hardware device installed within it.
My question relates specifically to the security of USB devices - if a wireless mouse USB dongle can also accept keystrokes, can a wired mouse also contain a device that masquerades as a keyboard and sends malicious keystrokes/commands?
The OS I use is Linux, so I am interested whether Linux is more secure in that respect (for example, not accepting keystrokes from a mouse). But I think the answer to this question would be useful for users of other OSes too.