From f344a1875b48656b01203fdce96aeffb15519683 Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 9 Jul 2020 13:48:56 +0100 Subject: [PATCH 1/2] Added additional container tools to intersting tools --- linPEAS/linpeas.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linPEAS/linpeas.sh b/linPEAS/linpeas.sh index 3e63ea9..d56c300 100755 --- a/linPEAS/linpeas.sh +++ b/linPEAS/linpeas.sh @@ -931,7 +931,7 @@ if [ "`echo $CHECKS | grep AvaSof`" ]; then #-- 1AS) Useful software printf $Y"[+] "$GREEN"Useful software\n"$NC - which nmap aws nc ncat netcat nc.traditional wget curl ping gcc g++ make gdb base64 socat python python2 python3 python2.7 python2.6 python3.6 python3.7 perl php ruby xterm doas sudo fetch docker 2>/dev/null + which nmap aws nc ncat netcat nc.traditional wget curl ping gcc g++ make gdb base64 socat python python2 python3 python2.7 python2.6 python3.6 python3.7 perl php ruby xterm doas sudo fetch docker lxc rkt kubectl 2>/dev/null echo "" #-- 2AS) Search for compilers From dfa35c5e31d1ba9e06be74d7315c3a18b324dfb6 Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 9 Jul 2020 14:46:36 +0100 Subject: [PATCH 2/2] Added check to list running containers for docker,lxc and rkt --- linPEAS/linpeas.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/linPEAS/linpeas.sh b/linPEAS/linpeas.sh index d56c300..44e9523 100755 --- a/linPEAS/linpeas.sh +++ b/linPEAS/linpeas.sh @@ -896,6 +896,26 @@ if [ "`echo $CHECKS | grep SysI`" ]; then else echo_no fi + #-- ????) Containers Running + printf $Y"[+] "$GREEN"Any running containers? ........ "$NC + # Get counts of running containers for each platform + dockercontainers=`docker ps --format "{{.Names}}" 2>/dev/null | wc -l` + lxccontainers=`lxc list -c n --format csv 2>/dev/null | wc -l` + rktcontainers=`rkt list 2>/dev/null | tail -n +2 | wc -l` + if [ "$dockercontainers" -eq "0" ] && [ "$lxccontainers" -eq "0" ] && [ "$rktcontainers" -eq "0" ]; then + echo_no + else + containerCounts="" + if [ "$dockercontainers" -ne "0" ]; then containerCounts="${containerCounts}docker($dockercontainers) "; fi + if [ "$lxccontainers" -ne "0" ]; then containerCounts="${containerCounts}lxc($lxccontainers) "; fi + if [ "$rktcontainers" -ne "0" ]; then containerCounts="${containerCounts}rkt($rktcontainers) "; fi + echo "Yes $containerCounts" | sed "s,.*,${C}[1;31m&${C}[0m," + # List any running containers + if [ "$dockercontainers" -ne "0" ]; then echo "Running Docker Containers" | sed "s,.*,${C}[1;31m&${C}[0m,"; docker ps | tail -n +2 2>/dev/null; echo ""; fi + if [ "$lxccontainers" -ne "0" ]; then echo "Running LXC Containers" | sed "s,.*,${C}[1;31m&${C}[0m,"; lxc list 2>/dev/null; echo ""; fi + if [ "$rktcontainers" -ne "0" ]; then echo "Running RKT Containers" | sed "s,.*,${C}[1;31m&${C}[0m,"; rkt list 2>/dev/null; echo ""; fi + fi + echo "" echo "" if [ "$WAIT" ]; then echo "Press enter to continue"; read "asd"; fi