-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathmondoo-windows-security.mql.yaml
4951 lines (4086 loc) · 273 KB
/
mondoo-windows-security.mql.yaml
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
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright (c) Mondoo, Inc.
# SPDX-License-Identifier: BUSL-1.1
policies:
- uid: mondoo-windows-security
name: Mondoo Microsoft Windows Security
version: 2.3.2
license: BUSL-1.1
tags:
mondoo.com/category: security
mondoo.com/platform: windows
authors:
- name: Mondoo, Inc
email: [email protected]
docs:
desc: |-
This policy provides prescriptive guidance for establishing a secure configuration posture for Microsoft Windows. This guide was tested against Microsoft Windows 10 Release 20H2 Enterprise.
## Local scan
Local scan refer to scans of files and operating systems where cnspec is installed.
To scan the `localhost` against this policy:
```bash
cnspec scan local
```
## Remote scan
Remote scans use cnspec providers to retrieve on-demand scan results without having to install any agents.
For a complete list of providers run:
```bash
cnspec scan --help
```
### Prerequisites
Remote scans of Windows hosts require an authentication method such as winRM or SSH keys.
### Scan a remote Windows device (SSH authentication)
```bash
cnspec scan ssh <user>@<IP_ADDRESS> -i /path/to/ssh_key
```
## Join the community!
Our goal is to build policies that are simple to deploy, accurate, and actionable.
If you have any suggestions for how to improve this policy, or if you need support, [join the community](https://github.com/orgs/mondoohq/discussions) in GitHub Discussions.
groups:
- title: Core
filters: |
asset.family.contains('windows')
checks:
- uid: mondoo-windows-security-always-prompt-for-password-upon-connection-is-set-to-enabled
- uid: mondoo-windows-security-apply-uac-restrictions-to-local-accounts-on-network-logons-is-set-to-enabled
- uid: mondoo-windows-security-audit-account-lockout-is-set-to-include-failure
- uid: mondoo-windows-security-audit-application-group-management-is-set-to-success-and-failure
- uid: mondoo-windows-security-audit-audit-policy-change-is-set-to-include-success
- uid: mondoo-windows-security-audit-authentication-policy-change-is-set-to-include-success
- uid: mondoo-windows-security-audit-authorization-policy-change-is-set-to-include-success
- uid: mondoo-windows-security-audit-credential-validation-is-set-to-success-and-failure
- uid: mondoo-windows-security-audit-detailed-file-share-is-set-to-include-failure
- uid: mondoo-windows-security-audit-file-share-is-set-to-success-and-failure
- uid: mondoo-windows-security-audit-force-audit-policy-subcategory-settings-windows-vista-or-later-to-override
- uid: mondoo-windows-security-audit-group-membership-is-set-to-include-success
- uid: mondoo-windows-security-audit-ipsec-driver-is-set-to-success-and-failure
- uid: mondoo-windows-security-audit-logoff-is-set-to-include-success
- uid: mondoo-windows-security-audit-logon-is-set-to-success-and-failure
- uid: mondoo-windows-security-audit-mpssvc-rule-level-policy-change-is-set-to-success-and-failure
- uid: mondoo-windows-security-audit-other-logonlogoff-events-is-set-to-success-and-failure
- uid: mondoo-windows-security-audit-other-object-access-events-is-set-to-success-and-failure
- uid: mondoo-windows-security-audit-other-policy-change-events-is-set-to-include-failure
- uid: mondoo-windows-security-audit-other-system-events-is-set-to-success-and-failure
- uid: mondoo-windows-security-audit-pnp-activity-is-set-to-include-success
- uid: mondoo-windows-security-audit-process-creation-is-set-to-include-success
- uid: mondoo-windows-security-audit-removable-storage-is-set-to-success-and-failure
- uid: mondoo-windows-security-audit-security-group-management-is-set-to-include-success
- uid: mondoo-windows-security-audit-security-state-change-is-set-to-include-success
- uid: mondoo-windows-security-audit-security-system-extension-is-set-to-include-success
- uid: mondoo-windows-security-audit-sensitive-privilege-use-is-set-to-success-and-failure
- uid: mondoo-windows-security-audit-shut-down-system-immediately-if-unable-to-log-security-audits
- uid: mondoo-windows-security-audit-special-logon-is-set-to-include-success
- uid: mondoo-windows-security-audit-system-integrity-is-set-to-success-and-failure
- uid: mondoo-windows-security-audit-user-account-management-is-set-to-success-and-failure
- uid: mondoo-windows-security-configure-smb-v1-client-driver-is-set-to-enabled-disable-driver-recommended
- uid: mondoo-windows-security-configure-smb-v1-server-is-set-to-disabled
- uid: mondoo-windows-security-do-not-allow-com-port-redirection-is-set-to-enabled
- uid: mondoo-windows-security-do-not-allow-drive-redirection-is-set-to-enabled
- uid: mondoo-windows-security-do-not-allow-lpt-port-redirection-is-set-to-enabled
- uid: mondoo-windows-security-do-not-allow-passwords-to-be-saved-is-set-to-enabled
- uid: mondoo-windows-security-do-not-allow-supported-plug-and-play-device-redirection-is-set-to-enabled
- uid: mondoo-windows-security-do-not-delete-temp-folders-upon-exit-is-set-to-disabled
- uid: mondoo-windows-security-enable-structured-exception-handling-overwrite-protection-sehop-is-set-to-enabled
- uid: mondoo-windows-security-enforce-password-history-is-set-to-24-or-more-passwords
- uid: mondoo-windows-security-maximum-password-age-is-set-to-365-or-fewer-days-but-not-0
- uid: mondoo-windows-security-minimum-password-age-is-set-to-1-or-more-days
- uid: mondoo-windows-security-minimum-password-length-is-set-to-14-or-more-characters
- uid: mondoo-windows-security-netbt-nodetype-configuration-is-set-to-enabled-p-node-recommended
- uid: mondoo-windows-security-network-access-allow-anonymous-sidname-translation-is-set-to-disabled
- uid: mondoo-windows-security-network-access-do-not-allow-anonymous-enumeration-of-sam-accounts
- uid: mondoo-windows-security-network-access-do-not-allow-anonymous-enumeration-of-sam-accounts-and-shares
- uid: mondoo-windows-security-network-access-do-not-allow-storage-of-passwords-and-credentials-for-network-auth
- uid: mondoo-windows-security-network-access-let-everyone-permissions-apply-to-anonymous-users-is-set-to-disabled
- uid: mondoo-windows-security-network-access-named-pipes-that-can-be-accessed-anonymously-is-set-to-none
- uid: mondoo-windows-security-network-access-restrict-anonymous-access-to-named-pipes-and-shares
- uid: mondoo-windows-security-network-access-restrict-clients-allowed-to-make-remote-calls-to-sam
- uid: mondoo-windows-security-network-access-shares-that-can-be-accessed-anonymously-is-set-to-none
- uid: mondoo-windows-security-network-access-sharing-and-security-model-for-local-accounts-is-set-to-classic
- uid: mondoo-windows-security-network-security-allow-local-system-to-use-computer-identity-for-ntlm
- uid: mondoo-windows-security-network-security-allow-localsystem-null-session-fallback-is-set-to-disabled
- uid: mondoo-windows-security-network-security-allow-pku2u-authentication-requests-is-set-to-disabled
- uid: mondoo-windows-security-network-security-configure-encryption-types-allowed-for-kerberos-is-set-to-aes12
- uid: mondoo-windows-security-network-security-do-not-store-lan-manager-hash-value-on-next-password-change
- uid: mondoo-windows-security-network-security-lan-manager-authentication-level-is-set-to-send-ntlmv2-response
- uid: mondoo-windows-security-network-security-ldap-client-signing-requirements-is-set-to-negotiate-signing
- uid: mondoo-windows-security-network-security-minimum-session-security-for-ntlm-ssp-based-servers-is-set-to-ntlmv2
- uid: mondoo-windows-security-network-security-minimum-session-security-for-ntlm-ssp-clients-is-set-to-ntlmv2
- uid: mondoo-windows-security-password-must-meet-complexity-requirements-is-set-to-enabled
- uid: mondoo-windows-security-relax-minimum-password-length-limits-is-set-to-enabled
- uid: mondoo-windows-security-require-secure-rpc-communication-is-set-to-enabled
- uid: mondoo-windows-security-require-use-of-specific-security-layer-for-remote-rdp-connections-is-set-to
- uid: mondoo-windows-security-require-user-authentication-for-remote-connections-by-using-network-level-a
- uid: mondoo-windows-security-set-client-connection-encryption-level-is-set-to-enabled-high-level
- uid: mondoo-windows-security-set-time-limit-for-active-but-idle-remote-desktop-services-sessions-is-set
- uid: mondoo-windows-security-set-time-limit-for-disconnected-sessions-is-set-to-enabled-1-minute
- uid: mondoo-windows-security-store-passwords-using-reversible-encryption-is-set-to-disabled
- uid: mondoo-windows-security-turn-off-multicast-name-resolution-is-set-to-enabled
- uid: mondoo-windows-security-wdigest-authentication-is-set-to-disabled
- uid: mondoo-windows-security-additional-LSA-protection
- title: Logging
filters: |
asset.family.contains('windows')
checks:
- uid: mondoo-windows-security-application-control-event-log-behavior-when-the-log-file-reaches-its-maximum
- uid: mondoo-windows-security-application-specify-the-maximum-log-file-size-kb-is-set-to-enabled-32768
- uid: mondoo-windows-security-security-control-event-log-behavior-when-the-log-file-reaches-its-maximum-size
- uid: mondoo-windows-security-security-specify-the-maximum-log-file-size-kb-is-set-to-enabled-196608
- uid: mondoo-windows-security-setup-control-event-log-behavior-when-the-log-file-reaches-its-maximum-size
- uid: mondoo-windows-security-setup-specify-the-maximum-log-file-size-kb-is-set-to-enabled-32768
- uid: mondoo-windows-security-system-control-event-log-behavior-when-the-log-file-reaches-its-maximum-size
- uid: mondoo-windows-security-system-specify-the-maximum-log-file-size-kb-is-set-to-enabled-32768
- title: User Rights
filters: |
asset.family.contains('windows')
checks:
- uid: mondoo-windows-security-2.2.19-l1-ensure-debug-programs-is-empty
queries:
- uid: mondoo-windows-security-2.2.19-l1-ensure-debug-programs-is-empty
title: Ensure 'Debug programs' is set to ''
impact: 100
mql: |
secpol.privilegerights['SeDebugPrivilege'] == empty
docs:
desc: |
This policy setting determines which user accounts will have the right to attach a debugger to any process or to the kernel, which provides complete access to sensitive and critical operating system components. Developers who are debugging their own applications do not need to be assigned this user right; however, developers who are debugging new system components will need it.
The recommended state for this setting is empty.
> Note: This user right is considered a "sensitive privilege" for the purposes of auditing.
remediation:
- id: default
desc: |-
#### Group Policy Approach
To establish the recommended configuration via GP, set the following UI path to "":
```
Computer Configuration\Policies\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Debug programs
```
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
$Temp = [System.Environment]::GetEnvironmentVariable('TEMP','Machine')
secedit /export /cfg $Temp\secpol-export.cfg
(gc $Temp\secpol-export.cfg) -replace("SeDebugPrivilege = \S+", "SeDebugPrivilege = ") | Out-File $Temp\secpol-import.cfg
secedit /import /db $Temp\secpol-db.sdb /cfg $Temp\secpol-import.cfg
secedit /configure /db $Temp\secpol-db.sdb
gpupdate /force
Remove-Item -Path $Temp\secpol-export.cfg -Force
Remove-Item -Path $Temp\secpol-import.cfg -Force
Remove-Item -Path $Temp\secpol-db.sdb -Force
```
- uid: mondoo-windows-security-additional-LSA-protection
title: Ensure additional LSA protection is enabled
impact: 100
mql: |
registrykey.property( path: 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa', name: 'RunAsPPL' ).value == 1
docs:
desc: |
Local Security Authority (LSA) protection is a security feature in Microsoft Windows operating systems that helps to prevent credential theft and other types of attacks that can compromise system security.
The LSA is responsible for enforcing security policies and managing various security-related tasks, such as authentication and authorization, on a local system. It stores sensitive information such as passwords, user account information, and security tokens.
LSA protection enhances the security of these sensitive information by restricting access to the LSA subsystem to authorized processes only. It prevents malicious software from accessing or manipulating the LSA, thereby reducing the risk of credential theft and other types of attacks.
LSA protection is implemented through the use of several techniques such as code integrity checks, access controls, and system call filtering. These techniques work together to prevent unauthorized access and ensure that only trusted processes can interact with the LSA subsystem.
Overall, LSA protection is an important security feature that helps to secure Windows systems and protect against various types of attacks that can compromise system security.
remediation:
- id: default
desc: |-
#### Group Policy Approach
Enable LSA protection via GPO:
- Open the Group Policy Management Console (GPMC).
- Create a new GPO that is linked at the domain level or that is linked to the organizational unit that contains your computer accounts. Or you can select a GPO that is already deployed.
- Right-click the GPO, and then select Edit to open the Group Policy Management Editor.
- Expand Computer Configuration, expand Preferences, and then expand Windows Settings.
- Right-click Registry, point to New, and then select Registry Item. The New Registry Properties dialog box appears.
- In the Hive list, select HKEY_LOCAL_MACHINE.
- In the Key Path list, browse to SYSTEM\CurrentControlSet\Control\Lsa.
- In the Value name box, type RunAsPPL.
- In the Value type box, select the REG_DWORD.
- In the Value data box, type 00000001.
- Select OK.
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
$RegistryPath = 'HKLM:\System\CurrentControlSet\Control\Lsa'
$Name = 'RunAsPPL'
$Value = '1'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath)) {
New-Item -Path $RegistryPath -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force
```
- uid: mondoo-windows-security-always-prompt-for-password-upon-connection-is-set-to-enabled
title: Ensure 'Always prompt for password upon connection' is set to 'Enabled'
impact: 80
mql: |
registrykey.property( path: 'HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services', name: 'fPromptForPassword' ).value == 1
docs:
desc: |-
This policy setting specifies whether Remote Desktop Services always prompts the client computer for a password upon connection. You can use this policy setting to enforce a password prompt for users who log on to Remote Desktop Services, even if they already provided the password in the Remote Desktop Connection client.
The recommended state for this setting is: `Enabled`.
remediation:
- id: default
desc: |-
#### Group Policy Approach
To establish the recommended configuration via GP, set the following UI path to `Enabled`:
```
Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Remote Desktop Services\\Remote Desktop Session Host\\Security\\Always prompt for password upon connection
```
**Note:**
This Group Policy path is provided by the Group Policy template `TerminalServer.admx/adml`
that is included with all versions of the Microsoft Windows Administrative Templates.
**Note #2:**
In the Microsoft Windows Vista Administrative Templates, this setting was named _Always prompt client for password upon connection_, but it was renamed starting with the Windows Server 2008 (non-R2) Administrative Templates.
**Impact:**
Users cannot automatically log on to Remote Desktop Services by supplying their passwords in the Remote Desktop Connection client. They will be prompted for a password to log on.
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
$RegistryPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services'
$Name = 'fPromptForPassword'
$Value = '1'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath)) {
New-Item -Path $RegistryPath -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force
```
- uid: mondoo-windows-security-application-control-event-log-behavior-when-the-log-file-reaches-its-maximum
title: 'Ensure ''Application: Control Event Log behavior when the log file reaches its maximum size'' is set to ''Disabled'''
impact: 30
mql: |
registrykey.property( path: 'HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Application', name: 'Retention' ).value == '0'
docs:
desc: |-
This policy setting controls Event Log behavior when the log file reaches its maximum size.
The recommended state for this setting is: `Disabled`.
**Note:**
Old events may or may not be retained according to the _Backup log automatically when full_
policy setting.
remediation:
- id: default
desc: |-
#### Group Policy Approach
To establish the recommended configuration via GP, set the following UI path to `Disabled`:
```
Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Application\\Control Event Log behavior when the log file reaches its maximum size
```
**Note:**
This Group Policy path is provided by the Group Policy template `EventLog.admx/adml`
that is included with all versions of the Microsoft Windows Administrative Templates.
**Note #2:**
In older Microsoft Windows Administrative Templates, this setting was initially named _Retain old events_, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates.
**Impact:**
None - this is the default behavior.
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
$RegistryPath = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\Application'
$Name = 'Retention'
$Value = '0'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath)) {
New-Item -Path $RegistryPath -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force
```
- uid: mondoo-windows-security-application-specify-the-maximum-log-file-size-kb-is-set-to-enabled-32768
title: 'Ensure ''Application: Specify the maximum log file size (KB)'' is set to ''Enabled: 32,768 or greater'''
impact: 30
mql: |
registrykey.property( path: 'HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Application', name: 'MaxSize' ).value >= 32768
docs:
desc: |-
This policy setting specifies the maximum size of the log file in kilobytes. The maximum log file size can be configured between 1 megabyte (1,024 kilobytes) and 4 terabytes (4,194,240 kilobytes) in kilobyte increments.
The recommended state for this setting is: `Enabled: 32,768 or greater`.
remediation:
- id: default
desc: |-
#### Group Policy Approach
To establish the recommended configuration via GP, set the following UI path to `Enabled: 32,768 or greater`:
```
Computer Configuration\\Policies\\Administrative Templates\\Windows Components\\Event Log Service\\Application\\Specify the maximum log file size (KB)
```
**Note:**
This Group Policy path is provided by the Group Policy template `EventLog.admx/adml`
that is included with all versions of the Microsoft Windows Administrative Templates.
**Note #2:**
In older Microsoft Windows Administrative Templates, this setting was initially named _Maximum Log Size (KB)_, but it was renamed starting with the Windows 8.0 & Server 2012 (non-R2) Administrative Templates.
**Impact:**
When event logs fill to capacity, they will stop recording information unless the retention method for each is set so that the computer will overwrite the oldest entries with the most recent ones. To mitigate the risk of loss of recent data, you can configure the retention method so that older events are overwritten as needed.
The consequence of this configuration is that older events will be removed from the logs. Attackers can take advantage of such a configuration, because they can generate a large number of extraneous events to overwrite any evidence of their attack. These risks can be somewhat reduced if you automate the archival and backup of event log data.
Ideally, all specifically monitored events should be sent to a server that uses Microsoft System Center Operations Manager (SCOM) or some other automated monitoring tool. Such a configuration is particularly important because an attacker who successfully compromises a server could clear the Security log. If all events are sent to a monitoring server, then you will be able to gather forensic information about the attacker's activities.
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
$RegistryPath = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\Application'
$Name = 'MaxSize'
$Value = '32768'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath)) {
New-Item -Path $RegistryPath -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force
```
- uid: mondoo-windows-security-apply-uac-restrictions-to-local-accounts-on-network-logons-is-set-to-enabled
title: Ensure 'Apply UAC restrictions to local accounts on network logons' is set to 'Enabled'
impact: 85
mql: |
registrykey.property( path: 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System', name: 'LocalAccountTokenFilterPolicy' ).value == 0
docs:
desc: |-
This setting controls whether local accounts can be used for remote administration via network logon (e.g., NET USE, connecting to C$, etc.). Local accounts are at high risk for credential theft when the same account and password is configured on multiple systems. Enabling this policy significantly reduces that risk.
**Enabled:**
Applies UAC token-filtering to local accounts on network logons. Membership in powerful group such as Administrators is disabled and powerful privileges are removed from the resulting access token. This configures the `LocalAccountTokenFilterPolicy` registry value to `0`. This is the default behavior for Windows.
**Disabled:**
Allows local accounts to have full administrative rights when authenticating via network logon, by configuring the `LocalAccountTokenFilterPolicy` registry value to `1`.
For more information about local accounts and credential theft, review the " [Mitigating Pass-the-Hash (PtH) Attacks and Other Credential Theft Techniques](https://www.microsoft.com/en-us/download/details.aspx?id=36036)
" documents.
For more information about `LocalAccountTokenFilterPolicy`, see Microsoft Knowledge Base article 951016: [Description of User Account Control and remote restrictions in Windows Vista](https://learn.microsoft.com/en-US/troubleshoot/windows-server/windows-security/user-account-control-and-remote-restriction).
The recommended state for this setting is: `Enabled`.
remediation:
- id: default
desc: |-
#### Group Policy Approach
To establish the recommended configuration via GP, set the following UI path to `Enabled`:
```
Computer Configuration\\Policies\\Administrative Templates\\MS Security Guide\\Apply UAC restrictions to local accounts on network logons
```
**Note:**
This Group Policy path does not exist by default. An additional Group Policy template ( `SecGuide.admx/adml` ) is required - it is available from Microsoft at
[this link](https://techcommunity.microsoft.com/t5/Microsoft-Security-Baselines/Security-baseline-FINAL-for-Windows-10-v1903-and-Windows-Server/ba-p/701084).
**Impact:**
None - this is the default behavior.
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
$RegistryPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System'
$Name = 'LocalAccountTokenFilterPolicy'
$Value = '0'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath)) {
New-Item -Path $RegistryPath -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force
```
- uid: mondoo-windows-security-audit-account-lockout-is-set-to-include-failure
title: Ensure 'Audit Account Lockout' is set to include 'Failure'
impact: 30
filters: |
asset.platform == "windows"
props:
- uid: mondooWindowsSecurityAuditpolSuccessFailure1
title: Returns 'Success and Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg und Fehler";
case _ == "it-IT": "Esito positivo e negativo";
default: "Success and Failure";
}
- uid: mondooWindowsSecurityAuditpolSuccess1
title: Returns 'Success' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg";
case _ == "it-IT": "Operazione riuscita";
default: "Success";
}
- uid: mondooWindowsSecurityAuditpolFailure
title: Returns 'Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Fehler";
case _ == "it-IT": "Errore";
default: "Failure";
}
mql: |
auditpol.where(subcategoryguid == "0CCE9217-69AE-11D9-BED3-505054503030").list != []
auditpol.where(subcategoryguid == "0CCE9217-69AE-11D9-BED3-505054503030").all(inclusionsetting == props.mondooWindowsSecurityAuditpolFailure || inclusionsetting == props.mondooWindowsSecurityAuditpolSuccessFailure1)
docs:
desc: |-
This subcategory reports when a user's account is locked out as a result of too many failed logon attempts. Events for this subcategory include:
- 4625: An account failed to log on.
The recommended state for this setting is to include: `Failure`.
remediation:
- id: default
desc: |-
#### Group Policy Approach
To establish the recommended configuration via GP, set the following UI path to include `Failure`:
```
Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Advanced Audit Policy Configuration\\Audit Policies\\Logon/Logoff\\Audit Account Lockout
```
**Impact:**
If no audit settings are configured, or if audit settings are too lax on the computers in your organization, security incidents might not be detected or not enough evidence will be available for network forensic analysis after security incidents occur. However, if audit settings are too severe, critically important entries in the Security log may be obscured by all of the meaningless entries and computer performance and the available amount of data storage may be seriously affected. Companies that operate in certain regulated industries may have legal obligations to log certain events or activities.
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
Auditpol /set /subcategory:"{0CCE9217-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable
```
- uid: mondoo-windows-security-audit-application-group-management-is-set-to-success-and-failure
title: Ensure 'Audit Application Group Management' is set to 'Success and Failure'
impact: 30
filters: |
asset.platform == "windows"
props:
- uid: mondooWindowsSecurityAuditpolSuccessFailure2
title: Returns 'Success and Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg und Fehler";
case _ == "it-IT": "Esito positivo e negativo";
default: "Success and Failure";
}
- uid: mondooWindowsSecurityAuditpolSuccess2
title: Returns 'Success' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg";
case _ == "it-IT": "Operazione riuscita";
default: "Success";
}
- uid: mondooWindowsSecurityAuditpolFailure1
title: Returns 'Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Fehler";
case _ == "it-IT": "Errore";
default: "Failure";
}
mql: |
auditpol.where(subcategoryguid == "0CCE9239-69AE-11D9-BED3-505054503030").list != []
auditpol.where(subcategoryguid == "0CCE9239-69AE-11D9-BED3-505054503030").all(inclusionsetting == props.mondooWindowsSecurityAuditpolSuccessFailure2)
docs:
desc: |-
This policy setting allows you to audit events generated by changes to application groups such as the following:
- Application group is created, changed, or deleted.
- Member is added or removed from an application group.
Application groups are utilized by Windows Authorization Manager, which is a flexible framework created by Microsoft for integrating role-based access control (RBAC) into applications. More information on Windows Authorization Manager is available at [MSDN - Windows Authorization Manager](https://msdn.microsoft.com/en-us/library/bb897401.aspx).
The recommended state for this setting is: `Success and Failure`.
remediation:
- id: default
desc: |-
#### Group Policy Approach
To establish the recommended configuration via GP, set the following UI path to `Success and Failure`:
```
Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Advanced Audit Policy Configuration\\Audit Policies\\Account Management\\Audit Application Group Management
```
**Impact:**
If no audit settings are configured, or if audit settings are too lax on the computers in your organization, security incidents might not be detected or not enough evidence will be available for network forensic analysis after security incidents occur. However, if audit settings are too severe, critically important entries in the Security log may be obscured by all of the meaningless entries and computer performance and the available amount of data storage may be seriously affected. Companies that operate in certain regulated industries may have legal obligations to log certain events or activities.
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
Auditpol /set /subcategory:"{0CCE9239-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable
```
- uid: mondoo-windows-security-audit-audit-policy-change-is-set-to-include-success
title: Ensure 'Audit Audit Policy Change' is set to include 'Success'
impact: 30
filters: |
asset.platform == "windows"
props:
- uid: auditpolAuditPolicyChange
title: A list of Windows audit policy names depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Richtlinienänderungen überwachen";
case _ == "nl-BE": "Beleidswijzigingen controleren";
case _ == "it-IT": "Modifica del criterio di controllo";
default: "Audit Policy Change";
}
- uid: mondooWindowsSecurityAuditpolSuccessFailure3
title: Returns 'Success and Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg und Fehler";
case _ == "it-IT": "Esito positivo e negativo";
default: "Success and Failure";
}
- uid: mondooWindowsSecurityAuditpolSuccess3
title: Returns 'Success' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg";
case _ == "it-IT": "Operazione riuscita";
default: "Success";
}
- uid: mondooWindowsSecurityAuditpolFailure2
title: Returns 'Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Fehler";
case _ == "it-IT": "Errore";
default: "Failure";
}
mql: |
auditpol.where(subcategoryguid == "0CCE922F-69AE-11D9-BED3-505054503030").list != []
auditpol.where(subcategoryguid == "0CCE922F-69AE-11D9-BED3-505054503030").all(inclusionsetting == props.mondooWindowsSecurityAuditpolSuccess3 || inclusionsetting == props.mondooWindowsSecurityAuditpolSuccessFailure3)
docs:
desc: |-
This subcategory reports changes in audit policy including SACL changes. Events for this subcategory include:
- 4715: The audit policy (SACL) on an object was changed.
- 4719: System audit policy was changed.
- 4902: The Per-user audit policy table was created.
- 4904: An attempt was made to register a security event source.
- 4905: An attempt was made to unregister a security event source.
- 4906: The CrashOnAuditFail value has changed.
- 4907: Auditing settings on object were changed.
- 4908: Special Groups Logon table modified.
- 4912: Per User Audit Policy was changed.
The recommended state for this setting is to include: `Success`.
remediation:
- id: default
desc: |-
#### Group Policy Approach
To establish the recommended configuration via GP, set the following UI path to include `Success`:
```
Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Advanced Audit Policy Configuration\\Audit Policies\\Policy Change\\Audit Audit Policy Change
```
**Impact:**
If no audit settings are configured, or if audit settings are too lax on the computers in your organization, security incidents might not be detected or not enough evidence will be available for network forensic analysis after security incidents occur. However, if audit settings are too severe, critically important entries in the Security log may be obscured by all of the meaningless entries and computer performance and the available amount of data storage may be seriously affected. Companies that operate in certain regulated industries may have legal obligations to log certain events or activities.
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
Auditpol /set /subcategory:"{0CCE922F-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable
```
- uid: mondoo-windows-security-audit-authentication-policy-change-is-set-to-include-success
title: Ensure 'Audit Authentication Policy Change' is set to include 'Success'
impact: 30
filters: |
asset.platform == "windows"
props:
- uid: mondooWindowsSecurityAuditpolSuccessFailure4
title: Returns 'Success and Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg und Fehler";
case _ == "it-IT": "Esito positivo e negativo";
default: "Success and Failure";
}
- uid: mondooWindowsSecurityAuditpolSuccess4
title: Returns 'Success' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg";
case _ == "it-IT": "Operazione riuscita";
default: "Success";
}
- uid: mondooWindowsSecurityAuditpolFailure3
title: Returns 'Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Fehler";
case _ == "it-IT": "Errore";
default: "Failure";
}
mql: |
auditpol.where(subcategoryguid == "0CCE9230-69AE-11D9-BED3-505054503030").list != []
auditpol.where(subcategoryguid == "0CCE9230-69AE-11D9-BED3-505054503030").all(inclusionsetting == props.mondooWindowsSecurityAuditpolSuccess4 || inclusionsetting == props.mondooWindowsSecurityAuditpolSuccessFailure4)
docs:
desc: |-
This subcategory reports changes in authentication policy. Events for this subcategory include:
- 4706: A new trust was created to a domain.
- 4707: A trust to a domain was removed.
- 4713: Kerberos policy was changed.
- 4716: Trusted domain information was modified.
- 4717: System security access was granted to an account.
- 4718: System security access was removed from an account.
- 4739: Domain Policy was changed.
- 4864: A namespace collision was detected.
- 4865: A trusted forest information entry was added.
- 4866: A trusted forest information entry was removed.
- 4867: A trusted forest information entry was modified.
The recommended state for this setting is to include: `Success`.
remediation:
- id: default
desc: |-
#### Group Policy Approach
To establish the recommended configuration via GP, set the following UI path to include `Success`:
```
Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Advanced Audit Policy Configuration\\Audit Policies\\Policy Change\\Audit Authentication Policy Change
```
**Impact:**
If no audit settings are configured, or if audit settings are too lax on the computers in your organization, security incidents might not be detected or not enough evidence will be available for network forensic analysis after security incidents occur. However, if audit settings are too severe, critically important entries in the Security log may be obscured by all of the meaningless entries and computer performance and the available amount of data storage may be seriously affected. Companies that operate in certain regulated industries may have legal obligations to log certain events or activities.
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
Auditpol /set /subcategory:"{0CCE9230-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable
```
- uid: mondoo-windows-security-audit-authorization-policy-change-is-set-to-include-success
title: Ensure 'Audit Authorization Policy Change' is set to include 'Success'
impact: 30
filters: |
asset.platform == "windows"
props:
- uid: mondooWindowsSecurityAuditpolSuccessFailure5
title: Returns 'Success and Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg und Fehler";
case _ == "it-IT": "Esito positivo e negativo";
default: "Success and Failure";
}
- uid: mondooWindowsSecurityAuditpolSuccess5
title: Returns 'Success' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg";
case _ == "it-IT": "Operazione riuscita";
default: "Success";
}
- uid: mondooWindowsSecurityAuditpolFailure4
title: Returns 'Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Fehler";
case _ == "it-IT": "Errore";
default: "Failure";
}
mql: |
auditpol.where(subcategoryguid == "0CCE9231-69AE-11D9-BED3-505054503030").list != []
auditpol.where(subcategoryguid == "0CCE9231-69AE-11D9-BED3-505054503030").all(inclusionsetting == props.mondooWindowsSecurityAuditpolSuccess5 || inclusionsetting == props.mondooWindowsSecurityAuditpolSuccessFailure5)
docs:
desc: |-
This subcategory reports changes in authorization policy. Events for this subcategory include:
- 4704: A user right was assigned.
- 4705: A user right was removed.
- 4706: A new trust was created to a domain.
- 4707: A trust to a domain was removed.
- 4714: Encrypted data recovery policy was changed.
The recommended state for this setting is to include: `Success`.
remediation:
- id: default
desc: |-
#### Group Policy Approach
To establish the recommended configuration via GP, set the following UI path to include `Success`:
```
Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Advanced Audit Policy Configuration\\Audit Policies\\Policy Change\\Audit Authorization Policy Change
```
**Impact:**
If no audit settings are configured, or if audit settings are too lax on the computers in your organization, security incidents might not be detected or not enough evidence will be available for network forensic analysis after security incidents occur. However, if audit settings are too severe, critically important entries in the Security log may be obscured by all of the meaningless entries and computer performance and the available amount of data storage may be seriously affected. Companies that operate in certain regulated industries may have legal obligations to log certain events or activities.
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
Auditpol /set /subcategory:"{0CCE9231-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable
```
- uid: mondoo-windows-security-audit-credential-validation-is-set-to-success-and-failure
title: Ensure 'Audit Credential Validation' is set to 'Success and Failure'
impact: 30
filters: |
asset.platform == "windows"
props:
- uid: mondooWindowsSecurityAuditpolSuccessFailure6
title: Returns 'Success and Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg und Fehler";
case _ == "it-IT": "Esito positivo e negativo";
default: "Success and Failure";
}
- uid: mondooWindowsSecurityAuditpolSuccess6
title: Returns 'Success' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg";
case _ == "it-IT": "Operazione riuscita";
default: "Success";
}
- uid: mondooWindowsSecurityAuditpolFailure5
title: Returns 'Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Fehler";
case _ == "it-IT": "Errore";
default: "Failure";
}
mql: |
auditpol.where(subcategoryguid == "0CCE923F-69AE-11D9-BED3-505054503030").list != []
auditpol.where(subcategoryguid == "0CCE923F-69AE-11D9-BED3-505054503030").all(inclusionsetting == props.mondooWindowsSecurityAuditpolSuccessFailure6)
docs:
desc: |-
This subcategory reports the results of validation tests on credentials submitted for a user account logon request. These events occur on the computer that is authoritative for the credentials. For domain accounts, the Domain Controller is authoritative, whereas for local accounts, the local computer is authoritative. In domain environments, most of the Account Logon events occur in the Security log of the Domain Controllers that are authoritative for the domain accounts. However, these events can occur on other computers in the organization when local accounts are used to log on. Events for this subcategory include:
- 4774: An account was mapped for logon.
- 4775: An account could not be mapped for logon.
- 4776: The Domain Controller attempted to validate the credentials for an account.
- 4777: The Domain Controller failed to validate the credentials for an account.
The recommended state for this setting is: `Success and Failure`.
remediation:
- id: default
desc: |-
#### Group Policy Approach
To establish the recommended configuration via GP, set the following UI path to `Success and Failure`:
```
Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Advanced Audit Policy Configuration\\Audit Policies\\Account Logon\\Audit Credential Validation
```
**Impact:**
If no audit settings are configured, or if audit settings are too lax on the computers in your organization, security incidents might not be detected or not enough evidence will be available for network forensic analysis after security incidents occur. However, if audit settings are too severe, critically important entries in the Security log may be obscured by all of the meaningless entries and computer performance and the available amount of data storage may be seriously affected. Companies that operate in certain regulated industries may have legal obligations to log certain events or activities.
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
Auditpol /set /subcategory:"{0CCE923F-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable
```
- uid: mondoo-windows-security-audit-detailed-file-share-is-set-to-include-failure
title: Ensure 'Audit Detailed File Share' is set to include 'Failure'
impact: 30
filters: |
asset.platform == "windows"
props:
- uid: mondooWindowsSecurityAuditpolSuccessFailure7
title: Returns 'Success and Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg und Fehler";
case _ == "it-IT": "Esito positivo e negativo";
default: "Success and Failure";
}
- uid: mondooWindowsSecurityAuditpolSuccess7
title: Returns 'Success' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg";
case _ == "it-IT": "Operazione riuscita";
default: "Success";
}
- uid: mondooWindowsSecurityAuditpolFailure6
title: Returns 'Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Fehler";
case _ == "it-IT": "Errore";
default: "Failure";
}
mql: |
auditpol.where(subcategoryguid == "0CCE9244-69AE-11D9-BED3-505054503030").list != []
auditpol.where(subcategoryguid == "0CCE9244-69AE-11D9-BED3-505054503030").all(inclusionsetting == props.mondooWindowsSecurityAuditpolFailure6 || inclusionsetting == props.mondooWindowsSecurityAuditpolSuccessFailure7)
docs:
desc: |-
This subcategory allows you to audit attempts to access files and folders on a shared folder. Events for this subcategory include:
- 5145: network share object was checked to see whether client can be granted desired access.
The recommended state for this setting is to include: `Failure`
remediation:
- id: default
desc: |-
#### Group Policy Approach
To establish the recommended configuration via GP, set the following UI path to include `Failure`:
```
Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Advanced Audit Policy Configuration\\Audit Policies\\Object Access\\Audit Detailed File Share
```
**Impact:**
If no audit settings are configured, or if audit settings are too lax on the computers in your organization, security incidents might not be detected or not enough evidence will be available for network forensic analysis after security incidents occur. However, if audit settings are too severe, critically important entries in the Security log may be obscured by all of the meaningless entries and computer performance and the available amount of data storage may be seriously affected. Companies that operate in certain regulated industries may have legal obligations to log certain events or activities.
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
Auditpol /set /subcategory:"{0CCE9244-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable
```
- uid: mondoo-windows-security-audit-file-share-is-set-to-success-and-failure
title: Ensure 'Audit File Share' is set to 'Success and Failure'
impact: 30
filters: |
asset.platform == "windows"
props:
- uid: mondooWindowsSecurityAuditpolSuccessFailure8
title: Returns 'Success and Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg und Fehler";
case _ == "it-IT": "Esito positivo e negativo";
default: "Success and Failure";
}
- uid: mondooWindowsSecurityAuditpolSuccess8
title: Returns 'Success' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Erfolg";
case _ == "it-IT": "Operazione riuscita";
default: "Success";
}
- uid: mondooWindowsSecurityAuditpolFailure7
title: Returns 'Failure' depending on the operating system language
mql: |
switch(windows.computerInfo['OsLocale']) {
case _ == "de-DE": "Fehler";
case _ == "it-IT": "Errore";
default: "Failure";
}
mql: |
auditpol.where(subcategoryguid == "0CCE9224-69AE-11D9-BED3-505054503030").list != []
auditpol.where(subcategoryguid == "0CCE9224-69AE-11D9-BED3-505054503030").all(inclusionsetting == props.mondooWindowsSecurityAuditpolSuccessFailure8)
docs:
desc: |-
This policy setting allows you to audit attempts to access a shared folder.
The recommended state for this setting is: `Success and Failure`.
**Note:**
There are no system access control lists (SACLs) for shared folders. If this policy setting is enabled, access to all shared folders on the system is audited.
remediation:
- id: default
desc: |-
#### Group Policy Approach
To establish the recommended configuration via GP, set the following UI path to `Success and Failure`:
```
Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Advanced Audit Policy Configuration\\Audit Policies\\Object Access\\Audit File Share
```
**Impact:**
If no audit settings are configured, or if audit settings are too lax on the computers in your organization, security incidents might not be detected or not enough evidence will be available for network forensic analysis after security incidents occur. However, if audit settings are too severe, critically important entries in the Security log may be obscured by all of the meaningless entries and computer performance and the available amount of data storage may be seriously affected. Companies that operate in certain regulated industries may have legal obligations to log certain events or activities.
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
Auditpol /set /subcategory:"{0CCE9224-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable