Skip to content

K8s internal recon

Environment variables

check what we have in env

env | grep -i kube

K8S kubectlr

install kubectl, that will be useful for information gathering

K8s what can I do with kubectl

script that show you what you can do with kubectl

Misconfiguration that can lead to container escape

Service Account token

cat /var/run/secrets/kubernetes.io/serviceaccount/token

Namespace

cat /var/run/secrets/kubernetes.io/serviceaccount/namespace

hostname

hostname

linux kernel version

uname -r

os release

cat /etc/os-release

check available tool

curl
wget
nc
netcat
apt
apk
rpm
kubletctl
nmap

custom _wget & _curl in case of lack in target and no possibility to install