Fake USB Keyboards: How Keystroke-Injection Devices Reach a Kiosk PC
A USB stick that types on its own can run commands on a kiosk faster than a visitor can notice. Windows treats it as a trusted keyboard, which is why the storage rules in the main guide never trigger. This page explains the class of device and the layers that help, without attack instructions.
Four layers, none of them sufficient alone.
See the four layers →A fake USB keyboard looks like an ordinary keyboard to Windows, so storage blocking never sees it. Defend with four layers: cover the port, set a firmware password, allow only known hardware IDs for input devices, and watch for machine-regular typing. No single layer is enough on its own.
- Applies to
- Windows kiosks with exposed USB-A or USB-C ports
- Time needed
- 30 to 60 minutes for the first kiosk
- Difficulty
- Moderate
- Cost
- Port blockers cost money; the rest is free
- Needs admin or internet
- Administrator rights yes; internet no
- Reading time
- 7 min
Why Windows Trusts a Device That Says It Is a Keyboard
Windows trusts a device that declares itself a keyboard, because keyboards are class 03h input devices and need no prompt to work. A Rubber Ducky-style device uses that trust: it announces itself as input and sends keystrokes as fast as the host accepts them.
Part of our guide to protecting a public kiosk PC from USB attacks; the overview there shows why this gap exists.
ManageEngine describes the attack as emulated keystrokes with no stored files, and the University of Florida paper behind GoodUSB notes that one device can register as storage and a keyboard together. That mix is why a drive that looks harmless can still type.
Why Storage Blocking Does Not Stop Keystroke Injection
Storage blocking acts on the storage and disc classes, and a keyboard is neither. USB Block, which this site recommends for storage, lists storage, discs, network and non-system drives on its page and does not describe keyboard control, so it does not close this gap.
We make USB Block and we say plainly that it is a storage control. Pair any storage tool with the layers below.
The USB Block product page lists the same scope. That limit holds for the Windows removable-storage policy and the USBSTOR switch too. All three are class-level controls for drives, not input.
Four Layers That Do Help on a Kiosk
Four layers help on a kiosk: a physical port cover, a firmware setting with a password, an allow-by-ID rule inside Windows and active monitoring of typing behavior. Each answers a different failure of the others.
| Layer | What it does | Weak point | Cost |
|---|---|---|---|
| Physical port cover | Stops any device on that port | Ports left open; key holder | Hardware |
| Firmware setting | Turns ports or controllers off, behind a setup password | Not every board offers it | Free |
| Allow-by-ID rule | Blocks input devices not on your list | IDs can be copied by a determined attacker | Free |
| Behavior monitoring | Flags typing that is too regular | Needs a product that supports it | Paid |
Hardware blockers are sold in packs with a shared removal key; ITPRC reviews nine USB port-locking tools if you need a starting list.
Allow-by-ID Rules and Where They Fail
Windows can allow only input devices whose hardware ID you list by using Device Installation Restrictions. The kiosk keeps its own keyboard and scanner, and every other newly plugged input device is refused. The catch is that a device can claim another device’s ID.
- Plug in the kiosk keyboard and open Device Manager, Details, Hardware Ids.
- Enable Allow installation of devices that match any of these device IDs and add each ID.
- Enable the matching Prevent rule for other devices, and keep the USB hub and host controller classes allowed.
- Test with a spare keyboard that is not on the list.
Blocking the USB class itself. Microsoft cautions that doing so can cut off the keyboard and mouse that depend on hubs and controllers.
What Detection Looks For: Typing Speed and Device Behavior
Detection tools compare typing rhythm: a person’s key gaps vary, an injected burst is evenly spaced and far faster. OPSWAT’s MetaDefender Kiosk documents typing-behavior analysis for this purpose and ships Bad USB Detection switched off by default.
Detection costs money and needs an agent or a kiosk product, so it suits sites that already scan visitor media. RedesZone’s Spanish tutorial on Rubber Ducky devices covers the same class and suggests user-side habits.
Power-Surge Devices Are a Separate Problem
A power-surge device is a different attack: it charges capacitors from the port and discharges high voltage back into it, repeatedly, until unplugged. Software cannot stop that, and disabling ports in Group Policy does not prevent the surge.
The only reliable control is physical: cover the port, or use hardware that isolates it. OPSWAT notes that its own surge detection needs specific kiosk hardware with an attack-resistant hub.
A Short Checklist for a Kiosk You Manage
The allow-by-ID rule, applied to one kiosk, becomes a checklist: cover spare ports, set the firmware password, list approved input IDs, test with an unlisted keyboard and review the log or sheet weekly. Each tick is a check you can repeat after updates.
Fake-keyboard checklist
0 of 5 completed
Fake Keyboard Questions Answered
Does blocking USB storage stop a Rubber Ducky?
Not on its own. A Rubber Ducky presents itself as a keyboard, which is a different device class, so a storage block never sees it. Cover the port, set a firmware password, and apply allow-by-ID rules for input devices to close the gap.
Can software detect a fake USB keyboard?
Some products can. Typing-behavior analysis flags keystrokes that arrive too regularly or too fast for a person, but it needs a supporting product and an administrator console. Windows itself has no built-in feature that does this, so plan for a paid tool if you need it.
Are physical port blockers worth it on a kiosk?
For ports the kiosk never uses, yes. Blockers are sold in multi-packs with a shared removal key for compatible USB-A ports, and they stop every device type on the port they plug. They cannot help on ports the kiosk needs, such as the reader or printer.
Is a fake keyboard the same as a USB Killer?
They are different attacks. A fake keyboard sends keystrokes, while a USB Killer sends a power surge into the port. Allow-by-ID rules and monitoring answer the first; only a physical cover or isolation hardware reliably answers the second, as policy cannot stop electricity.
Does USB Block stop fake keyboards?
The official page does not say so. It describes blocking storage, discs, optional network access and non-system drives, with a password and a log, and it does not describe keyboard control. Use it for the storage half of the problem and add the layers on this page for input.
For the storage half of the problem, USB Block gives a password and an authorized list on Windows; see its official product page for current Windows support. The installer comes from the official NewSoftwares.net downloads page.
More kiosk USB guides on input and storage
Kiosk USB ports stopped working
Dead keyboard or reader after lockdown, and the safe undo order.
Policy, registry or software
Edition limits, upkeep and tamper resistance side by side.