01 / ACCESS
Administrator access comes first
The original scenario escapes a container on a control node to obtain root and an administrator kubeconfig. k0otkit takes over in the post-exploitation stage, using those existing API privileges.
KUBERNETES POST-EXPLOITATION
k0otkit is technical research I carried out in industry. Starting with Kubernetes administrator access, it uses native resources to turn a single foothold into persistent control across cluster nodes.
CIS 2020 · Kubernetes + rootkit · Original mechanism diagrams
Administrator access first
Node coverage and Pod replicas
Shanghai · Technical research talk
A large cluster contains many nodes. Accessing each one and maintaining individual connections repeats the same work. k0otkit explores how native mechanisms amplify existing control-plane privileges.
01 / ACCESS
The original scenario escapes a container on a control node to obtain root and an administrator kubeconfig. k0otkit takes over in the post-exploitation stage, using those existing API privileges.
02 / COVERAGE
A DaemonSet describes node workloads through a template. Its controller maintains Pods on eligible nodes and reconciles that desired state when nodes join or Pods are deleted.
03 / OBSERVATION
The initial design creates a separate DaemonSet. Later stages modify the kube-proxy Pod template, separate the payload, reuse an image, and execute from memory. The observable changes shift with each stage.
Prerequisites and mechanisms: the README, CIS 2020 slides pp. 11–14, and the write-up’s basic design. Node coverage depends on the existing DaemonSet’s scheduling conditions. README ↗
Play or select the stages to trace the final design from API objects to node processes. Then add a node, delete a Pod, or restore the original template.
Admin access
Admin access
Admin access
After the flow, change nodes and desired state
This browser model illustrates the final design; node counts are illustrative. Actual updates depend on the DaemonSet update strategy, admission rules and node conditions. A deleted Pod is recreated from the current template. If only a container process exits, kubelet typically restarts that container according to its restart policy. k0otkit_template.sh ↗
From a separate DaemonSet to an existing Pod template, and from a payload image to memory execution. Switch versions to compare objects, payload location, images and execution.
v1.0 / TECHNICAL EVOLUTION
FOUR IMPLEMENTATION SURFACES
Existing kube-proxy template change + Secret
Secret → environment variable → memory file
Existing kube-proxy image, with Perl
Execution from a memfd_create memory file
v0.1–v1.0 are design-stage labels from CIS 2020 slides, corresponding to the baseline and seven iterations in the write-up. They do not represent eight repository releases. This comparison describes mechanisms and signals, without performance or success-rate claims.
The 2020 implementation connects several existing features. Its prerequisites and traces explain where the talk’s detection and defense ideas apply.
API / OBJECTS & ACCESS
The final design still creates a Secret and changes the containers and volumes in a system DaemonSet. An almost unchanged object inventory does not replace checking template differences and administrator privileges.
Template and Secret source ↗HOST / IMAGE & ISOLATION
The script depends on a kube-proxy DaemonSet, sh, echo and Perl in its image, and Linux payload and system-call conventions. Acceptance of privileged containers and host mounts also affects operation.
README prerequisites ↗RUNTIME / PROCESS & NETWORK
Executing from memory reduces target-side payload-file traces. Processes, memory files and outbound communication remain observable. The talk discusses object audits and detection of abnormal processes, system calls and network activity.
Memory execution source ↗“Fileless” refers to target-side YAML and payload executables. The Secret and DaemonSet remain persistent API objects, and the preparation script generates files on the operator side. This exhibit explains the historical design and its environment assumptions.
k0otkit: A Universal Manipulation Technique in Post-Penetration against Kubernetes. An industry talk at CIS 2020, followed by a technical write-up in January 2021. The project connects native Kubernetes features for post-exploitation control and discusses corresponding detection ideas.
Source checked on 2026-10-10 at commit 1101f06162ebbcd382bcde9a5a364ed45476d4de. The interaction follows the final local-template design. The repository also contains a remote API variant added in 2021. The evolution comes from historical slides and the write-up; node counts and animation illustrate mechanisms.