From 0a4df51b064f57331b1469924a3f68fd4efde346 Mon Sep 17 00:00:00 2001 From: Carlos Polop Date: Sat, 5 Feb 2022 19:56:14 +0000 Subject: [PATCH] Update 1_system_information.sh --- linPEAS/builder/linpeas_parts/1_system_information.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/linPEAS/builder/linpeas_parts/1_system_information.sh b/linPEAS/builder/linpeas_parts/1_system_information.sh index 9f3ed6f..c64762a 100644 --- a/linPEAS/builder/linpeas_parts/1_system_information.sh +++ b/linPEAS/builder/linpeas_parts/1_system_information.sh @@ -23,7 +23,13 @@ echo "" #-- SY) CVE-2021-4034 if [ `command -v pkexec` ] && stat -c '%a' $(which pkexec) | grep -q 4755 && [ "$(stat -c '%Y' $(which pkexec))" -lt "1642035600" ]; then - echo "Vulnerable to CVE-2021-4034 (polkit privesc)" | sed -${E} "s,.*,${SED_RED_YELLOW}," + echo "Vulnerable to CVE-2021-4034" | sed -${E} "s,.*,${SED_RED_YELLOW}," +fi + +#-- SY) CVE-2021-3560 +polkitVersion=$(systemctl status polkit.service | grep version | cut -d " " -f 9) +if [[ "$(apt list --installed 2>/dev/null | grep polkit | grep -c 0.105-26)" -ge 1 || "$(yum list installed | grep polkit | grep -c 0.117-2)" ]]; then + echo "Vulnerable to CVE-2021-3560" | sed -${E} "s,.*,${SED_RED_YELLOW}," fi #--SY) USBCreator