Skip to main content
T1609Executionmedium difficulty

Container Administration Command

Container Administration Command (T1609) covers attackers using kubectl exec, docker exec, or a direct call to the kubelet, Docker daemon, or Kubernetes API server to run commands inside an already-running container. Kubernetes audit logs record every exec request as a distinct event, so the technique leaves a server-side trail even when the attacker never touches the node's own process list.

Practice detecting Container Administration Command on realistic SIEM alerts in SOCSimulator Operations.

SIEM

What is Container Administration Command?

Container Administration Command is documented as technique T1609 in MITRE ATT&CK® v19.1 under the Execution tactic. Detection requires visibility into SIEM telemetry.

Kubernetes exposes container execution through two connected paths. The first is the API server: kubectl exec -it <pod> -- /bin/sh sends a create request against the pod's exec subresource, the API server authorizes it against RBAC, then forwards the request to the kubelet on the node hosting that pod. The kubelet opens a streaming connection into the container runtime and attaches a shell, all without ever creating a new pod or pulling a new image. Docker outside Kubernetes works the same way at a smaller scale: docker exec -it <container> bash calls the daemon's /containers/{id}/exec/create and /exec/start endpoints, which the daemon services directly against the running container's namespace.

Because the container is already running, exec does not touch the deployment pipeline at all: no new pod spec, no image pull, no admission-controller review, none of the checks a cluster might apply at deploy time. Anyone holding a valid kubeconfig with create permission on pods/exec, or direct network access to an exposed kubelet API on port 10250, can run arbitrary commands inside that workload. The same is true of an operator with access to a container orchestration UI or an unauthenticated Docker socket, which is why attackers who compromise a build agent or a developer's laptop often go straight for exec rather than trying to redeploy anything.

Attackers use the technique two ways. Some, like Kinsing, bake the malicious command into the container's own entrypoint so it fires the moment the container starts, no live exec needed. Others reach into containers that are already running: Hildegard drove commands through the kubelet API's run endpoint, and Siloscape relayed kubectl commands through an IRC channel to reach Windows containers it had already compromised. Both routes land in the same place, a shell or a one-off command running inside a container the attacker does not own.

Where Container Administration Command fits in an attack

Exec into a container rarely opens the intrusion. The attacker needs a path in first, most often a misconfigured or internet-exposed Kubernetes API server, a leaked kubeconfig or service-account token, an SSRF against the cloud metadata service that yields cluster credentials, or a vulnerability in an internet-facing workload that hands over a shell inside one pod already. Container Administration Command is how that initial foothold gets turned into arbitrary command execution across the workloads the attacker's stolen identity can reach.

From there it typically feeds discovery and lateral movement: listing other pods and namespaces (T1613), reading mounted service-account tokens and secrets to pivot to new identities, or attempting to break out of the container entirely (T1611 Escape to Host) to reach the underlying node. TeamTNT's Hildegard campaign followed close to this shape, using kubelet-API and container-command execution for cryptomining deployment across a cluster once it had a way in. Siloscape went further, using its exec access specifically to reach Windows containers as a stepping stone toward the host and the wider Azure environment. The pattern to watch for is exec activity that clusters around discovery commands (whoami, cat /var/run/secrets/...) rather than the application-specific debugging a real engineer would run.

Detection Strategies

The following detection strategies help SOC analysts identify Container Administration Command activity. These methods apply across SIEM environments and can be implemented as detection rules, correlation queries, or behavioral analytics in your security platform.

SIEM detection

Sigma
detection:
  selection:
    verb: 'create'
    objectRef.resource: 'pods'
    objectRef.subresource: 'exec'
  condition: selection

SigmaHQ's Kubernetes audit-log rule for pod exec, tagged attack.t1609 directly. It fires on any create request against pods/exec regardless of client (kubectl, a dashboard, or a raw API call), the same signature Hildegard and TeamTNT abused through the kubelet API.

EQL
any where data_stream.dataset == "kubernetes.audit_logs" and
  kubernetes.audit.verb in ("get", "create") and
  kubernetes.audit.objectRef.subresource == "exec" and
  kubernetes.audit.stage in ("ResponseComplete", "ResponseStarted") and
  kubernetes.audit.level == "Request" and
  kubernetes.audit.annotations.authorization_k8s_io/decision == "allow"

Elastic's 'Kubernetes User Exec into Pod' rule, which only fires on allowed requests so denied attempts never trip it, and expects the analyst to exclude known DevOps namespaces and CI service accounts instead of treating every hit as malicious.

Simulated example generated by SOCSimulator Research
{
  "kind": "Event",
  "apiVersion": "audit.k8s.io/v1",
  "stage": "ResponseComplete",
  "requestURI": "/api/v1/namespaces/payments-prod/pods/payments-api-7d9f6b8/exec?command=%2Fbin%2Fsh&stdin=true&stdout=true&tty=true",
  "verb": "create",
  "user": {
    "username": "system:serviceaccount:payments-prod:ci-deploy-bot",
    "groups": ["system:serviceaccounts", "system:authenticated"]
  },
  "sourceIPs": ["10.44.2.19"],
  "objectRef": {
    "resource": "pods",
    "namespace": "payments-prod",
    "name": "payments-api-7d9f6b8",
    "subresource": "exec"
  },
  "responseStatus": { "code": 101 },
  "annotations": { "authorization.k8s.io/decision": "allow", "authorization.k8s.io/reason": "" },
  "requestReceivedTimestamp": "2026-07-16T03:14:22.501112Z",
  "stageTimestamp": "2026-07-16T03:14:22.611980Z"
}

Tuning and false positives

Legitimate exec traffic is constant in any active cluster. Developers debug failing pods with kubectl exec -it, CI/CD pipelines exec into containers to run migrations or health checks, and platform tooling such as Trident's storage controller or monitoring agents legitimately opens exec sessions as part of normal operation. A rule that fires on every pods/exec create request, with no other context, generates far more noise than signal in a busy engineering org.

The fix is identity- and namespace-aware tuning, not turning the detection off. Build an allow-list of the service accounts, CI runners, and platform-team human identities that legitimately exec, scoped to the namespaces they actually own, and reserve alerting for exec from anything outside that set, especially production or kube-system namespaces where routine debugging should be rare. Correlate with time of day and deployment schedule: an exec from a deploy bot at 3 AM during a scheduled release is expected, the same account exec'ing at 3 AM with no release in flight is not.

Example Alerts

These realistic alert examples show what Container Administration Command looks like in your security tools. Use them to tune detection rules and train analysts to recognize true positives versus false positives in live environments.

HighSIEM

kubectl exec Into Production Payments Pod

Kubernetes audit log recorded a create request against pods/exec for pod payments-api-7d9f6b8 in namespace payments-prod, initiated by service account ci-deploy-bot from source IP 10.44.2.19 outside its normal deploy window, with the API server returning decision allow. The service account has no documented reason to open an interactive shell.

MediumSIEM

Docker Daemon Exec API Call on Build Host

Docker daemon log on build-host-03.corp.local shows a POST to /v1.44/containers/a3f9c21e0b7d5a91/exec/start from remote client 172.16.5.44, five minutes after the container's entry-point script had already run to completion. No CI job was scheduled on that host at the time.

CriticalSIEM

kubectl exec Into kube-system Followed by Reverse Shell

An exec request against pod coredns-7b8f9 in namespace kube-system succeeded for user attacker@external-idp.example, and endpoint telemetry from the node shows /bin/sh -c spawning a reverse shell inside the container two seconds later. The identity had never accessed kube-system before this event.

Responding to Container Administration Command

When the alert fires, first establish who did it and why: pull the requesting identity from the audit event's user field, check whether it is a human account or a service account, and confirm whether that identity has a documented reason to touch the target namespace and pod. Read the exec command from the requestURI query string if present, since a debugging session (cat, ls, tail) looks very different from a reverse shell or a package-manager invocation reaching out for tools.

If the identity or command is not accounted for, treat it as active compromise rather than a maintenance false positive. Revoke or rotate the credential (kubeconfig, service-account token, or IAM role) that authorized the exec, apply a network policy to cut the pod off from the rest of the cluster, and capture the container's filesystem and process list before it gets rescheduled or restarted, since a fresh container replacement destroys the evidence. Escalate immediately if the exec touched kube-system, a node with elevated permissions, or any pod holding secrets for other services, because from there the attacker is one T1611 escape or one stolen token away from the whole cluster.

Frequently Asked Questions

How do SOC analysts detect Container Administration Command?
Detection centers on SIEM telemetry for the execution phase of the attack. Enable and forward Kubernetes audit logging (--audit-log-path or an audit webhook) to your SIEM; without it, kubectl exec and API-driven container commands leave no server-side record at all, only whatever the container itself logs. Alert on audit events where verb is create, objectRef.resource is pods, and objectRef.subresource is exec: that exact combination is what kubectl exec generates against the API server, whether the operator uses the CLI, a dashboard, or a raw curl call.
What does a Container Administration Command alert look like?
A representative SIEM detection is "kubectl exec Into Production Payments Pod" (high severity): Kubernetes audit log recorded a create request against pods/exec for pod payments-api-7d9f6b8 in namespace payments-prod, initiated by service account ci-deploy-bot from source IP 10.44.2.19 outside its normal deploy window, with the API server returning decision allow. The service account has no documented reason to open an interactive shell.
Which tools detect Container Administration Command, and how can I practice?
Container Administration Command (T1609) is best surfaced with SIEM telemetry, which exposes the execution signals described above. Practice detecting it on those exact consoles in SOCSimulator Operations, free.
Glossary

What is IOC? SOC Glossary

An Indicator of Compromise (IOC) is an observable artifact, such as a file hash, IP address, domain name, URL, registry …

Read more
Glossary

What is EDR? SOC Glossary

Endpoint Detection and Response (EDR) is a security technology that continuously monitors endpoint activity, recording p…

Read more
Glossary

What is Alert Triage? SOC Glossary

Alert triage is the structured process of reviewing, prioritizing, and investigating security alerts to determine their …

Read more
Glossary

What is TTPs? SOC Glossary

Tactics, Techniques, and Procedures (TTPs) describe the behavioral patterns, methods, and operational processes threat a…

Read more
Career Path

SOC Analyst (Tier 2) Career Guide: Salary & Skills

Tier 2 SOC Analysts handle the investigations that Tier 1 escalates. You dig into multi-stage attacks, coordinate contai…

Read more
Career Path

Incident Responder Career Guide: Salary & Skills

Incident Responders lead the technical response when confirmed breaches happen. You coordinate containment, run forensic…

Read more
Tool

SIEM Training Console: SOCSimulator

The SIEM console in SOCSimulator replicates the workflow of enterprise platforms like Splunk Enterprise Security, Micros…

Read more
Comparison

SOCSimulator Vs. Letsdefend: Platform Comparison

SOCSimulator wins on operational realism. You get multi-tool shift simulation with SLA pressure, noise injection, and al…

Read more
Glossary

SOC Glossary: Security Operations Terminology

Complete glossary of Security Operations Center terminology for aspiring SOC analysts.

Read more
Feature

Shift Mode: Real-Time SOC Simulation

Practice alert triage under realistic time pressure with SLA timers and noise injection.

Read more
Feature

Operations: Guided Training Operations

Structured CTF-style investigation operations covering real-world attack scenarios.

Read more
Blog

SOCSimulator Blog: Security Training Insights

Articles on SOC analyst skills, detection engineering, and career development.

Read more