Arthur Lutz (Zenika) · @arthurzenika
367 followers · 584 posts · Server pouet.chapril.org

That's it, remember to have fun while learning all this security stuff, don't be too competitive, share with your peers and stay humble.

End of ๐Ÿงต

#kubeconctf #kubeconeu #kubecon

Last updated 2 years ago

Arthur Lutz (Zenika) · @arthurzenika
367 followers · 583 posts · Server pouet.chapril.org
Arthur Lutz (Zenika) · @arthurzenika
367 followers · 582 posts · Server pouet.chapril.org

So it was quite fun for a first k8s CTF, although I regret not focusing more on the task at hand. On the failed routes I learned a bunch of things and tried a bunch of new tools which was cool. Thanks for the setup and the fun ๐Ÿดโ€โ˜ ๏ธ scenario !

I believe the setup was done with github.com/controlplaneio/simu which is open source so I might find the time to explore more.

github.com/madhuakula/kubernet might be another was to practice a bit more of this type of challenges.

#kubeconctf #kubeconeu #kubecon

Last updated 2 years ago

Arthur Lutz (Zenika) · @arthurzenika
367 followers · 581 posts · Server pouet.chapril.org

One of the exploration tools I had used had found a service in the DNS, so nmap got me the port, curl told me there was a /login redirect, time to try that password there. First attempt failed, and then time was up, the environment got deleted and I got disconnected (CTF was time boxed) โŒ›... shame shame. But that's the rules of the game.

#kubeconctf #kubeconeu #kubecon

Last updated 2 years ago

Arthur Lutz (Zenika) · @arthurzenika
367 followers · 580 posts · Server pouet.chapril.org

Next step was to go at "kubectl auth can-i" again with the namespaces found in the first pod. I found I could look for Secrets in the other namespace so I got them there, "base64 -d" later I had a user and a password. What service should I use them against ?

#kubeconctf #kubeconeu #kubecon

Last updated 2 years ago

Arthur Lutz (Zenika) · @arthurzenika
367 followers · 579 posts · Server pouet.chapril.org

Next step was to list the pods in that namespace, and then use "kubectl attach" to get a shell in that other pod. In that pod, less permissions since the user was not root.

#kubeconctf #kubeconeu #kubecon

Last updated 2 years ago

Arthur Lutz (Zenika) · @arthurzenika
367 followers · 578 posts · Server pouet.chapril.org

Then you're off to find a flag. Enumation, evasion, esclation, escaping, etc. I checked a bunch of things (but won't go into all the failed explorations). Being root in the pod enabled me to install a few tools, "kubectl get ns" got me the other namespaces available, then "kubectl auth can-i --list" got me some hints as to what was possible with the service account at hand.

#kubeconctf #kubeconeu #kubecon

Last updated 2 years ago

Arthur Lutz (Zenika) · @arthurzenika
367 followers · 577 posts · Server pouet.chapril.org

So you start off on the following page controlplaneio.github.io/kubec with some instructions, you need to join the CNCF Slack, then a -ctf room, then ping the CTF TaskMaster which sends you a tgz with some ssh configuration files. The setup is described in detail on controlplaneio.github.io/kubec

#kubecon23 #kubeconctf #kubeconeu #kubecon

Last updated 2 years ago