This repository was archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathoms_audits.xml
More file actions
2091 lines (2038 loc) · 119 KB
/
oms_audits.xml
File metadata and controls
2091 lines (2038 loc) · 119 KB
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
<baseline BaselineId="OMS.Linux.1" BaseOrigId="1">
<baselines>
<baseline id="SSH.Linux" />
</baselines>
<audits>
<audit
description="Ensure nodev option set on /home partition."
msid="1.1.4"
impact="An attacker could mount a special device (for example, block or character device) on the /home partition."
remediation="Edit the /etc/fstab file and nodev the fourth field (mounting options) for the /home partition. For more information, see the fstab(5) manual pages."
ruleId="a87f15ed-1115-a22d-6f43-17db97c91111">
<check distro="*" command="CheckNoMatchingLines" regex="nodev" filter="\s/home\s" path="/etc/fstab" />
</audit>
<audit
description="Ensure nodev option set on /tmp partition."
msid="1.1.5"
impact="An attacker could mount a special device (for example, block or character device) on the /tmp partition."
remediation="Edit the /etc/fstab file and nodev the fourth field (mounting options) for the /tmp partition. For more information, see the fstab(5) manual pages."
ruleId="a87f15ed-1115-a22d-6f43-17db97c91161">
<check distro="*" command="CheckNoMatchingLines" regex="nodev" filter="\s/tmp\s" path="/etc/fstab" />
</audit>
<audit
description="Ensure nodev option set on /var/tmp partition."
msid="1.1.6"
impact="An attacker could mount a special device (for example, block or character device) on the /var/tmp partition."
remediation="Edit the /etc/fstab file and nodev the fourth field (mounting options) for the /var/tmp partition. For more information, see the fstab(5) manual pages."
ruleId="a87f15ed-1115-a22d-6f43-17db97c91181">
<check distro="*" command="CheckNoMatchingLines" regex="nodev" filter="\s/var/tmp\s" path="/etc/fstab" />
</audit>
<audit
description="Ensure nosuid option set on /tmp partition."
msid="1.1.7"
impact="Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /var/tmp."
remediation="Edit the /etc/fstab file and nosuid the fourth field (mounting options) for the /tmp partition. For more information, see the fstab(5) manual pages."
ruleId="a87f15ed-1115-a22d-6f43-17db97c91191">
<check distro="*" command="CheckNoMatchingLines" regex="nosuid" filter="\s/tmp\s" path="/etc/fstab" />
</audit>
<audit
description="Ensure nosuid option set on /var/tmp partition."
msid="1.1.8"
impact="Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /var/tmp."
remediation="Edit the /etc/fstab file and nosuid the fourth field (mounting options) for the /var/tmp partition. For more information, see the fstab(5) manual pages."
ruleId="a87f15ed-1115-a22d-6f43-17db97c91171">
<check distro="*" command="CheckNoMatchingLines" regex="nosuid" filter="\s/var/tmp\s" path="/etc/fstab" />
</audit>
<audit
description="Ensure noexec option set on /var/tmp partition."
msid="1.1.9"
impact="Since the `/var/tmp` filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from `/var/tmp` ."
remediation="Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /var/tmp partition. For more information, see the fstab(5) manual pages."
ruleId="b97f15dd-8185-a12d-6f43-17db97c98477">
<check distro="*" command="CheckNoMatchingLines" regex="noexec" filter="\s/var/tmp\s" path="/etc/fstab" />
</audit>
<audit
description="Ensure noexec option set on /dev/shm partition."
msid="1.1.16"
impact="Setting this option on a file system prevents users from executing programs from shared memory. This deters users from introducing potentially malicious software on the system."
remediation="Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /dev/shm partition. For more information, see the fstab(5) manual pages."
ruleId="11e6dc3b-0659-3dc8-7d12-8eb0bb6c0890">
<check distro="*" command="CheckNoMatchingLines" regex="noexec" filter="\s/dev/shm\s" path="/etc/fstab" />
</audit>
<audit
description="Disable automounting"
msid="1.1.21"
impact="With automounting enabled anyone with physical access could attach a USB drive or disc and have its contents available in system even if they lacked permissions to mount it themselves."
remediation="Disable the autofs service or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-autofs'"
ruleId="8cffbbca-3e5b-9af9-65fe-ff7b6316565d">
<check distro="*" command="CheckServiceDisabled" service="autofs" />
</audit>
<audit
description="Ensure mounting of USB storage devices is disabled"
msid="1.1.21.1"
impact="Removing support for USB storage devices reduces the local attack surface of the server."
remediation="Edit or create a file in the `/etc/modprobe.d/` directory ending in .conf and add `install usb-storage /bin/true` then unload the usb-storage module or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-unnecessary-kernel-mods'"
ruleId="acffbbca-3e5b-9aa9-65ee-ff7b6116565f">
<check distro="*" command="CheckMatchingLinesInDir" regex="^install\s+usb-storage\s+/bin/true" path="/etc/modprobe.d/"/>
</audit>
<audit
description="Ensure core dumps are restricted."
msid="1.5.1"
impact="Setting a hard limit on core dumps prevents users from overriding the soft variable. If core dumps are required, consider setting limits for user groups (see `limits.conf(5)` ). In addition, setting the `fs.suid_dumpable` variable to 0 will prevent setuid programs from dumping core."
remediation="Add `hard core 0` to /etc/security/limits.conf or a file in the limits.d directory and set `fs.suid_dumpable = 0` in sysctl or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-core-dumps'"
ruleId="429123d4-7e7d-2737-6542-2e86b82c16a1">
<check distro="*" command="CheckMatchingLines" regex="\*\s+hard\s+core\s+0\s*$" path="/etc/security/limits.conf">
</check>
<check distro="*" command="CheckSysctlOutput" regex="^fs\.suid_dumpable\s=\s0$"/>
</audit>
<audit
description="Ensure prelink is disabled."
msid="1.5.4"
impact="The prelinking feature can interfere with the operation of AIDE, because it changes binaries. Prelinking can also increase the vulnerability of the system if a malicious user is able to compromise a common library such as libc."
remediation="uninstall `prelink` using your package manager or run '/opt/microsoft/omsagent/plugin/omsremediate -r remove-prelink'"
ruleId="cdee3703-321a-69c4-107f-e7b350a95e5a">
<check distro="*" command="CheckPackageNotInstalled" packagename="prelink"/>
</audit>
<audit
description="Ensure permissions on /etc/motd are configured."
msid="1.7.1.4"
impact="If the `/etc/motd` file does not have the correct ownership, it could be modified by unauthorized users with incorrect or misleading information."
remediation="Set the owner and group of /etc/motd to root and set permissions to 0644 or run '/opt/microsoft/omsagent/plugin/omsremediate -r file-permissions'"
ruleId="b08735e4-8565-0ab1-0fba-b15e31be98e4">
<check distro="*" command="CheckFileStatsIfExists" path="/etc/motd" owner="root" group="root" mode="644" allow-stricter="true" />
</audit>
<audit
description="Ensure permissions on /etc/issue are configured."
msid="1.7.1.5"
impact="If the `/etc/issue` file does not have the correct ownership, it could be modified by unauthorized users with incorrect or misleading information."
remediation="Set the owner and group of /etc/issue to root and set permissions to 0644 or run '/opt/microsoft/omsagent/plugin/omsremediate -r file-permissions'"
ruleId="69032884-324a-3289-a171-b17a541f7adb">
<check distro="*" command="CheckFileStats" path="/etc/issue" owner="root" group="root" mode="644" allow-stricter="true" />
</audit>
<audit
description="Ensure permissions on /etc/issue.net are configured."
msid="1.7.1.6"
impact="If the `/etc/issue.net` file does not have the correct ownership, it could be modified by unauthorized users with incorrect or misleading information."
remediation="Set the owner and group of /etc/issue.net to root and set permissions to 0644 or run '/opt/microsoft/omsagent/plugin/omsremediate -r file-permissions'"
ruleId="9110c0c6-27f1-065e-140d-2672c1ad055b">
<check distro="*" command="CheckFileStats" path="/etc/issue.net" owner="root" group="root" mode="644" allow-stricter="true" />
</audit>
<audit
description="The nodev option should be enabled for all removable media."
msid="2.1"
cceid="CCE-3522-0"
severity="Important"
impact="An attacker could mount a special device (for example, block or character device) via removable media"
remediation="Add the nodev option to the fourth field (mounting options) in /etc/fstab"
ruleId="5c7537f2-b90b-44a4-89c9-4fca5fd79ef7">
<check distro="*" command="CheckNoMatchingLines" filter="^[^#]\S+\s+\S*(floppy|cdrom)" regex="nodev" path="/etc/fstab" />
</audit>
<audit
description="The noexec option should be enabled for all removable media."
msid="2.2"
cceid="CCE-4275-4"
severity="Important"
impact="An attacker could load executable file via removable media"
remediation="Add the noexec option to the fourth field (mounting options) in /etc/fstab"
ruleId="7976cc38-fddb-4913-9295-4fcac2e641c3">
<check distro="*" command="CheckNoMatchingLines" filter="^[^#]\S+\s+\S*(floppy|cdrom)" regex="noexec" path="/etc/fstab" />
</audit>
<audit
description="The nosuid option should be enabled for all removable media."
msid="2.3"
cceid="CCE-4042-8"
severity="Important"
impact="An attacker could load files that run with an elevated security context via removable media"
remediation="Add the nosuid option to the fourth field (mounting options) in /etc/fstab"
ruleId="cdc390c9-fb4a-47f6-90a7-4e1bd6d0e9e6">
<check distro="*" command="CheckNoMatchingLines" filter="^[^#]\S+\s+\S*(floppy|cdrom)" regex="nosuid" path="/etc/fstab" />
</audit>
<audit
description="Ensure talk client is not installed."
msid="2.3.3"
impact="The software presents a security risk as it uses unencrypted protocols for communication."
remediation="Uninstall `talk` or run '/opt/microsoft/omsagent/plugin/omsremediate -r remove-talk'"
ruleId="5133422e-990f-971e-661d-ccfc913c1d2c">
<check distro="*" command="CheckPackageNotInstalled" packagename="talk"/>
</audit>
<audit
description="Ensure permissions on /etc/hosts.allow are configured."
msid="3.4.4"
impact="It is critical to ensure that the `/etc/hosts.allow` file is protected from unauthorized write access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions."
remediation="Set the owner and group of /etc/hosts.allow to root and the permissions to 0644 or run '/opt/microsoft/omsagent/plugin/omsremediate -r file-permissions'"
ruleId="1d498679-5780-6db3-14cc-6433011e0310">
<check distro="*" command="CheckFileStatsIfExists" path="/etc/hosts.allow" owner="root" group="root" mode="644" allow-stricter="true"/>
</audit>
<audit
description="Ensure permissions on /etc/hosts.deny are configured."
msid="3.4.5"
impact="It is critical to ensure that the `/etc/hosts.deny` file is protected from unauthorized write access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions."
remediation="Set the owner and group of /etc/hosts.deny to root and the permissions to 0644 or run '/opt/microsoft/omsagent/plugin/omsremediate -r file-permissions'"
ruleId="71d554b5-1436-9676-1966-939ded8d0a37">
<check distro="*" command="CheckFileStatsIfExists" path="/etc/hosts.deny" owner="root" group="root" mode="644" allow-stricter="true"/>
</audit>
<audit
description="Ensure default deny firewall policy"
msid="3.6.2"
impact="With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to maintain a secure firewall with a default DROP policy than it is with a default ALLOW policy."
remediation="Set the default policy for incoming, outgoing and routed traffic to `deny` or `reject` as appropriate using your firewall software"
ruleId="eb6c608a-2316-41bd-aa00-604249e31f27">
<check
distro="*"
command="CheckIptablesStatus"
regex="Chain\sINPUT\s\(policy\sDROP\)">
</check>
<check
distro="*"
command="CheckIptablesStatus"
regex="Chain\sFORWARD\s\(policy\sDROP\)">
</check>
<check
distro="*"
command="CheckIptablesStatus"
regex="Chain\sOUTPUT\s\(policy\sDROP\)">
</check>
</audit>
<audit
description="The nodev/nosuid option should be enabled for all NFS mounts."
msid="5"
cceid="CCE-4368-7"
severity="Important"
impact="An attacker could load files that run with an elevated security context or special devices via remote file system"
remediation="Add the nosuid and nodev options to the fourth field (mounting options) in /etc/fstab"
ruleId="7ca24433-3c08-4ff5-9fe2-d8e1830c5829">
<check distro="*" command="CheckNoMatchingLines" filter="nfs\s+" regex="nosuid|nodev" path="/etc/fstab" />
</audit>
<audit
description="Ensure password creation requirements are configured."
msid="5.3.1"
impact="Strong passwords protect systems from being hacked through brute force methods."
remediation="Set the following key/value pairs in the appropriate PAM for your distro: minlen=14, minclass = 4, dcredit = -1, ucredit = -1, ocredit = -1, lcredit = -1, or run '/opt/microsoft/omsagent/plugin/omsremediate -r enable-password-requirements'"
ruleId="b042fda5-55f6-17ba-78d5-1ba33a4709f5">
<check distro="SLES" command="CheckMatchingLinesAll" path="/etc/pam.d/common-password" filter="password\s+(?:requisite|required)\s+pam_cracklib\.so" regex="(try_first_pass(?:\s+|$))|(minlen=(?:1[4-9]|[2-9][0-9])(?:\s+|$))|(dcredit=-1(?:\s+|$))|(ucredit=-1(?:\s+|$))|(ocredit=-1(?:\s+|$))|(lcredit=-1(?:\s+|$))"/>
<check distro="CentOS=6|RedHat=6|Oracle=6" command="CheckMatchingLinesAll" path="/etc/pam.d/system-auth" filter="password\s+(?:requisite|required)\s+pam_cracklib\.so" regex="(try_first_pass(?:\s+|$))|(minlen=(?:1[4-9]|[2-9][0-9])(?:\s+|$))|(dcredit=-1(?:\s+|$))|(ucredit=-1(?:\s+|$))|(ocredit=-1(?:\s+|$))|(lcredit=-1(?:\s+|$))"/>
<check distro="CentOS=6|RedHat=6|Oracle=6" command="CheckMatchingLinesAll" path="/etc/pam.d/password-auth" filter="password\s+(?:requisite|required)\s+pam_cracklib\.so" regex="(try_first_pass(?:\s+|$))|(minlen=(?:1[4-9]|[2-9][0-9])(?:\s+|$))|(dcredit=-1(?:\s+|$))|(ucredit=-1(?:\s+|$))|(ocredit=-1(?:\s+|$))|(lcredit=-1(?:\s+|$))"/>
<check distro="CentOS>6|RedHat>6|Oracle>6|Ubuntu|Debian" command="CheckFileExists" path="/etc/security/pwquality.conf"/>
<check distro="CentOS>6|RedHat>6|Oracle>6|Ubuntu|Debian" command="CheckPwQuality" path="/etc/security/pwquality.conf"/>
</audit>
<audit
description="Ensure lockout for failed password attempts is configured."
msid="5.3.2"
impact="Locking out user IDs after `n` unsuccessful consecutive login attempts mitigates brute force password attacks against your systems."
remediation="for Ubuntu and Debian, add the pam_tally and pam_deny modules as appropriate. For all other distros, refer to your distro's documentation"
ruleId="1895704d-a326-90ca-3795-3a1289e7482d">
<check distro="*" command="CheckMatchingLinesAllIfExists" path="/etc/pam.d/common-auth" filter="\s+pam_tally2\.so\s+" regex="(deny=[1-5])|(unlock_time=[1-9][0-9]{2,})"/>
<check distro="*" command="CheckMatchingLinesAllIfExists" path="/etc/pam.d/password-auth" filter="^\s*auth\s+required\s+pam_faillock\.so\s+" regex="(deny=[1-5])|(unlock_time=[1-9][0-9]{2,})"/>
<check distro="*" command="CheckMatchingLinesAllIfExists" path="/etc/pam.d/system-auth" filter="^\s*auth\s+required\s+pam_faillock\.so\s+" regex="(deny=[1-5])|(unlock_time=[1-9][0-9]{2,})"/>
</audit>
<audit
description = "Disable the installation and use of file systems that are not required (cramfs)"
msid="6.1"
severity="Warning"
impact="An attacker could use a vulnerability in cramfs to elevate privileges"
remediation="Add a file to the /etc/modprob.d directory that disables cramfs or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-unnecessary-kernel-mods'"
ruleId="9967cbaf-44be-0dd1-92ab-d4f4034b2d28">
<check distro="*" command="CheckMatchingLinesInDir" regex="^install\s+cramfs\s+/bin/true" path="/etc/modprobe.d/"/>
</audit>
<audit
description = "Disable the installation and use of file systems that are not required (freevxfs)"
msid="6.2"
severity="Warning"
impact="An attacker could use a vulnerability in freevxfs to elevate privileges"
remediation="Add a file to the /etc/modprob.d directory that disables freevxfs or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-unnecessary-kernel-mods'"
ruleId="4c066a3d-8eba-a210-3228-cff300039363">
<check distro="*" command="CheckMatchingLinesInDir" regex="^install\s+freevxfs\s+/bin/true" path="/etc/modprobe.d/"/>
</audit>
<audit
description="Ensure all users' home directories exist"
msid="6.2.7"
impact="If the user's home directory does not exist or is unassigned, the user will be placed in '/' and will not be able to write any files or have local environment variables set."
remediation="If any users' home directories do not exist, create them and make sure the respective user owns the directory. Users without an assigned home directory should be removed or assigned a home directory as appropriate."
ruleId="c07e6adc-93ab-1d40-2c6d-f3f16ca9561d">
<check distro="*" command="CheckUserDirs" expect="exists"/>
</audit>
<audit
description="Ensure users own their home directories"
msid="6.2.9"
impact="Since the user is accountable for files stored in the user home directory, the user must be the owner of the directory."
remediation="Change the ownership of any home directories that are not owned by the defined user to the correct user."
ruleId="54e255d1-038a-860b-48a2-3d1821e34661">
<check distro="*" command="CheckUserDirs" expect="owner"/>
</audit>
<audit
description="Ensure users' dot files are not group or world writable."
msid="6.2.10"
impact="Group or world-writable user configuration files may enable malicious users to steal or modify other users' data or to gain another user's system privileges."
remediation="Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user dot file permissions and determine the action to be taken in accordance with site policy."
ruleId="086cb95b-5427-3ac0-9b98-c5c5b593579a">
<check distro="*" command="CheckUserDirs" expect="FileMatchPerm" regex="^\.\S+" mode-mask="744"/>
</audit>
<audit
description="Ensure no users have .forward files"
msid="6.2.11"
impact="Use of the `.forward` file poses a security risk in that sensitive data may be inadvertently transferred outside the organization. The `.forward` file also poses a risk as it can be used to execute commands that may perform unintended actions."
remediation="Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user `.forward` files and determine the action to be taken in accordance with site policy."
ruleId="d02297d2-9f49-5276-0a92-5ac1e42e243c">
<check distro="*" command="CheckUserDirs" expect="FileNotExists" path=".forward"/>
</audit>
<audit
description="Ensure no users have .netrc files"
msid="6.2.12"
impact="The `.netrc` file presents a significant security risk since it stores passwords in unencrypted form. Even if FTP is disabled, user accounts may have brought over `.netrc` files from other systems which could pose a risk to those systems"
remediation="Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user `.netrc` files and determine the action to be taken in accordance with site policy."
ruleId="c1b7767e-6c84-6a54-10b8-b9797a8d707a">
<check distro="*" command="CheckUserDirs" expect="FileNotExists" path=".netrc"/>
</audit>
<audit
description="Ensure no users have .rhosts files"
msid="6.2.14"
impact="This action is only meaningful if `.rhosts` support is permitted in the file `/etc/pam.conf` . Even though the `.rhosts` files are ineffective if support is disabled in `/etc/pam.conf` , they may have been brought over from other systems and could contain information useful to an attacker for those other systems."
remediation="Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user `.rhosts` files and determine the action to be taken in accordance with site policy."
ruleId="28884fab-89e2-2250-a057-6f35637b4848">
<check distro="*" command="CheckUserDirs" expect="FileNotExists" path=".rhosts"/>
</audit>
<audit
description="Ensure all groups in /etc/passwd exist in /etc/group"
msid="6.2.15"
impact="Groups which are defined in the /etc/passwd file but not in the /etc/group file poses a threat to system security since group permissions are not properly managed."
remediation="For each group defined in /etc/passwd, ensure there is a corresponding group in /etc/group"
ruleId="835a98f5-46da-5332-6b45-38df223e9d9a">
<check distro="*" command="CheckGroupValidity"/>
</audit>
<audit
description="Ensure no duplicate UIDs exist"
msid="6.2.16"
impact="Users must be assigned unique UIDs for accountability and to ensure appropriate access protections."
remediation="Establish unique UIDs and review all files owned by the shared UIDs to determine which UID they are supposed to belong to."
ruleId="df7fd9e2-0cd0-47c1-92b0-f3cab6e06869">
<check distro="*" command="CheckNoDuplicateAccounts" path="/etc/passwd" variable="2"/>
</audit>
<audit
description="Ensure no duplicate GIDs exist"
msid="6.2.17"
impact="Groups must be assigned unique GIDs for accountability and to ensure appropriate access protections."
remediation="Establish unique GIDs and review all files owned by the shared GIDs to determine which GID they are supposed to belong to."
ruleId="70f3d785-1410-440f-6f6d-79b051039d21">
<check distro="*" command="CheckNoDuplicateAccounts" path="/etc/group" variable="2"/>
</audit>
<audit
description="Ensure no duplicate user names exist"
msid="6.2.18"
impact="If a user is assigned a duplicate user name, it will create and have access to files with the first UID for that username in `/etc/passwd` . For example, if 'test4' has a UID of 1000 and a subsequent 'test4' entry has a UID of 2000, logging in as 'test4' will use UID 1000. Effectively, the UID is shared, which is a security problem."
remediation="Establish unique user names for the users. File ownerships will automatically reflect the change as long as the users have unique UIDs."
ruleId="017e0242-25b9-2c72-7ac6-d601086f5c8b">
<check distro="*" command="CheckNoDuplicateAccounts" path="/etc/passwd" variable="0"/>
</audit>
<audit
description="Ensure no duplicate groups exist"
msid="6.2.19"
impact="If a group is assigned a duplicate group name, it will create and have access to files with the first GID for that group in `/etc/group` . Effectively, the GID is shared, which is a security problem."
remediation="Establish unique names for the user groups. File group ownerships will automatically reflect the change as long as the groups have unique GIDs."
ruleId="bc5844b6-7e40-4f2f-7e81-1cbd18885dae">
<check distro="*" command="CheckNoDuplicateAccounts" path="/etc/group" variable="0"/>
</audit>
<audit
description="Ensure shadow group is empty"
msid="6.2.20"
impact="Any users assigned to the shadow group would be granted read access to the /etc/shadow file. If attackers can gain read access to the `/etc/shadow` file, they can easily run a password cracking program against the hashed passwords to break them. Other security information that is stored in the `/etc/shadow` file (such as expiration) could also be useful to subvert additional user accounts."
remediation="Remove all users form the shadow group"
ruleId="cbdc33fa-0f1c-0a90-7fe9-8ef1cf6643c2">
<check distro="*" command="CheckNoMatchingLines" path="/etc/group" regex="^shadow:.*:.*:\S+"/>
</audit>
<audit
description = "Disable the installation and use of file systems that are not required (hfs)"
msid="6.3"
severity="Warning"
impact="An attacker could use a vulnerability in hfs to elevate privileges"
remediation="Add a file to the /etc/modprob.d directory that disables hfs or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-unnecessary-kernel-mods'"
ruleId="39595d95-88a4-78e2-6e0e-fbde7fd95eed">
<check distro="*" command="CheckMatchingLinesInDir" regex="^install\s+hfs\s+/bin/true" path="/etc/modprobe.d/"/>
</audit>
<audit
description = "Disable the installation and use of file systems that are not required (hfsplus)"
msid="6.4"
severity="Warning"
impact="An attacker could use a vulnerability in hfsplus to elevate privileges"
remediation="Add a file to the /etc/modprob.d directory that disables hfsplus or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-unnecessary-kernel-mods'"
ruleId="68fb9c92-1009-9e24-694e-3d996a5e09c5">
<check distro="*" command="CheckMatchingLinesInDir" regex="^install\s+hfsplus\s+/bin/true" path="/etc/modprobe.d/"/>
</audit>
<audit
description = "Disable the installation and use of file systems that are not required (jffs2)"
msid="6.5"
severity="Warning"
impact="An attacker could use a vulnerability in jffs2 to elevate privileges"
remediation="Add a file to the /etc/modprob.d directory that disables jffs2 or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-unnecessary-kernel-mods'"
ruleId="859c7aa0-6eeb-6aac-6160-2fdead2537bf">
<check distro="*" command="CheckMatchingLinesInDir" regex="^install\s+jffs2\s+/bin/true" path="/etc/modprobe.d/"/>
</audit>
<audit
description="Kernels should only be compiled from approved sources."
msid="10"
cceid="CCE-4209-3"
severity="Critical"
impact="A kernel from an unapproved source could contain vulnerabilities or backdoors to grant access to an attacker."
remediation="Install the kernel that is provided by your distro vendor."
ruleId="34e19f66-2387-4cdc-8ab2-cfac8e5865f0">
<check distro="Ubuntu" command="VerifyKernelSource" regex="-Ubuntu "/>
</audit>
<audit
description = "/etc/shadow file permissions should be set to 0400"
msid="11.1"
cceid="CCE-4130-1"
severity="Critical"
impact="An attacker that can retrieve or manipulate hashed passwords from /etc/shadow if it is not correctly secured."
remediation="Set the permissions and ownership of /etc/shadow* or run '/opt/microsoft/omsagent/plugin/omsremediate -r set-etc-shadow-perms'"
ruleId="13dabe7c-02ea-09d2-1a97-42cc7ac94eaa">
<check distro="*" command="CheckFileStats" path="/etc/shadow" owner="root" group="root,shadow" mode-mask="07177"/>
</audit>
<audit
description = "/etc/shadow- file permissions should be set to 0400"
msid="11.2"
cceid="CCE-4130-1"
severity="Critical"
impact="An attacker that can retrieve or manipulate hashed passwords from /etc/shadow- if it is not correctly secured."
remediation="Set the permissions and ownership of /etc/shadow* or run '/opt/microsoft/omsagent/plugin/omsremediate -r set-etc-shadow-perms'"
ruleId="1e941132-a3a7-5ccb-1817-50551b65202e">
<check distro="*" command="CheckFileStats" path="/etc/shadow-" owner="root" group="root,shadow" mode-mask="07177"/>
<check distro="*" command="CheckFileStatsIfExists" path="/etc/shadow.old" owner="root" group="root,shadow" mode-mask="07177"/>
</audit>
<audit
description = "/etc/gshadow file permissions should be set to 0400"
msid="11.3"
cceid="CCE-3932-1"
severity="Critical"
impact="An attacker could join security groups if this file is not properly secured"
remediation="Set the permissions and ownership of /etc/gshadow- or run '/opt/microsoft/omsagent/plugin/omsremediate -r set-etc-gshadow-perms'"
ruleId="0a7f2b28-8586-6cef-512e-a28f991d83cd">
<check distro="*" command="CheckFileStatsIfExists" path="/etc/gshadow-" owner="root" group="root,shadow" mode-mask="07177"/>
</audit>
<audit
description = "/etc/gshadow- file permissions should be set to 0400"
msid="11.4"
cceid="CCE-3932-1"
severity="Critical"
impact="An attacker could join security groups if this file is not properly secured"
remediation="Set the permissions and ownership of /etc/gshadow or run '/opt/microsoft/omsagent/plugin/omsremediate -r set-etc-gshadow-perms'"
ruleId="0fe59dec-472c-4b11-a221-36053a47afb6">
<check distro="*" command="CheckFileStatsIfExists" path="/etc/gshadow" owner="root" group="root,shadow" mode-mask="07177"/>
</audit>
<audit
description="/etc/passwd file permissions should be 0644"
msid="12.1"
cceid="CCE-3566-7"
severity="Critical"
impact="An attacker could modify userIDs and login shells"
remediation="Set the permissions and ownership of /etc/passwd or run '/opt/microsoft/omsagent/plugin/omsremediate -r set-etc-passwd-perms'"
ruleId="ad534c97-1070-415c-9fc7-c92366d3fc30">
<check distro="*" command="CheckFileStats" path="/etc/passwd" owner="root" group="root" mode="644" allow-stricter="true" />
</audit>
<audit
description="/etc/group file permissions should be 0644"
msid="12.2"
cceid="CCE-3967-7"
severity="Critical"
impact="An attacker could elevate privileges by modifying group membership"
remediation="Set the permissions and ownership of /etc/group or run '/opt/microsoft/omsagent/plugin/omsremediate -r set-etc-group-perms"
ruleId="c41a47e9-1ba0-4e72-9f43-4659a4bfed63">
<check distro="*" command="CheckFileStats" path="/etc/group" owner="root" group="root" mode="644" allow-stricter="true" />
</audit>
<audit
description = "/etc/passwd- file permissions should be set to 0600"
msid="12.3"
cceid="CCE-3932-1"
severity="Critical"
impact="An attacker could join security groups if this file is not properly secured"
remediation="Set the permissions and ownership of /etc/passwd- or run '/opt/microsoft/omsagent/plugin/omsremediate -r set-etc-passwd-perms"
ruleId="0c67cac0-1e99-8a8f-32e1-841d18b01a9a">
<check distro="*" command="CheckFileStatsIfExists" path="/etc/passwd-" owner="root" group="root,shadow" mode="600"/>
</audit>
<audit
description="/etc/group- file permissions should be 0644"
msid="12.4"
cceid="CCE-3967-7"
severity="Critical"
impact="An attacker could elevate privileges by modifying group membership"
remediation="Set the permissions and ownership of /etc/group- or run '/opt/microsoft/omsagent/plugin/omsremediate -r set-etc-group-perms"
ruleId="865ebb92-8e64-4e3a-aa9b-0290768aa8f1">
<check distro="*" command="CheckFileStats" path="/etc/group-" owner="root" group="root" mode="644" allow-stricter="true" />
</audit>
<audit
description = "Access to the root account via su should be restricted to the 'root' group"
msid="21"
cceid="CCE-15047-4"
severity="Critical"
impact="An attacker could escalate permissions by password guessing if su is not restricted to users in the root group."
remediation="Run the command '/opt/microsoft/omsagent/plugin/omsremediate -r fix-su-permissions'. This will add the line 'auth required pam_wheel.so use_uid' to the file '/etc/pam.d/su'"
ruleId="0c77cac0-1e99-8a8f-32e1-841d18b01a9a">
<check distro="*" command="CheckMatchingLines" regex="^[\s\t]*auth\s+required\s+pam_wheel.so(\s+.*)?\suse_uid" path="/etc/pam.d/su"/>
</audit>
<audit
description="The 'root' group should exist, and contain all members who can su to root"
msid="22"
cceid="CCE-14088-9"
severity="Critical"
impact="An attacker could escalate permissions by password guessing if su is not restricted to users in the root group."
remediation="Create the root group via the command 'groupadd -g 0 root'"
ruleId="8cac0c32-1add-42b9-9300-5ccb9f91aab3">
<check distro="*" command="CheckMatchingLines" regex="^root:x:0:" path="/etc/group" />
</audit>
<audit
description="There are no accounts without passwords"
msid="23.2"
cceid="CCE-4238-2"
severity="Critical"
impact="An attacker can login to accounts with no password and execute arbitrary commands."
remediation="Use the passwd command to set passwords for all accounts"
ruleId="ca9d29b7-79bd-4c99-85e2-1454295c3c8e">
<check distro="*" command="CheckNoMatchingLines" regex="^[^:]+::" path="/etc/shadow" />
</audit>
<audit
description="Accounts other than root must have unique UIDs greater than zero(0)"
msid="24"
cceid="CCE-4009-7"
severity="Critical"
impact="If an account other than root has uid zero, an attacker could compromise the account and gain root privileges."
remediation="Assign unique, non-zero uids to all non-root accounts using 'usermod -u'"
ruleId="7de0f0e6-f97b-4e12-8f9e-c6538ca5a85b">
<check distro="*" command="CheckNoMatchingLines" filter="^root" regex="^[^:]:[^:]:0:" path="/etc/shadow" />
</audit>
<audit
description="Randomized placement of virtual memory regions should be enabled"
msid="25"
cceid="CCE-4146-7"
severity="Critical"
impact="An attacker could write executable code to known regions in memory resulting in elevation of privilege"
remediation="Add the value '1' or '2' to the file '/proc/sys/kernel/randomize_va_space'"
ruleId="d790e942-efd3-42e6-a3a5-9eb1d651a588">
<check distro="*" command="CheckMatchingLines" regex="^(1|2)$" path="/proc/sys/kernel/randomize_va_space" />
</audit>
<audit
description="Kernel support for the XD/NX processor feature should be enabled"
msid="26"
cceid="CCE-4172-3"
severity="Critical"
impact="An attacker could cause a system to executable code from data regions in memory resulting in elevation of privilege."
remediation="Confirm the file '/proc/cpuinfo' contains the flag 'nx'"
ruleId="49c89437-d116-4d84-a91d-0dd59daafa0d">
<check distro="*" command="CheckMatchingLines" regex="^\s*flags.* nx[ $]" path="/proc/cpuinfo" />
</audit>
<audit
description = " The '.' should not appear in root's $PATH"
msid="27.1"
cceid="CCE-3301-9"
severity="Critical"
impact="An attacker could elevate privileges by placing a malicious file in root's $PATH"
remediation="Modify the 'export PATH=' line in /root/.profile"
ruleId="d66f8908-7b9f-77fc-18d4-af85197e0aeb">
<check distro="*" command="CheckNotMatchEnvVariable" user="root" regex="^\.:|:\.:|:\.$" variable="PATH"/>
</audit>
<audit
description = "User home directories should be mode 750 or more restrictive"
msid="28"
cceid="CCE-4090-7"
severity="Critical"
impact="An attacker could retrieve sensitive information from the home folders of other users."
remediation="Set home folder permissions to 750 or run '/opt/microsoft/omsagent/plugin/omsremediate -r fix-home-dir-permissions"
ruleId="0754488a-75c7-a4e8-0fb4-9212f771623f">
<check distro="*" command="CheckHomeDirectoryPermissions"/>
</audit>
<audit
description = "The default umask for all users should be set to 077 in login.defs"
msid="29"
cceid="CCE-14847-8"
severity="Critical"
impact="An attacker could retrieve sensitive information from files owned by other users."
remediation="Run the command '/opt/microsoft/omsagent/plugin/omsremediate -r set-default-user-umask'. This will add the line 'UMASK 077' to the file '/etc/login.defs'"
ruleId="0753438a-75c7-a4e8-0fb4-9213f771623f">
<check distro="*" command="CheckMatchingLines" regex="^UMASK\s+077" path="/etc/login.defs"/>
</audit>
<audit
description="All bootloaders should have password protection enabled."
msid="31"
cceid="CCE-3818-2"
severity="Warning"
impact="An attacker with physical access could modify bootloader options, yielding unrestricted system access"
remediation="Add a boot loader password to the file '/boot/grub/grub.cfg'"
ruleId="8a4f5ce8-41c4-710c-631e-fbc36a2fa53e">
<check distro="*" command="CheckMatchingLinesIfExists" regex="^password\s+--encrypted\s+\S+" path="/boot/grub/grub.conf"/>
<check distro="*" command="CheckMatchingLinesIfExists" regex="^[\s]*password(?:(?:_pbkdf2\s+\S+)|(?:\s+--encrypted))\s+\S+" path="/boot/grub/grub.cfg"/>
<check distro="*" command="CheckMatchingLinesIfExists" regex="^[\s]*password(?:(?:_pbkdf2\s+\S+)|(?:\s+--encrypted))\s+\S+" path="/boot/grub2/grub.cfg"/>
</audit>
<audit
description="Ensure permissions on bootloader config are configured"
msid="31.1"
severity="Important"
impact="Setting the permissions to read and write for root only prevents non-root users from seeing the boot parameters or changing them. Non-root users who read the boot parameters may be able to identify weaknesses in security upon boot and be able to exploit them."
remediation="Set the owner and group of your bootloader to root:root and permissions to 0400 or run '/opt/microsoft/omsagent/plugin/omsremediate -r bootloader-permissions"
ruleId="091f0150-80d1-0e2d-7353-8cdb77fc6aa1">
<check distro="*" command="CheckFileStatsIfExists" path="/boot/grub/grub.conf" owner="root" group="root" mode="400" allow-stricter="true"/>
<check distro="*" command="CheckFileStatsIfExists" path="/boot/grub/grub.cfg" owner="root" group="root" mode="400" allow-stricter="true"/>
<check distro="*" command="CheckFileStatsIfExists" path="/boot/grub2/grub.cfg" owner="root" group="root" mode="400" allow-stricter="true"/>
</audit>
<audit
description="Ensure authentication required for single user mode."
msid="33"
impact="Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials."
remediation="run the following command to set a password for the root user: `passwd root`"
ruleId="13a48ca1-92bc-63a1-a4de-b984375fa332">
<check distro="*" command="CheckNoMatchingLines" path="/etc/shadow" regex="^root:\s*:"/>
</audit>
<audit
description="Ensure packet redirect sending is disabled."
msid="38.3"
cceid="CCE-4155-8"
severity="Critical"
impact="An attacker could use a compromised host to send invalid ICMP redirects to other router devices in an attempt to corrupt routing and have users access a system set up by the attacker as opposed to a valid system."
remediation="set the following parameters in /etc/sysctl.conf: 'net.ipv4.conf.all.send_redirects = 0' and 'net.ipv4.conf.default.send_redirects = 0' or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-send-redirects"
ruleId="5ea9d618-1af4-4e59-65be-ffac234872e9">
<check distro="*" command="CheckSysctlOutput" regex="^net\.ipv4\.conf\.all\.send_redirects\s*=\s*0\s*$"/>
<check distro="*" command="CheckSysctlOutput" regex="^net\.ipv4\.conf\.default\.send_redirects\s*=\s*0\s*$"/>
</audit>
<audit
description = "Sending ICMP redirects should be disabled for all interfaces. (net.ipv4.conf.default.accept_redirects = 0)"
msid="38.4"
cceid="CCE-4186-3"
severity="Critical"
impact="An attacker could alter this system's routing table, redirecting traffic to an alternate destination"
remediation="Run `sysctl -w key=value` and set to a compliant value or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-accept-redirects'."
ruleId="a492f72a-6b79-8a9d-3b4f-3fface972ab7">
<check distro="*" command="CheckSysctlOutput" regex="^net\.ipv4\.conf\.default\.accept_redirects\s*=\s*0\s*$"/>
<check distro="*" command="CheckSysctlOutput" regex="^net\.ipv4\.conf\.all\.accept_redirects\s*=\s*0\s*$"/>
<check distro="*" command="CheckSysctlOutput" regex="^net\.ipv6\.conf\.all\.accept_redirects\s*=\s*0\s*$"/>
<check distro="*" command="CheckSysctlOutput" regex="^net\.ipv6\.conf\.default\.accept_redirects\s*=\s*0\s*$"/>
</audit>
<audit
description = "Sending ICMP redirects should be disabled for all interfaces. (net.ipv4.conf.default.secure_redirects = 0)"
msid="38.5"
cceid="CCE-4151-7"
severity="Critical"
impact="An attacker could alter this system's routing table, redirecting traffic to an alternate destination"
remediation="Run `sysctl -w key=value` and set to a compliant value or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-secure-redirects'"
ruleId="2451c34e-218d-349e-10b2-54c3591e6edf">
<check distro="*" command="CheckSysctlOutput" regex="^net\.ipv4\.conf\.default\.secure_redirects\s*=\s*0\s*$"/>
<check distro="*" command="CheckSysctlOutput" regex="^net\.ipv4\.conf\.all\.secure_redirects\s*=\s*0\s*$"/>
</audit>
<audit
description="Accepting source routed packets should be disabled for all interfaces. (net.ipv4.conf.all.accept_source_route = 0)"
msid="40.1"
cceid="CCE-4236-6"
severity="Critical"
impact="An attacker could redirect traffic for malicious purposes."
remediation="Run `sysctl -w key=value` and set to a compliant value or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-accept-source-route'"
ruleId="4ecae4e6-a3e2-44f5-9985-ea2a21962450">
<check distro="*" command="CheckMatchingLines" regex="^0$" path="/proc/sys/net/ipv4/conf/all/accept_source_route" />
</audit>
<audit
description="Accepting source routed packets should be disabled for all interfaces. (net.ipv6.conf.all.accept_source_route = 0) or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-accept-source-route'"
msid="40.2"
cceid="CCE-4236-6"
severity="Critical"
impact="An attacker could redirect traffic for malicious purposes."
remediation="Run `sysctl -w key=value` and set to a compliant value."
ruleId="b659c9f6-a076-4886-9048-db10c349b9fe">
<check distro="*" command="CheckMatchingLinesIfExists" regex="^0$" path="/proc/sys/net/ipv6/conf/all/accept_source_route" />
</audit>
<audit
description="Ignoring bogus ICMP responses to broadcasts should be enabled. (net.ipv4.icmp_ignore_bogus_error_responses = 1)"
msid="43"
cceid="CCE-4133-5"
severity="Critical"
impact="An attacker could perform an ICMP attack resulting in DoS"
remediation="Run `sysctl -w key=value` and set to a compliant value or run '/opt/microsoft/omsagent/plugin/omsremediate -r enable-icmp-ignore-bogus-error-responses'"
ruleId="88acc143-2f76-4418-9aa9-d0d5f244ab5f">
<check distro="*" command="CheckMatchingLines" regex="^1$" path="/proc/sys/net/ipv4/icmp_ignore_bogus_error_responses" />
</audit>
<audit
description="Ignoring ICMP echo requests (pings) sent to broadcast / multicast addresses should be enabled. (net.ipv4.icmp_echo_ignore_broadcasts = 1)"
msid="44"
cceid="CCE-3644-2"
severity="Critical"
impact="An attacker could perform an ICMP attack resulting in DoS"
remediation="Run `sysctl -w key=value` and set to a compliant value or run '/opt/microsoft/omsagent/plugin/omsremediate -r enable-icmp-echo-ignore-broadcasts'"
ruleId="f5a5926d-9c64-41fa-8220-5bc0f8213550">
<check distro="*" command="CheckMatchingLines" regex="^1$" path="/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts" />
</audit>
<audit
description = "Logging of martian packets (those with impossible addresses) should be enabled for all interfaces. (net.ipv4.conf.all.log_martians = 1)"
msid="45.1"
cceid="CCE-4320-8"
severity="Critical"
impact="An attacker could send traffic from spoofed addresses without being detected"
remediation="Run `sysctl -w key=value` and set to a compliant value or run '/opt/microsoft/omsagent/plugin/omsremediate -r enable-log-martians'"
ruleId="dc1c08a3-91e8-1d60-9210-c18bdebd8778">
<check distro="*" command="CheckSysctlOutput" regex="^net\.ipv4\.conf\.all\.log_martians\s*=\s*1\s*$"/>
<check distro="*" command="CheckSysctlOutput" regex="^net\.ipv4\.conf\.default\.log_martians\s*=\s*1\s*$"/>
</audit>
<audit
description="Performing source validation by reverse path should be enabled for all interfaces. (net.ipv4.conf.all.rp_filter = 1)"
msid="46.1"
cceid="CCE-4080-8"
severity="Critical"
impact="The system will accept traffic from addresses that are unroutable."
remediation="Run `sysctl -w key=value` and set to a compliant value or run '/opt/microsoft/omsagent/plugin/omsremediate -r enable-rp-filter'"
ruleId="177e6190-1026-49fb-a1f9-fd5b10302280">
<check distro="*" command="CheckMatchingLines" regex="^1$" path="/proc/sys/net/ipv4/conf/all/rp_filter" />
</audit>
<audit
description="Performing source validation by reverse path should be enabled for all interfaces. (net.ipv4.conf.default.rp_filter = 1)"
msid="46.2"
cceid="CCE-3840-6"
severity="Critical"
impact="The system will accept traffic from addresses that are unroutable."
remediation="Run `sysctl -w key=value` and set to a compliant value or run '/opt/microsoft/omsagent/plugin/omsremediate -r enable-rp-filter'"
ruleId="c28d5519-6e3a-466f-8d8c-b351851dfc78">
<check distro="*" command="CheckMatchingLines" regex="^1$" path="/proc/sys/net/ipv4/conf/default/rp_filter" />
</audit>
<audit
description="TCP syncookies should be enabled. (net.ipv4.tcp_syncookies = 1)"
msid="47"
cceid="CCE-4265-5"
severity="Critical"
impact="An attacker could perform a DoS over TCP"
remediation="Run `sysctl -w key=value` and set to a compliant value or run '/opt/microsoft/omsagent/plugin/omsremediate -r enable-tcp-syncookies'"
ruleId="db6ca14e-26c5-48cd-a6b7-fc953861043c">
<check distro="*" command="CheckMatchingLines" regex="^1$" path="/proc/sys/net/ipv4/tcp_syncookies" />
</audit>
<audit
description="The system should not act as a network sniffer."
msid="48"
cceid="CCE-15013-6"
severity="Warning"
impact="An attacker may use promiscuous interfaces to sniff network traffic"
remediation="Promiscuous mode is enabled via a 'promisc' entry in '/etc/network/interfaces' or '/etc/rc.local.' Check both files and remove this entry."
ruleId="45766f27-5af3-453d-bade-f8195925cde1">
<check distro="*" command="CheckNoPromiscInterfaces" />
</audit>
<audit
description="All wireless interfaces should be disabled."
msid="49"
cceid="CCE-4276-2"
severity="Warning"
impact="An attacker could create a fake AP to intercept transmissions."
remediation="Confirm all wireless interfaces are disabled in '/etc/network/interfaces'"
ruleId="8def2d0c-303a-4c0b-858c-319f80f7c814">
<check distro="*" command="CheckNoWirelessInterfaces" />
</audit>
<audit
description="The IPv6 protocol should be enabled."
msid="50"
cceid="CCE-18455-6"
severity="Informational"
impact="This is necessary for communication on modern networks."
remediation="Open /etc/sysctl.conf and confirm that 'net.ipv6.conf.all.disable_ipv6' and 'net.ipv6.conf.default.disable_ipv6' are set to 0"
ruleId="f04b1de8-1fd3-40da-a27f-39b7ea97bf8c">
<check distro="*" command="CheckFileExists" path="/proc/net/if_inet6" />
</audit>
<audit
description="Ensure DCCP is disabled"
msid="54"
impact="If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface."
remediation="Edit or create a file in the `/etc/modprobe.d/` directory ending in .conf and add `install dccp /bin/true` then unload the dccp module or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-unnecessary-kernel-mods'"
ruleId="93d2736e-7329-8806-3ef6-e71bb2203d11">
<check distro="*" command="CheckMatchingLinesInDir" regex="^install\s+dccp\s+/bin/true" path="/etc/modprobe.d/"/>
</audit>
<audit
description="Ensure SCTP is disabled"
msid="55"
impact="If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface."
remediation="Edit or create a file in the `/etc/modprobe.d/` directory ending in .conf and add `install sctp /bin/true` then unload the sctp module or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-unnecessary-kernel-mods'"
ruleId="78228616-15d4-33fe-0357-88e77f228f05">
<check distro="*" command="CheckMatchingLinesInDir" regex="^install\s+sctp\s+/bin/true" path="/etc/modprobe.d/"/>
</audit>
<audit
description="Disable support for RDS."
msid="56"
cceid="CCE-14027-7"
severity="Warning"
impact="An attacker could use a vulnerability in RDS to compromise the system"
remediation="Edit or create a file in the `/etc/modprobe.d/` directory ending in .conf and add `install rds /bin/true` then unload the rds module or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-unnecessary-kernel-mods'"
ruleId="d9ed5e76-2348-4409-94dd-c76352407fe8">
<check distro="*" command="CheckMatchingLinesInDir" regex="^install\s+rds\s+/bin/true" path="/etc/modprobe.d/" />
</audit>
<audit
description="Ensure TIPC is disabled"
msid="57"
impact="If the protocol is not required, it is recommended that the drivers not be installed to reduce the potential attack surface."
remediation="Edit or create a file in the `/etc/modprobe.d/` directory ending in .conf and add `install tipc /bin/true` then unload the tipc module or run '/opt/microsoft/omsagent/plugin/omsremediate -r disable-unnecessary-kernel-mods'"
ruleId="8ace9b14-820f-6e0d-37d8-c6df950454cd">
<check distro="*" command="CheckMatchingLinesInDir" regex="^install\s+tipc\s+/bin/true" path="/etc/modprobe.d/"/>
</audit>
<audit
description="Ensure logging is configured"
msid="60"
impact="A great deal of important security-related information is sent via `rsyslog` (for example, successful and failed su attempts, failed login attempts, root login attempts, etc.)."
remediation="Configure syslog, rsyslog or syslog-ng as appropriate"
ruleId="15ca11bf-034a-56d6-564f-2f857d1f96c6">
<check distro="*" command="CheckFileExistsRegex" path="/var/log" regex="(syslog|\S+\.log$)"/>
</audit>
<audit
description="The syslog, rsyslog, or syslog-ng package should be installed."
msid="61"
cceid="CCE-17742-8"
severity="Important"
impact="Reliability and security issues will not be logged, preventing proper diagnosis."
remediation="Install the rsyslog package, or run '/opt/microsoft/omsagent/plugin/omsremediate -r install-rsyslog'"
ruleId="8720959b-c356-4eaa-bb4f-720fb8006183">
<check distro="*" command="CheckPackageInstalledRegexp" packagename="^r?syslog(-ng)?$" />
</audit>
<audit
description="Ensure a logging service is enabled"
msid="62"
impact="It is imperative to have the ability to log events on a node."
remediation="Enable the rsyslog package or run '/opt/microsoft/omsagent/plugin/omsremediate -r enable-rsyslog'"
ruleId="4c4e42e2-4cd2-3eaf-147b-ea4f61164d3e">
<check distro="*" command="CheckServiceStatus" service="rsyslog" expect="running">
<dependency type="PackageNotInstalled">syslog-ng</dependency>
</check>
<check distro="*" command="CheckServiceStatus" service="syslog-ng" expect="running">
<dependency type="PackageNotInstalled">rsyslog</dependency>
</check>
</audit>
<audit
description="File permissions for all rsyslog log files should be set to 640 or 600."
msid="63"
cceid="CCE-18095-0"
severity="Important"
impact="An attacker could cover up activity by manipulating logs"
remediation="Add the line '$FileCreateMode 0640' to the file '/etc/rsyslog.conf'"
ruleId="fcc86485-487a-4644-87a0-f29f1b1cd28b">
<check distro="*" command="CheckMatchingLinesIfExists" regex="^[\s]*.FileCreateMode\s+06[04]0" path="/etc/rsyslog.conf" />
<check distro="*" command="CheckMatchingLinesIfExists" filter="^options\s*{" regex="perm\(06(4|0)0\);" path="/etc/syslog-ng/syslog-ng.conf" />
</audit>
<audit
description="Ensure logger configuration files are restricted."
msid="63.1"
impact="It is important to ensure that log files exist and have the correct permissions to ensure that sensitive syslog data is archived and protected."
remediation="Set your logger's configuration files to 0640 or run '/opt/microsoft/omsagent/plugin/omsremediate -r logger-config-file-permissions'"
ruleId="afd57de2-4365-9949-79f7-f8e92c198746">
<check distro="*" command="CheckFileStatsIfExists" path="/etc/syslog-ng/syslog-ng.conf" mode="644"/>
<check distro="*" command="CheckFileStatsIfExists" path="/etc/rsyslog.conf" mode="644"/>
</audit>
<audit
description="All rsyslog log files should be owned by the adm group."
msid="64"
cceid="CCE-18240-2"
severity="Important"
impact="An attacker could cover up activity by manipulating logs"
remediation="Add the line '$FileGroup adm' to the file '/etc/rsyslog.conf'"
ruleId="c1d99621-913e-45f7-96e1-a60b1af83015">
<check distro="Ubuntu|Debian" command="CheckMatchingLines" regex="^[\s]*.FileGroup\s+adm" path="/etc/rsyslog.conf" />
</audit>
<audit
description="All rsyslog log files should be owned by the syslog user."
msid="65"
cceid="CCE-17857-4"
severity="Important"
impact="An attacker could cover up activity by manipulating logs"
remediation="Add the line '$FileOwner syslog' to the file '/etc/rsyslog.conf' or run '/opt/microsoft/omsagent/plugin/omsremediate -r syslog-owner"
ruleId="2830790c-5b3f-43cb-be6b-7572e441acc1">
<check distro="*" command="CheckMatchingLines" regex="^[\s]*.FileOwner\s+syslog" path="/etc/rsyslog.conf">
<dependency type="FileExists">/etc/rsyslog.conf</dependency>
</check>
</audit>
<audit
description="Rsyslog should not accept remote messages."
msid="67"
cceid="CCE-17639-6"
severity="Important"
impact="An attacker could inject messages into syslog, causing a DoS or a distraction from other activity"
remediation="Remove the lines '$ModLoad imudp' and '$ModLoad imtcp' from the file '/etc/rsyslog.conf'"
ruleId="1e9567e1-d96d-4f90-be1a-0809947e789c">
<check distro="!SLES" command="CheckNoMatchingLines" regex="^[\s]*.ModLoad\s+im(udp|tcp)" path="/etc/rsyslog.conf" />
</audit>
<audit
description="The logrotate (syslog rotater) service should be enabled."
msid="68"
cceid="CCE-4182-2"
severity="Critical"
impact="Logfiles could grow unbounded and consume all disk space"
remediation="Install the logrotate package and confirm the logrotate cron entry is active (chmod 755 /etc/cron.daily/logrotate; chown root:root /etc/cron.daily/logrotate)"
ruleId="2d2355e7-7b07-4c0e-a395-16499c27ae94">
<check distro="*" command="CheckFileExists" path="/etc/cron.daily/logrotate"/>
<check distro="Ubuntu|Debian|SLES|Centos" command="CheckFileStats" path="/etc/cron.daily/logrotate" owner="root" group="root" mode="755" allow-stricter="true" />
<check distro="CentOS|RedHat|Oracle" command="CheckFileStats" path="/etc/cron.daily/logrotate" owner="root" group="root" mode="700" allow-stricter="true" />
</audit>
<audit
description="The rlogin service should be disabled."
msid="69"
cceid="CCE-3537-8"
severity="Critical"
impact="An attacker could gain access, bypassing strict authentication requirements"
remediation="Remove the inetd service."
ruleId="f57ef648-bdaa-45a3-9e3a-f4649c48896f">
<check distro="*" command="CheckNoMatchingLinesIfExists" regex="^[\s\t]*login" path="/etc/inetd.conf" />
</audit>
<audit
description="Disable inetd unless required. (inetd)"
msid="70.1"
cceid="CCE-4234-1"
severity="Important"
impact="An attacker could exploit a vulnerability in an inetd service to gain access"
remediation="Uninstall the inetd service (apt-get remove inetd)"
ruleId="a8a37e7f-9aae-41cf-8313-42d1f69506b9">
<check distro="*" command="CheckServiceDisabled" service="inetd" />
</audit>
<audit
description="Disable xinetd unless required. (xinetd)"
msid="70.2"
cceid="CCE-4252-3"
severity="Important"
impact="An attacker could exploit a vulnerability in a xinetd service to gain access"
remediation="Uninstall the inetd service (apt-get remove xinetd)"
ruleId="1d9557b2-b58f-4f81-bde9-4f9b08a3b2f1">
<check distro="*" command="CheckServiceDisabled" service="xinetd" />
</audit>
<audit
description="Install inetd only if appropriate and required by your distro. Secure according to current hardening standards. (if required)"
msid="71.1"
cceid="CCE-4023-8"
severity="Important"
impact="An attacker could exploit a vulnerability in an inetd service to gain access"
remediation="Uninstall the inetd service (apt-get remove inetd)"
ruleId="d6bcd055-26cf-416e-a395-a9169b79f74c">
<check distro="*" command="CheckPackageNotInstalled" packagename="inetd" />
</audit>
<audit
description="Install xinetd only if appropriate and required by your distro. Secure according to current hardening standards. (if required)"
msid="71.2"
cceid="CCE-4164-0"
severity="Important"
impact="An attacker could exploit a vulnerability in an xinetd service to gain access"
remediation="Uninstall the inetd service (apt-get remove xinetd)"
ruleId="0552f68e-b759-4aa7-a211-d48b2f6d2117">
<check distro="*" command="CheckPackageNotInstalled" packagename="xinetd" />
</audit>
<audit
description="The telnet service should be disabled."
msid="72"
cceid="CCE-3390-2"
severity="Critical"
impact="An attacker could eavesdrop or hijack unencrypted telnet sessions"
remediation="Remove or comment out the telnet entry in the file '/etc/inetd.conf'"
ruleId="0617b91c-2a28-42bd-b5b3-7562555b41ed">
<check distro="*" command="CheckNoMatchingLinesIfExists" regex="^[\s\t]*telnet" path="/etc/inetd.conf" />
</audit>
<audit
description="All telnetd packages should be uninstalled."
msid="73"
cceid="CCE-4330-7"
severity="Critical"
impact="An attacker could eavesdrop or hijack unencrypted telnet sessions"
remediation="Uninstall any telnetd packages"
ruleId="6c716f88-a252-4fe9-9c5c-ba9236a80beb">
<check distro="*" command="CheckPackageNotInstalledRegexp" packagename="[a-z-]*telnetd" />
</audit>
<audit
description="The rcp/rsh service should be disabled."
msid="74"
cceid="CCE-4141-8"
severity="Critical"
impact="An attacker could eavesdrop or hijack unencrypted sessions"
remediation="Remove or comment out the shell entry in the file '/etc/inetd.conf'"
ruleId="dda66a42-30d1-4621-9565-f09628ac8047">
<check distro="*" command="CheckNoMatchingLinesIfExists" regex="^[\s\t]*shell" path="/etc/inetd.conf" />
</audit>
<audit
description="The rsh-server package should be uninstalled."
msid="77"
cceid="CCE-4308-3"
severity="Critical"
impact="An attacker could eavesdrop or hijack unencrypted rsh sessions"
remediation="Uninstall the rsh-server package (apt-get remove rsh-server)"
ruleId="b256491f-f804-4c44-bfa4-057dd2f44c30">
<check distro="*" command="CheckPackageNotInstalled" packagename="rsh-server" />
</audit>
<audit
description="The ypbind service should be disabled."
msid="78"
cceid="CCE-3705-1"
severity="Important"
impact="An attacker could retrieve sensitive information from the ypbind service"
remediation="Uninstall the nis package (apt-get remove nis)"
ruleId="58f5187e-88bd-4f24-8570-2c295d5c93c6">
<check distro="*" command="CheckServiceDisabled" service="nis" />
</audit>
<audit
description="The nis package should be uninstalled."
msid="79"
cceid="CCE-4348-9"
severity="Important"
impact="An attacker could retrieve sensitive information from the NIS service"
remediation="Uninstall the nis package (apt-get remove nis)"
ruleId="7da0b32e-ced5-42eb-aa1e-6df90281e59c">
<check distro="*" command="CheckPackageNotInstalled" packagename="nis" />
</audit>
<audit
description="The tftp service should be disabled."
msid="80"
cceid="CCE-4273-9"
severity="Important"
impact="An attacker could eavesdrop or hijack an unencrypted session"
remediation="Remove the tftp entry from the file '/etc/inetd.conf'"
ruleId="cb086aef-fec2-467f-a03b-627c00020926">
<check distro="*" command="CheckNoMatchingLinesIfExists" regex="^[\s\t]*tftp" path="/etc/inetd.conf" />
</audit>
<audit
description="The tftpd package should be uninstalled."
msid="81"
cceid="CCE-3916-4"
severity="Important"
impact="An attacker could eavesdrop or hijack an unencrypted session"
remediation="Uninstall the tftpd package (apt-get remove tftpd)"
ruleId="ae9ce111-ef4d-4d34-8f76-fdc38263f153">
<check distro="*" command="CheckPackageNotInstalled" packagename="tftpd" />
</audit>
<audit
description="The readahead-fedora package should be uninstalled."
msid="82"
cceid="CCE-4421-4"
severity="Informational"
impact="No substantial exposure, but also no substantial benefit"
remediation="Uninstall the readahead-fedora package (apt-get remove readahead-fedora)"
ruleId="dbae0d26-55e9-49d5-8782-86cb7412f99f">
<check distro="*" command="CheckPackageNotInstalled" packagename="readahead-fedora" />
</audit>
<audit
description="The bluetooth/hidd service should be disabled."
msid="84"
cceid="CCE-4355-4"
severity="Warning"