Unsecured Credentials: Container API
- ID
- T1552.007
- Tactics
- TA0006 Credential Access
- Sub-technique of
- T1552 Unsecured Credentials
- Platforms
- Containers
- Data sources
- Command Execution, User Account Authentication, Process Creation, Application Log Content
- Source
- attack.mitre.org
- MITRE last modified
- 25 Oct 2025
Adversaries may gather credentials via APIs within a containers environment. APIs in these environments, such as the Docker API and Kubernetes APIs, allow a user to remotely manage their container resources and cluster components.[8][9]
An adversary may access the Docker API to collect logs that contain credentials to cloud, container, and various other resources in the environment.[10] An adversary with sufficient permissions, such as via a pod's service account, may also use the Kubernetes API to retrieve credentials from the Kubernetes API server. These credentials may include those needed for Docker API authentication or secrets from Kubernetes cluster components.
Detection
- DET0198 Detect Abuse of Container APIs for Credential Access
Data components: Command Execution, User Account Authentication, Process Creation, Application Log Content
Mitigations (4)
- M1018 User Account Management
Enforce authentication and role-based access control on the container API to restrict users to the least privileges required.[1] When using Kubernetes, avoid giving users wildcard permissions or adding users to the
system:mastersgroup, and useRoleBindingsrather thanClusterRoleBindingsto limit user privileges to specific namespaces.[2]- M1026 Privileged Account Management
Use the principle of least privilege for privileged accounts such as the service account in Kubernetes. For example, if a pod is not required to access the Kubernetes API, consider disabling the service account altogether.[3]
- M1030 Network Segmentation
Deny direct remote access to internal systems through the use of network proxies, gateways, and firewalls.
- M1035 Limit Access to Resource Over Network
Limit communications with the container service to managed and secured channels, such as local Unix sockets or remote access via SSH. Require secure port access to communicate with the APIs over TLS by disabling unauthenticated access to the Docker API and Kubernetes API Server.[4][5] In Kubernetes clusters deployed in cloud environments, use native cloud platform features to restrict the IP ranges that are permitted to access to API server.[6] Where possible, consider enabling just-in-time (JIT) access to the Kubernetes API to place additional restrictions on access.[7]
Software (3)
References
- Kubernetes Hardening Guide
- Kubernetes RBAC
- Kubernetes Service Accounts
- Docker Daemon Socket Protect
- Kubernetes API Control Access
- Kubernetes Cloud Native Security
- Microsoft AKS Azure AD 2023
- Docker API
- Kubernetes API
- Unit 42 Unsecured Docker Daemons
