Version information
This version is compatible with:
- Puppet Enterprise 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
- Puppet >= 6.21.0 < 8.0.0
Start using this module
Add this module to your Puppetfile:
mod 'benjaminrobertson-acsc_e8_application_control', '0.1.0'
Learn more about managing modules with a PuppetfileDocumentation
acsc_e8_application_control
A Puppet module which automates the setup of the ACSC essential 8 application control on Windows, without requiring the use of group policy. This module allows for application control to be configured at scale as ACSC intended across all Puppet managed environment using a repeatable method.
For more information about applocker: https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/applocker/applocker-overview
For more information about Essential 8: https://www.cyber.gov.au/acsc/view-all-content/essential-eight
For more information about Application control: https://www.cyber.gov.au/acsc/view-all-content/publications/implementing-application-control
Table of Contents
- Description
- Setup - The basics of getting started with acsc_e8_application_control
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
Use this module to easily implement basic application control on your Windows hosts. This module will implement application control as described in ACSC link Backup link
Setup
What acsc_e8_application_control affects
See here page 2 for information on which applocker rules will be configured.
In addition, the c:\choco will also be whitelisted for executables to allow chocolatey to run from its default directly. Chocolate is commonly used in conjunction with Puppet on Window for package management. Chocolately
Warning
Please only apply this module to test nodes initially. Applocker can prevent application from running and could cause outages in production systems.
Setup Requirements
The following modules are dependencies are required acsc_e8_application_control
Beginning with acsc_e8_application_control
include acsc_e8_application_control
Usage
Standard defaults
class { 'acsc_e8_application_control'
executable_rules => 'Enabled',
msi_rules => 'Enabled',
dll_rules => 'Enabled',
script_rules => 'Enabled',
packaged_app_rules => 'Enabled',
start_service => true,
}
Additional applocker rules can be specified as shown. Hiera is preferred method to configure and manage large hash sets
class { 'acsc_e8_application_control':
additional_exec_applocker_rules => {
'Exec c:\\temp' => {
'ensure' => 'present',
'action' => 'Allow',
'conditions' => {
'path' => '%OSDRIVE%\\temp\\*',
},
'description' => 'Allow all users to run executable from c:\\temp',
'rule_type' => 'path',
'type' => 'Exe',
'user_or_group_sid' => 'S-1-1-0',
},
},
executable_rules => 'Enabled',
msi_rules => 'Enabled',
dll_rules => 'Enabled',
script_rules => 'Enabled',
packaged_app_rules => 'Enabled',
start_service => true,
}
}
To remove the rule change 'ensure' to 'absent' Eg
class { 'acsc_e8_application_control':
additional_exec_applocker_rules => {
'Exec c:\\temp' => {
'ensure' => 'absent',
'action' => 'Allow',
'conditions' => {
'path' => '%OSDRIVE%\\temp\\*',
},
'description' => 'Allow all users to run executable from c:\\temp',
'rule_type' => 'path',
'type' => 'Exe',
'user_or_group_sid' => 'S-1-1-0',
},
},
executable_rules => 'Enabled',
msi_rules => 'Enabled',
dll_rules => 'Enabled',
script_rules => 'Enabled',
packaged_app_rules => 'Enabled',
start_service => true,
}
}
For more information on how to construct applocker rules, please see https://forge.puppet.com/modules/fervid/applocker documentation.
Limitations
Currently, we are unable to set the Applocker rules to run in audit only. This is due to a limitation in the underlying custom type.
This module has been tested on
- Windows Server 2016
- Windows Server 2019
Windows 10 hasn't been tested, however it expected to work.
It can take a few minutes for applocker to apply policies once running Puppet. Especially when setting up applocker for the first time. I have seen it take over 20 minutes in some cases.
Development
Open to Pull requests :)
Reference
Table of Contents
Classes
acsc_e8_application_control
: Enforce acsc E8 application controlacsc_e8_application_control::rule_status
: A short summary of the purpose of this classacsc_e8_application_control::rules
: A short summary of the purpose of this classacsc_e8_application_control::service
: A short summary of the purpose of this class
Classes
acsc_e8_application_control
Enforce acsc E8 application control
Examples
include acsc_e8_application_control
Parameters
The following parameters are available in the acsc_e8_application_control
class:
additional_exec_applocker_rules
additional_msi_applocker_rules
additional_appx_applocker_rules
additional_script_applocker_rules
additional_dll_applocker_rules
executable_rules
msi_rules
dll_rules
script_rules
packaged_app_rules
start_service
additional_exec_applocker_rules
Data type: Hash
Additional exec applocker rules. merged with existing ACSC rules see https://forge.puppet.com/modules/fervid/applocker Defaults - {}
Default value: {}
additional_msi_applocker_rules
Data type: Hash
Additional msi applocker rules. merged with existing ACSC rules see https://forge.puppet.com/modules/fervid/applocker Defaults - {}
Default value: {}
additional_appx_applocker_rules
Data type: Hash
Additional appx applocker rules. merged with existing ACSC rules see https://forge.puppet.com/modules/fervid/applocker Defaults - {}
Default value: {}
additional_script_applocker_rules
Data type: Hash
Additional script applocker rules. merged with existing ACSC rules see https://forge.puppet.com/modules/fervid/applocker Defaults - {}
Default value: {}
additional_dll_applocker_rules
Data type: Hash
Additional dll applocker rules. merged with existing ACSC rules see https://forge.puppet.com/modules/fervid/applocker Defaults - {}
Default value: {}
executable_rules
Data type: Enum['Enabled']
Executable rule status, Enabled (or Audit, currently not supported) Defaults - Enabled
Default value: 'Enabled'
msi_rules
Data type: Enum['Enabled']
Msi rule status, Enabled (or Audit, currently not supported) Defaults - Enabled
Default value: 'Enabled'
dll_rules
Data type: Enum['Enabled']
Dll rule status, Enabled (or Audit, currently not supported) Defaults - Enabled
Default value: 'Enabled'
script_rules
Data type: Enum['Enabled']
Script rule status, Enabled (or Audit, currently not supported) Defaults - Enabled
Default value: 'Enabled'
packaged_app_rules
Data type: Enum['Enabled']
Packaged_app_rules rule status, Enabled (or Audit, currently not supported) Defaults - Enabled
Default value: 'Enabled'
start_service
Data type: Boolean
Start the appID service, defaults true.
Default value: true
acsc_e8_application_control::rule_status
Enforces rule status of each applocker rule type
Examples
private class
Parameters
The following parameters are available in the acsc_e8_application_control::rule_status
class:
executable_rules
Data type: Enum['Audit','Enabled']
msi_rules
Data type: Enum['Audit','Enabled']
dll_rules
Data type: Enum['Audit','Enabled']
script_rules
Data type: Enum['Audit','Enabled']
packaged_app_rules
Data type: Enum['Audit','Enabled']
acsc_e8_application_control::rules
Sets applocker rules
Examples
private class
Parameters
The following parameters are available in the acsc_e8_application_control::rules
class:
exec_applocker_rules
msi_applocker_rules
appx_applocker_rules
script_applocker_rules
dll_applocker_rules
executable_rules
msi_rules
dll_rules
script_rules
packaged_app_rules
exec_applocker_rules
Data type: Hash
msi_applocker_rules
Data type: Hash
appx_applocker_rules
Data type: Hash
script_applocker_rules
Data type: Hash
dll_applocker_rules
Data type: Hash
executable_rules
Data type: Enum['Audit','Enabled']
Default value: 'Enabled'
msi_rules
Data type: Enum['Audit','Enabled']
Default value: 'Enabled'
dll_rules
Data type: Enum['Audit','Enabled']
Default value: 'Enabled'
script_rules
Data type: Enum['Audit','Enabled']
Default value: 'Enabled'
packaged_app_rules
Data type: Enum['Audit','Enabled']
Default value: 'Enabled'
acsc_e8_application_control::service
Starts applocker service
Examples
private class
Changelog
All notable changes to this project will be documented in this file.
Release 0.1.0
Features
- Initial release
Bugfixes
Known Issues
- Audit only option not working, can only run the module in enforce mode.
- Windows 2016/2019 will throw error 1st Puppet run when activating the AppIDSvc, this is due to it being a protected service subsequent runs will run clean.
Dependencies
- puppetlabs/registry (>=4.0.0 < 5.0.0)
- fervid/applocker (>=1.0.0 < 2.0.0)
- puppetlabs-stdlib (>=6.0.0 < 9.0.0)