$ cat writeup.md…
$ cat writeup.md…
Hack.lu 2026
Task: players receive a kubeconfig for a locked-down namespace and must reach an in-cluster web app that the NetworkPolicy hides. Solution: use kubectl as an HTTP client against the service ClusterIP, then exploit a mass-assignment flaw in PUT /profile that trusts a user-supplied is_admin field.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
Kubernetes is the new Curl!
Players are given a per-instance URL of the form
http://download.kurl.flu.xxx:1337/kubeconfig/<instance>?token=<token> which
returns a kubeconfig (HTTP 503 Cluster is still starting until the namespace
is ready). The kubeconfig authenticates as a namespace-scoped ServiceAccount and
the goal is to reach a web app that is only reachable from inside the cluster.
English summary: this is a Kubernetes RBAC/pivot challenge. There is no shell in
the namespace — the only tool available is kubectl inside a read-only pod, and
a default-deny NetworkPolicy blocks everything except a single service. The
solution is to abuse kubectl itself as a generic HTTP client and then exploit
an authorization flaw in the internal web application.
The download endpoint first returns 503 Cluster is still starting, then a
kubeconfig once the instance is provisioned. The config authenticates as
system:serviceaccount:ctf:ctf-player.
Effective permissions:
pods/exec create restricted to the resource name player-shellpods, services, networkpolicies.networking.k8s.io → get, list, watch/api, /apis, /healthz, /version, openidselfsubject*reviews createRecon:
kubectl auth can-i --list kubectl get pods -n ctf kubectl get svc -n ctf kubectl get networkpolicies -n ctf -o yaml kubectl get pod -n ctf flag-server-<hash> -o yaml
Findings:
...
$ grep --similar