diff options
Diffstat (limited to 'include/tests_file_integrity')
-rw-r--r-- | include/tests_file_integrity | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/include/tests_file_integrity b/include/tests_file_integrity index 03fa0908..278f2d07 100644 --- a/include/tests_file_integrity +++ b/include/tests_file_integrity @@ -5,7 +5,7 @@ # Lynis # ------------------ # -# Copyright 2007-2015, Michael Boelen (michael.boelen@cisofy.com) +# Copyright 2007-2016, Michael Boelen (michael.boelen@cisofy.com) # Web site: https://cisofy.com # # Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are @@ -29,14 +29,14 @@ # Description : Check if AFICK is installed Register --test-no FINT-4310 --weight L --network NO --description "AFICK availability" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: Checking AFICK binary" + LogText "Test: Checking AFICK binary" if [ ! "${AFICKBINARY}" = "" ]; then - logtext "Result: AFICK is installed (${AFICKBINARY})" + LogText "Result: AFICK is installed (${AFICKBINARY})" FILE_INT_TOOL="afick" FILE_INT_TOOL_FOUND=1 Display --indent 4 --text "- AFICK" --result FOUND --color GREEN else - logtext "Result: AFICK is not installed" + LogText "Result: AFICK is not installed" fi fi # @@ -46,14 +46,14 @@ # Description : Check if AIDE is installed Register --test-no FINT-4314 --weight L --network NO --description "AIDE availability" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: Checking AIDE binary" + LogText "Test: Checking AIDE binary" if [ ! "${AIDEBINARY}" = "" ]; then - logtext "Result: AIDE is installed (${AIDEBINARY})" + LogText "Result: AIDE is installed (${AIDEBINARY})" FILE_INT_TOOL="aide" FILE_INT_TOOL_FOUND=1 Display --indent 4 --text "- AIDE" --result FOUND --color GREEN else - logtext "Result: AIDE is not installed" + LogText "Result: AIDE is not installed" fi fi # @@ -65,17 +65,17 @@ Register --test-no FINT-4315 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check AIDE configuration file" if [ ${SKIPTEST} -eq 0 ]; then AIDE_CONFIG_LOCS="/etc /etc/aide /usr/local/etc" - logtext "Test: search for aide.conf in ${AIDE_CONFIG_LOCS}" + LogText "Test: search for aide.conf in ${AIDE_CONFIG_LOCS}" for I in ${AIDE_CONFIG_LOCS}; do if [ -f ${I}/aide.conf ]; then - logtext "Result: found aide.conf in directory ${I}" + LogText "Result: found aide.conf in directory ${I}" AIDECONFIG="${I}/aide.conf" fi done if [ "${AIDECONFIG}" = "" ]; then Display --indent 6 --text "- AIDE config file" --result "NOT FOUND" --color YELLOW else - logtext "Checking configuration file ${AIDECONFIG} for errors" + LogText "Checking configuration file ${AIDECONFIG} for errors" FIND=`${AIDEBINARY} --config=${AIDECONFIG} -D; echo $?` if [ "${FIND}" = "0" ]; then Display --indent 6 --text "- AIDE config file" --result FOUND --color GREEN @@ -96,16 +96,16 @@ FIND=`${GREPBINARY} "^Checksums" ${AIDECONFIG}` FIND2=`${GREPBINARY} "^Checksums" ${AIDECONFIG} | ${EGREPBINARY} "sha256|sha512"` if [ "${FIND}" = "" ]; then - logtext "Result: Unclear how AIDE is dealing with checksums" + LogText "Result: Unclear how AIDE is dealing with checksums" Display --indent 6 --text "- AIDE config (Checksums)" --result UNKNOWN --color YELLOW else if [ "${FIND2}" = "" ]; then - logtext "Result: No SHA256 or SHA512 found for creating checksums" + LogText "Result: No SHA256 or SHA512 found for creating checksums" Display --indent 6 --text "- AIDE config (Checksum)" --result WARNING --color RED ReportSuggestion ${TEST_NO} "Use SHA256 or SHA512 to create checksums in AIDE" AddHP 1 3 else - logtext "Result: Found SHA256 or SHA512 found for creating checksums" + LogText "Result: Found SHA256 or SHA512 found for creating checksums" Display --indent 6 --text "- AIDE config (Checksum)" --result OK --color GREEN AddHP 2 2 fi @@ -118,14 +118,14 @@ # Description : Check if Osiris is installed Register --test-no FINT-4318 --weight L --network NO --description "Osiris availability" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: Checking Osiris binary" + LogText "Test: Checking Osiris binary" if [ ! "${OSIRISBINARY}" = "" ]; then - logtext "Result: Osiris is installed (${OSIRISBINARY})" + LogText "Result: Osiris is installed (${OSIRISBINARY})" FILE_INT_TOOL="osiris" FILE_INT_TOOL_FOUND=1 Display --indent 4 --text "- Osiris" --result FOUND --color GREEN else - logtext "Result: Osiris is not installed" + LogText "Result: Osiris is not installed" fi fi # @@ -135,14 +135,14 @@ # Description : Check if Samhain is installed Register --test-no FINT-4322 --weight L --network NO --description "Samhain availability" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: Checking Samhain binary" + LogText "Test: Checking Samhain binary" if [ ! "${SAMHAINBINARY}" = "" ]; then - logtext "Result: Samhain is installed (${SAMHAINBINARY})" + LogText "Result: Samhain is installed (${SAMHAINBINARY})" FILE_INT_TOOL="samhain" FILE_INT_TOOL_FOUND=1 Display --indent 4 --text "- Samhain" --result FOUND --color GREEN else - logtext "Result: Samhain is not installed" + LogText "Result: Samhain is not installed" fi fi # @@ -152,14 +152,14 @@ # Description : Check if Tripwire is installed Register --test-no FINT-4326 --weight L --network NO --description "Tripwire availability" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: Checking Tripwire binary" + LogText "Test: Checking Tripwire binary" if [ ! "${TRIPWIREBINARY}" = "" ]; then - logtext "Result: Tripwire is installed (${TRIPWIREBINARY})" + LogText "Result: Tripwire is installed (${TRIPWIREBINARY})" FILE_INT_TOOL="tripwire" FILE_INT_TOOL_FOUND=1 Display --indent 4 --text "- Tripwire" --result FOUND --color GREEN else - logtext "Result: Tripwire is not installed" + LogText "Result: Tripwire is not installed" fi fi # @@ -169,15 +169,15 @@ # Description : Check if OSSEC system integrity tool is running Register --test-no FINT-4328 --weight L --network NO --description "OSSEC syscheck daemon running" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: Checking if OSSEC syscheck daemon is running" + LogText "Test: Checking if OSSEC syscheck daemon is running" IsRunning ossec-syscheckd if [ ${RUNNING} -eq 1 ]; then - logtext "Result: syscheck (OSSEC) installed" + LogText "Result: syscheck (OSSEC) installed" FILE_INT_TOOL="ossec-syscheck" FILE_INT_TOOL_FOUND=1 Display --indent 4 --text "- OSSEC (syscheck)" --result FOUND --color GREEN else - logtext "Result: syscheck (OSSEC) not installed" + LogText "Result: syscheck (OSSEC) not installed" fi fi # @@ -188,14 +188,14 @@ # Note : Usually on BSD and similar Register --test-no FINT-4330 --weight L --network NO --description "mtree availability" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: Checking mtree binary" + LogText "Test: Checking mtree binary" if [ ! "${MTREEBINARY}" = "" ]; then - logtext "Result: mtree is installed (${MTREEBINARY})" + LogText "Result: mtree is installed (${MTREEBINARY})" FILE_INT_TOOL="mtree" FILE_INT_TOOL_FOUND=1 Display --indent 4 --text "- mtree" --result FOUND --color GREEN else - logtext "Result: mtree is not installed" + LogText "Result: mtree is not installed" fi fi # @@ -209,7 +209,7 @@ Display --indent 4 --text "- lfd (CSF)" --result FOUND --color GREEN IsRunning 'lfd ' if [ ${RUNNING} -eq 1 ]; then - logtext "Result: lfd daemon is running (CSF)" + LogText "Result: lfd daemon is running (CSF)" Display --indent 6 --text "- Daemon status" --result RUNNING --color GREEN FILE_INT_TOOL="csf-lfd" FILE_INT_TOOL_FOUND=1 @@ -225,18 +225,18 @@ # LFD configuration parameters ENABLED=`grep "^LF_DAEMON = \"1\"" ${CSF_CONFIG}` if [ ! "${ENABLED}" = "" ]; then - logtext "Result: lfd service is configured to run" + LogText "Result: lfd service is configured to run" Display --indent 6 --text "- Configuration status" --result ENABLED --color GREEN else - logtext "Result: lfd service is configured NOT to run" + LogText "Result: lfd service is configured NOT to run" Display --indent 6 --text "- Configuration status" --result DISABLED --color YELLOW fi ENABLED=`grep "^LF_DIRWATCH =" ${CSF_CONFIG} | awk '{ print $3 }' | sed 's/\"//g'` if [ ! "${ENABLED}" = "0" -a ! "${ENABLED}" = "" ]; then - logtext "Result: lfd directory watching is enabled (value: ${ENABLED})" + LogText "Result: lfd directory watching is enabled (value: ${ENABLED})" Display --indent 6 --text "- Temporary directory watches" --result ENABLED --color GREEN else - logtext "Result: lfd directory watching is disabled" + LogText "Result: lfd directory watching is disabled" Display --indent 6 --text "- Temporary directory watches" --result DISABLED --color YELLOW fi ENABLED=`grep "^LF_DIRWATCH_FILE =" ${CSF_CONFIG} | awk '{ print $3 }' | sed 's/\"//g'` @@ -253,13 +253,13 @@ # Description : Check if at least one file integrity tool is installed Register --test-no FINT-4350 --weight L --network NO --description "File integrity software installed" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: Check if at least on file integrity tool is available/installed" + LogText "Test: Check if at least on file integrity tool is available/installed" if [ ${FILE_INT_TOOL_FOUND} -eq 1 ]; then - logtext "Result: found at least one file integrity tool" + LogText "Result: found at least one file integrity tool" Display --indent 2 --text "- Checking presence integrity tool" --result FOUND --color GREEN AddHP 5 5 else - logtext "Result: No file integrity tools found" + LogText "Result: No file integrity tools found" Display --indent 2 --text "- Checking presence integrity tool" --result "NOT FOUND" --color YELLOW ReportSuggestion ${TEST_NO} "Install a file integrity tool to monitor changes to critical and sensitive files" AddHP 0 5 @@ -269,10 +269,10 @@ ################################################################################# # -report "file_integrity_tool=${FILE_INT_TOOL}" -report "file_integrity_tool_installed=${FILE_INT_TOOL_FOUND}" +Report "file_integrity_tool=${FILE_INT_TOOL}" +Report "file_integrity_tool_installed=${FILE_INT_TOOL_FOUND}" wait_for_keypress # #================================================================================ -# Lynis - Copyright 2007-2015 Michael Boelen, CISOfy - https://cisofy.com +# Lynis - Copyright 2007-2016 Michael Boelen, CISOfy - https://cisofy.com |