/
stig-4-debian.sh
1433 lines (964 loc) · 34.2 KB
/
stig-4-debian.sh
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
#!/bin/bash
VERSION='2.1'
DATE=`date +%F`
LOG=STIG-for-Debian-$DATE
TEXTFILE=stig-debian.txt
export SUCCESS_FLAG=0
export FAIL_FLAG=0
export ENABLE_HTML=0
export ASCII=0
export CATCOLOR=0
RED=$(tput setaf 1)
BOLD=$(tput bold)
GREEN=$(tput setaf 2)
NORMAL=$(tput sgr0)
function version() {
echo "STIG for Debian Compliance Checking Tools(v.$VERSION)"
}
function usage() {
cat << EOF
usage: $0 [options]
-H Start checking and output report in HTML version
-A Start checking and output report in ASCII version
-C Start checking and output report in ASCII version with catable colors
-v Display version
-h Display help
Default report is output in current directory(STIG-for-Debian-*.(html|log))
STIG for Debian Compliance Checking Tools (v$VERSION)
Ported from DISA RHEL 7 STIG
EOF
}
if [ $# -eq 0 ];then
usage
exit 1
elif [ $# -gt 1 ];then
tput setaf 1;echo -e "\033[1mERROR: Too much parameter\033[0m";tput sgr0
echo
usage
exit 1
fi
while getopts ":HCAvh" OPTION; do
case $OPTION in
H)
ENABLE_HTML=1
;;
C)
CATCOLOR=1
;;
A)
ASCII=1
;;
v)
version
exit 0
;;
h)
usage
exit 0
;;
?)
tput setaf 1;echo -e "\033[1mERROR: Wrong parameter!\033[0m";tput sgr0
echo
usage
exit 1
;;
esac
done
if [[ $EUID -ne 0 ]]; then
tput setaf 1; #Setting Output Color To Red
echo -e "\033[1mPlease re-run this script as root!\033[0m";
tput sgr0 #Turn off all attributes
exit 1
fi
RUNTIME=$(date)
printf "Script Run: %s\nStart checking process...\n\n" "${RUNTIME}"
spinner(){
local pid=$1
local delay=0.1
local spinstr='|/-\'
while [ "$(ps -a | awk '{print $1}' | grep "$pid")" ];
do
local temp=${spinstr#?}
printf "%c" "$spinstr"
local spinstr=$temp${spinstr%"$temp"}
sleep $delay
printf "\b"
done
printf " \b"
wait $1
}
HTML_OVERVIEW_LOG="$LOG"_overview.html
function html_overview_gen_prologue() {
cat html/html_overview_template_head1.html > $HTML_OVERVIEW_LOG
echo "STIG for Debian Compliance Checking $DATE" >>$HTML_OVERVIEW_LOG #HTML title
cat html/html_overview_template_style.html >> $HTML_OVERVIEW_LOG
cat html/html_overview_template_script.html >> $HTML_OVERVIEW_LOG
cat html/html_overview_template_head2.html >> $HTML_OVERVIEW_LOG
cat html/html_overview_template_body1.html >> $HTML_OVERVIEW_LOG
echo "$DATE" >> $HTML_OVERVIEW_LOG
cat html/html_overview_template_body2.html >> $HTML_OVERVIEW_LOG
}
function html_overview_gen_middle() {
cat html/html_overview_template_middle.html >> $HTML_OVERVIEW_LOG
}
function html_overview_gen_epilogue() {
cat html/html_overview_template_footer.html >> $HTML_OVERVIEW_LOG
}
function html_overview_output() {
echo '<tr><td data-title="ID">'"$RULE_ID"'</td>' >>$HTML_OVERVIEW_LOG
echo '<td data-title="ID">'"$RULE_TITLE"'</td>' >>$HTML_OVERVIEW_LOG
echo '<td data-title="ID">'"$LEVEL"'</td>' >>$HTML_OVERVIEW_LOG
echo '<td data-title="ID">'"$STATUS"'</td></tr>' >>$HTML_OVERVIEW_LOG
}
function html_overview_manual_output() {
echo '<tr><td data-title="ID">'"$RULE_ID"'</td>' >>$HTML_OVERVIEW_LOG
echo '<td data-title="ID">'"$RULE_TITLE"'</td>' >>$HTML_OVERVIEW_LOG
echo '<td data-title="ID">'"$LEVEL"'</td></tr>' >>$HTML_OVERVIEW_LOG
}
HTML_DETAILS_LOG="$LOG"_details.html
function html_details_gen_prologue() {
cat html/html_details_template_head1.html > $HTML_DETAILS_LOG
echo "STIG for Debian Compliance Checking $DATE" >>$HTML_DETAILS_LOG #HTML title
cat html/html_details_template_style.html >> $HTML_DETAILS_LOG
cat html/html_details_template_script.html >> $HTML_DETAILS_LOG
cat html/html_details_template_head2.html >> $HTML_DETAILS_LOG
cat html/html_details_template_body1.html >> $HTML_DETAILS_LOG
echo "$DATE" >> $HTML_DETAILS_LOG
cat html/html_details_template_body2.html >> $HTML_DETAILS_LOG
}
function html_details_gen_middle() {
cat html/html_details_template_middle.html >> $HTML_DETAILS_LOG
}
function html_details_gen_epilogue() {
cat html/html_details_template_footer.html >> $HTML_DETAILS_LOG
}
function html_details_output() {
echo '<section><font style="font-weight:bold;">Rule Title: </font>'"$RULE_TITLE"'<br />' >>$HTML_DETAILS_LOG
echo '<font style="font-weight:bold;">Rule ID: </font>'"$RULE_ID"'<br />'>>$HTML_DETAILS_LOG
echo '<font style="font-weight:bold;">Status: </font>'"$STATUS"'<br />' >>$HTML_DETAILS_LOG
echo '<font style="font-weight:bold;">Description: </font>'"$(echo "$QUESTION_DESC" | sed -e 's/\\n\\n/<br \/>/g' -e 's/\\n/<br \/>/g')"'<br />' >>$HTML_DETAILS_LOG
echo '<font style="font-weight:bold;">Check Content: </font>'"$(echo "$CHECK_CONTENT" | sed -e 's/\\n\\n/<br \/>/g' -e 's/\\n/<br \/>/g')"'<br />' >>$HTML_DETAILS_LOG
echo '<font style="font-weight:bold;">Fix Method: </font>'"$(echo "$FIX" | sed -e 's/\\n\\n/<br \/>/g' -e 's/\\n/<br \/>/g')"'<br /></section>' >>$HTML_DETAILS_LOG
}
function html_details_manual_output() {
echo '<section><font style="font-weight:bold;">Rule Title: </font>'"$RULE_TITLE"'<br />' >>$HTML_DETAILS_LOG
echo '<font style="font-weight:bold;">Rule ID: </font>'"$RULE_ID"'<br />'>>$HTML_DETAILS_LOG
echo '<font style="font-weight:bold;">Description: </font>'"$(echo "$QUESTION_DESC" | sed -e 's/\\n\\n/<br \/>/g' -e 's/\\n/<br \/>/g')"'<br />' >>$HTML_DETAILS_LOG
echo '<font style="font-weight:bold;">Check Content: </font>'"$(echo "$CHECK_CONTENT" | sed -e 's/\\n\\n/<br \/>/g' -e 's/\\n/<br \/>/g')"'<br />' >>$HTML_DETAILS_LOG
echo '<font style="font-weight:bold;">Fix Method: </font>'"$(echo "$FIX" | sed -e 's/\\n\\n/<br \/>/g' -e 's/\\n/<br \/>/g')"'<br /></section>' >>$HTML_DETAILS_LOG
}
function ascii_output() {
printf "\n---------------------------------------\n"
echo "Rule Title: ""$RULE_TITLE"
echo "Rule ID: ""$RULE_ID"
echo "Status: ""$STATUS"
echo "Description: ""$QUESTION_DESC"
printf "Check Content: %b\n" "$CHECK_CONTENT" | sed -e 's/\\'/'/g'
printf "Fix Method: %b\n" "$FIX" | sed -e 's/\\'/'/g'
printf "\n"
}
function ascii_manual_output() {
echo "Rule Title: ""$RULE_TITLE"
echo "Rule ID: ""$RULE_ID"
echo "Description: ""$QUESTION_DESC"
printf "Check Content: %b\n" "$CHECK_CONTENT" | sed -e 's/\\'/'/g'
printf "Fix Method: %b\n" "$FIX" | sed -e 's/\\'/'/g'
printf "\n"
}
ASCII_LOG="$LOG"-ascii.log
function catcolor_output() {
RED=$(tput setaf 1)
BOLD=$(tput bold)
GREEN=$(tput setaf 2)
NORMAL=$(tput sgr0)
printf "\n---------------------------------------\n"
printf "%s %s\n\n" "$BOLD""RuleTitle:$NORMAL" "$RULE_TITLE"
printf "%s %s\n\n" "$BOLD""Rule ID:$NORMAL" "$RULE_ID"
printf "%s %s\n\n" "$BOLD""Status:$NORMAL" "$STATUS"
printf "%s %s\n\n" "$BOLD""Description:$NORMAL" "$QUESTION_DESC"
printf "%s %b\n\n" "$BOLD""Check Content:$NORMAL" "$CHECK_CONTENT" | sed -e 's/\\'/'/g'
printf "%s %b\n\n" "$BOLD""Fix Method:$NORMAL" "$FIX" | sed -e 's/\\'/'/g'
printf "\n"
}
function catcolor_manual_output() {
RED=$(tput setaf 1)
BOLD=$(tput bold)
GREEN=$(tput setaf 2)
NORMAL=$(tput sgr0)
printf "\n---------------------------------------\n"
printf "%s %s\n\n" "$BOLD""RuleTitle:$NORMAL" "$RULE_TITLE"
printf "%s %s\n\n" "$BOLD""Rule ID:$NORMAL" "$RULE_ID"
printf "%s %s\n\n" "$BOLD""Description:$NORMAL" "$QUESTION_DESC"
printf "%s %b\n\n" "$BOLD""Check Content:$NORMAL" "$CHECK_CONTENT" | sed -e 's/\\'/'/g'
printf "%s %b\n\n" "$BOLD""Fix Method:$NORMAL" "$FIX" | sed -e 's/\\'/'/g'
printf "\n"
}
function on_screen_output() {
printf "Checking %s\n" "$RULE_TITLE"
}
CATCOLOR_LOG="$LOG"-catcolor.log
function output() {
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
NORMAL=$(tput sgr0)
EXIT_STATUS=$2
LOCATION=$(sed -n "/$1/=" $TEXTFILE)
#output rule id
RULE_ID=$(sed -n "$LOCATION"p "$TEXTFILE" | sed "s/Rule ID: //" )
#output severity level
LEVEL=$(sed -n "$((LOCATION+=1))"p "$TEXTFILE" | sed "s/Severity: //" )
#output rule title
RULE_TITLE=$(sed -n "$((LOCATION+=2))"p "$TEXTFILE" | sed "s/Rule Title: //")
#output description
QUESTION_DESC=$(sed -n "$((LOCATION+=3))"p "$TEXTFILE" | sed "s/Description: //")
#output check content
CHECK_CONTENT=$(sed -n "$((LOCATION+=4))"p "$TEXTFILE" | sed "s/Check_content: //")
#output fixtext
FIX=$(sed -n "$((LOCATION+=5))"p $TEXTFILE | sed "s/Fixtext: //")
HTML_FIX=$(echo $FIX)
if [ $ENABLE_HTML = "1" ];then
#check exit status
if [ $EXIT_STATUS -eq 0 ];then
printf "%s %s\n" "$GREEN$BOLD[ PASS ]$NORMAL" "$RULE_TITLE"
STATUS="PASS"
((SUCCESS_FLAG++))
else
printf "%s %s\n" "$RED$BOLD[ FAIL ]$NORMAL" "$RULE_TITLE"
STATUS='<font color="#FE4365">FAILED</font>'
((FAIL_FLAG++))
fi
html_overview_output >> $HTML_OVERVIEW_LOG
html_details_output >> $HTML_DETAILS_LOG
fi
if [ $ASCII = "1" ];then
if [ $EXIT_STATUS -eq 0 ];then
printf "%s %s\n" "$GREEN$BOLD[ PASS ]$NORMAL" "$RULE_TITLE"
STATUS="PASS"
((SUCCESS_FLAG++))
else
printf "%s %s\n" "$RED$BOLD[ FAIL ]$NORMAL" "$RULE_TITLE"
STATUS="FAILED"
((FAIL_FLAG++))
fi
ascii_output >> $ASCII_LOG
fi
if [ $CATCOLOR = "1" ];then
if [ $EXIT_STATUS -eq 0 ];then
printf "%s %s\n" "$GREEN$BOLD[ PASS ]$NORMAL" "$RULE_TITLE"
STATUS="$GREEN$BOLD""PASS""$NORMAL"
((SUCCESS_FLAG++))
else
printf "%s %s\n" "$RED$BOLD[ FAIL ]$NORMAL" "$RULE_TITLE"
STATUS="$RED$BOLD""FAILED""$NORMAL"
((FAIL_FLAG++))
fi
catcolor_output >> $CATCOLOR_LOG
fi
}
function manual_output() {
if [ -z "$1" ];then
return
fi
LOCATION=$(sed -n "/$1/=" $TEXTFILE)
#output rule id
RULE_ID=$(sed -n "$LOCATION"p "$TEXTFILE" | sed "s/Rule ID: //" )
#output severity level
LEVEL=$(sed -n "$((LOCATION+=1))"p "$TEXTFILE" | sed "s/Severity: //" )
#output rule title
RULE_TITLE=$(sed -n "$((LOCATION+=2))"p "$TEXTFILE" | sed "s/Rule Title: //")
#output description
QUESTION_DESC=$(sed -n "$((LOCATION+=3))"p "$TEXTFILE" | sed "s/Description: //")
#output check content
CHECK_CONTENT=$(sed -n "$((LOCATION+=4))"p "$TEXTFILE" | sed "s/Check_content: //")
#output fixtext
FIX=$(sed -n "$((LOCATION+=5))"p $TEXTFILE | sed "s/Fixtext: //")
HTML_FIX=$(echo $FIX)
printf "%s: %s\n" "$RULE_ID" "$RULE_TITLE"
if [ $ENABLE_HTML = "1" ];then
html_overview_manual_output >> $HTML_OVERVIEW_LOG
html_details_manual_output >> $HTML_DETAILS_LOG
fi
if [ $ASCII = "1" ];then
ascii_manual_output >> $ASCII_LOG
fi
if [ $CATCOLOR = "1" ];then
catcolor_manual_output >> $CATCOLOR_LOG
fi
}
if [ $ENABLE_HTML = "1" ]; then
html_overview_gen_prologue
html_details_gen_prologue
fi
###global env
if [ -f /usr/share/doc/gnome/copyright ];then
GNOMEINSTALL=1
else
GNOMEINSTALL=0
fi
##########################################################################
######CAT I
bash scripts/check-package-verify.sh >/dev/null 2>&1 &
spinner $!
output "SV-86479r2_rule" $?
if [ ${GNOMEINSTALL} -eq 1 ];then
bash scripts/check-gdm3-conf.sh banner-message-enable >/dev/null 2>&1 &
spinner $!
output "SV-86483r2_rule" $?
bash scripts/check-gdm3-conf.sh banner-message-text >/dev/null 2>&1 &
spinner $!
output "SV-86485r2_rule" $?
bash scripts/check-session-lock.sh >/dev/null 2>&1 &
spinner $!
output "SV-86515r2_rule" $?
bash scripts/check-screensaver-idle-delay.sh >/dev/null 2>&1 &
spinner $!
output "SV-86517r2_rule" $?
fi
dpkg -s screen >/dev/null 2>&1 &
spinner $!
output "SV-86521r1_rule" $?
bash scripts/check-password.sh /etc/pam.d/common-password pam_pwquality.so ucredit gt -1 >/dev/null 2>&1 &
spinner $!
output "SV-86527r2_rule" $?
bash scripts/check-password.sh /etc/pam.d/common-password pam_pwquality.so lcredit gt -1 >/dev/null 2>&1 &
spinner $!
output "SV-86529r2_rule" $?
bash scripts/check-password.sh /etc/pam.d/common-password pam_pwquality.so dcredit gt -1 >/dev/null 2>&1 &
spinner $!
output "SV-86531r2_rule" $?
bash scripts/check-password.sh /etc/pam.d/common-password pam_pwquality.so ocredit gt -1 >/dev/null 2>&1 &
spinner $!
output "SV-86533r1_rule" $?
bash scripts/check-password.sh /etc/pam.d/common-password pam_pwquality.so difok lt 8 >/dev/null 2>&1 &
spinner $!
output "SV-86535r1_rule" $?
bash scripts/check-password.sh /etc/pam.d/common-password pam_pwquality.so minclass lt 4 >/dev/null 2>&1 &
spinner $!
output "SV-86537r1_rule" $?
bash scripts/check-password.sh /etc/pam.d/common-password pam_pwquality.so maxrepeat gt 2 >/dev/null 2>&1 &
spinner $!
output "SV-86539r1_rule" $?
bash scripts/check-password.sh /etc/pam.d/common-password pam_pwquality.so maxclassrepeat gt 4 >/dev/null 2>&1 &
spinner $!
output "SV-86541r1_rule" $?
sed -e '/^#/d' -e '/^[ \t][ \t]*#/d' -e 's/#.*$//' -e '/^$/d' /etc/pam.d/* | grep password | grep pam_unix.so | grep sha512 > /dev/null 2>&1 &
spinner $!
output "SV-86543r1_rule" $?
grep -i encrypt /etc/login.defs | grep -v '^#' | grep SHA512 >/dev/null 2>&1 &
spinner $!
output "SV-86545r1_rule" $?
bash scripts/check-password-newuser-minday.sh 1 >/dev/null 2>&1 &
spinner $!
output "SV-86549r1_rule" $?
bash scripts/check-password-min-day.sh 1 >/dev/null 2>&1 &
spinner $!
output "SV-86551r1_rule" $?
bash scripts/check-password-max-day-4-newuser.sh 60 >/dev/null 2>&1 &
spinner $!
output "SV-86553r1_rule" $?
bash scripts/check-password-max-day-4-existing.sh 60 >/dev/null 2>&1 &
spinner $!
output "SV-86555r1_rule" $?
bash scripts/check-password.sh /etc/pam.d/common-password pam_unix.so remember ge 5 >/dev/null 2>&1 &
spinner $!
output "SV-86557r1_rule" $?
bash scripts/check-password.sh /etc/pam.d/common-password pam_pwquality.so minlen lt 15 >/dev/null 2>&1 &
spinner $!
output "SV-86559r1_rule" $?
bash scripts/check-nullok.sh >/dev/null 2>&1 &
spinner $!
output "SV-86561r1_rule" $?
bash scripts/check-ssh.sh emptypassword >/dev/null 2>&1 &
spinner $!
output "SV-86563r2_rule" $?
bash scripts/check-inactive.sh 0 >/dev/null 2>&1 &
spinner $!
output "SV-86565r1_rule" $?
bash scripts/check-deny-and-locktime.sh >/dev/null 2>&1 &
spinner $!
output "SV-86567r2_rule" $?
bash scripts/check-deny-and-locktime-4-root.sh >/dev/null 2>&1 &
spinner $!
output "SV-86569r1_rule" $?
bash scripts/check-privilege-escalation.sh sudo >/dev/null 2>&1 &
spinner $!
output "SV-86571r1_rule" $?
bash scripts/check-privilege-escalation.sh authentication >/dev/null 2>&1 &
spinner $!
output "SV-86573r2_rule" $?
bash scripts/check-password-fail-delay.sh 4 >/dev/null 2>&1 &
spinner $!
output "SV-86575r1_rule" $?
if [ ${GNOMEINSTALL} -eq 1 ];then
bash scripts/check-gdm3-conf.sh AutomaticLoginEnable >/dev/null 2>&1 &
spinner $!
output "SV-86577r1_rule" $?
bash scripts/check-gdm3-conf.sh TimedLoginEnable >/dev/null 2>&1 &
spinner $!
output "SV-86579r2_rule" $?
fi
bash scripts/check-ssh.sh emptypasswordenvironment >/dev/null 2>&1 &
spinner $!
output "SV-86581r2_rule" $?
bash scripts/check-ssh.sh hostauth >/dev/null 2>&1 &
spinner $!
output "SV-86583r2_rule" $?
bash scripts/check-grub.sh password_pbkdf2 >/dev/null 2>&1 &
spinner $!
output "SV-86585r1_rule" $?
bash scripts/check-grub.sh password_pbkdf2_efi >/dev/null 2>&1 &
spinner $!
output "SV-86587r1_rule" $?
bash scripts/check-packages.sh rsh-server >/dev/null 2>&1 &
spinner $!
output "SV-86591r1_rule" $?
bash scripts/check-packages.sh ypserv >/dev/null 2>&1 &
spinner $!
output "SV-86593r1_rule" $?
bash scripts/check-aide-cron.sh >/dev/null 2>&1 &
spinner $!
output "SV-86597r1_rule" $?
bash scripts/check-package-install-verification.sh repository >/dev/null 2>&1 &
spinner $!
output "SV-86601r1_rule" $?
bash scripts/check-package-install-verification.sh local >/dev/null 2>&1 &
spinner $!
output "SV-86603r1_rule" $?
bash scripts/check-apt-key.sh >/dev/null 2>&1 &
spinner $!
output "SV-86605r1_rule" $?
bash scripts/check-usb-storage-disable.sh >/dev/null 2>&1 &
spinner $!
output "SV-86607r1_rule" $?
bash scripts/check-autofs.sh >/dev/null 2>&1 &
spinner $!
output "SV-86609r1_rule" $?
grep -v "^#" /boot/grub/grub.cfg | grep -i "apparmor=1" >/dev/null 2>&1 &
spinner $!
output "SV-86613r2_rule" $?
bash scripts/check-ctrl-alt-del.sh >/dev/null 2>&1 &
spinner $!
output "SV-86617r1_rule" $?
sed -e '/^#/d' -e '/^[ \t][ \t]*#/d' -e 's/#.*$//' -e '/^$/d' /etc/login.defs | grep -i "umask.*077" >/dev/null 2>&1 &
spinner $!
output "SV-86619r1_rule" $?
grep "Debian.*GNU/Linux.*9" /etc/issue >/dev/null 2>&1 &
spinner $!
output "SV-86621r2_rule" $?
bash scripts/check-package-up2date.sh >/dev/null 2>&1 &
spinner $!
output "SV-86623r3_rule" $?
bash scripts/check-gids.sh >/dev/null 2>&1 &
spinner $!
output "SV-86627r1_rule" $?
bash scripts/check-root-uid.sh >/dev/null 2>&1 &
spinner $!
output "SV-86629r1_rule" $?
bash scripts/check-valid-owner.sh >/dev/null 2>&1 &
spinner $!
output "SV-86631r1_rule" $?
bash scripts/check-valid-group-owner.sh >/dev/null 2>&1 &
spinner $!
output "SV-86633r1_rule" $?
bash scripts/check-homedir-assigned.sh >/dev/null 2>&1 &
spinner $!
output "SV-86635r1_rule" $?
bash scripts/check-create-home.sh >/dev/null 2>&1 &
spinner $!
output "SV-86637r1_rule" $?
bash scripts/check-homedir-exist.sh >/dev/null 2>&1 &
spinner $!
output "SV-86639r1_rule" $?
bash scripts/check-homedir-permissive.sh >/dev/null 2>&1 &
spinner $!
output "SV-86641r1_rule" $?
bash scripts/check-homedir-owner.sh >/dev/null 2>&1 &
spinner $!
output "SV-86643r2_rule" $?
bash scripts/check-homedir-gowner.sh >/dev/null 2>&1 &
spinner $!
output "SV-86645r2_rule" $?
bash scripts/check-homedir-files-owner.sh >/dev/null 2>&1 &
spinner $!
output "SV-86647r1_rule" $?
bash scripts/check-homedir-files-gowner.sh >/dev/null 2>&1 &
spinner $!
output "SV-86649r1_rule" $?
bash scripts/check-homedir-files-permissive.sh >/dev/null 2>&1 &
spinner $!
output "SV-86651r1_rule" $?
bash scripts/check-homedir-initfiles-owner.sh >/dev/null 2>&1 &
spinner $!
output "SV-86653r1_rule" $?
bash scripts/check-homedir-initfiles-gowner.sh >/dev/null 2>&1 &
spinner $!
output "SV-86655r2_rule" $?
bash scripts/check-homedir-initfiles-permissive.sh >/dev/null 2>&1 &
spinner $!
output "SV-86657r1_rule" $?
bash scripts/check-homedir-to-exec-path.sh >/dev/null 2>&1 &
spinner $!
output "SV-86659r2_rule" $?
bash scripts/check-homedir-initfiles-world-writable.sh >/dev/null 2>&1 &
spinner $!
output "SV-86661r1_rule" $?
bash scripts/check-mount-option.sh home nosuid >/dev/null 2>&1 &
spinner $!
output "SV-86665r2_rule" $?
bash scripts/check-mount-option.sh media nosuid >/dev/null 2>&1 &
spinner $!
output "SV-86667r1_rule" $?
bash scripts/check-mount-option.sh nfs nosuid >/dev/null 2>&1 &
spinner $!
output "SV-86669r1_rule" $?
bash scripts/check-world-writable-dir-gowner.sh >/dev/null 2>&1 &
spinner $!
output "SV-86671r1_rule" $?
bash scripts/check-homedir-initfiles-umask.sh >/dev/null 2>&1 &
spinner $!
output "SV-86673r1_rule" $?
bash scripts/check-cron.sh cronlog >/dev/null 2>&1 &
spinner $!
output "SV-86675r1_rule" $?
if [ -e /etc/cron.allow ];then
bash scripts/check-cron.sh allowfileown >/dev/null 2>&1 &
spinner $!
output "SV-86677r1_rule" $?
bash scripts/check-cron.sh allowfilegown >/dev/null 2>&1 &
spinner $!
output "SV-86679r1_rule" $?
fi
bash scripts/check-limits.sh core-dumps >/dev/null 2>&1 &
spinner $!
output "SV-86681r1_rule" $?
mount | grep "on./home.type" >/dev/null 2>&1 &
spinner $!
output "SV-86683r1_rule" $?
mount | grep "on./var.type" >/dev/null 2>&1 &
spinner $!
output "SV-86685r1_rule" $?
mount | grep "on./var/log/audit.type" >/dev/null 2>&1 &
spinner $!
output "SV-86687r3_rule" $?
mount | grep "on./tmp.type" >/dev/null 2>&1 &
spinner $!
output "SV-86689r1_rule" $?
bash scripts/check-fips_enabled.sh >/dev/null 2>&1 &
spinner $!
output "SV-86691r2_rule" $?
bash scripts/check-aide.sh acl >/dev/null 2>&1 &
spinner $!
output "SV-86693r2_rule" $?
bash scripts/check-aide.sh sha512 >/dev/null 2>&1 &
spinner $!
output "SV-86697r2_rule" $?
bash scripts/check-grub.sh removable >/dev/null 2>&1 &
spinner $!
output "SV-86699r1_rule" $?
bash scripts/check-packages.sh telnetd >/dev/null 2>&1 &
spinner $!
output "SV-86701r1_rule" $?
bash scripts/check-auditd.sh active >/dev/null 2>&1 &
spinner $!
output "SV-86703r1_rule" $?
bash scripts/check-auditd.sh enableflag >/dev/null 2>&1 &
spinner $!
output "SV-86705r1_rule" $?
bash scripts/check-auditd.sh remote_server >/dev/null 2>&1 &
spinner $!
output "SV-86707r1_rule" $?
bash scripts/check-auditd.sh enable_krb5 >/dev/null 2>&1 &
spinner $!
output "SV-86709r1_rule" $?
bash scripts/check-auditd.sh disk_full_error_action >/dev/null 2>&1 &
spinner $!
output "SV-86711r2_rule" $?
bash scripts/check-auditd.sh space_left >/dev/null 2>&1 &
spinner $!
output "SV-86713r1_rule" $?
bash scripts/check-auditd.sh space_left_action >/dev/null 2>&1 &
spinner $!
output "SV-86715r1_rule" $?
bash scripts/check-auditd.sh action_mail_acct >/dev/null 2>&1 &
spinner $!
output "SV-86717r2_rule" $?
bash scripts/check-auditd-syscall.sh chown >/dev/null 2>&1 &
spinner $!
output "SV-86721r2_rule" $?
bash scripts/check-auditd-syscall.sh fchown >/dev/null 2>&1 &
spinner $!
output "SV-86723r2_rule" $?
bash scripts/check-auditd-syscall.sh lchown >/dev/null 2>&1 &
spinner $!
output "SV-86725r2_rule" $?
bash scripts/check-auditd-syscall.sh fchownat >/dev/null 2>&1 &
spinner $!
output "SV-86727r2_rule" $?
bash scripts/check-auditd-syscall.sh chmod >/dev/null 2>&1 &
spinner $!
output "SV-86729r2_rule" $?
bash scripts/check-auditd-syscall.sh fchmod >/dev/null 2>&1 &
spinner $!
output "SV-86731r2_rule" $?
bash scripts/check-auditd-syscall.sh fchmodat >/dev/null 2>&1 &
spinner $!
output "SV-86733r2_rule" $?
bash scripts/check-auditd-syscall.sh setxattr >/dev/null 2>&1 &
spinner $!
output "SV-86735r2_rule" $?
bash scripts/check-auditd-syscall.sh fsetxattr >/dev/null 2>&1 &
spinner $!
output "SV-86737r2_rule" $?
bash scripts/check-auditd-syscall.sh lsetxattr >/dev/null 2>&1 &
spinner $!
output "SV-86739r2_rule" $?
bash scripts/check-auditd-syscall.sh removexattr >/dev/null 2>&1 &
spinner $!
output "SV-86741r2_rule" $?
bash scripts/check-auditd-syscall.sh fremovexattr >/dev/null 2>&1 &
spinner $!
output "SV-86743r2_rule" $?
bash scripts/check-auditd-syscall.sh lremovexattr >/dev/null 2>&1 &
spinner $!
output "SV-86745r2_rule" $?
bash scripts/check-auditd-syscall.sh creat >/dev/null 2>&1 &
spinner $!
output "SV-86747r2_rule" $?
bash scripts/check-auditd-syscall.sh open >/dev/null 2>&1 &
spinner $!
output "SV-86749r2_rule" $?
bash scripts/check-auditd-syscall.sh openat >/dev/null 2>&1 &
spinner $!
output "SV-86751r2_rule" $?
bash scripts/check-auditd-syscall.sh open_by_handle_at >/dev/null 2>&1 &
spinner $!
output "SV-86753r2_rule" $?
bash scripts/check-auditd-syscall.sh truncate >/dev/null 2>&1 &
spinner $!
output "SV-86755r2_rule" $?
bash scripts/check-auditd-syscall.sh ftruncate >/dev/null 2>&1 &
spinner $!
output "SV-86757r2_rule" $?
bash scripts/check-auditd.sh tallylog >/dev/null 2>&1 &
spinner $!
output "SV-86767r2_rule" $?
bash scripts/check-auditd.sh faillock >/dev/null 2>&1 &
spinner $!
output "SV-86769r2_rule" $?
bash scripts/check-auditd.sh lastlog >/dev/null 2>&1 &
spinner $!
output "SV-86771r2_rule" $?
bash scripts/check-auditd.sh passwd >/dev/null 2>&1 &
spinner $!
output "SV-86773r3_rule" $?
bash scripts/check-auditd.sh unix_chkpwd >/dev/null 2>&1 &
spinner $!
output "SV-86775r3_rule" $?
bash scripts/check-auditd.sh gpasswd >/dev/null 2>&1 &
spinner $!
output "SV-86777r3_rule" $?
bash scripts/check-auditd.sh chage >/dev/null 2>&1 &
spinner $!
output "SV-86779r3_rule" $?
if [ ${GNOMEINSTALL} -eq 1 ];then
bash scripts/check-auditd.sh gnome-pty-helper >/dev/null 2>&1 &
spinner $!
output "SV-86781r3_rule" $?
fi
bash scripts/check-auditd.sh su >/dev/null 2>&1 &
spinner $!
output "SV-86783r3_rule" $?
bash scripts/check-auditd.sh sudo >/dev/null 2>&1 &
spinner $!
output "SV-86785r3_rule" $?
bash scripts/check-auditd.sh f-sudoers >/dev/null 2>&1 &
spinner $!
output "SV-86787r3_rule" $?
bash scripts/check-auditd.sh newgrp >/dev/null 2>&1 &
spinner $!
output "SV-86789r3_rule" $?
bash scripts/check-auditd.sh chsh >/dev/null 2>&1 &
spinner $!
output "SV-86791r3_rule" $?
bash scripts/check-auditd.sh sudoedit >/dev/null 2>&1 &
spinner $!
output "SV-86793r3_rule" $?
bash scripts/check-auditd.sh mount >/dev/null 2>&1 &
spinner $!
output "SV-86795r3_rule" $?
bash scripts/check-auditd.sh umount >/dev/null 2>&1 &
spinner $!
output "SV-86797r3_rule" $?
if [ -e /usr/sbin/postdrop ];then