GCP Kubernetes Rolebindings Created or Patchededit

Identifies the creation or patching of potentially malicious role bindings. Users can use role bindings and cluster role bindings to assign roles to Kubernetes subjects (users, groups, or service accounts).

Rule type: query

Rule indices:

  • filebeat-*
  • logs-gcp*

Severity: medium

Risk score: 47

Runs every: 5 minutes

Searches indices from: now-20m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

References:

Tags:

  • Elastic
  • Cloud
  • GCP
  • Continuous Monitoring
  • SecOps
  • Configuration Audit

Version: 4 (version history)

Added (Elastic Stack release): 7.16.0

Last modified (Elastic Stack release): 8.4.0

Rule authors: Elastic, Austin Songer

Rule license: Elastic License v2

Investigation guideedit


Rule queryedit

event.dataset:(googlecloud.audit or gcp.audit) and
event.action:(io.k8s.authorization.rbac.v*.clusterrolebindings.create
or io.k8s.authorization.rbac.v*.rolebindings.create or
io.k8s.authorization.rbac.v*.clusterrolebindings.patch or
io.k8s.authorization.rbac.v*.rolebindings.patch) and
event.outcome:success and not
gcp.audit.authentication_info.principal_email:"system:addon-manager"

Threat mappingedit

Framework: MITRE ATT&CKTM

Rule version historyedit

Version 4 (8.4.0 release)
  • Updated query, changed from:

    event.dataset:(googlecloud.audit or gcp.audit) and
    event.action:(io.k8s.authorization.rbac.v*.clusterrolebindings.create
    or io.k8s.authorization.rbac.v*.rolebindings.create or
    io.k8s.authorization.rbac.v*.clusterrolebindings.patch or
    io.k8s.authorization.rbac.v*.rolebindings.patch) and
    event.outcome:success and not
    gcp.audit.authentication_info.principal_email:"system:addon-manager"
Version 2 (8.1.0 release)
  • Updated query, changed from:

    event.dataset:(googlecloud.audit or gcp.audit) and
    event.action:(io.k8s.authorization.rbac.v*.clusterrolebindings.create
    or io.k8s.authorization.rbac.v*.rolebindings.create or
    io.k8s.authorization.rbac.v*.clusterrolebindings.patch or
    io.k8s.authorization.rbac.v*.rolebindings.patch) and
    event.outcome:success