Implementing USB Device Control Policy
When to Use
Use this skill when:
- Restricting USB storage devices to prevent data exfiltration or malware introduction
- Implementing device control policies via GPO, Intune, or EDR device control modules
- Creating USB whitelists for authorized devices while blocking all others
- Meeting compliance requirements for removable media control (PCI DSS, HIPAA)
Do not use for network-based DLP or cloud storage restrictions.
Common Misconfigurations & Verification
- Over-broad allow exceptions: an exception keyed only on
VID_xxxx (vendor) or a USB class permits every device from that vendor/class, not the specific approved unit. Pin allow rules to the full Device Instance ID (USB\VID_0781&PID_5583\<serial>) and verify the serial component is present, not a wildcard.
- Device Installation vs. Removable Storage Access confusion: "Prevent installation of devices not described by other policy settings" blocks new installs but does nothing to already-installed drivers; existing devices keep working until removed. Pair it with
Removable Storage Access → All Removable Storage classes: Deny all access for live blocking.
- Blocking all USB breaks HID: denying the whole USB bus kills keyboards/mice and USB-C docks. Scope deny rules to mass storage / WPD, and confirm Thunderbolt and MTP phones are covered too — they often slip past a storage-only rule.
- Read-only assumed = safe: "Deny write access" still allows malware to autorun from the device. Confirm whether read should also be denied for untrusted media.
- Verification: with the policy applied, insert an unapproved USB stick — it must be blocked (Event ID 6416 absent or access-denied, MDE
DeviceEvents shows the deny) — then insert an approved device by full instance ID and confirm it mounts. Test a USB keyboard still works to prove HID wasn't caught.
Prerequisites
- Active Directory GPO or Microsoft Intune for policy deployment
- Device Instance IDs of authorized USB devices
- EDR with device control module (CrowdStrike, Microsoft Defender for Endpoint)
- Understanding of USB device classes (mass storage, HID, printer, etc.)
Workflow
Step 1: Inventory Current USB Usage
# Enumerate currently connected USB devices
Get-PnpDevice -Class USB | Select-Object InstanceId, FriendlyName, Status
# Query USB storage history from registry
Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Enum\USBSTOR\*\*" |
Select-Object FriendlyName, ContainerID, HardwareID
# Collect USB usage across fleet (via EDR or scripts)
# CrowdStrike: Investigate → USB Device Activity
# MDE: DeviceEvents | where ActionType == "UsbDriveMounted"
Step 2: Configure GPO Device Control
Computer Configuration → Administrative Templates → System → Removable Storage Access
- All Removable Storage classes: Deny all access → Enabled
(Block read AND write for all removable storage)
OR for granular control:
- CD and DVD: Deny read access → Enabled
- Removable Disks: Deny write access → Enabled (read-only USB)
- Tape Drives: Deny all access → Enabled
- WPD Devices: Deny all access → Enabled
To allow specific approved USB devices:
Computer Configuration → Administrative Templates → System → Device Installation
→ Device Installation Restrictions
- Prevent installation of devices not described by other policy settings → Enabled
- Allow installation of devices that match any of these device IDs → Enabled
Add approved Device IDs: USB\VID_0781&PID_5583 (example: SanDisk Cruzer)
Step 3: Deploy via Microsoft Defender for Endpoint
<!-- MDE Device Control policy (XML format) -->
<PolicyGroups>
<Group Id="{d9a81dc0-1234-5678-9abc-def012345678}"
Type="Device" Name="Approved USB Devices">
<MatchClause>
<MatchType>VID_PID</MatchType>
<MatchData>0781_5583</MatchData> <!-- SanDisk -->
</MatchClause>
</Group>
</PolicyGroups>
<PolicyRules>
<Rule Id="{rule-guid}" Name="Block unapproved USB storage">
<IncludedIdList>
<PrimaryId>RemovableMediaDevices</PrimaryId>
</IncludedIdList>
<ExcludedIdList>
<GroupId>{d9a81dc0-1234-5678-9abc-def012345678}</GroupId>
</ExcludedIdList>
<Entry>
<Type>Deny</Type>
<AccessMask>63</AccessMask> <!-- All access -->
<Options>4</Options> <!-- Show notification -->
</Entry>
</Rule>
</PolicyRules>
Step 4: Audit and Monitor
# Monitor USB events in SIEM:
# Windows Event ID 6416 - New external device recognized
# Windows Event ID 4663 - File access on removable media
# MDE: DeviceEvents where ActionType contains "Usb"
# Generate USB activity reports monthly
# Track: blocked attempts, approved device usage, exception requests
Key Concepts
| Term |
Definition |
| VID/PID |
Vendor ID and Product ID that uniquely identify USB device models |
| Device Instance ID |
Unique identifier for a specific physical USB device |
| Device Control |
EDR/endpoint feature restricting device access based on type, vendor, or serial number |
| USB Class |
USB device category (mass storage 08h, HID 03h, printer 07h) |
Tools & Systems
- Microsoft Defender Device Control: MDE module for USB restriction policies
- CrowdStrike Falcon Device Control: EDR-based USB policy enforcement
- Group Policy (Removable Storage Access): Built-in Windows USB restriction via GPO
- Endpoint Protector: Third-party device control and DLP solution
Common Pitfalls
- Blocking all USB without exception: Keyboards and mice are USB HID devices. Block only mass storage class, not all USB.
- Not communicating policy to users: USB blocks without user notification generate helpdesk tickets. Display a notification explaining the policy.
- Ignoring USB-C and Thunderbolt: Modern devices use USB-C for docking, charging, and storage. Policies must distinguish between USB storage and USB peripherals.
- No approved device process: Users with legitimate USB needs (presentations, field data collection) require an exception process with approved, encrypted devices.
1---2name: implementing-usb-device-control-policy3description: Implements USB device control policies to restrict unauthorized removable media access on endpoints, preventing data exfiltration and malware introduction via USB devices. Use when deploying device control via Group Policy, Intune, or EDR platforms to enforce USB restrictions. Activates for requests involving USB control, removable media policy, device control, or data loss prevention via USB.4license: Apache-2.05---6# Implementing USB Device Control Policy
7
8## When to Use
9
10Use this skill when:
11- Restricting USB storage devices to prevent data exfiltration or malware introduction
12- Implementing device control policies via GPO, Intune, or EDR device control modules
13- Creating USB whitelists for authorized devices while blocking all others
14- Meeting compliance requirements for removable media control (PCI DSS, HIPAA)
15
16**Do not use** for network-based DLP or cloud storage restrictions.
17
18## Common Misconfigurations & Verification
19
20- **Over-broad allow exceptions:** an exception keyed only on `VID_xxxx` (vendor) or a USB *class* permits every device from that vendor/class, not the specific approved unit. Pin allow rules to the full Device Instance ID (`USB\VID_0781&PID_5583\<serial>`) and verify the serial component is present, not a wildcard.
21- **Device Installation vs. Removable Storage Access confusion:** "Prevent installation of devices not described by other policy settings" blocks *new* installs but does nothing to already-installed drivers; existing devices keep working until removed. Pair it with `Removable Storage Access → All Removable Storage classes: Deny all access` for live blocking.
22- **Blocking all USB breaks HID:** denying the whole USB bus kills keyboards/mice and USB-C docks. Scope deny rules to mass storage / WPD, and confirm Thunderbolt and MTP phones are covered too — they often slip past a storage-only rule.
23- **Read-only assumed = safe:** "Deny write access" still allows malware to autorun from the device. Confirm whether read should also be denied for untrusted media.
24- **Verification:** with the policy applied, insert an unapproved USB stick — it must be blocked (Event ID 6416 absent or access-denied, MDE `DeviceEvents` shows the deny) — then insert an approved device by full instance ID and confirm it mounts. Test a USB keyboard still works to prove HID wasn't caught.
25
26## Prerequisites
27
28- Active Directory GPO or Microsoft Intune for policy deployment
29- Device Instance IDs of authorized USB devices
30- EDR with device control module (CrowdStrike, Microsoft Defender for Endpoint)
31- Understanding of USB device classes (mass storage, HID, printer, etc.)
32
33## Workflow
34
35### Step 1: Inventory Current USB Usage
36
37```powershell
38# Enumerate currently connected USB devices
39Get-PnpDevice -Class USB | Select-Object InstanceId, FriendlyName, Status
40
41# Query USB storage history from registry
42Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Enum\USBSTOR\*\*" |
43 Select-Object FriendlyName, ContainerID, HardwareID
44
45# Collect USB usage across fleet (via EDR or scripts)
46# CrowdStrike: Investigate → USB Device Activity
47# MDE: DeviceEvents | where ActionType == "UsbDriveMounted"
48```
49
50### Step 2: Configure GPO Device Control
51
52```
53Computer Configuration → Administrative Templates → System → Removable Storage Access
54
55- All Removable Storage classes: Deny all access → Enabled
56 (Block read AND write for all removable storage)
57
58OR for granular control:
59- CD and DVD: Deny read access → Enabled
60- Removable Disks: Deny write access → Enabled (read-only USB)
61- Tape Drives: Deny all access → Enabled
62- WPD Devices: Deny all access → Enabled
63
64To allow specific approved USB devices:
65Computer Configuration → Administrative Templates → System → Device Installation
66 → Device Installation Restrictions
67
68- Prevent installation of devices not described by other policy settings → Enabled
69- Allow installation of devices that match any of these device IDs → Enabled
70 Add approved Device IDs: USB\VID_0781&PID_5583 (example: SanDisk Cruzer)
71```
72
73### Step 3: Deploy via Microsoft Defender for Endpoint
74
75```xml
76<!-- MDE Device Control policy (XML format) -->
77<PolicyGroups>
78 <Group Id="{d9a81dc0-1234-5678-9abc-def012345678}"
79 Type="Device" Name="Approved USB Devices">
80 <MatchClause>
81 <MatchType>VID_PID</MatchType>
82 <MatchData>0781_5583</MatchData> <!-- SanDisk -->
83 </MatchClause>
84 </Group>
85</PolicyGroups>
86
87<PolicyRules>
88 <Rule Id="{rule-guid}" Name="Block unapproved USB storage">
89 <IncludedIdList>
90 <PrimaryId>RemovableMediaDevices</PrimaryId>
91 </IncludedIdList>
92 <ExcludedIdList>
93 <GroupId>{d9a81dc0-1234-5678-9abc-def012345678}</GroupId>
94 </ExcludedIdList>
95 <Entry>
96 <Type>Deny</Type>
97 <AccessMask>63</AccessMask> <!-- All access -->
98 <Options>4</Options> <!-- Show notification -->
99 </Entry>
100 </Rule>
101</PolicyRules>
102```
103
104### Step 4: Audit and Monitor
105
106```
107# Monitor USB events in SIEM:
108# Windows Event ID 6416 - New external device recognized
109# Windows Event ID 4663 - File access on removable media
110# MDE: DeviceEvents where ActionType contains "Usb"
111
112# Generate USB activity reports monthly
113# Track: blocked attempts, approved device usage, exception requests
114```
115
116## Key Concepts
117
118| Term | Definition |
119|------|-----------|
120| **VID/PID** | Vendor ID and Product ID that uniquely identify USB device models |
121| **Device Instance ID** | Unique identifier for a specific physical USB device |
122| **Device Control** | EDR/endpoint feature restricting device access based on type, vendor, or serial number |
123| **USB Class** | USB device category (mass storage 08h, HID 03h, printer 07h) |
124
125## Tools & Systems
126
127- **Microsoft Defender Device Control**: MDE module for USB restriction policies
128- **CrowdStrike Falcon Device Control**: EDR-based USB policy enforcement
129- **Group Policy (Removable Storage Access)**: Built-in Windows USB restriction via GPO
130- **Endpoint Protector**: Third-party device control and DLP solution
131
132## Common Pitfalls
133
134- **Blocking all USB without exception**: Keyboards and mice are USB HID devices. Block only mass storage class, not all USB.
135- **Not communicating policy to users**: USB blocks without user notification generate helpdesk tickets. Display a notification explaining the policy.
136- **Ignoring USB-C and Thunderbolt**: Modern devices use USB-C for docking, charging, and storage. Policies must distinguish between USB storage and USB peripherals.
137- **No approved device process**: Users with legitimate USB needs (presentations, field data collection) require an exception process with approved, encrypted devices.