Assuming it doesn’t present a USB storage device, the simple answer is: no, it won’t be infected in most reasonable scenarios.
The more complicated answer is that any complicated USB device could theoretically be reprogrammed to act maliciously. This could be especially useful to jump air gaps or ensure that all machines used by an individual are infected.
How could this happen? Two examples:
- An attacker could reprogram the firmware to act as a different USB device, perhaps temporarily. For example if you’re not using your USB receiver it could present as a keyboard and type keystrokes (open Powershell, download some malware etc.).
- Firmware could be reprogrammed to exploit a bug in the vendor drivers. For example triggering some form of buffer overflow or double free by violating the expected protocol.
There are significant hurdles to achieving these aims, for example:
- Many devices can’t be updated. The firmware is fixed during manufacture.
- Most commercial devices won’t have a lot of spare capacity. The manufacturer will try to use the smallest micro controller and memory possible.
- Update mechanisms will be proprietary and undocumented, requiring substantial reverse engineering.
- Many (but not all) devices will have code signing or update validation at the micro controller level, typically to prevent counterfeiting. This is more likely to affect common brands, reducing the risk of widespread attacks.
- Lots of common devices use generic drivers, provided by the operating system. These will (hopefully) present less chance of vulnerabilities.
However, the chances of this are incredibly slim. Slim enough they probably won’t appear in most corporate threat models, but would potentially register for a defence manufacturer and certainly for sensitive Government departments.