From 751d61b27f6e3d632b681b93d5393b95693fde64 Mon Sep 17 00:00:00 2001 From: shadowabi <50265741+shadowabi@users.noreply.github.com> Date: Mon, 8 Apr 2024 14:41:46 +0800 Subject: [PATCH 1/4] Update 3_cloud.sh Delete the condition that Tencent Cloud detection is liable to cause false positives --- linPEAS/builder/linpeas_parts/3_cloud.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linPEAS/builder/linpeas_parts/3_cloud.sh b/linPEAS/builder/linpeas_parts/3_cloud.sh index 266ea8e..a5fb302 100644 --- a/linPEAS/builder/linpeas_parts/3_cloud.sh +++ b/linPEAS/builder/linpeas_parts/3_cloud.sh @@ -45,7 +45,7 @@ check_aliyun_ecs () { check_tencent_cvm () { is_tencent_cvm="No" - if [ -f "/etc/cloud/cloud.cfg.d/05_logging.cfg" ] || grep -qi Tencent /etc/cloud/cloud.cfg; then + if grep -qi Tencent /etc/cloud/cloud.cfg; then is_tencent_cvm="Yes" fi } From a2fb2cd2be5cac4af2264953ecf45380aacd4942 Mon Sep 17 00:00:00 2001 From: cp Date: Mon, 8 Apr 2024 11:31:00 +0200 Subject: [PATCH 2/4] Update 3_cloud.sh --- linPEAS/builder/linpeas_parts/3_cloud.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linPEAS/builder/linpeas_parts/3_cloud.sh b/linPEAS/builder/linpeas_parts/3_cloud.sh index a5fb302..e6ede29 100644 --- a/linPEAS/builder/linpeas_parts/3_cloud.sh +++ b/linPEAS/builder/linpeas_parts/3_cloud.sh @@ -154,7 +154,7 @@ check_do print_list "DO Droplet? .......................... $is_do\n"$NC | sed "s,Yes,${SED_RED}," | sed "s,No,${SED_GREEN}," check_aliyun_ecs print_list "Aliyun ECS? .......................... $is_aliyun_ecs\n"$NC | sed "s,Yes,${SED_RED}," | sed "s,No,${SED_GREEN}," -#check_tencent_cvm +check_tencent_cvm print_list "Tencent CVM? .......................... $is_tencent_cvm\n"$NC | sed "s,Yes,${SED_RED}," | sed "s,No,${SED_GREEN}," check_ibm_vm print_list "IBM Cloud VM? ........................ $is_ibm_vm\n"$NC | sed "s,Yes,${SED_RED}," | sed "s,No,${SED_GREEN}," From d8f86e81b284e8e81e46b9a7b71878bea154c8c5 Mon Sep 17 00:00:00 2001 From: Gary Corrall <4834451+gcorrall@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:54:27 +0100 Subject: [PATCH 3/4] Fix 'find possible conf files with passwords' in 9_interesting_files.sh --- linPEAS/builder/linpeas_parts/9_interesting_files.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linPEAS/builder/linpeas_parts/9_interesting_files.sh b/linPEAS/builder/linpeas_parts/9_interesting_files.sh index 6e69b88..bb085cb 100644 --- a/linPEAS/builder/linpeas_parts/9_interesting_files.sh +++ b/linPEAS/builder/linpeas_parts/9_interesting_files.sh @@ -301,14 +301,14 @@ if ! [ "$FAST" ] && ! [ "$SUPERFAST" ] && [ "$TIMEOUT" ]; then ##-- IF) Find possible conf files with passwords print_2title "Searching possible password in config files (if k8s secrets are found you need to read the file)" if ! [ "$SEARCH_IN_FOLDER" ]; then - ppicf=$(timeout 150 find $HOMESEARCH /var/www/ /usr/local/www/ /etc /opt /tmp /private /Applications /mnt -name "*.conf" -o -name "*.cnf" -o -name "*.config" -name "*.json" -name "*.yml" -name "*.yaml" 2>/dev/null) + ppicf=$(timeout 150 find $HOMESEARCH /var/www/ /usr/local/www/ /etc /opt /tmp /private /Applications /mnt -name "*.conf" -o -name "*.cnf" -o -name "*.config" -o -name "*.json" -o -name "*.yml" -o -name "*.yaml" 2>/dev/null) else - ppicf=$(timeout 150 find $SEARCH_IN_FOLDER -name "*.conf" -o -name "*.cnf" -o -name "*.config" -name "*.json" -name "*.yml" -name "*.yaml" 2>/dev/null) + ppicf=$(timeout 150 find $SEARCH_IN_FOLDER -name "*.conf" -o -name "*.cnf" -o -name "*.config" -o -name "*.json" -o -name "*.yml" -o -name "*.yaml" 2>/dev/null) fi printf "%s\n" "$ppicf" | while read f; do - if grep -qEiI 'passwd.*|creden.*|^kind:\W?Secret|\Wenv:|\Wsecret:|\WsecretName:|^kind:\W?EncryptionConfiguration|\-\-encriyption\-provider\-config' \"$f\" 2>/dev/null; then + if grep -qEiI 'passwd.*|creden.*|^kind:\W?Secret|\Wenv:|\Wsecret:|\WsecretName:|^kind:\W?EncryptionConfiguration|\-\-encryption\-provider\-config' "$f" 2>/dev/null; then echo "$ITALIC $f$NC" - grep -HnEiIo 'passwd.*|creden.*|^kind:\W?Secret|\Wenv:|\Wsecret:|\WsecretName:|^kind:\W?EncryptionConfiguration|\-\-encriyption\-provider\-config' "$f" 2>/dev/null | sed -${E} "s,[pP][aA][sS][sS][wW]|[cC][rR][eE][dD][eE][nN],${SED_RED},g" + grep -HnEiIo 'passwd.*|creden.*|^kind:\W?Secret|\Wenv:|\Wsecret:|\WsecretName:|^kind:\W?EncryptionConfiguration|\-\-encryption\-provider\-config' "$f" 2>/dev/null | sed -${E} "s,[pP][aA][sS][sS][wW]|[cC][rR][eE][dD][eE][nN],${SED_RED},g" fi done echo "" From 972503f806fc76c79080718edaf3767f0f213c96 Mon Sep 17 00:00:00 2001 From: cp Date: Sun, 5 May 2024 11:48:54 +0200 Subject: [PATCH 4/4] Update CI-master_tests.yml --- .github/workflows/CI-master_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI-master_tests.yml b/.github/workflows/CI-master_tests.yml index c137b5c..e7f4c80 100644 --- a/.github/workflows/CI-master_tests.yml +++ b/.github/workflows/CI-master_tests.yml @@ -321,8 +321,8 @@ jobs: # Build linpeas - name: Build macpeas run: | - python3 -m pip install PyYAML - python3 -m pip install requests + python3 -m pip install PyYAML --break-system-packages + python3 -m pip install requests --break-system-packages cd linPEAS python3 -m builder.linpeas_builder