Skip to content

Commit 1d38142

Browse files
committed
implement first cis controls
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
1 parent a184bdf commit 1d38142

6 files changed

Lines changed: 20 additions & 46 deletions

File tree

Gemfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
source 'https://rubygems.org'
22

3-
gem 'berkshelf', '~> 5.3'
4-
gem 'chef', '~> 12.5'
3+
gem 'berkshelf', '~> 7.0.8'
4+
gem 'chef', '~> 14'
55

66
group :test do
7-
gem 'foodcritic', '~> 6.0'
8-
gem 'highline', '~> 1.6.0'
9-
gem 'rubocop', '~> 0.56.0'
7+
gem 'foodcritic', '~> 15.1.0'
8+
gem 'highline', '~> 1.6'
9+
gem 'rubocop', '~> 0.66.0'
1010
end
1111

1212
group :integration do
13-
gem 'inspec', '~> 1'
13+
gem 'inspec', '~> 3'
1414
gem 'kitchen-inspec'
1515
gem 'kitchen-vagrant'
1616
gem 'test-kitchen'
1717
end
1818

1919
group :tools do
20-
gem 'github_changelog_generator', '~> 1.12.0'
20+
gem 'github_changelog_generator', '~> 1.14.3'
2121
end

attributes/sec_policy.rb

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@
55

66
# System access settings
77
# Nil value means nothing will be written to the security policy template.
8-
default['security_policy']['access']['PasswordComplexity'] = 1
9-
default['security_policy']['access']['LockoutBadCount'] = 3
10-
default['security_policy']['access']['ResetLockoutCount'] = 15
11-
default['security_policy']['access']['LockoutDuration'] = 15
8+
default['security_policy']['access']['PasswordHistorySize'] = 24
9+
default['security_policy']['access']['PasswordComplexity'] = 1
10+
default['security_policy']['access']['MinimumPasswordAge'] = 1
11+
default['security_policy']['access']['MaximumPasswordAge'] = 60
12+
default['security_policy']['access']['MinimumPasswordLength'] = 14
13+
default['security_policy']['access']['LockoutBadCount'] = 10
14+
default['security_policy']['access']['ResetLockoutCount'] = 15
15+
default['security_policy']['access']['LockoutDuration'] = 15
16+
default['security_policy']['access']['ClearTextPassword'] = 0
1217

1318
# Security policy rights / privileges settings.
1419
default['security_policy']['rights']['SeRemoteInteractiveLogonRight'] = '*S-1-5-32-544'
1520
default['security_policy']['rights']['SeTcbPrivilege'] = ''
1621
default['security_policy']['rights']['SeMachineAccountPrivilege'] = '*S-1-5-32-544'
1722
default['security_policy']['rights']['SeTrustedCredManAccessPrivilege'] = ''
1823
default['security_policy']['rights']['SeNetworkLogonRight'] = ''
24+
default['security_policy']['rights']['SeMachineAccountPrivilege'] = '*S-1-5-32-544'

recipes/default.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
return unless node['platform_family'] == 'windows'
88

9-
include_recipe 'windows-hardening::password_policy'
9+
#include_recipe 'windows-hardening::password_policy'
1010
include_recipe 'windows-hardening::security_policy'
1111
include_recipe 'windows-hardening::user_rights'
1212
include_recipe 'windows-hardening::audit'

recipes/password_policy.rb

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
include_controls 'windows-baseline' do
22
# we need to skip the test to ensure we can connect with non-administrator
33
# winrm user for our tests
4-
skip_control 'cis-network-access-2.2.2'
5-
skip_control 'windows-account-100'
4+
attribute('se_network_logon_right', default: ['S-1-1-0', 'S-1-5-32-544', 'S-1-5-32-545', 'S-1-5-32-551'])
65
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: windows-hardening-integration-tests
22
depends:
33
- name: windows-baseline
4-
url: https://github.com/dev-sec/windows-baseline
4+
path: ../windows-baseline

0 commit comments

Comments
 (0)