2014-08-26 17:33:55 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Lynis
|
|
|
|
# ------------------
|
|
|
|
#
|
2016-03-13 16:00:39 +01:00
|
|
|
# Copyright 2007-2013, Michael Boelen
|
2017-02-09 13:35:40 +01:00
|
|
|
# Copyright 2007-2017, CISOfy
|
2016-03-13 16:00:39 +01:00
|
|
|
#
|
|
|
|
# Website : https://cisofy.com
|
|
|
|
# Blog : http://linux-audit.com
|
|
|
|
# GitHub : https://github.com/CISOfy/lynis
|
2014-08-26 17:33:55 +02:00
|
|
|
#
|
|
|
|
# Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
|
|
|
|
# welcome to redistribute it under the terms of the GNU General Public License.
|
|
|
|
# See LICENSE file for usage of this software.
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Malware scanners
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
2016-06-18 11:14:01 +02:00
|
|
|
InsertSection "Software: ${SECTION_MALWARE}"
|
2014-08-26 17:33:55 +02:00
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
2016-10-17 20:45:53 +02:00
|
|
|
AVAST_DAEMON_RUNNING=0
|
2017-03-13 15:51:13 +01:00
|
|
|
AVIRA_DAEMON_RUNNING=0
|
2016-10-19 11:17:54 +02:00
|
|
|
BITDEFENDER_DAEMON_RUNNING=0
|
2014-08-26 17:33:55 +02:00
|
|
|
CLAMD_RUNNING=0
|
2015-09-28 11:00:34 +02:00
|
|
|
CLAMSCAN_INSTALLED=0
|
|
|
|
ESET_DAEMON_RUNNING=0
|
|
|
|
FRESHCLAM_DAEMON_RUNNING=0
|
2015-05-04 13:37:36 +02:00
|
|
|
MCAFEE_SCANNER_RUNNING=0
|
2014-08-26 17:33:55 +02:00
|
|
|
MALWARE_SCANNER_INSTALLED=0
|
2015-05-04 13:37:36 +02:00
|
|
|
SOPHOS_SCANNER_RUNNING=0
|
2017-04-30 17:59:35 +02:00
|
|
|
SYMANTEC_SCANNER_RUNNING=0
|
2014-08-26 17:33:55 +02:00
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Test : MALW-3275
|
|
|
|
# Description : Check for installed tool (chkrootkit)
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no MALW-3275 --weight L --network NO --category security --description "Check for chkrootkit"
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: checking presence chkrootkit"
|
2016-09-10 16:12:44 +02:00
|
|
|
if [ ! -z "${CHKROOTKITBINARY}" ]; then
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- ${GEN_CHECKING} chkrootkit" --result "${STATUS_FOUND}" --color GREEN
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: Found ${CHKROOTKITBINARY}"
|
2014-08-26 17:33:55 +02:00
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
|
|
|
AddHP 2 2
|
2015-12-21 21:17:15 +01:00
|
|
|
Report "malware_scanner[]=chkrootkit"
|
2016-09-10 16:12:44 +02:00
|
|
|
else
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: chkrootkit not found"
|
2014-08-26 17:33:55 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Test : MALW-3276
|
2015-09-07 17:35:07 +02:00
|
|
|
# Description : Check for installed tool (Rootkit Hunter)
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no MALW-3276 --weight L --network NO --category security --description "Check for Rootkit Hunter"
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: checking presence Rootkit Hunter"
|
2016-09-10 16:12:44 +02:00
|
|
|
if [ ! -z "${RKHUNTERBINARY}" ]; then
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- ${GEN_CHECKING} Rootkit Hunter" --result "${STATUS_FOUND}" --color GREEN
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: Found ${RKHUNTERBINARY}"
|
2014-08-26 17:33:55 +02:00
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
|
|
|
AddHP 2 2
|
2015-12-21 21:17:15 +01:00
|
|
|
Report "malware_scanner[]=rkhunter"
|
2016-09-10 16:12:44 +02:00
|
|
|
else
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: Rootkit Hunter not found"
|
2014-08-26 17:33:55 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
2015-09-24 16:45:03 +02:00
|
|
|
#
|
|
|
|
# Test : MALW-3278
|
|
|
|
# Description : Check for installed tool (Linux Malware Detect or LMD)
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no MALW-3278 --weight L --network NO --category security --description "Check for LMD"
|
2015-09-24 16:45:03 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: checking presence LMD"
|
2015-09-24 16:45:03 +02:00
|
|
|
if [ ! "${LMDBINARY}" = "" ]; then
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- ${GEN_CHECKING} LMD (Linux Malware Detect)" --result "${STATUS_FOUND}" --color GREEN
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: Found ${LMDBINARY}"
|
2015-09-24 16:45:03 +02:00
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
|
|
|
AddHP 2 2
|
2015-12-21 21:17:15 +01:00
|
|
|
Report "malware_scanner[]=lmd"
|
2016-09-10 16:12:44 +02:00
|
|
|
else
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: LMD not found"
|
2015-09-24 16:45:03 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
2014-08-26 17:33:55 +02:00
|
|
|
#
|
|
|
|
# Test : MALW-3280
|
|
|
|
# Description : Check if an anti-virus tool is installed
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no MALW-3280 --weight L --network NO --category security --description "Check if anti-virus tool is installed"
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
|
|
|
FOUND=0
|
2015-09-28 11:00:34 +02:00
|
|
|
|
|
|
|
# ESET security products
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: checking process esets_daemon"
|
2015-09-28 11:00:34 +02:00
|
|
|
IsRunning esets_daemon
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then
|
|
|
|
FOUND=1
|
|
|
|
ESET_DAEMON_RUNNING=1
|
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
2017-04-29 14:22:40 +02:00
|
|
|
if IsVerbose; then Display --indent 2 --text "- ${GEN_CHECKING} ESET daemon" --result "${STATUS_FOUND}" --color GREEN; fi
|
|
|
|
LogText "Result: found ESET security product"
|
2015-12-21 21:17:15 +01:00
|
|
|
Report "malware_scanner[]=eset"
|
2015-09-28 11:00:34 +02:00
|
|
|
fi
|
|
|
|
|
2016-10-19 11:17:54 +02:00
|
|
|
# Bitdefender (macOS)
|
|
|
|
LogText "Test: checking process bdagentd"
|
|
|
|
IsRunning bdagentd
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then
|
|
|
|
FOUND=1
|
|
|
|
BITDEFENDER_DAEMON_RUNNING=1
|
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
2017-04-29 14:22:40 +02:00
|
|
|
if IsVerbose; then Display --indent 2 --text "- ${GEN_CHECKING} Bitdefender agent" --result "${STATUS_FOUND}" --color GREEN; fi
|
|
|
|
LogText "Result: found Bitdefender security product"
|
2016-10-19 11:17:54 +02:00
|
|
|
Report "malware_scanner[]=bitdefender"
|
|
|
|
fi
|
|
|
|
|
2016-10-17 20:45:53 +02:00
|
|
|
# Avast (macOS)
|
|
|
|
LogText "Test: checking process com.avast.daemon"
|
|
|
|
IsRunning com.avast.daemon
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then
|
|
|
|
FOUND=1
|
|
|
|
AVAST_DAEMON_RUNNING=1
|
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
2017-04-29 14:22:40 +02:00
|
|
|
if IsVerbose; then Display --indent 2 --text "- ${GEN_CHECKING} Avast daemon" --result "${STATUS_FOUND}" --color GREEN; fi
|
|
|
|
LogText "Result: found Avast security product"
|
2016-10-17 20:45:53 +02:00
|
|
|
Report "malware_scanner[]=avast"
|
|
|
|
fi
|
|
|
|
|
2017-03-13 15:51:13 +01:00
|
|
|
# Avira
|
|
|
|
LogText "Test: checking process Avira daemon"
|
|
|
|
IsRunning avqmd
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then
|
|
|
|
FOUND=1
|
|
|
|
AVIRA_DAEMON_RUNNING=1
|
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
2017-04-29 14:22:40 +02:00
|
|
|
if IsVerbose; then Display --indent 2 --text "- ${GEN_CHECKING} Avira daemon" --result "${STATUS_FOUND}" --color GREEN; fi
|
|
|
|
LogText "Result: found Avira security product"
|
2017-03-13 15:51:13 +01:00
|
|
|
Report "malware_scanner[]=avira"
|
|
|
|
fi
|
|
|
|
|
2017-01-24 20:01:22 +01:00
|
|
|
# Cylance (macOS)
|
|
|
|
LogText "Test: checking process CylanceSvc"
|
|
|
|
IsRunning CylanceSvc
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then
|
|
|
|
FOUND=1
|
2017-04-29 14:22:40 +02:00
|
|
|
if IsVerbose; then Display --indent 2 --text "- ${GEN_CHECKING} CylancePROTECT" --result "${STATUS_FOUND}" --color GREEN; fi
|
2017-01-24 20:01:22 +01:00
|
|
|
LogText "Result: found CylancePROTECT service"
|
|
|
|
AVAST_DAEMON_RUNNING=1
|
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
|
|
|
Report "malware_scanner[]=cylance-protect"
|
|
|
|
fi
|
|
|
|
|
2015-09-28 11:00:34 +02:00
|
|
|
# McAfee products
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: checking process cma or cmdagent (McAfee)"
|
2015-04-01 14:22:53 +02:00
|
|
|
# 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
|
2016-09-10 16:12:44 +02:00
|
|
|
IsRunning cma
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then MCAFEE_SCANNER_RUNNING=1; fi
|
|
|
|
else
|
|
|
|
IsRunning cmdagent
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then MCAFEE_SCANNER_RUNNING=1; fi
|
2015-04-01 14:22:53 +02:00
|
|
|
fi
|
2015-05-04 13:37:36 +02:00
|
|
|
if [ ${MCAFEE_SCANNER_RUNNING} -eq 1 ]; then
|
2014-08-26 17:33:55 +02:00
|
|
|
FOUND=1
|
2017-04-29 14:22:40 +02:00
|
|
|
if IsVerbose; then Display --indent 2 --text "- ${GEN_CHECKING} McAfee" --result "${STATUS_FOUND}" --color GREEN; fi
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: Found McAfee"
|
2014-08-26 17:33:55 +02:00
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
2015-12-21 21:17:15 +01:00
|
|
|
Report "malware_scanner[]=mcafee"
|
2014-08-26 17:33:55 +02:00
|
|
|
fi
|
2017-04-29 14:22:40 +02:00
|
|
|
|
2015-05-04 13:37:36 +02:00
|
|
|
# Sophos savscand/SophosScanD
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: checking process savscand"
|
2015-05-04 13:37:36 +02:00
|
|
|
IsRunning savscand
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then
|
|
|
|
FOUND=1
|
2015-09-28 11:00:34 +02:00
|
|
|
SOPHOS_SCANNER_RUNNING=1
|
2015-05-04 13:37:36 +02:00
|
|
|
fi
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: checking process SophosScanD"
|
2014-08-26 17:33:55 +02:00
|
|
|
IsRunning SophosScanD
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then
|
|
|
|
FOUND=1
|
2015-09-28 11:00:34 +02:00
|
|
|
SOPHOS_SCANNER_RUNNING=1
|
2015-05-04 13:37:36 +02:00
|
|
|
fi
|
|
|
|
if [ ${SOPHOS_SCANNER_RUNNING} -eq 1 ]; then
|
2017-04-29 14:22:40 +02:00
|
|
|
if IsVerbose; then Display --indent 2 --text "- ${GEN_CHECKING} Sophos" --result "${STATUS_FOUND}" --color GREEN; fi
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: Found Sophos"
|
2014-08-26 17:33:55 +02:00
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
2015-12-21 21:17:15 +01:00
|
|
|
Report "malware_scanner[]=sophos"
|
2014-08-26 17:33:55 +02:00
|
|
|
fi
|
2017-01-24 20:01:22 +01:00
|
|
|
|
2017-04-29 14:22:40 +02:00
|
|
|
# Symantec rtvscand/smcd/symcfgd
|
|
|
|
LogText "Test: checking process rtvscand"
|
|
|
|
IsRunning rtvscand
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then
|
|
|
|
SYMANTEC_SCANNER_RUNNING=1
|
|
|
|
fi
|
|
|
|
LogText "Test: checking process Symantec management client service"
|
|
|
|
IsRunning smcd
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then
|
|
|
|
SYMANTEC_SCANNER_RUNNING=1
|
|
|
|
fi
|
|
|
|
LogText "Test: checking process Symantec Endpoint Protection configuration service"
|
|
|
|
IsRunning symcfgd
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then
|
|
|
|
SYMANTEC_SCANNER_RUNNING=1
|
|
|
|
fi
|
|
|
|
if [ ${SYMANTEC_SCANNER_RUNNING} -eq 1 ]; then
|
|
|
|
if IsVerbose; then Display --indent 2 --text "- ${GEN_CHECKING} Symantec" --result "${STATUS_FOUND}" --color GREEN; fi
|
|
|
|
LogText "Result: found one or more Symantec components"
|
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
|
|
|
FOUND=1
|
|
|
|
Report "malware_scanner[]=symantec"
|
|
|
|
fi
|
|
|
|
|
2017-01-24 20:01:22 +01:00
|
|
|
# TrendMicro (macOS)
|
|
|
|
LogText "Test: checking process TmccMac to test for Trend Micro anti-virus (macOS)"
|
|
|
|
IsRunning TmccMac
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then
|
2017-04-29 14:22:40 +02:00
|
|
|
if IsVerbose; then Display --indent 2 --text "- ${GEN_CHECKING} Trend Micro anti-virus" --result "${STATUS_FOUND}" --color GREEN; fi
|
|
|
|
LogText "Result: found Trend Micro component"
|
2017-01-24 20:01:22 +01:00
|
|
|
FOUND=1
|
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
|
|
|
Report "malware_scanner[]=trend-micro-av"
|
|
|
|
fi
|
|
|
|
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${FOUND} -eq 0 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: no commercial anti-virus tools found"
|
2014-08-26 17:33:55 +02:00
|
|
|
AddHP 0 3
|
2017-04-29 14:22:40 +02:00
|
|
|
else
|
|
|
|
LogText "Result: found one or more commercial anti-virus tools"
|
|
|
|
AddHP 2 2
|
2014-08-26 17:33:55 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Test : MALW-3282
|
|
|
|
# Description : Check if clamscan is installed
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no MALW-3282 --weight L --network NO --category security --description "Check for clamscan"
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: checking presence clamscan"
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ! "${CLAMSCANBINARY}" = "" ]; then
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- Checking ClamAV scanner" --result "${STATUS_FOUND}" --color GREEN
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: Found ${CLAMSCANBINARY}"
|
2014-08-26 17:33:55 +02:00
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
2015-09-28 11:00:34 +02:00
|
|
|
CLAMSCAN_INSTALLED=1
|
2014-08-26 17:33:55 +02:00
|
|
|
AddHP 2 2
|
2016-09-10 16:12:44 +02:00
|
|
|
else
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: clamscan couldn't be found"
|
2014-08-26 17:33:55 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Test : MALW-3284
|
|
|
|
# Description : Check running clamd process
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no MALW-3284 --weight L --network NO --category security --description "Check for clamd"
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: checking running ClamAV daemon (clamd)"
|
2014-09-19 01:10:43 +02:00
|
|
|
IsRunning clamd
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- ${GEN_CHECKING} ClamAV daemon" --result "${STATUS_FOUND}" --color GREEN
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: found running clamd process"
|
2014-08-26 17:33:55 +02:00
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
|
|
|
CLAMD_RUNNING=1
|
2016-09-10 16:12:44 +02:00
|
|
|
else
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: clamd not running"
|
2014-08-26 17:33:55 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Test : MALW-3286
|
|
|
|
# Description : Check running freshclam if clamd process is running
|
|
|
|
if [ ${CLAMD_RUNNING} -eq 1 ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no MALW-3286 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check for freshclam"
|
2014-08-26 17:33:55 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Test: checking running freshclam daemon"
|
2014-09-19 01:10:43 +02:00
|
|
|
IsRunning freshclam
|
|
|
|
if [ ${RUNNING} -eq 1 ]; then
|
2015-09-28 11:00:34 +02:00
|
|
|
FRESHCLAM_DAEMON_RUNNING=1
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 4 --text "- ${GEN_CHECKING} freshclam" --result "${STATUS_FOUND}" --color GREEN
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: found running freshclam process"
|
2014-08-26 17:33:55 +02:00
|
|
|
AddHP 2 2
|
2016-09-10 16:12:44 +02:00
|
|
|
else
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 4 --text "- ${GEN_CHECKING} freshclam" --result "${STATUS_SUGGESTION}" --color YELLOW
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: freshclam is not running"
|
2014-08-26 17:33:55 +02:00
|
|
|
ReportSuggestion ${TEST_NO} "Confirm that freshclam is properly configured and keeps updating the ClamAV database"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
|
|
|
#
|
2015-07-22 16:28:11 +02:00
|
|
|
# Test : MALW-3288
|
2016-11-05 11:53:22 +01:00
|
|
|
# Description : Check for ClamXav (macOS)
|
2015-07-22 16:28:11 +02:00
|
|
|
if [ -d /Applications/ClamXav.app/Contents/Resources/ScanningEngine/bin/ ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
2016-07-24 17:22:00 +02:00
|
|
|
Register --test-no MALW-3288 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check for ClamXav"
|
2014-09-25 19:08:47 +02:00
|
|
|
if [ ${SKIPTEST} -eq 0 ]; then
|
2016-09-10 16:12:44 +02:00
|
|
|
CLAMSCANBINARY=$(${LSBINARY} /Applications/ClamXav.app/Contents/Resources/ScanningEngine/bin/ 2> /dev/null | ${GREPBINARY} 'clamscan')
|
|
|
|
if [ ! -z "${CLAMSCANBINARY}" ]; then
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: Found ClamXav clamscan installed"
|
2016-06-18 11:14:01 +02:00
|
|
|
Display --indent 2 --text "- ${GEN_CHECKING} ClamXav AV scanner" --result "${STATUS_FOUND}" --color GREEN
|
2015-07-22 16:28:11 +02:00
|
|
|
MALWARE_SCANNER_INSTALLED=1
|
2015-09-28 11:00:34 +02:00
|
|
|
CLAMSCAN_INSTALLED=1
|
2015-07-22 16:28:11 +02:00
|
|
|
AddHP 3 3
|
2016-09-10 16:12:44 +02:00
|
|
|
else
|
2015-12-21 21:17:15 +01:00
|
|
|
LogText "Result: ClamXav malware scanner not found"
|
2015-07-22 16:28:11 +02:00
|
|
|
AddHP 0 3
|
2014-09-25 19:08:47 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
2015-09-28 11:00:34 +02:00
|
|
|
#
|
|
|
|
# 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
|
2015-12-21 21:17:15 +01:00
|
|
|
Report "malware_scanner[]=clamav"
|
2015-09-28 11:00:34 +02:00
|
|
|
fi
|
|
|
|
#
|
|
|
|
#################################################################################
|
2014-08-26 17:33:55 +02:00
|
|
|
#
|
|
|
|
|
2015-12-21 21:17:15 +01:00
|
|
|
Report "malware_scanner_installed=${MALWARE_SCANNER_INSTALLED}"
|
2014-08-26 17:33:55 +02:00
|
|
|
|
2015-03-25 15:55:46 +01:00
|
|
|
|
2016-04-28 12:31:57 +02:00
|
|
|
WaitForKeyPress
|
2014-08-26 17:33:55 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
#================================================================================
|
2016-03-13 16:03:46 +01:00
|
|
|
# Lynis - Security Auditing and System Hardening for Linux and UNIX - https://cisofy.com
|