From 7a9ea40cbbe5c4e345dd460fefcfc15c14ebf05d Mon Sep 17 00:00:00 2001 From: Carlos Polop Date: Tue, 24 Sep 2024 11:49:57 +0200 Subject: [PATCH] Less false possitives applied to small names --- linPEAS/builder/src/linpeasBuilder.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linPEAS/builder/src/linpeasBuilder.py b/linPEAS/builder/src/linpeasBuilder.py index 1166db7b..9079859b 100644 --- a/linPEAS/builder/src/linpeasBuilder.py +++ b/linPEAS/builder/src/linpeasBuilder.py @@ -364,7 +364,10 @@ def __get_gtfobins_lists(self) -> tuple: except: rb = requests.get(f"https://raw.githubusercontent.com/GTFOBins/GTFOBins.github.io/master/_gtfobins/{b}.md", timeout=5) if "sudo:" in rb.text: - sudoVB.append(b+"$") + if len(b) <= 3: + sudoVB.append("[^a-ZA-Z0-9]"+b+"$") # Less false possitives applied to small names + else: + sudoVB.append(b+"$") if "suid:" in rb.text: suidVB.append("/"+b+"$") if "capabilities:" in rb.text: