Block USB Storage but Keep the Keyboard and Mouse Working

Stopping drives is easy. Stopping drives without stopping the keyboard, mouse and printer needs a clear picture of USB device classes.

NewSoftwares.net editorial teamLast verified: November 2026
Quick answer

Storage blocks, such as the USBSTOR value or the removable-storage deny policy, leave keyboards and mice alone. The risk is the reverse: a rogue device can pose as a keyboard, and a storage block will not notice. Cover unused ports and allow-list the input devices you own.

At a glance
CoversDevice classes, safe blocks, the fake-keyboard gap
Best forAdmins worried about locking themselves out
Time to read6 minutes
Last verifiedNovember 2026
USB hub with storage blocked and keyboard and mouse connected

How Windows Tells USB Devices Apart

Windows loads a different driver for each USB device class: mass storage for drives, human interface devices for keyboards and mice, and printer drivers for printers. A block aimed at the storage driver leaves the others untouched.

That separation is why a storage block is safe for daily work. It is also why it is incomplete. A device decides which class it announces, and a modified drive can announce itself as a keyboard.

Four USB device classes shown as separate lanes
Each device class loads its own driver.
What each block touches
ControlStorage drivesKeyboard and mousePrinters
USBSTOR Start = 4BlockedUnaffectedUnaffected
Deny all removable storage classesBlockedUnaffectedUnaffected
Disable a hub in Device ManagerBlocked behind that hubBlocked if behind that hubBlocked if behind that hub
Default deny in Defender device controlBlockedNot covered by the storage rulesBlocked unless you allow it
VerdictClass-level blocks are the safe choiceHub-level blocks are riskyAlways test printers
Flash drive wearing a keyboard mask beside a blocked storage symbol
A drive that claims to be a keyboard is not storage as far as Windows is concerned.

The Drive That Types

At the Black Hat conference in 2014, Security Research Labs demonstrated BadUSB: reprogramming a USB drive’s firmware so it acts as a keyboard, a network card or another device. A scanner cannot read that firmware, and a fresh Windows install does not remove it.

Their advice for defenders is practical: restrict who can plug things in, use a BIOS password and boot only from the hard drive, and treat generic block lists with caution.

Honest limit

No setting on this page fully stops a modified device. Physical control of the ports does more than any storage block against this attack.

Practical Steps That Keep Input Working

  1. Block by class, not by port

    Use the storage deny setting or the USBSTOR value, never a blanket “disable all USB” rule.

  2. Keep a second way in

    Know where the on-screen keyboard is, or enable remote access, before any device-level rule.

  3. Cover unused ports

    On a kiosk or reception PC, physical port blockers cost little and stop the keyboard trick.

  4. Allow-list input you own

    If you use device installation restrictions, add your keyboard, mouse and receiver IDs first.

  5. Test both halves

    Type, click, print, then plug in a spare drive.

USB Block’s product page describes blocking storage, discs and network locations and does not mention keyboards or mice, so treat input devices as outside what it documents. For the registry and policy steps, see the main guide.

Questions About This Topic

No. The USBSTOR value and the removable-storage deny settings target storage drivers and storage classes. Keyboards and mice use a different driver, so they keep working. Problems arise only when you add broad rules that cover all USB devices or whole ports.

Yes. Researchers at Security Research Labs showed in 2014 that a drive’s firmware can be rewritten so it reports itself as a keyboard and types commands. A storage block sees no storage device, so it does not react. Port control and allow-listed input IDs are the answer.

Not as a security control. A hub often carries the keyboard and mouse as well, so disabling it can leave you with no input. If you must experiment, do it with a second way into the PC, such as remote access, and write down what you changed.

Yes, the receiver is a USB device that registers as a keyboard or mouse. A storage block does not touch it. If you build an input allow-list, include the receiver’s ID, or the keyboard stops working.

After the change and a restart, press keys, move the mouse and print a test page before you leave. Then plug in a spare drive to confirm it is still blocked. Both halves of the test matter.