Block Unknown USB Block Unknown USB

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.

  • Editorial Team
  • Last verified: November 2026
  • 5 min read
Quick answer

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.

At a glance
Storage block stopsDrives
Does not stopInput devices
HelpsAllow list and screen lock
Risk levelNarrow but real
USB device splitting into a blocked storage path and an open keyboard pathIllustration of a USB stick with two dashed paths: one to a storage box marked blocked and one to a keyboard box marked as needing its own rule.Storage classBlocked by policyKeyboard classNeeds its own ruleOne plug can announce more than one class

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.

Which USB control covers which device classThree rows comparing a storage rule against a disk class and a keyboard class, and a class allow list against keyboards.What each control looks atStorage ruleDisk classStops a flash driveStorage ruleKeyboard classDoes not applyClass allow listKeyboard classCan hold new keyboardsA device that announces two classes needs a rule for each
Where a storage rule helps and where it does not.
Myth

Blocking USB storage makes every USB port safe.

Fact

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 and what it covers
ControlAddresses fake keyboardsNotes
Storage deny ruleNoCovers drives only
Device ID allow listYesNeeds careful testing
Standard user accountPartlyLimits what typed commands can do
Screen lockYes, when awayStops typing at an unattended PC
Port covers or locksYesPhysical control
Our readingLayer themTest firstCheap and effectiveGood 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.

  1. Note your trusted devices

    Collect hardware IDs for your own keyboard and mouse in Device Manager.

  2. Allow them first

    Add the IDs to the allow settings under Device Installation Restrictions.

  3. Prevent everything else

    Enable the prevent rule with layered order of evaluation.

  4. Test with a spare

    Plug a spare keyboard in and confirm it is refused, then confirm yours still works.

Do not lock yourself out

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.