LoFP LoFP / google cloud kubernetes admission controller may be done by a system administrator.

Techniques

Sample rules

Google Cloud Kubernetes Admission Controller

Description

Identifies when an admission controller is executed in GCP Kubernetes. A Kubernetes Admission controller intercepts, and possibly modifies, requests to the Kubernetes API server. The behavior of this admission controller is determined by an admission webhook (MutatingAdmissionWebhook or ValidatingAdmissionWebhook) that the user deploys in the cluster. An adversary can use such webhooks as the MutatingAdmissionWebhook for obtaining persistence in the cluster. For example, attackers can intercept and modify the pod creation operations in the cluster and add their malicious container to every created pod. An adversary can use the webhook ValidatingAdmissionWebhook, which could be used to obtain access credentials. An adversary could use the webhook to intercept the requests to the API server, record secrets, and other sensitive information.

Detection logic

condition: selection
selection:
  gcp.audit.method_name|contains:
  - .mutatingwebhookconfigurations.
  - .validatingwebhookconfigurations.
  gcp.audit.method_name|endswith:
  - create
  - patch
  - replace
  gcp.audit.method_name|startswith: admissionregistration.k8s.io.v