Detect Container Administration Command in Sumo Logic CSE
This detection identifies adversaries abusing container administration services such as the Docker daemon, Kubernetes API server, or kubelet to execute commands within running containers. Attackers leverage tools like 'docker exec', 'kubectl exec', or direct kubelet API calls to achieve code execution in containerized environments, often for lateral movement, cryptomining deployment, or establishing persistence. This detection monitors process creation events on container host nodes for suspicious invocations of container management binaries with exec sub-commands, privileged flags, or interactive shell spawning, as well as anomalous kubelet API activity patterns associated with threat actors like TeamTNT and malware families including Kinsing, Hildegard, and Siloscape.
MITRE ATT&CK
- Tactic
- Execution
- Technique
- T1609 Container Administration Command
- Canonical reference
- https://attack.mitre.org/techniques/T1609/
Sumo Detection Query
_sourceCategory=endpoint/linux OR _sourceCategory=endpoint/kubernetes | json auto | where process_name in ("docker", "kubectl", "crictl", "ctr", "podman", "nsenter", "runc") | if(matches(command_line, "*--privileged*") or matches(command_line, "*nsenter*pid*1*"), "Critical", if(matches(command_line, "*--pid=host*") or matches(command_line, "*--cap-add=SYS_ADMIN*"), "High", "Medium")) as RiskLevel | stats count by user_name, process_name, command_line, RiskLevel | sort by count desc Sumo Logic query for T1609 detection using source category filters and aggregation. Detects container administration command execution via docker exec, kubectl exec, crictl, and direct
Data Sources
Required Tables
False Positives & Tuning
- Legitimate DevOps engineers running 'kubectl exec' or 'docker exec' for container debugging and troubleshooting during business hours
- CI/CD pipeline agents (Jenkins, GitLab Runner, GitHub Actions self-hosted) executing docker run or kubectl exec as part of automated build, test, or deployment workflows
- Container health check scripts or monitoring agents (Datadog, Dynatrace, Prometheus node exporter installers) that use crictl or docker exec to inspect running container state
Other platforms for T1609
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Docker Exec Interactive Shell in Running Container
Expected signal: Sysmon EventCode=1 or Linux process creation event showing docker process with CommandLine containing 'exec -it atomic-test-container /bin/sh'. DeviceProcessEvents will show FileName=docker, ProcessCommandLine containing 'exec' and '/bin/sh'.
- Test 2Kubectl Exec Command Execution in Pod
Expected signal: DeviceProcessEvents showing FileName=kubectl, ProcessCommandLine containing 'exec atomic-exec-test -- /bin/sh'. Kubernetes API server audit log entry with verb=create, objectRef.subresource=exec, objectRef.name=atomic-exec-test. Linux audit log execve records for kubectl.
- Test 3Direct Kubelet API Exec Bypassing API Server
Expected signal: DeviceProcessEvents showing FileName=curl, ProcessCommandLine containing ':10250' and '/exec/' or '/pods'. Linux process creation audit records for curl with kubelet API endpoint arguments. Network connection to port 10250 in DeviceNetworkEvents.
References (8)
- https://attack.mitre.org/techniques/T1609/
- https://unit42.paloaltonetworks.com/hildegard-malware-teamtnt/
- https://aquasecurity.github.io/kube-hunter/
- https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#exec
- https://docs.docker.com/engine/reference/commandline/exec/
- https://kubernetes.io/docs/reference/access-authn-authz/kubelet-authn-authz/
- https://microsoft.com/security/blog/2023/07/25/threat-matrix-for-kubernetes/
- https://www.aquasec.com/blog/kinsing-malware-container-vulnerability/
Unlock Pro Content
Get the full detection package for T1609 including response playbook, investigation guide, and atomic red team tests.