From dc7c9db7ddf1c23f22667b5dc38ae876d07cf5ab Mon Sep 17 00:00:00 2001 From: secnigma <78214540+secnigma@users.noreply.github.com> Date: Fri, 11 Feb 2022 13:23:50 -0500 Subject: [PATCH] Improved CVE-2021-3560 Check * Swapped `yum ` for `rpm ` for improved compatibility * Added known vulnerable version of Polkit --- linPEAS/builder/linpeas_parts/1_system_information.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linPEAS/builder/linpeas_parts/1_system_information.sh b/linPEAS/builder/linpeas_parts/1_system_information.sh index 230b66e..1850b9d 100644 --- a/linPEAS/builder/linpeas_parts/1_system_information.sh +++ b/linPEAS/builder/linpeas_parts/1_system_information.sh @@ -29,7 +29,7 @@ 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)" -ge 1 ]]; then +if [[ "$(apt list --installed 2>/dev/null | grep polkit | grep -c 0.105-26)" -ge 1 || "$(rpm -qa | grep polkit | grep -c '0.117-2\|0.115-6')" -ge 1 ]]; then echo "Vulnerable to CVE-2021-3560" | sed -${E} "s,.*,${SED_RED_YELLOW}," echo "" fi