mirror of https://github.com/CISOfy/lynis.git
[BANN-7119/BANN-7122] Disabled tests
This commit is contained in:
parent
7878fad617
commit
ee7b5f87bb
|
@ -65,59 +65,59 @@
|
|||
#
|
||||
# Test : BANN-7119
|
||||
# Description : Check MOTD banner file
|
||||
Register --test-no BANN-7119 --weight L --network NO --description "Check MOTD banner file"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
LogText "Test: Testing existence /etc/motd"
|
||||
if [ -f /etc/motd ]; then
|
||||
LogText "Result: file /etc/motd exists"
|
||||
Display --indent 2 --text "- /etc/motd" --result FOUND --color GREEN
|
||||
if [ ! -L /etc/motd ]; then
|
||||
if IsWorldWritable /etc/motd; then
|
||||
Display --indent 4 --text "- /etc/motd permissions" --result WARNING --color RED
|
||||
LogText "Result: /etc/motd is world writable. Users can change this file!"
|
||||
ReportWarning ${TEST_NO} "H" "/etc/motd is world writable"
|
||||
else
|
||||
Display --indent 4 --text "- /etc/motd permissions" --result OK --color GREEN
|
||||
LogText "Result: /etc/motd is not world writable."
|
||||
fi
|
||||
else
|
||||
LogText "Result: file /etc/motd is symlink"
|
||||
fi
|
||||
else
|
||||
LogText "Result: File /etc/motd not found"
|
||||
Display --indent 2 --text "- /etc/motd" --result "NOT FOUND" --color WHITE
|
||||
fi
|
||||
fi
|
||||
#Register --test-no BANN-7119 --weight L --network NO --description "Check MOTD banner file"
|
||||
#if [ ${SKIPTEST} -eq 0 ]; then
|
||||
# LogText "Test: Testing existence /etc/motd"
|
||||
# if [ -f /etc/motd ]; then
|
||||
# LogText "Result: file /etc/motd exists"
|
||||
# Display --indent 2 --text "- /etc/motd" --result FOUND --color GREEN
|
||||
# if [ ! -L /etc/motd ]; then
|
||||
# if IsWorldWritable /etc/motd; then
|
||||
# Display --indent 4 --text "- /etc/motd permissions" --result WARNING --color RED
|
||||
# LogText "Result: /etc/motd is world writable. Users can change this file!"
|
||||
# ReportWarning ${TEST_NO} "H" "/etc/motd is world writable"
|
||||
# else
|
||||
# Display --indent 4 --text "- /etc/motd permissions" --result OK --color GREEN
|
||||
# LogText "Result: /etc/motd is not world writable."
|
||||
# fi
|
||||
# else
|
||||
# LogText "Result: file /etc/motd is symlink"
|
||||
# fi
|
||||
# else
|
||||
# LogText "Result: File /etc/motd not found"
|
||||
# Display --indent 2 --text "- /etc/motd" --result "NOT FOUND" --color WHITE
|
||||
# fi
|
||||
#fi
|
||||
#
|
||||
#################################################################################
|
||||
#
|
||||
# Test : BANN-7122
|
||||
# Description : Check motd file to see if it contains some form of message
|
||||
# to discourage unauthorized users to leave the system alone
|
||||
if [ -f /etc/motd -a ! -L /etc/motd ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||
Register --test-no BANN-7122 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check /etc/motd banner file contents"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
N=0
|
||||
LogText "Test: Checking file /etc/motd contents for legal key words"
|
||||
for I in ${LEGAL_BANNER_STRINGS}; do
|
||||
FIND=`grep -i "${I}" /etc/motd`
|
||||
if [ ! "${FIND}" = "" ]; then
|
||||
LogText "Result: found string '${I}'"
|
||||
N=`expr ${N} + 1`
|
||||
fi
|
||||
done
|
||||
# Check if we have 5 or more key words
|
||||
if [ ${N} -gt 4 ]; then
|
||||
LogText "Result: Found ${N} key words, to warn unauthorized users"
|
||||
Display --indent 4 --text "- /etc/motd contents" --result OK --color GREEN
|
||||
AddHP 2 2
|
||||
else
|
||||
LogText "Result: Found only ${N} key words, to warn unauthorized users and could be increased"
|
||||
Display --indent 4 --text "- /etc/motd contents" --result WEAK --color YELLOW
|
||||
ReportSuggestion ${TEST_NO} "Add legal banner to /etc/motd, to warn unauthorized users"
|
||||
AddHP 0 1
|
||||
fi
|
||||
fi
|
||||
#if [ -f /etc/motd -a ! -L /etc/motd ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||
#Register --test-no BANN-7122 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check /etc/motd banner file contents"
|
||||
#if [ ${SKIPTEST} -eq 0 ]; then
|
||||
# N=0
|
||||
# LogText "Test: Checking file /etc/motd contents for legal key words"
|
||||
# for I in ${LEGAL_BANNER_STRINGS}; do
|
||||
# FIND=`grep -i "${I}" /etc/motd`
|
||||
# if [ ! "${FIND}" = "" ]; then
|
||||
# LogText "Result: found string '${I}'"
|
||||
# N=`expr ${N} + 1`
|
||||
# fi
|
||||
# done
|
||||
# # Check if we have 5 or more key words
|
||||
# if [ ${N} -gt 4 ]; then
|
||||
# LogText "Result: Found ${N} key words, to warn unauthorized users"
|
||||
# Display --indent 4 --text "- /etc/motd contents" --result OK --color GREEN
|
||||
# AddHP 2 2
|
||||
# else
|
||||
# LogText "Result: Found only ${N} key words, to warn unauthorized users and could be increased"
|
||||
# Display --indent 4 --text "- /etc/motd contents" --result WEAK --color YELLOW
|
||||
# ReportSuggestion ${TEST_NO} "Add legal banner to /etc/motd, to warn unauthorized users"
|
||||
# AddHP 0 1
|
||||
# fi
|
||||
#fi
|
||||
#
|
||||
#################################################################################
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue