An exec into prod, then a stolen token
Filter a Kubernetes API audit log with jq. Find the exec that read a service account token, where it came from, and the secret that token was then used to fetch.
- Terminal mission
- Advanced
- 3 questions
- 0 of 3 solved
Your goal
Your goalFollow a stolen account into a production pod and out again with a secret.
The API server writes one JSON object per request to its audit log. Exec into a pod is a create on the pods/exec subresource, and the command it ran is in the requestURI as command= parameters.
A reporting account that never runs kubectl showed up in the identity provider’s risky sign-ins this morning. Here is last night’s audit log from the prod cluster.
What’s on screen
- Briefing
- the story: what happened and what evidence you were handed.
- Terminal
- the dark box. It is a pretend Linux shell that runs in your browser. Type a command and press Enter. Nothing you type touches a real system.
- Walkthrough
- the numbered path. Each step says what to type and what you should see. Hints open one at a time.
- Answer boxes
- under each question step. Type what you found and press Check.
Words to know
- API
- application programming interface, how programs talk to a service
- JSON
- JavaScript Object Notation, a text format of fields and values
- IP
- Internet Protocol address, the number that identifies a machine on a network
ops-bastion · Kubernetes review
Type help for the command list and objectives for your tasks. Everything runs in this browser.
Up and down arrows walk your history. Ctrl+L clears the screen. Try help, ls, and objectives.
Read first
More in Kubernetes review
The whole walkthrough
Every step in order: 296 words, about 2 min. It gives away every answer, so try the steps first.