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