| name | T1552.007_container-api |
| description | Adversaries may gather credentials via APIs within a containers environment. |
| category | authentication |
| version | 18.1 |
| author | cyberstrike-official |
| tags | ["mitre-attack","enterprise","t1552.007","credential-access","containers","sub-technique"] |
| technique_id | T1552.007 |
| tactic | credential-access |
| all_tactics | ["credential-access"] |
| platforms | ["Containers"] |
| mitre_url | https://attack.mitre.org/techniques/T1552/007 |
| tech_stack | ["containers"] |
| cwe_ids | ["CWE-522"] |
| chains_with | ["T1552","T1552.001","T1552.002","T1552.003","T1552.004","T1552.005","T1552.006","T1552.008"] |
| prerequisites | ["T1552"] |
| severity_boost | {"T1552":"Chain with T1552 for deeper attack path","T1552.001":"Chain with T1552.001 for deeper attack path","T1552.002":"Chain with T1552.002 for deeper attack path"} |
T1552.007 Container API
Sub-technique of: T1552
High-Level Description
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.
An adversary may access the Docker API to collect logs that contain credentials to cloud, container, and various other resources in the environment. 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.
Kill Chain Phase
- Credential Access (TA0006)
Platforms: Containers
What to Check
How to Test
Atomic Red Team Tests
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Atomic Test 1: List All Secrets
A Kubernetes secret is an object that lets users store and manage sensitive information, such as passwords and connection strings in the cluster. Secrets can be consumed by reference in the pod configuration. Attackers who have permissions to retrieve the secrets from the API server (by using the pod service account, for example) can access sensitive information that might include credentials to various services or provide further access to the cluster.
More information about secrets.
This test will make a request to the Kubernetes api at the /api/v1/secrets endpoint requesting every secret stored within the cluster.
Supported Platforms: containers
kubectl get secrets --all-namespaces
Dependencies:
- kubectl must be installed
Atomic Test 2: ListSecrets