Giter Site home page Giter Site logo

minik8s-ctf's Introduction

Minik8s CTF

This mini CTF is just a selection of what have I seen during some Kubernetes CTFs I participated in. These flags are designed to highlight the use of the kdigger tool and are beginner-friendly. For now, it's only composed of 3 challenges.

This challenge could potentially run on any Kubernetes infrastructure but is currently designed especially for the minikube virtual machine environment. You might spoil yourself by running it on a different setup than recommended, because you will need to look at the YAML and scripts files. You don't need any extra cloud account to run the challenge, it runs on Linux x86 or macOS x86 hosts directly by creating a virtual machine for isolation. If you don't trust the installation and you don't want to read all the challenges content, rent a dedicated server to run the VM, a VM with nested virtualization enabled, or wait for a cloud version.

WARNING 1: Do not start the challenge running Kubernetes in Docker (with kind for example), it's running in privileged containers a.k.a. root processes on the host and it does not provide a level of isolation between your machine and the containers that will run as privileged on the Kubernetes cluster. Nothing dramatic will happen but some CTF files will be written on your host machine and it's not a safe way to experiment.

WARNING 2: Do not browse the YAML files since they contain the CTF deployments, thus the structure behind each flag and even the flag themselves.

Installation

Some basics requirements:

  • Linux x86 or macOS x86
  • 2 CPUs or more
  • 2GB of free memory
  • 10GB of free disk space
  • Internet connection

And more importantly, a virtual machine driver installed like Virtualbox or KVM, the latter only for Linux of course. Please follow the links for the installation instruction for your distribution if you don't already installed one.

Then you can just use the setup script that will propose to install minikube if not already present, setup the cluster and provision the challenges. You can read the whole bash script without spoiling some challenge information.

$ ./setup.sh

To go further, you can also deploy a specific challenge that I used at Quarks In The Shell, Quarkslab's annual conference, by selecting via this environment variable.

$ CHALLENGE=qits ./setup.sh

Usage

To start the challenges, just use the start.sh script with the step number you want to try, you can also read the script without getting too much information. You will then be given context information (or not?) for the challenge.

$ ./start.sh <step number>

For example, if you finished step 1 and want to do step 2, just type $ ./start.sh 2.

You have to find flags with the structure quarksflag{...}, with ... being some random text.

Solutions

You can find the solutions right here.

Uninstall

To remove everything, you can use, the --purge flag will delete the .minikube folder from your user directory with caches and other stuff:

minikube delete --purge=true

You can then remove minikube if you prefer!

License

Apache License 2.0

minik8s-ctf's People

Contributors

mtardy avatar

Stargazers

 avatar Julien Stroheker avatar Victor Azzam avatar Sam Mingo avatar Joshua Sorenson avatar  avatar Boschko avatar KW avatar Wong Wai Tuck avatar  avatar crusher avatar Mayank Sharma avatar Mate Streitmann avatar  avatar  avatar manuel.cruanes avatar ∵ avatar Grégoire D avatar Sunny avatar Alireza avatar Ne0 avatar h4ckm310n avatar  avatar Timothée Ravier avatar Aleksandr Menshchikov avatar  avatar Egor Achkasov avatar  avatar  avatar Eviatar Gerzi avatar StaticBunny avatar Sylvain Peyrefitte avatar panda bear avatar  avatar afrizaloky avatar Dmitry Shvedov avatar pingchangxin avatar Christophe Tafani-Dereeper avatar  avatar Security Trails avatar  avatar daniel avatar Hugh Campbell avatar Ryan avatar  avatar  avatar Shawn Charles avatar Ben Jemaa avatar Damian Tykałowski avatar Gaetano  avatar Aslak Ransby avatar  avatar Isaac Peña avatar rhnux avatar Cayu avatar d0gkiller87 avatar  avatar Ståle Pettersen avatar Christofer Simbar avatar  avatar cocoonk1d avatar Vincent R0m3 avatar Steeve Barbeau avatar Steven Huey avatar Jonathan Strong avatar Nicolas RUFF avatar MaverickRocky02 avatar Ryota Sakai avatar xiaohuajiao avatar Maulvi Alfansuri avatar Ryan Baxendale avatar  avatar Sveinbjörn Guðjohnsen avatar  avatar

Watchers

James Cloos avatar Robin David avatar  avatar  avatar  avatar Guillaume Valadon avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.