Page cover

Insekube (Kubernetes)

Task 1 - Introduction

01. What ports are open? (comma separated)

╭─hnl@hnl ~/Desktop/ctf/tryhackme/insekube  
╰─➤  nmap 10.10.122.48
Starting Nmap 7.80 ( https://nmap.org ) at 2022-04-04 00:56 +0630
Nmap scan report for 10.10.122.48
Host is up (0.23s latency).
Not shown: 998 closed ports
PORT   STATE SERVICE
22/tcp open  ssh
80/tcp open  http

Task 2 - RCE

01. What is flag 1?

First, we need to test command injection.

And then try to get RCE.

The third stage is to read the flag. Hint said "You will find the flag in an environment variable".

Task 3 - Interacting with kubernetes

When we list pods in namespace, we got only permission error. So, we can check our permission. We can only list kubernetes secrets.

Task 4 - Kubernetes Secrets

01. What is flag 2?

We can view kubernetes secrets using this command.

We can list all of the data contained in the secret. But it only show overviews.

So, we will output with json format.

Decode the base64.

Task 5 - Recon in the cluster

We can see GRAFANA is running on the cluster.

01. What is the version of Grafana running on the machine?

Read the page source using curl command and copy it. Paste back our text editor and find version keyword.

02. What is the CVE you've found?

Task 6 - Escape to the node

  1. What is root.txt?

Write a yml file referencing this source https://github.com/BishopFox/badPods/blob/main/manifests/everything-allowed/pod/everything-allowed-exec-pod.yaml

Run this yml file.

Check if it is running or not.

Login to the container.

Find the root flag.

Last updated