mirror of https://github.com/CISOfy/lynis.git
Change of variables for IDS/IPS and layout changes
This commit is contained in:
parent
e86f0522bf
commit
1205511c9d
|
@ -87,6 +87,7 @@ unset LANG
|
||||||
HAS_SYSTEMD=0
|
HAS_SYSTEMD=0
|
||||||
HELPER=""
|
HELPER=""
|
||||||
HOSTID=""
|
HOSTID=""
|
||||||
|
IDS_IPS_TOOL_FOUND=0
|
||||||
IPTABLESBINARY=""
|
IPTABLESBINARY=""
|
||||||
LINUX_VERSION=""
|
LINUX_VERSION=""
|
||||||
LINUXCONFIGFILE=""
|
LINUXCONFIGFILE=""
|
||||||
|
|
|
@ -169,11 +169,15 @@
|
||||||
echo " ${CYAN}Tests performed${NORMAL} : ${WHITE}${CTESTS_PERFORMED}${NORMAL}"
|
echo " ${CYAN}Tests performed${NORMAL} : ${WHITE}${CTESTS_PERFORMED}${NORMAL}"
|
||||||
echo " ${CYAN}Plugins enabled${NORMAL} : ${WHITE}${N_PLUGIN_ENABLED}${NORMAL}"
|
echo " ${CYAN}Plugins enabled${NORMAL} : ${WHITE}${N_PLUGIN_ENABLED}${NORMAL}"
|
||||||
echo ""
|
echo ""
|
||||||
echo " ${WHITE}Quick overview${NORMAL}:"
|
echo " ${WHITE}Components${NORMAL}:"
|
||||||
if [ ${FIREWALL_ACTIVE} -eq 1 ]; then FIREWALL="${GREEN}V"; else FIREWALL="${RED}X"; fi
|
if [ ${FIREWALL_ACTIVE} -eq 1 ]; then FIREWALL="${GREEN}V"; else FIREWALL="${RED}X"; fi
|
||||||
if [ ${MALWARE_SCANNER_INSTALLED} -eq 1 ]; then MALWARE="${GREEN}V"; else MALWARE="${RED}X"; fi
|
if [ ${MALWARE_SCANNER_INSTALLED} -eq 1 ]; then MALWARE="${GREEN}V"; else MALWARE="${RED}X"; fi
|
||||||
|
if [ ${IDS_IPS_TOOL_FOUND} -eq 1 ]; then IDSIPS="${GREEN}V"; else IDSIPS="${RED}X"; fi
|
||||||
|
|
||||||
echo " - Firewall [${FIREWALL}${NORMAL}] - Malware scanner [${MALWARE}${NORMAL}]"
|
echo " - Firewall [${FIREWALL}${NORMAL}]"
|
||||||
|
#echo " - Integrity monitoring [${IDSIPS}${NORMAL}]""
|
||||||
|
#echo " - Intrusion software [${IDSIPS}${NORMAL}]"
|
||||||
|
echo " - Malware scanner [${MALWARE}${NORMAL}]"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo " ${SECTION}Lynis Modules${NORMAL}:"
|
echo " ${SECTION}Lynis Modules${NORMAL}:"
|
||||||
|
|
|
@ -161,13 +161,13 @@
|
||||||
# Fail2ban presence
|
# Fail2ban presence
|
||||||
if [ ! "${FAIL2BANBINARY}" = "" ]; then
|
if [ ! "${FAIL2BANBINARY}" = "" ]; then
|
||||||
LogText "Result: Fail2ban is installed (${FAIL2BANBINARY})"
|
LogText "Result: Fail2ban is installed (${FAIL2BANBINARY})"
|
||||||
IPS_TOOL_FOUND=1
|
IDS_IPS_TOOL_FOUND=1
|
||||||
|
report "ids_ips_tooling[]=fail2ban"
|
||||||
FAIL2BAN_FOUND=1
|
FAIL2BAN_FOUND=1
|
||||||
Report "IPS_tool_running[]=fail2ban-server"
|
Report "IPS_tool_running[]=fail2ban-server"
|
||||||
Display --indent 2 --text "- Checking presence of Fail2ban" --result FOUND --color GREEN
|
Display --indent 2 --text "- Checking presence of Fail2ban" --result FOUND --color GREEN
|
||||||
else
|
else
|
||||||
LogText "Result: Fail2ban not present (fail2ban-server not found)"
|
LogText "Result: Fail2ban not present (fail2ban-server not found)"
|
||||||
Display --indent 2 --text "- Checking presence of Fail2ban" --result "NOT FOUND" --color WHITE
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fail2ban configuration
|
# Fail2ban configuration
|
||||||
|
@ -268,16 +268,16 @@
|
||||||
#################################################################################
|
#################################################################################
|
||||||
#
|
#
|
||||||
# Test : TOOL-5190
|
# Test : TOOL-5190
|
||||||
# Description : Check for an IPS tool
|
# Description : Check for an IDS/IPS tool
|
||||||
Register --test-no TOOL-5014 --weight L --network NO --description "Check presence of IPS tool"
|
Register --test-no TOOL-5014 --weight L --network NO --description "Check presence of IDS/IPS tool"
|
||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
|
|
||||||
if [ ${IPS_TOOL_FOUND} -eq 1 ]; then
|
if [ ${IDS_IPS_TOOL_FOUND} -eq 1 ]; then
|
||||||
Display --indent 2 --text "- Checking for implemented IPS" --result FOUND --color GREEN
|
Display --indent 2 --text "- Checking for intrusion detection/prevention system" --result FOUND --color GREEN
|
||||||
AddHP 2 2
|
AddHP 2 2
|
||||||
else
|
else
|
||||||
Display --indent 2 --text "- Checking for implemented IPS" --result NONE --color YELLOW
|
Display --indent 2 --text "- Checking for intrusion detection/prevention system" --result NONE --color YELLOW
|
||||||
#ReportSuggestion ${TEST_NO} "Ensure that automatic intrusion prevention tools are installed"
|
#ReportSuggestion ${TEST_NO} "Ensure that automatic intrusion detection/prevention tools are installed"
|
||||||
AddHP 0 2
|
AddHP 0 2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue