From d16b38eff83a8dca405e21e1c34205289f3d0832 Mon Sep 17 00:00:00 2001 From: mboelen Date: Mon, 21 Dec 2015 21:17:15 +0100 Subject: Rename of logtext and report functions, upcoming year change --- include/tests_malware | 76 +++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'include/tests_malware') diff --git a/include/tests_malware b/include/tests_malware index b9d4c0e8..d0d7d2c0 100644 --- a/include/tests_malware +++ b/include/tests_malware @@ -5,7 +5,7 @@ # Lynis # ------------------ # -# Copyright 2007-2015, Michael Boelen, CISOfy (michael.boelen@cisofy.com) +# Copyright 2007-2016, Michael Boelen, CISOfy (michael.boelen@cisofy.com) # Web site: https://cisofy.com # # Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are @@ -36,15 +36,15 @@ # Description : Check for installed tool (chkrootkit) Register --test-no MALW-3275 --weight L --network NO --description "Check for chkrootkit" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: checking presence chkrootkit" + LogText "Test: checking presence chkrootkit" if [ ! "${CHKROOTKITBINARY}" = "" ]; then Display --indent 2 --text "- Checking chkrootkit" --result "FOUND" --color GREEN - logtext "Result: Found ${CHKROOTKITBINARY}" + LogText "Result: Found ${CHKROOTKITBINARY}" MALWARE_SCANNER_INSTALLED=1 AddHP 2 2 - report "malware_scanner[]=chkrootkit" + Report "malware_scanner[]=chkrootkit" else - logtext "Result: chkrootkit not found" + LogText "Result: chkrootkit not found" fi fi # @@ -54,15 +54,15 @@ # Description : Check for installed tool (Rootkit Hunter) Register --test-no MALW-3276 --weight L --network NO --description "Check for Rootkit Hunter" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: checking presence Rootkit Hunter" + LogText "Test: checking presence Rootkit Hunter" if [ ! "${RKHUNTERBINARY}" = "" ]; then Display --indent 2 --text "- Checking Rootkit Hunter" --result "FOUND" --color GREEN - logtext "Result: Found ${RKHUNTERBINARY}" + LogText "Result: Found ${RKHUNTERBINARY}" MALWARE_SCANNER_INSTALLED=1 AddHP 2 2 - report "malware_scanner[]=rkhunter" + Report "malware_scanner[]=rkhunter" else - logtext "Result: Rootkit Hunter not found" + LogText "Result: Rootkit Hunter not found" fi fi # @@ -72,15 +72,15 @@ # Description : Check for installed tool (Linux Malware Detect or LMD) Register --test-no MALW-3278 --weight L --network NO --description "Check for LMD" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: checking presence LMD" + LogText "Test: checking presence LMD" if [ ! "${LMDBINARY}" = "" ]; then Display --indent 2 --text "- Checking LMD (Linux Malware Detect)" --result "FOUND" --color GREEN - logtext "Result: Found ${LMDBINARY}" + LogText "Result: Found ${LMDBINARY}" MALWARE_SCANNER_INSTALLED=1 AddHP 2 2 - report "malware_scanner[]=lmd" + Report "malware_scanner[]=lmd" else - logtext "Result: LMD not found" + LogText "Result: LMD not found" fi fi # @@ -93,20 +93,20 @@ FOUND=0 # ESET security products - logtext "Test: checking process esets_daemon" + LogText "Test: checking process esets_daemon" IsRunning esets_daemon if [ ${RUNNING} -eq 1 ]; then FOUND=1 Display --indent 2 --text "- Checking ESET daemon" --result "FOUND" --color GREEN - logtext "Result: found ESET security product" + LogText "Result: found ESET security product" ESET_DAEMON_RUNNING=1 MALWARE_SCANNER_INSTALLED=1 AddHP 2 2 - report "malware_scanner[]=eset" + Report "malware_scanner[]=eset" fi # McAfee products - logtext "Test: checking process cma or cmdagent (McAfee)" + LogText "Test: checking process cma or cmdagent (McAfee)" # cma is too generic to match on, so we want to ensure that it is related to McAfee first if [ -x /opt/McAfee/cma/bin/cma ]; then IsRunning cma @@ -118,20 +118,20 @@ if [ ${MCAFEE_SCANNER_RUNNING} -eq 1 ]; then FOUND=1 Display --indent 2 --text "- Checking McAfee" --result "FOUND" --color GREEN - logtext "Result: Found McAfee" + LogText "Result: Found McAfee" MALWARE_SCANNER_INSTALLED=1 AddHP 2 2 - report "malware_scanner[]=mcafee" + Report "malware_scanner[]=mcafee" fi # Sophos savscand/SophosScanD - logtext "Test: checking process savscand" + LogText "Test: checking process savscand" IsRunning savscand if [ ${RUNNING} -eq 1 ]; then FOUND=1 SOPHOS_SCANNER_RUNNING=1 fi - logtext "Test: checking process SophosScanD" + LogText "Test: checking process SophosScanD" IsRunning SophosScanD if [ ${RUNNING} -eq 1 ]; then FOUND=1 @@ -139,13 +139,13 @@ fi if [ ${SOPHOS_SCANNER_RUNNING} -eq 1 ]; then Display --indent 2 --text "- Checking Sophos" --result "FOUND" --color GREEN - logtext "Result: Found Sophos" + LogText "Result: Found Sophos" MALWARE_SCANNER_INSTALLED=1 AddHP 2 2 - report "malware_scanner[]=sophos" + Report "malware_scanner[]=sophos" fi if [ ${FOUND} -eq 0 ]; then - logtext "Result: no commercial anti-virus tools found" + LogText "Result: no commercial anti-virus tools found" AddHP 0 3 fi fi @@ -156,15 +156,15 @@ # Description : Check if clamscan is installed Register --test-no MALW-3282 --weight L --network NO --description "Check for clamscan" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: checking presence clamscan" + LogText "Test: checking presence clamscan" if [ ! "${CLAMSCANBINARY}" = "" ]; then Display --indent 2 --text "- Checking ClamAV scanner" --result "FOUND" --color GREEN - logtext "Result: Found ${CLAMSCANBINARY}" + LogText "Result: Found ${CLAMSCANBINARY}" MALWARE_SCANNER_INSTALLED=1 CLAMSCAN_INSTALLED=1 AddHP 2 2 else - logtext "Result: clamscan couldn't be found" + LogText "Result: clamscan couldn't be found" fi fi # @@ -174,15 +174,15 @@ # Description : Check running clamd process Register --test-no MALW-3284 --weight L --network NO --description "Check for clamd" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: checking running ClamAV daemon (clamd)" + LogText "Test: checking running ClamAV daemon (clamd)" IsRunning clamd if [ ${RUNNING} -eq 1 ]; then Display --indent 2 --text "- Checking ClamAV daemon" --result "FOUND" --color GREEN - logtext "Result: found running clamd process" + LogText "Result: found running clamd process" MALWARE_SCANNER_INSTALLED=1 CLAMD_RUNNING=1 else - logtext "Result: clamd not running" + LogText "Result: clamd not running" fi fi # @@ -193,16 +193,16 @@ if [ ${CLAMD_RUNNING} -eq 1 ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi Register --test-no MALW-3286 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check for freshclam" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: checking running freshclam daemon" + LogText "Test: checking running freshclam daemon" IsRunning freshclam if [ ${RUNNING} -eq 1 ]; then FRESHCLAM_DAEMON_RUNNING=1 Display --indent 4 --text "- Checking freshclam" --result "FOUND" --color GREEN - logtext "Result: found running freshclam process" + LogText "Result: found running freshclam process" AddHP 2 2 else Display --indent 4 --text "- Checking freshclam" --result "SUGGESTION" --color YELLOW - logtext "Result: freshclam is not running" + LogText "Result: freshclam is not running" ReportSuggestion ${TEST_NO} "Confirm that freshclam is properly configured and keeps updating the ClamAV database" fi fi @@ -216,13 +216,13 @@ if [ ${SKIPTEST} -eq 0 ]; then CLAMSCANBINARY=`ls /Applications/ClamXav.app/Contents/Resources/ScanningEngine/bin/ 2> /dev/null | grep 'clamscan'` if [ ! "${CLAMSCANBINARY}" = "" ]; then - logtext "Result: Found ClamXav clamscan installed" + LogText "Result: Found ClamXav clamscan installed" Display --indent 2 --text "- Checking presence of ClamXav AV scanner" --result "FOUND" --color GREEN MALWARE_SCANNER_INSTALLED=1 CLAMSCAN_INSTALLED=1 AddHP 3 3 else - logtext "Result: ClamXav malware scanner not found" + LogText "Result: ClamXav malware scanner not found" AddHP 0 3 fi fi @@ -231,17 +231,17 @@ # # Check if we found any of the ClamAV components if [ ${CLAMSCAN_INSTALLED} -eq 1 -o ${CLAMD_RUNNING} -eq 1 -o ${FRESHCLAM_DAEMON_RUNNING} -eq 1 ]; then - report "malware_scanner[]=clamav" + Report "malware_scanner[]=clamav" fi # ################################################################################# # -report "malware_scanner_installed=${MALWARE_SCANNER_INSTALLED}" +Report "malware_scanner_installed=${MALWARE_SCANNER_INSTALLED}" wait_for_keypress # #================================================================================ -# Lynis - Copyright 2007-2015, Michael Boelen, CISOfy - https://cisofy.com +# Lynis - Copyright 2007-2016, Michael Boelen, CISOfy - https://cisofy.com -- cgit v1.2.3