Description: This is a policy.
Device Type: Windows Removable Device
A device control policy is a combination of policy rules, groups and settings.
This sample is based on the sample files.
To configure the sample, follow the deployment instructions.
Name | Devices | Rule Type | Access | Notification | Conditions | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Included | Excluded | Disk Read | Disk Write | Disk Execute | File Read | File Write | File Execute | ||||
Audit Read Activity |
|
|
Allow | ✅ | - | - | - | - | - | None (0) | - |
Audit Allowed | 📄 | - | - | - | - | - | Send event (2) | - |
This is a group of type Device. The match type for the group is MatchAny.
Property | Value |
---|---|
PrimaryId | RemovableMediaDevices |
PrimaryId | CdRomDevices |
PrimaryId | WpdDevices |
View XML
<Group Id="{9b28fae8-72f7-4267-a1a5-685f747a7146}" Type="Device">
<!-- ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyGroups/%7B9b28fae8-72f7-4267-a1a5-685f747a7146%7D/GroupData -->
<Name>Any Removable Storage and CD-DVD and WPD Group_1</Name>
<MatchType>MatchAny</MatchType>
<DescriptorIdList>
<PrimaryId>RemovableMediaDevices</PrimaryId>
<PrimaryId>CdRomDevices</PrimaryId>
<PrimaryId>WpdDevices</PrimaryId>
</DescriptorIdList>
</Group>
Setting Name | Setting Value | Description | Documentation |
---|---|---|---|
DefaultEnforcement | Deny | Control Device Control default enforcement. This is the enforcement applied if there are no policy rules present or at the end of the policy rules evaluation none were matched. | documentation |
DeviceControlEnabled | True | Enables/disables device control | documentation |
This policy is based on information in the following files:
- Group Policy/Any Removable Storage and CD-DVD and WPD Group.xml
- Intune OMA-URI/Scenario 8 Audit Read_Intune.xml
Device control policy rules and groups can be deployed through the following management tools:
Create a reusable setting for Any Removable Storage and CD-DVD and WPD Group_1
-
Navigate to Home > Endpoint Security > Attack Surface Reduction
-
Click on Reusable Settings
-
Click (+) Add
-
Enter the Any Removable Storage and CD-DVD and WPD Group_1 for the name.
-
Optionally, enter a description
-
Click on "Next"
-
Set the match type toggle to MatchAny
-
Click "Next"
-
Click "Add"
Create a Device Control Rules configuration profile
- Navigate to Home > Endpoint Security > Attack Surface Reduction
- Click on "Create Policy"
- Under Platform, select "Windows 10 and later"
- Under Profile, select "Device Control Rules"
- Click "Create"
- Under Name, enter **
- Optionally, enter a description
- Click "Next"
Add a rule for Audit Read Activity to the policy
-
Click on "+ Set reusable settings" under Included Id
-
Click on Any Removable Storage and CD-DVD and WPD Group_1
-
Click on "Select"
-
Click on "+ Edit Entry"
-
Enter Audit Read Activity for the name
-
Select Allow from "Type"
-
Select None from "Options"
-
Select Read from "Access mask"
-
Add another entry. Click on "+ Add"
-
Select Audit Allowed from "Type"
-
Select Send event from "Options"
-
Select Read from "Access mask"
-
Click "OK"
Define device control policy groups
- Go to Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus > Device Control > Define device control policy groups.
- Save the XML below to a network share.
<Groups>
<Group Id="{9b28fae8-72f7-4267-a1a5-685f747a7146}" Type="Device">
<!-- ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyGroups/%7B9b28fae8-72f7-4267-a1a5-685f747a7146%7D/GroupData -->
<Name>Any Removable Storage and CD-DVD and WPD Group_1</Name>
<MatchType>MatchAny</MatchType>
<DescriptorIdList>
<PrimaryId>RemovableMediaDevices</PrimaryId>
<PrimaryId>CdRomDevices</PrimaryId>
<PrimaryId>WpdDevices</PrimaryId>
</DescriptorIdList>
</Group>
</Groups>
- In the Define device control policy groups window, select Enabled and specify the network share file path containing the XML groups data.
Define device control policy rules
- Go to Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus > Device Control > Define device control policy rules.
- Save the XML below to a network share.
<PolicyRules>
<PolicyRule Id="{4dd8a057-9c58-4a86-8fc2-0d7989d7ce6c}" >
<!-- ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyRules/%7B4dd8a057-9c58-4a86-8fc2-0d7989d7ce6c%7D/RuleData -->
<Name>Audit Read Activity</Name>
<IncludedIdList>
<GroupId>{9b28fae8-72f7-4267-a1a5-685f747a7146}</GroupId>
</IncludedIdList>
<ExcludedIdList>
</ExcludedIdList>
<Entry Id="{27c79875-25d2-4765-aec2-cb2d1000613f}">
<Type>Allow</Type>
<AccessMask>1</AccessMask>
<Options>0</Options>
</Entry>
<Entry Id="{684abbdd-000d-4565-b44c-550bc3d71034}">
<Type>AuditAllowed</Type>
<AccessMask>1</AccessMask>
<Options>2</Options>
</Entry>
</PolicyRule>
</PolicyRules>
- In the Define device control policy rules window, select Enabled, and enter the network share file path containing the XML rules data.
Create custom intune configuration
- Navigate to Devices > Configuration profiles
- Click Create (New Policy)
- Select Platform "Windows 10 and Later"
- Select Profile "Templates"
- Select Template Name "Custom"
- Click "Create"
- Under Name, enter **
- Optionally, enter a description
- Click "Next"
Add a row for Audit Read Activity
-
Click "Add"
-
For Name, enter Audit Read Activity
-
For Description, enter **
-
For OMA-URI, enter ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyRules/%7B4dd8a057-9c58-4a86-8fc2-0d7989d7ce6c%7D/RuleData
-
For Data type, select String (XML File)
-
For Custom XML, select windows/device/Intune OMA-URI/Scenario 8 Audit Read_Intune.xml
-
Click "Save"
Add a row for Any Removable Storage and CD-DVD and WPD Group_0
-
Click "Add"
-
For Name, enter Any Removable Storage and CD-DVD and WPD Group_0
-
For Description, enter **
-
For OMA-URI, enter ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyGroups/%7B9b28fae8-72f7-4267-a1a5-685f747a7146%7D/GroupData
-
For Data type, select String (XML File)
-
For Custom XML, select windows/device/Intune OMA-URI/Any Removable Storage and CD-DVD and WPD Group.xml
-
Click "Save"
Add a row for DefaultEnforcement
-
Click "Add"
-
For Name, enter DefaultEnforcement
-
For Description, enter **
-
For OMA-URI, enter ./Vendor/MSFT/Defender/Configuration/DefaultEnforcement
-
For Data type, select Integer
-
For Value, enter 2
-
Click "Save"
Add a row for DeviceControlEnabled
-
Click "Add"
-
For Name, enter DeviceControlEnabled
-
For Description, enter **
-
For OMA-URI, enter ./Vendor/MSFT/Defender/Configuration/DeviceControlEnabled
-
For Data type, select Integer
-
For Value, enter 1
-
Click "Save"