mirror of
https://github.com/peass-ng/PEASS-ng.git
synced 2026-11-07 09:25:57 -10:00
Auto-merge PR #746 (Chack Agent)
Co-authored-by: HackTricks News Bot <[email protected]>
This commit is contained in:
1 parent
96a593ba58
commit
922f54c2fa
1 file changed
+5
-2
@@ -371,6 +371,8 @@ class LinpeasBuilder:
|
||||
sudoVB = []
|
||||
suidVB = []
|
||||
capsVB = []
|
||||
# sudoers aliases and sudo -l may list several commands on one line.
|
||||
sudo_command_boundary = "([[:space:]]*[,]|$)"
|
||||
|
||||
for b in bins:
|
||||
try:
|
||||
@@ -382,9 +384,10 @@ class LinpeasBuilder:
|
||||
rb = requests.get(f"https://raw.githubusercontent.com/GTFOBins/GTFOBins.github.io/master/_gtfobins/{b}", timeout=5)
|
||||
if "sudo:" in rb.text:
|
||||
if len(b) <= 3:
|
||||
sudoVB.append("[^a-zA-Z0-9]"+b+"$") # Less false possitives applied to small names
|
||||
# Reduce false positives for short names.
|
||||
sudoVB.append("[^a-zA-Z0-9]" + b + sudo_command_boundary)
|
||||
else:
|
||||
sudoVB.append(b+"$")
|
||||
sudoVB.append(b + sudo_command_boundary)
|
||||
if "suid:" in rb.text:
|
||||
suidVB.append("/"+b+"$")
|
||||
if "capabilities:" in rb.text:
|
||||
|
||||
Reference in new issue
Block a user