From aade1c51008096132dacff2176145542d668b296 Mon Sep 17 00:00:00 2001 From: CyberSecurityN00b <51185020+CyberSecurityN00b@users.noreply.github.com> Date: Thu, 29 Apr 2021 23:35:18 -0500 Subject: [PATCH] Highlight all container capabilities When looking for docker breakout techniques, linpeas is not running a global sed against `$containercapsB`, so only the first match is highlighted. --- linPEAS/linpeas.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linPEAS/linpeas.sh b/linPEAS/linpeas.sh index 6416876..b5978a9 100755 --- a/linPEAS/linpeas.sh +++ b/linPEAS/linpeas.sh @@ -1135,7 +1135,7 @@ if [ "`echo $CHECKS | grep SysI`" ]; then if [ "$dockercontainer" ] || [ "$dockercontainers" -ne "0" ]; then printf $Y"[+] "$GREEN"Looking for docker breakout techniques\n"$NC printf $B"[i] "$Y"https://book.hacktricks.xyz/linux-unix/privilege-escalation/docker-breakout\n"$NC - capsh --print 2>/dev/null | sed -${E} "s,$containercapsB,${C}[1;31m&${C}[0m," + capsh --print 2>/dev/null | sed -${E} "s,$containercapsB,${C}[1;31m&${C}[0m,g" echo "" ls /var/run/docker.sock 2>/dev/null | sed "s,.*,${C}[1;31m&${C}[0m," ls /run/docker.sock 2>/dev/null | sed "s,.*,${C}[1;31m&${C}[0m,"