1
mirror of https://github.com/carlospolop/PEASS-ng synced 2024-11-20 12:39:21 +01:00

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.
This commit is contained in:
CyberSecurityN00b 2021-04-29 23:35:18 -05:00
parent 51236fa39e
commit aade1c5100

View File

@ -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,"