3 ms·
Can a USB device posing as a keyboard also supply charging voltage?
by grenoire 7y ago
Can a USB device posing as a keyboard also supply charging voltage?
- tialaramex 7y agoIs your question: Do real devices do this? None that I'm aware of. Are they allowed to do this? I would be astonished if the USB-C specification has a big list of what is or is not allowed to volunteer power, seems like just an opportunity to fail more than necessary. But anyway, suppose phones are smart enough to refuse to charge from a keyboard. These cable are remote controlled. So you plug in your phone, it charges... and then a minute later when you're distracted it gets told the charger went away... and now here's a keyboard. Attack in progress. I reckon you could work out a procedure e.g. pretend to be power for 90 seconds, supposing experience teaches that's how long people take to forget they plugged the phone in. Then, turn the power off. Watch. An attentive user may notice, unplug their phone and try again thinking the cable may be faulty. Re-enable power when the phone vanishes. If not, after giving them say 30 seconds to notice switch to keyboard mode. Or you could just wing it. A lot of good physical penetration testers "wing it" all the time.