39 lines
1.1 KiB
Bash
39 lines
1.1 KiB
Bash
# Title: Container - checkDockerVersionExploits
|
|
# ID: checkDockerVersionExploits
|
|
# Author: Carlos Polop
|
|
# Last Update: 22-08-2023
|
|
# Description: Check if the container is vulnerable to CVE-2019-13139 and CVE-2019-5736
|
|
# License: GNU GPL
|
|
# Version: 1.0
|
|
# Functions Used: echo_no, echo_not_found
|
|
# Global Variables: $dockerVersion
|
|
# Initial Functions:
|
|
# Generated Global Variables: $VULN_CVE_2019_13139, $VULN_CVE_2019_5736, $VULN_CVE_2021_41091
|
|
# Fat linpeas: 0
|
|
# Small linpeas: 1
|
|
|
|
|
|
checkDockerVersionExploits() {
|
|
if echo "$dockerVersion" | grep -iq "not found"; then
|
|
VULN_CVE_2019_13139="$(echo_not_found)"
|
|
VULN_CVE_2019_5736="$(echo_not_found)"
|
|
VULN_CVE_2021_41091="$(echo_not_found)"
|
|
return
|
|
fi
|
|
|
|
VULN_CVE_2019_13139="$(echo_no)"
|
|
if [ "$(echo $dockerVersion | sed 's,\.,,g')" -lt "1895" ]; then
|
|
VULN_CVE_2019_13139="Yes"
|
|
fi
|
|
|
|
VULN_CVE_2019_5736="$(echo_no)"
|
|
if [ "$(echo $dockerVersion | sed 's,\.,,g')" -lt "1893" ]; then
|
|
VULN_CVE_2019_5736="Yes"
|
|
fi
|
|
|
|
VULN_CVE_2021_41091="$(echo_no)"
|
|
if [ "$(echo $dockerVersion | sed 's,\.,,g')" -lt "20109" ]; then
|
|
VULN_CVE_2021_41091="Yes"
|
|
fi
|
|
}
|