Configure a Windows 11 Enterprise system to be DISA STIG compliant.
Join us on our Discord Server to ask questions, discuss features, or just chat with other Ansible-Lockdown users.
This role will make changes to the system which may have unintended consequences. This is not an auditing tool but rather a remediation tool to be used after an audit has been conducted.
Check Mode is not supported! π« The role will complete in check mode without errors, but it is not supported and should be used with caution.
This role was developed against a clean install of the Windows 11. If you are implementing to an existing system please review this role for any site specific changes that are needed.
To use release version please point to main branch and relevant release for the stig benchmark you wish to work with.
It is possible to to only run controls that are based on a particular for security level for STIG. This is managed using tags:
- CAT1
- CAT2
- CAT3
The controls found in defaults/main also need to reflect those control numbers due to aligning every control to the audit component.
STIG releases always contain changes, it is highly recommended to review the new references and available variables. This has changed significantly since the initial release of ansible-lockdown. This is now compatible with python3 if it is found to be the default interpreter. This does come with pre-requisites which it configures the system accordingly.
Further details can be seen in the Changelog
Currently this release does not have a auditing tool that is up to date.
- Read The Docs
- Getting Started
- Customizing Roles
- Per-Host Configuration
- Getting the Most Out of the Role
General:
-
Basic knowledge of Ansible, below are some links to the Ansible documentation to help get started if you are unfamiliar with Ansible
-
Functioning Ansible and/or Tower Installed, configured, and running. This includes all of the base Ansible/Tower configurations, needed packages installed, and infrastructure setup.
-
Please read through the tasks in this role to gain an understanding of what each control is doing. Some of the tasks are disruptive and can have unintended consequences in a live production system. Also familiarize yourself with the variables in the defaults/main.yml file.
Technical Dependencies: βοΈ
- Windows 11 Enterprise 22H2 - Other versions are not supported
- Running Ansible/Tower setup (this role is tested against Ansible version 2.10.1 and newer)
- Python3 Ansible run environment
- passlib (or python2-passlib, if using python2)
- python-lxml
- python-xmltodict
- python-jmespath
- pywinrm
Package 'python-xmltodict' is required if you enable the OpenSCAP tool installation and run a report. Packages python(2)-passlib and python-jmespath are required for tasks with custom filters or modules. These are all required on the controller host that executes Ansible.
This role is designed so that the end user should not have to edit the tasks themselves. All customizing should be done via the defaults/main.yml file or with extra vars within the project, job, workflow, etc.
There are many tags available for added control precision. Each control has its own set of tags noting what level, what OS element it relates to, whether it's a patch or audit, and the rule number. Additionally, NIST references follow a specific conversion format for consistency and clarity.
- Standard Prefix:
- All references are prefixed with "NIST SP".
- Standard Types:
- "800-53" references are formatted as NIST800-53.
- "800-53A" references are formatted as NIST800-53A.
- "800-53r4" references are formatted as NIST800-53R4 (with 'R' capitalized).
- Details:
- Section and subsection numbers use periods (.) for numeric separators.
- Parenthetical elements are separated by underscores (_), e.g., IA-5(1)(d) becomes IA-5_1_d.
- Subsection letters (e.g., "b") are appended with an underscore.
Below is an example of the tag section from a control within this role. Using this example, if you set your run to skip all controls with the tag CCI-000018, this task will be skipped. Conversely, you can choose to run only controls tagged with CCI-000018.
tags:
- WN11-AU-000040
- CAT2
- CCI-000018
- CCI-000172
- CCI-001403
- CCI-001404
- CCI-001405
- CCI-002130
- CCI-002234
- SRG-OS-000004-GPOS-00004
- SV-220752r958368_rule
- V-220752
- NIST800-53_AC-2_4
- NIST800-53_AU-12_c
- NIST800-53A_AC-2_4.1_i&ii
- NIST800-53A_AC-12.1_iv
- NIST800-53R4_AC-2_4
- NIST800-53R4_AU-12_c
- NIST SP 800-53 :: AC-2 (4) β NIST800-53_AC-2_4
- NIST SP 800-53A :: AC-2 (4).1 (i&ii) β NIST800-53A_AC-2_4.1_i&ii
- NIST SP 800-53 Revision 4 :: AC-2 (4) β NIST800-53_AC-2_4
- NIST SP 800-53 :: AU-12 c β NIST800-53_AU-12_c
- NIST SP 800-53A :: AU-12.1 (iv) β NIST800-53A_AC-12.1_iv
- NIST SP 800-53 Revision 4 :: AU-12 c β NIST800-53R4_AU-12_c
By maintaining this consistent tagging structure, it becomes easier to filter and manage tasks based on specific controls and compliance requirements.
We encourage you (the community) to contribute to this role. Please read the rules below.
- Your work is done in your own individual branch. Make sure to Signed-off and GPG sign all commits you intend to merge.
- All community Pull Requests are pulled into the devel branch.
- Pull Requests into devel will confirm your commits have a GPG signature, Signed-off, and a functional test before being approved.
- Once your changes are merged and a more detailed review is complete, an authorized member will merge your changes into the main branch for a new release.
uses:
- ansible-core 2.16.x
- ansible collections - pulls in the latest version based on requirements file
- runs the audit using the devel branch
- This is an automated test that occurs on pull requests into devel
- self-hosted runners using OpenTofu
- Ansible
- ansible-core 2.18.2 - python 3.13
Massive thanks to the fantastic community and all its members.
This includes a huge thanks and credit to the original authors and maintainers.