Skip to content

Commit b8347dd

Browse files
authored
Merge pull request #76 from ansible-lockdown/devel
Final Move Of v3.0.0 To Main
2 parents c303703 + 9051723 commit b8347dd

7 files changed

Lines changed: 110 additions & 40 deletions

File tree

ChangeLog.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
# ChangeLog
22

3+
## Release 3.0.5
4+
September 2025 Update
5+
- Issues Addressed:
6+
- [#73](https://github.com/ansible-lockdown/Windows-2022-CIS/issues/73) - Thank you @ShawnHardwick
7+
8+
## Release 3.0.4
9+
10+
May 2025 Update #2
11+
- Issues Addressed:
12+
- Fixed 1.1.6 to apply to all systems except for Domain Controllers. This is present in standalone version. - Thanks @mfortin
13+
- Re-Verified 18.10.79.2 Paths
14+
- Fixed 18.9.26.2 GPO Registry Entry
15+
316
## Release 3.0.3
417

518
May 2025 Update
6-
- Fixed Control 18.6.14.1 For Missing RequirePrivacy=1 in Ansible Hardening. - Thanks @mfortin
7-
- Updated 18.10.56.3.10.2 value to 60000 from 6000 in remediate and GPO - Thanks @mfortin
8-
- Verified 18.10.79.2 Path In Remediate - Thanks @mfortin
9-
- Updated 18.10.92.4.1 ManagePreviewBuildsPolicyValue to 1. - Thanks @mfortin
10-
- Updated Pipelines Branches Trigger
11-
- Updated Readme with New Badges
19+
- Issues Addressed:
20+
- Fixed Control 18.6.14.1 For Missing RequirePrivacy=1 in Ansible Hardening. - Thanks @mfortin
21+
- Updated 18.10.56.3.10.2 value to 60000 from 6000 in remediate and GPO - Thanks @mfortin
22+
- Verified 18.10.79.2 Path In Remediate - Thanks @mfortin
23+
- Updated 18.10.92.4.1 ManagePreviewBuildsPolicyValue to 1. - Thanks @mfortin
24+
- Updated Pipelines Branches Trigger
25+
- Updated Readme with New Badges
1226

1327
## Release 3.0.2
1428

defaults/main.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,17 @@ win22cis_legacy_rc4_hmac_md5_support: false
795795
# Default: 1
796796
win22cis_ldap_client_integrity: 1
797797

798+
# 2.3.11.13
799+
# win22cis_restrict_sending_ntlm_traffic is the policy setting allows the auditing of outgoing NTLM traffic.
800+
# Events for this setting are recorded in the operational event log (e.g. Applications and Services
801+
# Log\Microsoft\Windows\NTLM). Configuring this setting to Deny All also conforms to the benchmark.
802+
# The recommended state for this setting is: Audit All.
803+
# Note: Possible Valid Settings
804+
# 1 - Deny All
805+
# 2 - Audit All
806+
# Default: 2
807+
win22cis_restrict_sending_ntlm_traffic: 2
808+
798809
# 2.3.17.2
799810
# win22cis_consent_prompt_behavior_admin is the policy setting controls the behavior of the elevation prompt for administrators.
800811
# Configuring this setting to Prompt for credentials on the secure desktop also conforms to the benchmark.

tasks/ansible_hardening/section01.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
- name: "1.1.6 | PATCH | Ensure Relax minimum password length limits is set to Enabled."
129129
when:
130130
- win22cis_rule_1_1_6
131-
- prelim_win22cis_is_domain_member
131+
- not prelim_win22cis_is_domain_controller
132132
tags:
133133
- level1-memberserver
134134
- rule_1.1.6

tasks/ansible_hardening/section02.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3215,11 +3215,34 @@
32153215
- NIST800-53R5_AU-3_1
32163216
- NIST800-53R5_AU-7
32173217
- NIST800-53R5_AU-12
3218-
ansible.windows.win_regedit:
3219-
path: HKLM:\SYSTEM\Currentcontrolset\Control\Lsa\MSV1_0
3220-
name: RestrictSendingNTLMTraffic
3221-
data: 2
3222-
type: dword
3218+
block:
3219+
- name: "2.3.11.13 | PATCH | Ensure Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers is set to Audit all or higher. | Apply Variable To Registry."
3220+
when:
3221+
- win22cis_restrict_sending_ntlm_traffic == 1 or
3222+
win22cis_restrict_sending_ntlm_traffic == 2
3223+
ansible.windows.win_regedit:
3224+
path: HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
3225+
name: RestrictSendingNTLMTraffic
3226+
data: "{{ win22cis_restrict_sending_ntlm_traffic }}"
3227+
type: dword
3228+
3229+
- name: "2.3.11.13 | AUDIT | Ensure Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers is set to Audit all or higher. | Warning Check For Variable."
3230+
when:
3231+
- win22cis_restrict_sending_ntlm_traffic == 0 or
3232+
win22cis_restrict_sending_ntlm_traffic > 2
3233+
ansible.builtin.debug:
3234+
msg:
3235+
- "Warning!! You have an invalid variable set for win22cis_restrict_sending_ntlm_traffic. Please read"
3236+
- "the notes for the variable and make the necessary change to the variable to be in compliance."
3237+
3238+
- name: "2.3.11.13 | AUDIT | Ensure Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers is set to Audit all or higher. | Warn Count."
3239+
vars:
3240+
warn_control_id: '2.3.11.13'
3241+
when:
3242+
- win22cis_restrict_sending_ntlm_traffic == 0 or
3243+
win22cis_restrict_sending_ntlm_traffic > 2
3244+
ansible.builtin.import_tasks:
3245+
file: warning_facts.yml
32233246

32243247
- name: "2.3.13.1 | PATCH | Ensure Shutdown Allow system to be shut down without having to log on is set to Disabled"
32253248
when: win22cis_rule_2_3_13_1

tasks/ansible_hardening/section18.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4672,7 +4672,7 @@
46724672
- name: "18.10.79.2 | PATCH | Ensure 'Allow suggested apps in Windows Ink Workspace' is set to 'Disabled' | Set Variable."
46734673
when: win22cis_allow_windows_ink_workspace == 0 or win22cis_allow_windows_ink_workspace == 1
46744674
ansible.windows.win_regedit:
4675-
path: HKLM:\SOFTWARE\Microsoft\Policies\Microsoft\WindowsInkWorkspace
4675+
path: HKLM:\SOFTWARE\Policies\Microsoft\WindowsInkWorkspace
46764676
name: AllowWindowsInkWorkspace
46774677
data: "{{ win22cis_allow_windows_ink_workspace }}"
46784678
type: dword

tasks/gpo_creation/gpo_section02.yml

Lines changed: 48 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4933,9 +4933,7 @@
49334933
register: rule_2_3_11_12_results
49344934

49354935
- name: "2.3.11.13 | GPO | Ensure Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers is set to Audit all or higher"
4936-
when:
4937-
- win22cis_rule_2_3_11_13
4938-
- "'(Skipped)' not in item"
4936+
when: win22cis_rule_2_3_11_13
49394937
tags:
49404938
- level1-domaincontroller
49414939
- level1-memberserver
@@ -4954,31 +4952,55 @@
49544952
- NIST800-53R5_AU-3_1
49554953
- NIST800-53R5_AU-7
49564954
- NIST800-53R5_AU-12
4957-
ansible.windows.win_shell: |
4958-
$gpoName = "{{ item }}"
4959-
$registryKeyPath = "HKLM\SYSTEM\Currentcontrolset\Control\Lsa\MSV1_0"
4960-
$registryValueName = "RestrictSendingNTLMTraffic"
4961-
$type = "DWORD"
4962-
$desiredValue = 2
4955+
block:
4956+
- name: "2.3.11.13 | AUDIT | Ensure Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers is set to Audit all or higher. | Set GPO Value.."
4957+
when:
4958+
- "'(Skipped)' not in item"
4959+
- win22cis_restrict_sending_ntlm_traffic == 1 or
4960+
win22cis_restrict_sending_ntlm_traffic == 2
4961+
ansible.windows.win_shell: |
4962+
$gpoName = "{{ item }}"
4963+
$registryKeyPath = "HKLM\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0"
4964+
$registryValueName = "RestrictSendingNTLMTraffic"
4965+
$type = "DWORD"
4966+
$desiredValue = {{ win22cis_restrict_sending_ntlm_traffic }}
49634967
4964-
# Get the current value of the registry key in the GPO
4965-
$currentValue = (Get-GPRegistryValue -Name $gpoName -Key $registryKeyPath -ValueName $registryValueName -ErrorAction SilentlyContinue).Value
4968+
# Get the current value of the registry key in the GPO
4969+
$currentValue = (Get-GPRegistryValue -Name $gpoName -Key $registryKeyPath -ValueName $registryValueName -ErrorAction SilentlyContinue).Value
49664970
4967-
# Check if the current value is equal to the desired value
4968-
if ($currentValue -ne $desiredValue) {
4969-
# If not, set the registry value to the desired value
4970-
Set-GPRegistryValue -Name $gpoName -Key $registryKeyPath -ValueName $registryValueName -Type $type -Value $desiredValue
4971-
Write-Output "Patched"
4972-
} else {
4973-
Write-Output "No Change Needed"
4974-
}
4975-
loop:
4976-
- "{{ win22cis_l1_dc_gpo_name ~ ( '(Skipped)' if not win22cis_l1_dc_gpo else '' ) }}"
4977-
- "{{ win22cis_l1_ms_gpo_name ~ ( '(Skipped)' if not win22cis_l1_ms_gpo else '' ) }}"
4978-
loop_control:
4979-
label: "{{ item }}"
4980-
changed_when: '"Patched" in rule_2_3_11_13_results.stdout'
4981-
register: rule_2_3_11_13_results
4971+
# Check if the current value is equal to the desired value
4972+
if ($currentValue -ne $desiredValue) {
4973+
# If not, set the registry value to the desired value
4974+
Set-GPRegistryValue -Name $gpoName -Key $registryKeyPath -ValueName $registryValueName -Type $type -Value $desiredValue
4975+
Write-Output "Patched"
4976+
} else {
4977+
Write-Output "No Change Needed"
4978+
}
4979+
loop:
4980+
- "{{ win22cis_l1_dc_gpo_name ~ ( '(Skipped)' if not win22cis_l1_dc_gpo else '' ) }}"
4981+
- "{{ win22cis_l1_ms_gpo_name ~ ( '(Skipped)' if not win22cis_l1_ms_gpo else '' ) }}"
4982+
loop_control:
4983+
label: "{{ item }}"
4984+
changed_when: '"Patched" in rule_2_3_11_13_results.stdout'
4985+
register: rule_2_3_11_13_results
4986+
4987+
- name: "2.3.11.13 | AUDIT | Ensure Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers is set to Audit all or higher. | Warning Check For Variable."
4988+
ansible.builtin.debug:
4989+
msg:
4990+
- "Warning!! You have an invalid variable set for win22cis_restrict_sending_ntlm_traffic. Please read"
4991+
- "the notes for the variable and make the necessary change to the variable to be in compliance."
4992+
when:
4993+
- win22cis_restrict_sending_ntlm_traffic == 0 or
4994+
win22cis_restrict_sending_ntlm_traffic > 2
4995+
4996+
- name: "2.3.11.13 | AUDIT | Ensure Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers is set to Audit all or higher. | Warn Count."
4997+
ansible.builtin.import_tasks:
4998+
file: warning_facts.yml
4999+
vars:
5000+
warn_control_id: '2.3.11.13'
5001+
when:
5002+
- win22cis_restrict_sending_ntlm_traffic == 0 or
5003+
win22cis_restrict_sending_ntlm_traffic > 2
49825004

49835005
- name: "2.3.13.1 | GPO | Ensure Shutdown Allow system to be shut down without having to log on is set to Disabled"
49845006
when:

tasks/gpo_creation/gpo_section18.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4684,7 +4684,7 @@
46844684
ansible.windows.win_shell: |
46854685
$gpoName = "{{ item }}"
46864686
$registryKeyPath = "HKLM\SOFTWARE\Policies\Microsoft\Windows\System"
4687-
$registryValueName = "AllowCustomSSPsAPs"
4687+
$registryValueName = "RunAsPPL"
46884688
$type = "DWORD"
46894689
$desiredValue = 0
46904690

0 commit comments

Comments
 (0)