AppLocker

Note: For successful AppLocker rule enforcement, Enforce starts the Application Identity service on the endpoint.

The Enforce settings include default rule templates for each rule type used in AppLocker policies. The Block list rule template is used by default until you change it. For more information about changing the default rule templates, see Configure default rules for AppLocker.

Only one AppLocker policy is in effect on an endpoint at a given time. Therefore, if you want to enforce rules for multiple app types (Executable, Windows Installer, or Script) on a particular endpoint, you must use one policy with AppLocker rules for each app type (and not a separate policy for each one). If there are multiple policies with the same policy type applied to an endpoint, the priority of the policy is used to resolve the conflict.

Configure the AppLocker policy

  1. Select the tab for the app type that you want to configure rules for and click Enable.

  2. Select whether the rules for the app type are Audit Only or Blocking. For more information, see AppLocker policies workflow.

  3. (Optional) To import AppLocker rules in addition to the default rules, click Import Rules.

    1. Click Browse for File in the Import Rules From XML section.

    2. Select the XML file that contains the exported AppLocker rules and click Open.

    3. The Import Rules window shows up to three tabs, depending on the content in the XML file: the new rules added to the policy from the imported XML file, duplicate rules, and the rules Enforce cannot import.
      import_rules
    4. Click Save to import the XML.

    Note: You can import rules using the XML files generated in the AppLocker section of the Windows Local Security Policy Tool or an exported Enforce AppLocker policy to quickly add multiple rules to a policy.
  4. (Optional) To manually add rules in addition to the default rules, click Add Rule.

    1. Specify a Name for the rule.

    2. Select an Action for the rule.

    • Deny rules prevent the specified files from running on endpoints where the policy is enforced

    • Allow rules let the specified files run on endpoints where the policy is enforced

      Note:

      AppLocker Deny rules take precedence over AppLocker Allow rules. You must include at least one Allow rule. For more information about best practices and rule precedence, see Configure default rules for AppLocker.

      Be aware of AppLocker allow or deny rules that are set in your Domain Policy. These rules might take precedence over AppLocker rules created in Enforce.

      Note:

      Add to the existing default rules to allow or deny files rather than modifying the default rules. Test any modifications in audit mode first to ensure that they are running as intended before you switch to blocking mode.

      The Tanium Client uses BAT, EXE, and VBS files. Be sure that you do not block scripts in the Tanium Client directory that might break the client functions.

    1. Select Everyone or Administrators for the Windows User.

    2. In the Type section, select Hash, Path, or Publisher.

    3. Specify the settings for the file:

      • If you selected Hash, click Add Condition and provide the Hash and optional file size in bytes.

        Important: For best results, use a utility other than the Get-AppLockerFileInformation cmdlet to generate the SHA-256 hash. For example, you can use Get-FileHash to generate the hash. Hashes generated with Get-AppLockerFileInformation are different than hashes generated by other utilities and are not supported by Enforce. For more information about Get-FileHash, see Microsoft Documentation: Get-FileHash.
      • If you selected Path, provide the file path or file name including the path to the file. The path must start with a drive letter (for example C:\Windows), a supported environment variable (%WINDIR%, %SYSTEM32%, %OSDRIVE%, %PROGRAMFILES%, %REMOVABLE%, or %HOT%), a UNC share (for example \\server\share\folder), or *. The path cannot contain angle brackets or the characters " | ?. The only colon allowed is the one after the drive letter. If the path is not valid, a message that describes the issue appears next to the field.

      • If you selected Publisher, provide the Publisher, Product Name, File Name, and File Version, using the dropdown list to indicate whether you want earlier or later versions included or only the version you specify.

        Important: You can use the * character as a wildcard character only for the entire value. Partial wildcard values are not valid for any of these values.
        applocker-allow-rule
        Note: Use the Get-AppLockerFileInformation cmdlet to determine the publisher information. For example: Get-AppLockerFileInformation -Path 'C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE' | Select-Object -ExpandProperty Publisher
        getapplockerfileinformation

        Ensure that you correctly capture and include any special characters, such as ®. For more information about the Get-AppLockerFileInformation cmdlet, see Microsoft Documentation: Get-AppLockerFileInformation.

      Note: Each rule in a policy must have a unique rule ID. Enforce does not save a policy that contains two rules with the same ID. If you import rules from an XML file or a policy that was edited by hand, make sure that the rule IDs are not duplicated.
  5. (Optional) Click the Settings tab and provide a Support URL if you want to display a custom URL when a user tries to run an app that is blocked.

  6. Click another policy type tab to configure more settings or click Create to create the policy.

For more information about AppLocker event logs, see Review AppLocker event logs.