forked from chrisbelyea/local_security_policy
-
Notifications
You must be signed in to change notification settings - Fork 28
/
security_policy.rb
959 lines (944 loc) · 37.5 KB
/
security_policy.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
# frozen_string_literal: true
require 'puppet/provider'
require 'puppet/util'
require 'puppet/util/windows'
# class SecurityPolicy
class SecurityPolicy
EVENT_TYPES = ['Success,Failure', 'Success', 'Failure', 'No auditing', 0, 1, 2, 3].freeze
REGISTRY_TYPES = [1, 3, 4, 7].freeze
def initialize; end
def user_to_sid(value)
if value.match?(%r{^\*})
result = value
else
user_sid = Puppet::Util::Windows::SID.name_to_sid(value)
if user_sid.nil?
warn("\"#{value}\" does not exist")
else
result = '*' + user_sid
end
end
result
end
# convert the sid to a user
def sid_to_user(value)
value = value.gsub(%r{(^\*)}, '')
user = user_sid_array.find do |_home, _user, sid|
value == sid
end
if user.nil?
value
else
user[1]
end
end
def convert_privilege_right(ensure_value, policy_value)
# we need to convert users to sids first
if ensure_value.to_s == 'absent'
''
else
sids = []
policy_value.split(',').each do |suser|
suser.strip!
cur_user_sid = user_to_sid(suser)
sids << cur_user_sid unless cur_user_sid.nil?
end
sids.sort.join(',')
end
end
# converts the policy value inside the policy hash to conform to the secedit standards
def convert_policy_hash(policy_hash)
value = case policy_hash[:policy_type]
when 'Privilege Rights'
convert_privilege_right(policy_hash[:ensure], policy_hash[:policy_value])
when 'Event Audit'
event_to_audit_id(policy_hash[:policy_value])
when 'Registry Values'
SecurityPolicy.convert_registry_value(policy_hash[:name], policy_hash[:policy_value])
else
policy_hash[:policy_value]
end
policy_hash[:policy_value] = value
policy_hash
end
# Converts a event number to a word
def self.event_audit_mapper(policy_value)
case policy_value.to_s
when 3
'Success,Failure'
when 2
'Failure'
when 1
'Success'
else
'No auditing'
end
end
# Converts a event number to a word
def self.event_to_audit_id(event_audit_name)
case event_audit_name
when 'Success,Failure'
3
when 'Failure'
2
when 'Success'
1
when 'No auditing'
0
else
event_audit_name
end
end
# returns the key and hash value given the policy name
def self.find_mapping_from_policy_name(name)
key, value = lsp_mapping.find do |_key, hash|
hash[:name] == name
end
unless key && value
raise KeyError, "#{name} is not a valid policy"
end
[key, value]
end
# returns the key and hash value given the policy desc
def self.find_mapping_from_policy_desc(desc)
name = desc.downcase
_key, value = lsp_mapping.find do |key, _hash|
key.downcase == name
end
unless value
raise KeyError, "#{desc} is not a valid policy"
end
value
end
def self.valid_lsp?(name)
lsp_mapping.keys.include?(name)
end
def self.convert_registry_value(name, value)
value = value.to_s
return value if value.split(',').count > 1 && REGISTRY_TYPES.include?(value.split(',')[0].to_i)
policy_hash = find_mapping_from_policy_desc(name)
"#{policy_hash[:reg_type]},#{value}"
end
# converts the policy value to machine values
def self.convert_policy_value(policy_hash, value)
sp = SecurityPolicy.new
# I would rather not have to look this info up, but the type code will not always have this info handy
# without knowing the policy type we can't figure out what to convert
policy_type = find_mapping_from_policy_desc(policy_hash[:name])[:policy_type]
case policy_type.to_s
when 'Privilege Rights'
sp.convert_privilege_right(policy_hash[:ensure], value)
when 'Event Audit'
event_to_audit_id(value)
when 'Registry Values'
# convert the value to a datatype/value
convert_registry_value(policy_hash[:name], value)
else
value
end
end
def self.lsp_mapping
@lsp_mapping ||= {
# Password policy Mappings
'Enforce password history' => {
name: 'PasswordHistorySize',
policy_type: 'System Access',
},
'Maximum password age' => {
name: 'MaximumPasswordAge',
policy_type: 'System Access',
},
'Minimum password age' => {
name: 'MinimumPasswordAge',
policy_type: 'System Access',
},
'Minimum password length' => {
name: 'MinimumPasswordLength',
policy_type: 'System Access',
},
'Minimum password length audit' => {
name: 'MACHINE\System\CurrentControlSet\Control\SAM\MinimumPasswordLengthAudit',
reg_type: '4',
policy_type: 'Registry Values',
},
'Password must meet complexity requirements' => {
name: 'PasswordComplexity',
policy_type: 'System Access',
},
'Relax minimum password length limits' => {
name: 'MACHINE\System\CurrentControlSet\Control\SAM\RelaxMinimumPasswordLengthLimits',
reg_type: '4',
policy_type: 'Registry Values',
},
'Store passwords using reversible encryption' => {
name: 'ClearTextPassword',
policy_type: 'System Access',
},
# Account Lockout Policy mappings
'Account lockout threshold' => {
name: 'LockoutBadCount',
policy_type: 'System Access',
},
'Account lockout duration' => {
name: 'LockoutDuration',
policy_type: 'System Access',
},
'Reset account lockout counter after' => {
name: 'ResetLockoutCount',
policy_type: 'System Access',
},
# Audit Policy Mappings
'Audit account logon events' => {
name: 'AuditAccountLogon',
policy_type: 'Event Audit',
},
'Audit account management' => {
name: 'AuditAccountManage',
policy_type: 'Event Audit',
},
'Audit directory service access' => {
name: 'AuditDSAccess',
policy_type: 'Event Audit',
},
'Audit logon events' => {
name: 'AuditLogonEvents',
policy_type: 'Event Audit',
},
'Audit object access' => {
name: 'AuditObjectAccess',
policy_type: 'Event Audit',
},
'Audit policy change' => {
name: 'AuditPolicyChange',
policy_type: 'Event Audit',
},
'Audit privilege use' => {
name: 'AuditPrivilegeUse',
policy_type: 'Event Audit',
},
'Audit process tracking' => {
name: 'AuditProcessTracking',
policy_type: 'Event Audit',
},
'Audit system events' => {
name: 'AuditSystemEvents',
policy_type: 'Event Audit',
},
# User Rights Assignment mappings
'Access Credential Manager as a trusted caller' => {
name: 'SeTrustedCredManAccessPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Access this computer from the network' => {
name: 'SeNetworkLogonRight',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Act as part of the operating system' => {
name: 'SeTcbPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Add workstations to domain' => {
name: 'SeMachineAccountPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Adjust memory quotas for a process' => {
name: 'SeIncreaseQuotaPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Allow log on locally' => {
name: 'SeInteractiveLogonRight',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Allow log on through Remote Desktop Services' => {
name: 'SeRemoteInteractiveLogonRight',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Back up files and directories' => {
name: 'SeBackupPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Bypass traverse checking' => {
name: 'SeChangeNotifyPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Change the system time' => {
name: 'SeSystemtimePrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Change the time zone' => {
name: 'SeTimeZonePrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Create a pagefile' => {
name: 'SeCreatePagefilePrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Create a token object' => {
name: 'SeCreateTokenPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Create global objects' => {
name: 'SeCreateGlobalPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Create permanent shared objects' => {
name: 'SeCreatePermanentPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Create symbolic links' => {
name: 'SeCreateSymbolicLinkPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Debug programs' => {
name: 'SeDebugPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Deny access to this computer from the network' => {
name: 'SeDenyNetworkLogonRight',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Deny log on as a batch job' => {
name: 'SeDenyBatchLogonRight',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Deny log on as a service' => {
name: 'SeDenyServiceLogonRight',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Deny log on locally' => {
name: 'SeDenyInteractiveLogonRight',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Deny log on through Remote Desktop Services' => {
name: 'SeDenyRemoteInteractiveLogonRight',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Enable computer and user accounts to be trusted for delegation' => {
name: 'SeEnableDelegationPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Force shutdown from a remote system' => {
name: 'SeRemoteShutdownPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Generate security audits' => {
name: 'SeAuditPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Impersonate a client after authentication' => {
name: 'SeImpersonatePrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Increase a process working set' => {
name: 'SeIncreaseWorkingSetPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Increase scheduling priority' => {
name: 'SeIncreaseBasePriorityPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Load and unload device drivers' => {
name: 'SeLoadDriverPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Lock pages in memory' => {
name: 'SeLockMemoryPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Log on as a batch job' => {
name: 'SeBatchLogonRight',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Log on as a service' => {
name: 'SeServiceLogonRight',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Manage auditing and security log' => {
name: 'SeSecurityPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Modify an object label' => {
name: 'SeRelabelPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Modify firmware environment values' => {
name: 'SeSystemEnvironmentPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Obtain an impersonation token for another user in the same session' => {
name: 'SeDelegateSessionUserImpersonatePrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Perform volume maintenance tasks' => {
name: 'SeManageVolumePrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Profile single process' => {
name: 'SeProfileSingleProcessPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Profile system performance' => {
name: 'SeSystemProfilePrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Remove computer from docking station' => {
name: 'SeUndockPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Replace a process level token' => {
name: 'SeAssignPrimaryTokenPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Restore files and directories' => {
name: 'SeRestorePrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Shut down the system' => {
name: 'SeShutdownPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Synchronize directory service data' => {
name: 'SeSyncAgentPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
'Take ownership of files or other objects' => {
name: 'SeTakeOwnershipPrivilege',
policy_type: 'Privilege Rights',
data_type: :principal,
},
# Security Options mappings
'Accounts: Administrator account status' => {
name: 'EnableAdminAccount',
policy_type: 'System Access',
},
'EnableAdminAccount' => {
name: 'EnableAdminAccount',
policy_type: 'System Access',
},
'Accounts: Block Microsoft accounts' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\NoConnectedUser',
reg_type: '4',
policy_type: 'Registry Values',
},
'Accounts: Guest account status' => {
name: 'EnableGuestAccount',
policy_type: 'System Access',
},
'EnableGuestAccount' => {
name: 'EnableGuestAccount',
policy_type: 'System Access',
},
'Accounts: Limit local account use of blank passwords to console logon only' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\LimitBlankPasswordUse',
reg_type: '4',
policy_type: 'Registry Values',
},
'Accounts: Rename administrator account' => {
name: 'NewAdministratorName',
policy_type: 'System Access',
data_type: :quoted_string,
},
'Accounts: Rename guest account' => {
name: 'NewGuestName',
policy_type: 'System Access',
data_type: :quoted_string,
},
'Accounts: Require Login to Change Password' => {
name: 'RequireLogonToChangePassword',
policy_type: 'System Access',
},
'Audit: Audit the access of global system objects' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\AuditBaseObjects',
reg_type: '4',
policy_type: 'Registry Values',
},
'Audit: Audit the use of Backup and Restore privilege' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\FullPrivilegeAuditing',
reg_type: '3',
policy_type: 'Registry Values',
},
'Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\SCENoApplyLegacyAuditPolicy',
reg_type: '4',
policy_type: 'Registry Values',
},
'Audit: Shut down system immediately if unable to log security audits' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\CrashOnAuditFail',
reg_type: '4',
policy_type: 'Registry Values',
},
'DCOM: Machine Access Restrictions in Security Descriptor Definition Language (SDDL) syntax' => {
name: 'MACHINE\Software\Policies\Microsoft\Windows NT\DCOM\MachineAccessRestriction',
policy_type: 'Registry Values',
reg_type: '1',
},
'DCOM: Machine Launch Restrictions in Security Descriptor Definition Language (SDDL) syntax' => {
name: 'MACHINE\Software\Policies\Microsoft\Windows NT\DCOM\MachineLaunchRestriction',
policy_type: 'Registry Values',
reg_type: '1',
},
'Devices: Allow undock without having to log on' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\UndockWithoutLogon',
reg_type: '4',
policy_type: 'Registry Values',
},
'Devices: Allowed to format and eject removable media' => {
name: 'MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AllocateDASD',
reg_type: '1',
policy_type: 'Registry Values',
},
'Devices: Prevent users from installing printer drivers' => {
name: 'MACHINE\System\CurrentControlSet\Control\Print\Providers\LanMan Print Services\Servers\AddPrinterDrivers',
reg_type: '4',
policy_type: 'Registry Values',
},
'Devices: Restrict CD-ROM access to locally logged-on user only' => {
name: 'MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AllocateCDRoms',
reg_type: '1',
policy_type: 'Registry Values',
},
'Devices: Restrict floppy access to locally logged-on user only' => {
name: 'MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AllocateFloppies',
reg_type: '1',
policy_type: 'Registry Values',
},
'Domain member: Digitally encrypt or sign secure channel data (always)' => {
name: 'MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters\RequireSignOrSeal',
reg_type: '4',
policy_type: 'Registry Values',
},
'Domain member: Digitally encrypt secure channel data (when possible)' => {
name: 'MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters\SealSecureChannel',
reg_type: '4',
policy_type: 'Registry Values',
},
'Domain member: Digitally sign secure channel data (when possible)' => {
name: 'MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters\SignSecureChannel',
reg_type: '4',
policy_type: 'Registry Values',
},
'Domain member: Disable machine account password changes' => {
name: 'MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters\DisablePasswordChange',
reg_type: '4',
policy_type: 'Registry Values',
},
'Domain member: Maximum machine account password age' => {
name: 'MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters\MaximumPasswordAge',
reg_type: '4',
policy_type: 'Registry Values',
},
'Domain member: Require strong (Windows 2000 or later) session key' => {
name: 'MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters\RequireStrongKey',
reg_type: '4',
policy_type: 'Registry Values',
},
'Interactive logon: Display user information when the session is locked' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\DontDisplayLockedUserId',
reg_type: '4',
policy_type: 'Registry Values',
},
'Interactive logon: Do not display last user name' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\DontDisplayLastUserName',
reg_type: '4',
policy_type: 'Registry Values',
},
'Interactive logon: Do not require CTRL+ALT+DEL' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableCAD',
reg_type: '4',
policy_type: 'Registry Values',
},
"Interactive logon: Don't display last signed-in" => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\DontDisplayLastUserName',
reg_type: '4',
policy_type: 'Registry Values',
},
"Interactive logon: Don't display username at sign-in" => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\DontDisplayUserName',
reg_type: '4',
policy_type: 'Registry Values',
},
'Interactive logon: Machine account lockout threshold' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\MaxDevicePasswordFailedAttempts',
reg_type: '4',
policy_type: 'Registry Values',
},
'Interactive logon: Machine inactivity limit' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\InactivityTimeoutSecs',
reg_type: '4',
policy_type: 'Registry Values',
},
'Interactive logon: Message text for users attempting to log on' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\LegalNoticeText',
reg_type: '7',
policy_type: 'Registry Values',
},
'Interactive logon: Message title for users attempting to log on' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\LegalNoticeCaption',
reg_type: '1',
policy_type: 'Registry Values',
},
'Interactive logon: Number of previous logons to cache (in case domain controller is not available)' => {
name: 'MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\CachedLogonsCount',
reg_type: '1',
policy_type: 'Registry Values',
},
'Interactive logon: Prompt user to change password before expiration' => {
name: 'MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\PasswordExpiryWarning',
reg_type: '4',
policy_type: 'Registry Values',
},
'Interactive logon: Require Domain Controller authentication to unlock workstation' => {
name: 'MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\ForceUnlockLogon',
reg_type: '4',
policy_type: 'Registry Values',
},
'Interactive logon: Require smart card' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\ScForceOption',
reg_type: '4',
policy_type: 'Registry Values',
},
'Interactive logon: Require Windows Hello for Business or smart card' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\ScForceOption',
reg_type: '4',
policy_type: 'Registry Values',
},
'Interactive logon: Smart card removal behavior' => {
name: 'MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\ScRemoveOption',
reg_type: '1',
policy_type: 'Registry Values',
},
'Microsoft network client: Digitally sign communications (always)' => {
name: 'MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters\RequireSecuritySignature',
reg_type: '4',
policy_type: 'Registry Values',
},
'Microsoft network client: Digitally sign communications (if server agrees)' => {
name: 'MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters\EnableSecuritySignature',
reg_type: '4',
policy_type: 'Registry Values',
},
'Microsoft network client: Send unencrypted password to third-party SMB servers' => {
name: 'MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters\EnablePlainTextPassword',
reg_type: '4',
policy_type: 'Registry Values',
},
'Microsoft network server: Amount of idle time required before suspending session' => {
name: 'MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters\AutoDisconnect',
reg_type: '4',
policy_type: 'Registry Values',
},
'Microsoft network server: Attempt S4U2Self to obtain claim information' => {
name: 'MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters\EnableS4U2SelfForClaims',
policy_type: 'Registry Values',
reg_type: '4',
},
'Microsoft network server: Digitally sign communications (always)' => {
name: 'MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters\RequireSecuritySignature',
reg_type: '4',
policy_type: 'Registry Values',
},
'Microsoft network server: Digitally sign communications (if client agrees)' => {
name: 'MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters\EnableSecuritySignature',
reg_type: '4',
policy_type: 'Registry Values',
},
'Microsoft network server: Disconnect clients when logon hours expire' => {
name: 'MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters\EnableForcedLogOff',
reg_type: '4',
policy_type: 'Registry Values',
},
'Microsoft network server: Server SPN target name validation level' => {
name: 'MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters\SmbServerNameHardeningLevel',
reg_type: '4',
policy_type: 'Registry Values',
},
'Network access: Allow anonymous SID/name translation' => {
name: 'LSAAnonymousNameLookup',
policy_type: 'System Access',
},
'Network access: Do not allow anonymous enumeration of SAM accounts' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\RestrictAnonymousSAM',
reg_type: '4',
policy_type: 'Registry Values',
},
'Network access: Do not allow anonymous enumeration of SAM accounts and shares' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\RestrictAnonymous',
reg_type: '4',
policy_type: 'Registry Values',
},
'Network access: Do not allow storage of passwords and credentials for network authentication' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\DisableDomainCreds',
reg_type: '4',
policy_type: 'Registry Values',
},
'Network access: Let Everyone permissions apply to anonymous users' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\EveryoneIncludesAnonymous',
reg_type: '4',
policy_type: 'Registry Values',
},
'Network access: Named Pipes that can be accessed anonymously' => {
name: 'MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters\NullSessionPipes',
reg_type: '7',
policy_type: 'Registry Values',
},
'Network access: Remotely accessible registry paths' => {
name: 'MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedExactPaths\Machine',
reg_type: '7',
policy_type: 'Registry Values',
},
'Network access: Remotely accessible registry paths and sub-paths' => {
name: 'MACHINE\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedPaths\Machine',
reg_type: '7',
policy_type: 'Registry Values',
},
'Network access: Restrict anonymous access to Named Pipes and Shares' => {
name: 'MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters\RestrictNullSessAccess',
reg_type: '4',
policy_type: 'Registry Values',
},
'Network access: Restrict clients allowed to make remote calls to SAM' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\RestrictRemoteSAM',
policy_type: 'Registry Values',
reg_type: '1',
},
'Network access: Shares that can be accessed anonymously' => {
name: 'MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters\NullSessionShares',
reg_type: '7',
policy_type: 'Registry Values',
},
'Network access: Sharing and security model for local accounts' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\ForceGuest',
reg_type: '4',
policy_type: 'Registry Values',
},
'Network security: Allow Local System to use computer identity for NTLM' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\UseMachineId',
reg_type: '4',
policy_type: 'Registry Values',
},
'Network security: Allow LocalSystem NULL session fallback' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0\allownullsessionfallback',
policy_type: 'Registry Values',
reg_type: '4',
},
'Network security: Allow PKU2U authentication requests to this computer to use online identities' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\pku2u\AllowOnlineID',
policy_type: 'Registry Values',
reg_type: '4',
},
'Network security: Configure encryption types allowed for Kerberos' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters\SupportedEncryptionTypes',
policy_type: 'Registry Values',
reg_type: '4',
},
'Network security: Do not store LAN Manager hash value on next password change' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\NoLMHash',
reg_type: '4',
policy_type: 'Registry Values',
},
'Network security: Force logoff when logon hours expire' => {
name: 'ForceLogoffWhenHourExpire',
policy_type: 'System Access',
},
'Network security: LAN Manager authentication level' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\LmCompatibilityLevel',
reg_type: '4',
policy_type: 'Registry Values',
},
'Network security: LDAP client signing requirements' => {
name: 'MACHINE\System\CurrentControlSet\Services\LDAP\LDAPClientIntegrity',
reg_type: '4',
policy_type: 'Registry Values',
},
'Network security: Minimum session security for NTLM SSP based (including secure RPC) clients' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0\NTLMMinClientSec',
reg_type: '4',
policy_type: 'Registry Values',
},
'Network security: Minimum session security for NTLM SSP based (including secure RPC) servers' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0\NTLMMinServerSec',
reg_type: '4',
policy_type: 'Registry Values',
},
'Network security: Restrict NTLM: Add remote server exceptions for NTLM authentication' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0\ClientAllowedNTLMServers',
policy_type: 'Registry Values',
reg_type: '7',
},
'Network security: Restrict NTLM: Add server exceptions in this domain' => {
name: 'MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters\DCAllowedNTLMServers',
policy_type: 'Registry Values',
reg_type: '7',
},
'Network security: Restrict NTLM: Audit Incoming NTLM Traffic' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0\AuditReceivingNTLMTraffic',
policy_type: 'Registry Values',
reg_type: '4',
},
'Network security: Restrict NTLM: Audit NTLM authentication in this domain' => {
name: 'MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters\AuditNTLMInDomain',
policy_type: 'Registry Values',
reg_type: '4',
},
'Network security: Restrict NTLM: Incoming NTLM traffic' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0\RestrictReceivingNTLMTraffic',
policy_type: 'Registry Values',
reg_type: '4',
},
'Network security: Restrict NTLM: NTLM authentication in this domain' => {
name: 'MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters\RestrictNTLMInDomain',
policy_type: 'Registry Values',
reg_type: '4',
},
'Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0\RestrictSendingNTLMTraffic',
policy_type: 'Registry Values',
reg_type: '4',
},
'Recovery console: Allow automatic administrative logon' => {
name: 'MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole\SecurityLevel',
reg_type: '4',
policy_type: 'Registry Values',
},
'Recovery console: Allow floppy copy and access to all drives and all folders' => {
name: 'MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole\SetCommand',
reg_type: '4',
policy_type: 'Registry Values',
},
'Shutdown: Allow system to be shut down without having to log on' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\ShutdownWithoutLogon',
reg_type: '4',
policy_type: 'Registry Values',
},
'Shutdown: Clear virtual memory pagefile' => {
name: 'MACHINE\System\CurrentControlSet\Control\Session Manager\Memory Management\ClearPageFileAtShutdown',
policy_type: 'Registry Values',
reg_type: '4',
},
'System cryptography: Force strong key protection for user keys stored on the computer' => {
name: 'MACHINE\Software\Policies\Microsoft\Cryptography\ForceKeyProtection',
reg_type: '4',
policy_type: 'Registry Values',
},
'System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing' => {
name: 'MACHINE\System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy\Enabled',
reg_type: '4',
policy_type: 'Registry Values',
},
'System objects: Require case insensitivity for non-Windows subsystems' => {
name: 'MACHINE\System\CurrentControlSet\Control\Session Manager\Kernel\ObCaseInsensitive',
policy_type: 'Registry Values',
reg_type: '4',
},
'System objects: Strengthen default permissions of internal system objects (e.g., Symbolic Links)' => {
name: 'MACHINE\System\CurrentControlSet\Control\Session Manager\ProtectionMode',
policy_type: 'Registry Values',
reg_type: '4',
},
'System settings: Optional subsystems' => {
name: 'MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\optional',
policy_type: 'Registry Values',
reg_type: '7',
},
'System settings: Use Certificate Rules on Windows Executables for Software Restriction Policies' => {
name: 'MACHINE\Software\Policies\Microsoft\Windows\Safer\CodeIdentifiers\AuthenticodeEnabled',
reg_type: '4',
policy_type: 'Registry Values',
},
'User Account Control: Admin Approval Mode for the Built-in Administrator account' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\FilterAdministratorToken',
reg_type: '4',
policy_type: 'Registry Values',
},
'User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableUIADesktopToggle',
reg_type: '4',
policy_type: 'Registry Values',
},
'User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\ConsentPromptBehaviorAdmin',
reg_type: '4',
policy_type: 'Registry Values',
},
'User Account Control: Behavior of the elevation prompt for standard users' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\ConsentPromptBehaviorUser',
reg_type: '4',
policy_type: 'Registry Values',
},
'User Account Control: Detect application installations and prompt for elevation' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableInstallerDetection',
reg_type: '4',
policy_type: 'Registry Values',
},
'User Account Control: Only elevate executables that are signed and validated' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\ValidateAdminCodeSignatures',
reg_type: '4',
policy_type: 'Registry Values',
},
'User Account Control: Only elevate UIAccess applications that are installed in secure locations' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableSecureUIAPaths',
reg_type: '4',
policy_type: 'Registry Values',
},
'User Account Control: Run all administrators in Admin Approval Mode' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA',
reg_type: '4',
policy_type: 'Registry Values',
},
'User Account Control: Switch to the secure desktop when prompting for elevation' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\PromptOnSecureDesktop',
reg_type: '4',
policy_type: 'Registry Values',
},
'User Account Control: Virtualize file and registry write failures to per-user locations' => {
name: 'MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableVirtualization',
reg_type: '4',
policy_type: 'Registry Values',
},
}
end
end