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.
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.
| Covers | Device classes, safe blocks, the fake-keyboard gap |
|---|---|
| Best for | Admins worried about locking themselves out |
| Time to read | 6 minutes |
| Last verified | November 2026 |
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.
| Control | Storage drives | Keyboard and mouse | Printers |
|---|---|---|---|
| USBSTOR Start = 4 | Blocked | Unaffected | Unaffected |
| Deny all removable storage classes | Blocked | Unaffected | Unaffected |
| Disable a hub in Device Manager | Blocked behind that hub | Blocked if behind that hub | Blocked if behind that hub |
| Default deny in Defender device control | Blocked | Not covered by the storage rules | Blocked unless you allow it |
| Verdict | Class-level blocks are the safe choice | Hub-level blocks are risky | Always test printers |
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.
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
Block by class, not by port
Use the storage deny setting or the USBSTOR value, never a blanket “disable all USB” rule.
Keep a second way in
Know where the on-screen keyboard is, or enable remote access, before any device-level rule.
Cover unused ports
On a kiosk or reception PC, physical port blockers cost little and stop the keyboard trick.
Allow-list input you own
If you use device installation restrictions, add your keyboard, mouse and receiver IDs first.
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.