Access Secrets From Api Server (kubernetes)
Platform | Author | Last Update |
---|---|---|
kubernetes | Leo Tsaousis | 2024-12-02 |
Enumerate cluster secrets by querying the API server
This test case only simulates a standard “list” verb, although the same result can also be achieved with a “watch” operation. The associated detection shall therefore not be considered complete, but only a 1-to-1 match of this particular test case.
MITRE IDs
Scope
This test case does not need Cluster-wide permissions
Required Permissions
- apiGroups: - '' namespaced: true resources: - secrets verbs: - list
Required Parameters
None
Attacker Action
kubectl get secrets -o json
Detection Case
ELK query
When logs are ingested into ELK, the following query can be used to identify relevant events.
verb:list AND resource:secrets
Sigma Definition
---title: Access Secrets from API Serverid: eeb3e9e1-b685-44e4-9232-6bb701f925b5status: experimentalauthor: Leo Tsaousisdate: 2024-12-02description: | Enumerate cluster secrets by querying the API server
This test case only simulates a standard "list" verb, although the same result can also be achieved with a "watch" operation. The associated detection shall therefore not be considered complete, but only a 1-to-1 match of this particular test case.logsource: product: kubernetes service: auditdetection: selection: verb: ['list']
resource: secrets
condition: selectionlevel: lowtags:- attack.T1552.007references:- https://microsoft.github.io/Threat-Matrix-for-Kubernetes/techniques/List%20K8S%20secrets/