From 08746a3dff35d0ff689b3d824cb7bd5b52de59b7 Mon Sep 17 00:00:00 2001 From: Carlos Polop Date: Mon, 7 Oct 2024 15:08:07 +0200 Subject: [PATCH] CVE-2021-3560 --- ...h => 14_Linux_exploit_suggester_2 copy.sh} | 0 .../1_system_information/15_CVE_2021_3560.sh | 21 +++++++++++++++++++ .../{15_Protections.sh => 16_Protections.sh} | 0 3 files changed, 21 insertions(+) rename linPEAS/builder/linpeas_parts/1_system_information/{14_Linux_exploit_suggester_2.sh => 14_Linux_exploit_suggester_2 copy.sh} (100%) create mode 100644 linPEAS/builder/linpeas_parts/1_system_information/15_CVE_2021_3560.sh rename linPEAS/builder/linpeas_parts/1_system_information/{15_Protections.sh => 16_Protections.sh} (100%) diff --git a/linPEAS/builder/linpeas_parts/1_system_information/14_Linux_exploit_suggester_2.sh b/linPEAS/builder/linpeas_parts/1_system_information/14_Linux_exploit_suggester_2 copy.sh similarity index 100% rename from linPEAS/builder/linpeas_parts/1_system_information/14_Linux_exploit_suggester_2.sh rename to linPEAS/builder/linpeas_parts/1_system_information/14_Linux_exploit_suggester_2 copy.sh diff --git a/linPEAS/builder/linpeas_parts/1_system_information/15_CVE_2021_3560.sh b/linPEAS/builder/linpeas_parts/1_system_information/15_CVE_2021_3560.sh new file mode 100644 index 0000000..66eebb7 --- /dev/null +++ b/linPEAS/builder/linpeas_parts/1_system_information/15_CVE_2021_3560.sh @@ -0,0 +1,21 @@ +# Title: System Information - CVE-2021-3560 +# ID: SY_CVE-2021-3560 +# Author: Carlos Polop +# Last Update: 07-10-2024 +# Description: CVE-2021-3560 - paper box from HTB +# License: GNU GPL +# Version: 1.0 +# Functions Used: +# Global Variables: $SED_RED_YELLOW, $E +# Initial Functions: +# Generated Global Variables: +# Fat linpeas: 0 +# Small linpeas: 0 + +if apt list --installed 2>/dev/null | grep -q 'polkit.*0\.105-26' || \ + yum list installed 2>/dev/null | grep -q 'polkit.*\(0\.117-2\|0\.115-6\)' || \ + rpm -qa 2>/dev/null | grep -q 'polkit.*\(0\.117-2\|0\.115-6\)'; then + echo "Vulnerable to CVE-2021-3560" | sed -${E} "s,.*,${SED_RED_YELLOW}," + echo "" +fi + diff --git a/linPEAS/builder/linpeas_parts/1_system_information/15_Protections.sh b/linPEAS/builder/linpeas_parts/1_system_information/16_Protections.sh similarity index 100% rename from linPEAS/builder/linpeas_parts/1_system_information/15_Protections.sh rename to linPEAS/builder/linpeas_parts/1_system_information/16_Protections.sh