mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-05-15 14:57:23 +00:00
Refactored managed installer docs
This commit is contained in:
parent
92b73669c9
commit
5461c8aa37
@ -61,7 +61,6 @@ To turn on managed installer tracking, you must:
|
|||||||
|
|
||||||
- Create and deploy an AppLocker policy that defines your managed installer rules and enables services enforcement for executables and DLLs.
|
- Create and deploy an AppLocker policy that defines your managed installer rules and enables services enforcement for executables and DLLs.
|
||||||
- Enable AppLocker's Application Identity and AppLockerFltr services.
|
- Enable AppLocker's Application Identity and AppLockerFltr services.
|
||||||
- Enable managed installer trust in your WDAC policy.
|
|
||||||
|
|
||||||
### Create and deploy an AppLocker policy that defines your managed installer rules and enables services enforcement for executables and DLLs
|
### Create and deploy an AppLocker policy that defines your managed installer rules and enables services enforcement for executables and DLLs
|
||||||
|
|
||||||
@ -93,7 +92,7 @@ Currently, neither the AppLocker policy creation UI in GPO Editor nor the PowerS
|
|||||||
|
|
||||||
```xml
|
```xml
|
||||||
<RuleCollection Type="Dll" EnforcementMode="AuditOnly" >
|
<RuleCollection Type="Dll" EnforcementMode="AuditOnly" >
|
||||||
<FilePathRule Id="86f235ad-3f7b-4121-bc95-ea8bde3a5db5" Name="Dummy Rule" Description="" UserOrGroupSid="S-1-1-0" Action="Deny">
|
<FilePathRule Id="86f235ad-3f7b-4121-bc95-ea8bde3a5db5" Name="Benign DENY Rule" Description="" UserOrGroupSid="S-1-1-0" Action="Deny">
|
||||||
<Conditions>
|
<Conditions>
|
||||||
<FilePathCondition Path="%OSDRIVE%\ThisWillBeBlocked.dll" />
|
<FilePathCondition Path="%OSDRIVE%\ThisWillBeBlocked.dll" />
|
||||||
</Conditions>
|
</Conditions>
|
||||||
@ -105,7 +104,7 @@ Currently, neither the AppLocker policy creation UI in GPO Editor nor the PowerS
|
|||||||
</RuleCollectionExtensions>
|
</RuleCollectionExtensions>
|
||||||
</RuleCollection>
|
</RuleCollection>
|
||||||
<RuleCollection Type="Exe" EnforcementMode="AuditOnly">
|
<RuleCollection Type="Exe" EnforcementMode="AuditOnly">
|
||||||
<FilePathRule Id="9420c496-046d-45ab-bd0e-455b2649e41e" Name="Dummy Rule" Description="" UserOrGroupSid="S-1-1-0" Action="Deny">
|
<FilePathRule Id="9420c496-046d-45ab-bd0e-455b2649e41e" Name="Benign DENY Rule" Description="" UserOrGroupSid="S-1-1-0" Action="Deny">
|
||||||
<Conditions>
|
<Conditions>
|
||||||
<FilePathCondition Path="%OSDRIVE%\ThisWillBeBlocked.exe" />
|
<FilePathCondition Path="%OSDRIVE%\ThisWillBeBlocked.exe" />
|
||||||
</Conditions>
|
</Conditions>
|
||||||
@ -114,105 +113,77 @@ Currently, neither the AppLocker policy creation UI in GPO Editor nor the PowerS
|
|||||||
<ThresholdExtensions>
|
<ThresholdExtensions>
|
||||||
<Services EnforcementMode="Enabled" />
|
<Services EnforcementMode="Enabled" />
|
||||||
</ThresholdExtensions>
|
</ThresholdExtensions>
|
||||||
<RedstoneExtensions>
|
|
||||||
<SystemApps Allow="Enabled"/>
|
|
||||||
</RedstoneExtensions>
|
|
||||||
</RuleCollectionExtensions>
|
</RuleCollectionExtensions>
|
||||||
</RuleCollection>
|
</RuleCollection>
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Deploy your AppLocker managed installer configuration policy. You can either import your AppLocker policy and deploy with Group Policy or use a script to deploy the policy with the Set-AppLockerPolicy cmdlet. An example of a valid Managed Installer rule collection, using Microsoft Endpoint Config Manager (MEMCM), MEM (Intune), Powershell, and PowerShell ISE, is shown below. Remove any rules that you do not wish to designate as a Managed Installer.
|
4. Verify your AppLocker policy. The following example shows a complete AppLocker policy that sets Microsoft Endpoint Config Manager (MEMCM)and Microsoft Endpoint Manager Intune as managed installers. Only those AppLocker rule collections that have actual rules defined are included in the final XML. This ensures the policy will merge successfully on devices which may already have an AppLocker policy in place.
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<AppLockerPolicy Version="1">
|
<AppLockerPolicy Version="1">
|
||||||
<RuleCollection Type="Appx" EnforcementMode="NotConfigured" />
|
<RuleCollection Type="Dll" EnforcementMode="AuditOnly" >
|
||||||
<RuleCollection Type="Dll" EnforcementMode="AuditOnly" >
|
<FilePathRule Id="86f235ad-3f7b-4121-bc95-ea8bde3a5db5" Name="Benign DENY Rule" Description="" UserOrGroupSid="S-1-1-0" Action="Deny">
|
||||||
<FilePublisherRule Id="86f235ad-3f7b-4121-bc95-ea8bde3a5db5" Name="Allow all" Description="Allow all" UserOrGroupSid="S-1-1-0" Action="Allow">
|
<Conditions>
|
||||||
<Conditions>
|
<FilePathCondition Path="%OSDRIVE%\ThisWillBeBlocked.dll" />
|
||||||
<FilePublisherCondition PublisherName="*" ProductName="*" BinaryName="*">
|
</Conditions>
|
||||||
<BinaryVersionRange LowSection="*" HighSection="*" />
|
</FilePathRule>
|
||||||
</FilePublisherCondition>
|
<RuleCollectionExtensions>
|
||||||
</Conditions>
|
<ThresholdExtensions>
|
||||||
</FilePublisherRule>
|
<Services EnforcementMode="Enabled" />
|
||||||
<RuleCollectionExtensions>
|
</ThresholdExtensions>
|
||||||
<ThresholdExtensions>
|
</RuleCollectionExtensions>
|
||||||
<Services EnforcementMode="Enabled" />
|
</RuleCollection>
|
||||||
</ThresholdExtensions>
|
<RuleCollection Type="Exe" EnforcementMode="AuditOnly">
|
||||||
<RedstoneExtensions>
|
<FilePathRule Id="9420c496-046d-45ab-bd0e-455b2649e41e" Name="Benign DENY Rule" Description="" UserOrGroupSid="S-1-1-0" Action="Deny">
|
||||||
<SystemApps Allow="Enabled"/>
|
<Conditions>
|
||||||
</RedstoneExtensions>
|
<FilePathCondition Path="%OSDRIVE%\ThisWillBeBlocked.exe" />
|
||||||
</RuleCollectionExtensions>
|
</Conditions>
|
||||||
</RuleCollection>
|
</FilePathRule>
|
||||||
<RuleCollection Type="Exe" EnforcementMode="AuditOnly">
|
<RuleCollectionExtensions>
|
||||||
<FilePublisherRule Id="9420c496-046d-45ab-bd0e-455b2649e41e" Name="Allow all" Description="Allow all" UserOrGroupSid="S-1-1-0" Action="Allow">
|
<ThresholdExtensions>
|
||||||
<Conditions>
|
<Services EnforcementMode="Enabled" />
|
||||||
<FilePublisherCondition PublisherName="*" ProductName="*" BinaryName="*">
|
</ThresholdExtensions>
|
||||||
<BinaryVersionRange LowSection="*" HighSection="*" />
|
</RuleCollectionExtensions>
|
||||||
</FilePublisherCondition>
|
</RuleCollection>
|
||||||
</Conditions>
|
<RuleCollection Type="ManagedInstaller" EnforcementMode="AuditOnly">
|
||||||
</FilePublisherRule>
|
<FilePublisherRule Id="55932f09-04b8-44ec-8e2d-3fc736500c56" Name="MICROSOFT.MANAGEMENT.SERVICES.INTUNEWINDOWSAGENT.EXE version 1.39.200.2 or greater in MICROSOFT® INTUNE™ from O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" Description="" UserOrGroupSid="S-1-1-0" Action="Allow">
|
||||||
<RuleCollectionExtensions>
|
<Conditions>
|
||||||
<ThresholdExtensions>
|
<FilePublisherCondition PublisherName="O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="*" BinaryName="MICROSOFT.MANAGEMENT.SERVICES.INTUNEWINDOWSAGENT.EXE">
|
||||||
<Services EnforcementMode="Enabled" />
|
<BinaryVersionRange LowSection="1.39.200.2" HighSection="*" />
|
||||||
</ThresholdExtensions>
|
</FilePublisherCondition>
|
||||||
<RedstoneExtensions>
|
|
||||||
<SystemApps Allow="Enabled"/>
|
|
||||||
</RedstoneExtensions>
|
|
||||||
</RuleCollectionExtensions>
|
|
||||||
</RuleCollection>
|
|
||||||
<RuleCollection Type="Msi" EnforcementMode="NotConfigured" />
|
|
||||||
<RuleCollection Type="Script" EnforcementMode="NotConfigured" />
|
|
||||||
<RuleCollection Type="ManagedInstaller" EnforcementMode="AuditOnly">
|
|
||||||
<FilePublisherRule Id="55932f09-04b8-44ec-8e2d-3fc736500c56" Name="MICROSOFT.MANAGEMENT.SERVICES.INTUNEWINDOWSAGENT.EXE version 1.39.200.2 or greater in MICROSOFT® INTUNE™ from O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" Description="" UserOrGroupSid="S-1-1-0" Action="Allow">
|
|
||||||
<Conditions>
|
|
||||||
<FilePublisherCondition PublisherName="O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="MICROSOFT® INTUNE™" BinaryName="MICROSOFT.MANAGEMENT.SERVICES.INTUNEWINDOWSAGENT.EXE">
|
|
||||||
<BinaryVersionRange LowSection="1.39.200.2" HighSection="*" />
|
|
||||||
</FilePublisherCondition>
|
|
||||||
</Conditions>
|
|
||||||
</FilePublisherRule>
|
|
||||||
<FilePublisherRule Id="6ead5a35-5bac-4fe4-a0a4-be8885012f87" Name="CMM - CCMEXEC.EXE, 5.0.0.0+, Microsoft signed" Description="" UserOrGroupSid="S-1-1-0" Action="Allow">
|
|
||||||
<Conditions>
|
|
||||||
<FilePublisherCondition PublisherName="O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="*" BinaryName="CCMEXEC.EXE">
|
|
||||||
<BinaryVersionRange LowSection="5.0.0.0" HighSection="*" />
|
|
||||||
</FilePublisherCondition>
|
|
||||||
</Conditions>
|
</Conditions>
|
||||||
</FilePublisherRule>
|
</FilePublisherRule>
|
||||||
<FilePublisherRule Id="8e23170d-e0b7-4711-b6d0-d208c960f30e" Name="CCM - CCMSETUP.EXE, 5.0.0.0+, Microsoft signed" Description="" UserOrGroupSid="S-1-1-0" Action="Allow">
|
<FilePublisherRule Id="6ead5a35-5bac-4fe4-a0a4-be8885012f87" Name="CMM - CCMEXEC.EXE, 5.0.0.0+, Microsoft signed" Description="" UserOrGroupSid="S-1-1-0" Action="Allow">
|
||||||
<Conditions>
|
<Conditions>
|
||||||
<FilePublisherCondition PublisherName="O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="*" BinaryName="CCMSETUP.EXE">
|
<FilePublisherCondition PublisherName="O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="*" BinaryName="CCMEXEC.EXE">
|
||||||
<BinaryVersionRange LowSection="5.0.0.0" HighSection="*" />
|
<BinaryVersionRange LowSection="5.0.0.0" HighSection="*" />
|
||||||
</FilePublisherCondition>
|
</FilePublisherCondition>
|
||||||
</Conditions>
|
</Conditions>
|
||||||
</FilePublisherRule>
|
</FilePublisherRule>
|
||||||
<FilePublisherRule Id="a8cb325e-b26e-4f52-b528-a137764cae42" Name="POWERSHELL.EXE, version 10.0.0.0 and above, in MICROSOFT® WINDOWS® OPERATING SYSTEM, from O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" Description="" UserOrGroupSid="S-1-1-0" Action="Allow">
|
<FilePublisherRule Id="8e23170d-e0b7-4711-b6d0-d208c960f30e" Name="CCM - CCMSETUP.EXE, 5.0.0.0+, Microsoft signed" Description="" UserOrGroupSid="S-1-1-0" Action="Allow">
|
||||||
<Conditions>
|
<Conditions>
|
||||||
<FilePublisherCondition PublisherName="O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="*" BinaryName="POWERSHELL.EXE">
|
<FilePublisherCondition PublisherName="O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="*" BinaryName="CCMSETUP.EXE">
|
||||||
<BinaryVersionRange LowSection="*" HighSection="*" />
|
<BinaryVersionRange LowSection="5.0.0.0" HighSection="*" />
|
||||||
</FilePublisherCondition>
|
</FilePublisherCondition>
|
||||||
</Conditions>
|
</Conditions>
|
||||||
</FilePublisherRule>
|
</FilePublisherRule>
|
||||||
<FilePublisherRule Id="a8cb325e-b26e-4f52-b528-a137764cae54" Name="POWERSHELL_ISE.EXE, version 10.0.0.0 and above, in MICROSOFT® WINDOWS® OPERATING SYSTEM, from O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" Description="" UserOrGroupSid="S-1-1-0" Action="Allow">
|
</RuleCollection>
|
||||||
<Conditions>
|
</AppLockerPolicy>
|
||||||
<FilePublisherCondition PublisherName="O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="*" BinaryName="POWERSHELL_ISE.EXE">
|
```
|
||||||
<BinaryVersionRange LowSection="*" HighSection="*" />
|
|
||||||
</FilePublisherCondition>
|
|
||||||
</Conditions>
|
|
||||||
</FilePublisherRule>
|
|
||||||
</RuleCollection>
|
|
||||||
</AppLockerPolicy>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Set the AppLocker filter driver to autostart
|
5. Deploy your AppLocker managed installer configuration policy. You can either import your AppLocker policy and deploy with Group Policy or use a script to deploy the policy with the Set-AppLockerPolicy cmdlet as shown in the following PowerShell command.
|
||||||
|
|
||||||
To enable the managed installer, you need to set the AppLocker filter driver to autostart, and start it.
|
```powershell
|
||||||
|
Set-AppLockerPolicy -XmlPolicy <AppLocker XML FilePath> -Merge -ErrorAction SilentlyContinue
|
||||||
|
```
|
||||||
|
|
||||||
To do so, run the following command as an Administrator:
|
6. If deploying your AppLocker policy via script, use appidtel.exe to configure the AppLocker Application Identity service and AppLocker filter driver.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
appidtel.exe start [-mionly]
|
appidtel.exe start [-mionly]
|
||||||
```
|
```
|
||||||
|
|
||||||
Specify "-mionly" if you will not use the Intelligent Security Graph (ISG).
|
Specify "-mionly" if you don't plan to use the Intelligent Security Graph (ISG).
|
||||||
|
|
||||||
## Enable the managed installer option in WDAC policy
|
## Enable the managed installer option in WDAC policy
|
||||||
|
|
||||||
@ -237,67 +208,11 @@ Below are steps to create a WDAC policy that allows Windows to boot and enables
|
|||||||
Set-RuleOption -FilePath <XML filepath> -Option 13
|
Set-RuleOption -FilePath <XML filepath> -Option 13
|
||||||
```
|
```
|
||||||
|
|
||||||
|
4. Deploy your WDAC policy. See [Deploying Windows Defender Application Control (WDAC) policies](windows-defender-application-control-deployment-guide.md).
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> Your WDAC policy must include rules for all system/boot components, kernel drivers, and any other authorized applications that can't be deployed through a managed installer.
|
> Your WDAC policy must include rules for all system/boot components, kernel drivers, and any other authorized applications that can't be deployed through a managed installer.
|
||||||
|
|
||||||
## Using fsutil to query SmartLocker EA
|
## Related articles
|
||||||
|
|
||||||
Customers using Windows Defender Application Control (WDAC) with Managed Installer (MI) or Intelligent Security Graph enabled can use fsutil to determine whether a file was allowed to run by one of these features. This can be achieved by querying the EAs on a file using fsutil and looking for the KERNEL.SMARTLOCKER.ORIGINCLAIM EA. The presence of this EA indicates that either MI or ISG allowed the file to run. This can be used in conjunction with enabling the MI and ISG logging events.
|
- [Managed installer and ISG technical reference and troubleshooting guide](configure-wdac-managed-installer.md)
|
||||||
|
|
||||||
**Example:**
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
fsutil file queryEA C:\Users\Temp\Downloads\application.exe
|
|
||||||
|
|
||||||
Extended Attributes (EA) information for file C:\Users\Temp\Downloads\application.exe:
|
|
||||||
|
|
||||||
Ea Buffer Offset: 410
|
|
||||||
Ea Name: $KERNEL.SMARTLOCKER.ORIGINCLAIM
|
|
||||||
Ea Value Length: 7e
|
|
||||||
0000: 01 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 ................
|
|
||||||
0010: b2 ff 10 66 bc a8 47 c7 00 d9 56 9d 3d d4 20 2a ...f..G...V.=. *
|
|
||||||
0020: 63 a3 80 e2 d8 33 8e 77 e9 5c 8d b0 d5 a7 a3 11 c....3.w.\......
|
|
||||||
0030: 83 00 00 00 00 00 00 00 5c 00 00 00 43 00 3a 00 ........\...C.:.
|
|
||||||
0040: 5c 00 55 00 73 00 65 00 72 00 73 00 5c 00 6a 00 \.U.s.e.r.s.\.T.
|
|
||||||
0050: 6f 00 67 00 65 00 75 00 72 00 74 00 65 00 2e 00 e.m.p..\D.o.w.n...
|
|
||||||
0060: 52 00 45 00 44 00 4d 00 4f 00 4e 00 44 00 5c 00 l.o.a.d.\a.p.p.l.
|
|
||||||
0070: 44 00 6f 00 77 00 6e 00 6c 00 6f 00 61 00 64 i.c.a.t.i.o.n..e.x.e
|
|
||||||
```
|
|
||||||
|
|
||||||
## Enabling managed installer logging events
|
|
||||||
|
|
||||||
Refer to [Understanding Application Control Events](event-id-explanations.md#optional-intelligent-security-graph-isg-or-managed-installer-mi-diagnostic-events) for information on enabling optional managed installer diagnostic events.
|
|
||||||
|
|
||||||
## Deploying the Managed Installer rule collection
|
|
||||||
|
|
||||||
Once you've completed configuring your chosen Managed Installer, by specifying which option to use in the AppLocker policy, enabling the service enforcement of it, and by enabling the Managed Installer option in a WDAC policy, you'll need to deploy it.
|
|
||||||
|
|
||||||
1. Use the following command to deploy the policy.
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
$policyFile=
|
|
||||||
@"
|
|
||||||
Raw_AppLocker_Policy_XML
|
|
||||||
"@
|
|
||||||
Set-AppLockerPolicy -XmlPolicy $policyFile -Merge -ErrorAction SilentlyContinue
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Verify Deployment of the ruleset was successful
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
Get-AppLockerPolicy -Local
|
|
||||||
|
|
||||||
Version RuleCollections RuleCollectionTypes
|
|
||||||
------- --------------- -------------------
|
|
||||||
1 {0, 0, 0, 0...} {Appx, Dll, Exe, ManagedInstaller...}
|
|
||||||
```
|
|
||||||
|
|
||||||
Verify the output shows the ManagedInstaller rule set.
|
|
||||||
|
|
||||||
3. Get the policy XML (optional) using PowerShell:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
Get-AppLockerPolicy -Effective -Xml -ErrorVariable ev -ErrorAction SilentlyContinue
|
|
||||||
```
|
|
||||||
|
|
||||||
This command will show the raw XML to verify the individual rules that were set.
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Configure a WDAC managed installer (Windows)
|
title: Managed installer and ISG technical reference and troubleshooting guide (Windows)
|
||||||
description: Explains how to configure a custom Manged Installer.
|
description: Explains how to configure a custom Manged Installer.
|
||||||
keywords: security, malware
|
keywords: security, malware
|
||||||
ms.assetid: 8d6e0474-c475-411b-b095-1c61adb2bdbb
|
ms.assetid: 8d6e0474-c475-411b-b095-1c61adb2bdbb
|
||||||
@ -18,148 +18,75 @@ ms.date: 08/14/2020
|
|||||||
ms.technology: mde
|
ms.technology: mde
|
||||||
---
|
---
|
||||||
|
|
||||||
# Configuring a managed installer with AppLocker and Windows Defender Application Control
|
# Managed installer and ISG technical reference and troubleshooting guide
|
||||||
|
|
||||||
**Applies to:**
|
**Applies to:**
|
||||||
|
|
||||||
- Windows 10
|
- Windows 10
|
||||||
- Windows 11
|
- Windows 11
|
||||||
- Windows Server 2016 and above
|
- Windows Server 2019 and above
|
||||||
|
|
||||||
>[!NOTE]
|
>[!NOTE]
|
||||||
>Some capabilities of Windows Defender Application Control are only available on specific Windows versions. Learn more about the [Defender App Guard feature availability](feature-availability.md).
|
>Some capabilities of Windows Defender Application Control are only available on specific Windows versions. Learn more about the [Defender App Guard feature availability](feature-availability.md).
|
||||||
|
|
||||||
Setting up managed installer tracking and application execution enforcement requires applying both an AppLocker and WDAC policy with specific rules and options enabled.
|
## Using fsutil to query SmartLocker EA
|
||||||
There are three primary steps to keep in mind:
|
|
||||||
|
|
||||||
- Specify managed installers by using the Managed Installer rule collection in AppLocker policy.
|
Customers using Windows Defender Application Control (WDAC) with Managed Installer (MI) or Intelligent Security Graph enabled can use fsutil to determine whether a file was allowed to run by one of these features. This can be achieved by querying the EAs on a file using fsutil and looking for the KERNEL.SMARTLOCKER.ORIGINCLAIM EA. The presence of this EA indicates that either MI or ISG allowed the file to run. This can be used in conjunction with enabling the MI and ISG logging events.
|
||||||
- Enable service enforcement in AppLocker policy.
|
|
||||||
- Enable the managed installer option in a WDAC policy.
|
|
||||||
|
|
||||||
## Specify managed installers using the Managed Installer rule collection in AppLocker policy
|
**Example:**
|
||||||
|
|
||||||
The identity of the managed installer executable(s) is specified in an AppLocker policy in a Managed Installer rule collection.
|
```powershell
|
||||||
|
fsutil file queryEA C:\Users\Temp\Downloads\application.exe
|
||||||
|
|
||||||
### Create Managed Installer rule collection
|
Extended Attributes (EA) information for file C:\Users\Temp\Downloads\application.exe:
|
||||||
|
|
||||||
Currently, neither the AppLocker policy creation UI in GPO Editor nor the PowerShell cmdlets allow for directly specifying rules for the Managed Installer rule collection. However, a text editor can be used to make the simple changes needed to an EXE or DLL rule collection policy to specify Type="ManagedInstaller", so that the new rule can be imported into a GPO.
|
Ea Buffer Offset: 410
|
||||||
|
Ea Name: $KERNEL.SMARTLOCKER.ORIGINCLAIM
|
||||||
1. Use [New-AppLockerPolicy](/powershell/module/applocker/new-applockerpolicy?view=win10-ps&preserve-view=true) to make an EXE rule for the file you are designating as a managed installer. Note that only EXE file types can be designated as managed installers. Below is an example using the rule type Publisher with a hash fallback, but other rule types can be used as well. You may need to reformat the output for readability.
|
Ea Value Length: 7e
|
||||||
|
0000: 01 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 ................
|
||||||
```powershell
|
0010: b2 ff 10 66 bc a8 47 c7 00 d9 56 9d 3d d4 20 2a ...f..G...V.=. *
|
||||||
Get-ChildItem <exe filepath> | Get-AppLockerFileInformation | New-AppLockerPolicy -RuleType Publisher, Hash -User Everyone -Xml > AppLocker_MI_PS_ISE.xml
|
0020: 63 a3 80 e2 d8 33 8e 77 e9 5c 8d b0 d5 a7 a3 11 c....3.w.\......
|
||||||
```
|
0030: 83 00 00 00 00 00 00 00 5c 00 00 00 43 00 3a 00 ........\...C.:.
|
||||||
|
0040: 5c 00 55 00 73 00 65 00 72 00 73 00 5c 00 6a 00 \.U.s.e.r.s.\.T.
|
||||||
2. Manually rename the rule collection to ManagedInstaller
|
0050: 6f 00 67 00 65 00 75 00 72 00 74 00 65 00 2e 00 e.m.p..\D.o.w.n...
|
||||||
|
0060: 52 00 45 00 44 00 4d 00 4f 00 4e 00 44 00 5c 00 l.o.a.d.\a.p.p.l.
|
||||||
Change
|
0070: 44 00 6f 00 77 00 6e 00 6c 00 6f 00 61 00 64 i.c.a.t.i.o.n..e.x.e
|
||||||
|
|
||||||
```powershell
|
|
||||||
<RuleCollection Type="Exe" EnforcementMode="NotConfigured">
|
|
||||||
```
|
|
||||||
|
|
||||||
to
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
<RuleCollection Type="ManagedInstaller" EnforcementMode="AuditOnly">
|
|
||||||
```
|
|
||||||
|
|
||||||
An example of a valid Managed Installer rule collection using Microsoft Endpoint Config Manager (MEMCM) is shown below.
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<RuleCollection Type="ManagedInstaller" EnforcementMode="AuditOnly">
|
|
||||||
<FilePublisherRule Id="6cc9a840-b0fd-4f86-aca7-8424a22b4b93" Name="MEMCM - CCMEXEC.EXE, 5.0.0.0+, Microsoft signed" Description="" UserOrGroupSid="S-1-1-0" Action="Allow">
|
|
||||||
<Conditions>
|
|
||||||
<FilePublisherCondition PublisherName="O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="*" BinaryName="CCMEXEC.EXE">
|
|
||||||
<BinaryVersionRange LowSection="5.0.0.0" HighSection="*" />
|
|
||||||
</FilePublisherCondition>
|
|
||||||
</Conditions>
|
|
||||||
</FilePublisherRule>
|
|
||||||
<FilePublisherRule Id="780ae2d3-5047-4240-8a57-767c251cbb12" Name="MEMCM - CCMSETUP.EXE, 5.0.0.0+, Microsoft signed" Description="" UserOrGroupSid="S-1-1-0" Action="Allow">
|
|
||||||
<Conditions>
|
|
||||||
<FilePublisherCondition PublisherName="O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="*" BinaryName="CCMSETUP.EXE">
|
|
||||||
<BinaryVersionRange LowSection="5.0.0.0" HighSection="*" />
|
|
||||||
</FilePublisherCondition>
|
|
||||||
</Conditions>
|
|
||||||
</FilePublisherRule>
|
|
||||||
</RuleCollection>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Enable service enforcement in AppLocker policy
|
|
||||||
|
|
||||||
Since many installation processes rely on services, it is typically necessary to enable tracking of services.
|
|
||||||
Correct tracking of services requires the presence of at least one rule in the rule collection, so a simple audit only rule will suffice. This can be added to the policy created above which specifies your managed installer rule collection.
|
|
||||||
|
|
||||||
For example:
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<RuleCollection Type="Dll" EnforcementMode="AuditOnly" >
|
|
||||||
<FilePathRule Id="86f235ad-3f7b-4121-bc95-ea8bde3a5db5" Name="Dummy Rule" Description="" UserOrGroupSid="S-1-1-0" Action="Deny">
|
|
||||||
<Conditions>
|
|
||||||
<FilePathCondition Path="%OSDRIVE%\ThisWillBeBlocked.dll" />
|
|
||||||
</Conditions>
|
|
||||||
</FilePathRule>
|
|
||||||
<RuleCollectionExtensions>
|
|
||||||
<ThresholdExtensions>
|
|
||||||
<Services EnforcementMode="Enabled" />
|
|
||||||
</ThresholdExtensions>
|
|
||||||
<RedstoneExtensions>
|
|
||||||
<SystemApps Allow="Enabled"/>
|
|
||||||
</RedstoneExtensions>
|
|
||||||
</RuleCollectionExtensions>
|
|
||||||
</RuleCollection>
|
|
||||||
<RuleCollection Type="Exe" EnforcementMode="AuditOnly">
|
|
||||||
<FilePathRule Id="9420c496-046d-45ab-bd0e-455b2649e41e" Name="Dummy Rule" Description="" UserOrGroupSid="S-1-1-0" Action="Deny">
|
|
||||||
<Conditions>
|
|
||||||
<FilePathCondition Path="%OSDRIVE%\ThisWillBeBlocked.exe" />
|
|
||||||
</Conditions>
|
|
||||||
</FilePathRule>
|
|
||||||
<RuleCollectionExtensions>
|
|
||||||
<ThresholdExtensions>
|
|
||||||
<Services EnforcementMode="Enabled" />
|
|
||||||
</ThresholdExtensions>
|
|
||||||
<RedstoneExtensions>
|
|
||||||
<SystemApps Allow="Enabled"/>
|
|
||||||
</RedstoneExtensions>
|
|
||||||
</RuleCollectionExtensions>
|
|
||||||
</RuleCollection>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Enable the managed installer option in WDAC policy
|
|
||||||
|
|
||||||
In order to enable trust for the binaries laid down by managed installers, the Enabled: Managed Installer option must be specified in your WDAC policy.
|
|
||||||
This can be done by using the [Set-RuleOption cmdlet](/powershell/module/configci/set-ruleoption) with Option 13.
|
|
||||||
|
|
||||||
Below are steps to create a WDAC policy that allows Windows to boot and enables the managed installer option.
|
|
||||||
|
|
||||||
1. Copy the DefaultWindows_Audit policy into your working folder from C:\Windows\schemas\CodeIntegrity\ExamplePolicies\DefaultWindows_Audit.xml
|
|
||||||
|
|
||||||
2. Reset the policy ID to ensure it is in multiple policy format and give it a different GUID from the example policies. Also give it a friendly name to help with identification.
|
|
||||||
|
|
||||||
Ex.
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
Set-CIPolicyIdInfo -FilePath <XML filepath> -PolicyName "<friendly name>" -ResetPolicyID
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Set Option 13 (Enabled:Managed Installer)
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
Set-RuleOption -FilePath <XML filepath> -Option 13
|
|
||||||
```
|
|
||||||
|
|
||||||
## Set the AppLocker filter driver to autostart
|
|
||||||
|
|
||||||
To enable the managed installer, you need to set the AppLocker filter driver to autostart and start it.
|
|
||||||
|
|
||||||
To do so, run the following command as an Administrator:
|
|
||||||
|
|
||||||
```console
|
|
||||||
appidtel.exe start [-mionly]
|
|
||||||
```
|
|
||||||
|
|
||||||
Specify `-mionly` if you will not use the Intelligent Security Graph (ISG).
|
|
||||||
|
|
||||||
## Enabling managed installer logging events
|
## Enabling managed installer logging events
|
||||||
|
|
||||||
Refer to [Understanding Application Control Events](event-id-explanations.md#optional-intelligent-security-graph-isg-or-managed-installer-mi-diagnostic-events) for information on enabling optional managed installer diagnostic events.
|
Refer to [Understanding Application Control Events](event-id-explanations.md#optional-intelligent-security-graph-isg-or-managed-installer-mi-diagnostic-events) for information on enabling optional managed installer diagnostic events.
|
||||||
|
|
||||||
|
## Deploying the Managed Installer rule collection
|
||||||
|
|
||||||
|
Once you've completed configuring your chosen Managed Installer, by specifying which option to use in the AppLocker policy, enabling the service enforcement of it, and by enabling the Managed Installer option in a WDAC policy, you'll need to deploy it.
|
||||||
|
|
||||||
|
1. Use the following command to deploy the policy.
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
$policyFile=
|
||||||
|
@"
|
||||||
|
Raw_AppLocker_Policy_XML
|
||||||
|
"@
|
||||||
|
Set-AppLockerPolicy -XmlPolicy $policyFile -Merge -ErrorAction SilentlyContinue
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Verify Deployment of the ruleset was successful
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
Get-AppLockerPolicy -Local
|
||||||
|
|
||||||
|
Version RuleCollections RuleCollectionTypes
|
||||||
|
------- --------------- -------------------
|
||||||
|
1 {0, 0, 0, 0...} {Appx, Dll, Exe, ManagedInstaller...}
|
||||||
|
```
|
||||||
|
|
||||||
|
Verify the output shows the ManagedInstaller rule set.
|
||||||
|
|
||||||
|
3. Get the policy XML (optional) using PowerShell:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
Get-AppLockerPolicy -Effective -Xml -ErrorVariable ev -ErrorAction SilentlyContinue
|
||||||
|
```
|
||||||
|
|
||||||
|
This command will show the raw XML to verify the individual rules that were set.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user