Using Linux, is there anyway to detect that an arbitrary USB device is a BadUSB or not?
- Booting a Linux into
- No graphical interface / tty (getty login).
- Plug the USB into the PC.
- Wait and see if it starts typing any character on
Are these steps enough to detect a BadUSB?
This answer states that:
A compromised device can easily imitate any and all responses of a "good" device until and unless certain conditions are met, when it will deploy a payload.
However, this one says:
The hacked firmware have limited access to the computer, cannot detect the OS being used, and cannot infer anything about the computer status. So if you plug it on a computer with the screen locked, the "program" on the USB cannot detect the screen is locked, and usually will send keystrokes that cannot do anything because the screen is locked.