Does a USB Storage Block Stop a Fake Keyboard Attack?
A short explanation of what a USB storage block does not cover, and which controls do.
No. A storage block does not stop a device that acts as a keyboard, because that device is not storage. Use a device allow list by class or ID, standard user accounts, a screen lock and physical port control to reduce the risk.
| Storage block stops | Drives |
|---|---|
| Does not stop | Input devices |
| Helps | Allow list and screen lock |
| Risk level | Narrow but real |
What a fake keyboard attack is
A fake keyboard attack uses a device that looks like a normal keyboard but types preset commands. Windows trusts keyboards by default, so storage rules never see it. The risk is real but narrow, and the answer is a different control.
Blocking USB storage makes every USB port safe.
A storage block handles drives. Input devices need an allow list by class or ID, or control over who can reach the port.
Controls that do address it
Several controls reduce the risk, and none is perfect on its own. Layer them: an allow list, a screen lock, standard user accounts and physical control over ports on shared machines, because no single control covers every case.
| Control | Addresses fake keyboards | Notes | ||
|---|---|---|---|---|
| Storage deny rule | No | Covers drives only | ||
| Device ID allow list | Yes | Needs careful testing | ||
| Standard user account | Partly | Limits what typed commands can do | ||
| Screen lock | Yes, when away | Stops typing at an unattended PC | ||
| Port covers or locks | Yes | Physical control | ||
| Our reading | Layer them | Test first | Cheap and effective | Good for shared PCs |
A safe way to build an allow rule
Build an allow rule so the real keyboard and mouse are listed first. Then block everything else with a layered order so allow rules win. Keep a spare keyboard and a way back in before you apply it.
Note your trusted devices
Collect hardware IDs for your own keyboard and mouse in Device Manager.
Allow them first
Add the IDs to the allow settings under Device Installation Restrictions.
Prevent everything else
Enable the prevent rule with layered order of evaluation.
Test with a spare
Plug a spare keyboard in and confirm it is refused, then confirm yours still works.
A prevent rule on a PC with a single keyboard and no remote access can force a recovery boot. Test on a spare PC first.
The basic storage steps are in the main guide.
Frequently asked questions
These answers cover the questions people ask about keyboard-style devices, what a storage block misses and which controls help. Each one stands alone, so read only the one you need before you decide anything about your own PC.
No. A device that presents itself as a keyboard is an input device, not storage, so storage rules do not apply. It needs a device allow list by class or ID, or physical port control.
It can type text quickly, so it can open a terminal and enter commands as the signed-in user. It does not need a drive letter at all.
Use a device allow list by ID, lock the screen when you step away, keep users on standard accounts and control physical access to ports on shared PCs.
It can, if the rule blocks the input class. Allow your own keyboard and mouse first, and test with a spare input device.
It is far less common than a careless drive swap. For most home PCs, a storage block plus a screen lock is a sensible level of protection.
Need the full walkthrough?
The main guide covers every step to block unknown USB devices in Windows 11, from the restore point to the final test.