Description: A sample 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 Deny |
|
|
Deny | ❌ | ❌ | ❌ | - | - | - | None (0) | - |
Audit Denied | 📄 | 📄 | 📄 | - | - | - | Show notification and Send event (3) | - |
This is a group of type Device. The match type for the group is MatchAny.
Property | Value |
---|---|
PrimaryId | RemovableMediaDevices |
View XML
<Group Id="{d8819053-24f4-444a-a0fb-9ce5a9e97862}" Type="Device">
<!-- ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyGroups/%7Bd8819053-24f4-444a-a0fb-9ce5a9e97862%7D/GroupData -->
<Name>All removable media devices</Name>
<MatchType>MatchAny</MatchType>
<DescriptorIdList>
<PrimaryId>RemovableMediaDevices</PrimaryId>
</DescriptorIdList>
</Group>
Setting Name | Setting Value | Documentation |
---|---|---|
DefaultEnforcement | Deny | documentation |
DeviceControlEnabled | True | documentation |
This policy is based on information in the following files:
- windows/Getting Started/Step 1/deny_all_rules.xml
- windows/Getting Started/Intune OMA-URI/all_removable_media_devices{d8819053-24f4-444a-a0fb-9ce5a9e97862}.xml
Device control policy rules and groups can be deployed through the following management tools:
Create a reusable setting for All removable media devices
-
Navigate to Home > Endpoint Security > Attack Surface Reduction
-
Click on Reusable Settings
-
Click (+) Add
-
Enter the All removable media devices 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 Deny to the policy
-
Click on "+ Set reusable settings" under Included Id
-
Click on All removable media devices
-
Click on "Select"
-
Click on "+ Edit Entry"
-
Enter Audit Deny for the name
-
Select Deny from "Type"
-
Select None from "Options"
-
Select Read, Write and Execute from "Access mask"
-
Add another entry. Click on "+ Add"
-
Select Audit Denied from "Type"
-
Select Show notification and Send event from "Options"
-
Select Read, Write and Execute 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="{d8819053-24f4-444a-a0fb-9ce5a9e97862}" Type="Device">
<!-- ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyGroups/%7Bd8819053-24f4-444a-a0fb-9ce5a9e97862%7D/GroupData -->
<Name>All removable media devices</Name>
<MatchType>MatchAny</MatchType>
<DescriptorIdList>
<PrimaryId>RemovableMediaDevices</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="{d8e6f56c-f4c1-4875-ac45-51ad75d4580e}" >
<!-- ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyRules/%7Bd8e6f56c-f4c1-4875-ac45-51ad75d4580e%7D/RuleData -->
<Name>Audit Deny</Name>
<IncludedIdList>
<GroupId>{d8819053-24f4-444a-a0fb-9ce5a9e97862}</GroupId>
</IncludedIdList>
<ExcludedIdList>
</ExcludedIdList>
<Entry Id="{ad059b6f-bc9d-44e4-8ab9-907d7d00fc97}">
<Type>Deny</Type>
<AccessMask>7</AccessMask>
<Options>0</Options>
</Entry>
<Entry Id="{4cf50b77-0152-4999-8d82-6f6afdf27b0b}">
<Type>AuditDenied</Type>
<AccessMask>7</AccessMask>
<Options>3</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 Deny
-
Click "Add"
-
For Name, enter Audit Deny
-
For Description, enter **
-
For OMA-URI, enter ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyRules/%7Bd8e6f56c-f4c1-4875-ac45-51ad75d4580e%7D/RuleData
-
For Data type, select String (XML File)
-
For Custom XML, select windows\Getting Started\Intune OMA-URI\audit_deny{d8e6f56c-f4c1-4875-ac45-51ad75d4580e}.xml
-
Click "Save"
Add a row for All removable media devices
-
Click "Add"
-
For Name, enter All removable media devices
-
For Description, enter **
-
For OMA-URI, enter ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyGroups/%7Bd8819053-24f4-444a-a0fb-9ce5a9e97862%7D/GroupData
-
For Data type, select String (XML File)
-
For Custom XML, select windows\Getting Started\Intune OMA-URI\all_removable_media_devices{d8819053-24f4-444a-a0fb-9ce5a9e97862}.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"