T1098.006 IBM QRadar · QRadar

Detect Additional Container Cluster Roles in IBM QRadar

An adversary may add additional roles or permissions to an adversary-controlled user or service account to maintain persistent access to a container orchestration system. For example, an adversary with sufficient permissions may create a RoleBinding or ClusterRoleBinding to bind a Role or ClusterRole to a Kubernetes account. Where ABAC is in use, an adversary may modify a Kubernetes ABAC policy to give the target account additional permissions. This technique may also be used in conjunction with cloud-based RBAC assignments in managed Kubernetes services such as GKE, EKS, and AKS.

MITRE ATT&CK

Tactic
Persistence Privilege Escalation
Technique
T1098 Account Manipulation
Sub-technique
T1098.006 Additional Container Cluster Roles
Canonical reference
https://attack.mitre.org/techniques/T1098/006/

QRadar Detection Query

IBM QRadar (QRadar)
sql
SELECT
  DATEFORMAT(starttime, 'yyyy-MM-dd HH:mm:ss') AS EventTime,
  LOGSOURCENAME(logsourceid) AS LogSource,
  username,
  sourceip,
  "KubeVerb",
  "KubeResource",
  "KubeResourceName",
  "KubeNamespace",
  LONG("KubeResponseCode") AS ResponseCode,
  CASE
    WHEN "KubeRequestObject" ILIKE '%cluster-admin%'
      OR "KubeRequestObject" ILIKE '%system:masters%'
      OR "KubeRequestObject" ILIKE '%system:node-admin%'
    THEN 'true' ELSE 'false'
  END AS IsSensitiveRole,
  CASE
    WHEN username ILIKE 'system:serviceaccount:%' THEN 'true' ELSE 'false'
  END AS IsServiceAccount,
  CASE
    WHEN LOWER("KubeResource") IN ('clusterrolebindings', 'clusterroles') THEN 'true' ELSE 'false'
  END AS IsClusterScoped,
  UTF8(payload) AS RawPayload
FROM events
WHERE LOGSOURCETYPENAME(devicetype) ILIKE '%Kubernetes%'
  AND LOWER("KubeVerb") IN ('create', 'update', 'patch')
  AND LOWER("KubeResource") IN ('clusterrolebindings', 'rolebindings', 'clusterroles', 'roles')
  AND LONG("KubeResponseCode") BETWEEN 200 AND 299
  AND NOT (
    username ILIKE 'system:%'
    AND username NOT ILIKE 'system:serviceaccount:%'
  )
ORDER BY starttime DESC
LAST 24 HOURS
high severity medium confidence

Detects Kubernetes RBAC role and binding mutations using custom-extracted properties from Kubernetes audit log sources in QRadar. Requires QRadar DSM or Log Source Extension (LSX) configuration to extract KubeVerb, KubeResource, KubeResourceName, KubeNamespace, KubeResponseCode, and KubeRequestObject as custom properties via regex parsing of the kube-apiserver audit log JSON payload. Excludes pure kube-system components while flagging service account escalations and sensitive role references.

Data Sources

QRadar Kubernetes DSM (kube-apiserver audit log via syslog or file)QRadar Log Source Extension parsing kube-audit JSONAKS diagnostic logs forwarded via Event Hub to QRadarEKS CloudWatch Logs forwarded to QRadar via S3 or API

Required Tables

events

False Positives & Tuning

  • Legitimate cluster-admin users configuring RBAC during initial cluster setup, namespace provisioning, or compliance-driven access reviews
  • Automated deployment pipelines (Jenkins, Tekton, GitHub Actions) that use a service account with elevated permissions to install Helm charts containing RBAC resources
  • Managed Kubernetes add-ons (AWS Load Balancer Controller, GKE Config Connector, Azure Policy) that create and update their own cluster roles during installation and upgrades
Download portable Sigma rule (.yml)

Other platforms for T1098.006


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Create Privileged ClusterRoleBinding for Service Account

    Expected signal: Kubernetes API server audit log: verb=create, objectRef.resource=clusterrolebindings, objectRef.name=attacker-cluster-admin-binding, responseStatus.code=201. Second audit event for serviceaccounts create. The requestObject will contain roleRef.name=cluster-admin and subjects referencing the service account.

  2. Test 2Create Namespace-Scoped RoleBinding for External User

    Expected signal: Kubernetes API server audit log: verb=create, objectRef.resource=rolebindings, objectRef.namespace=attacker-test-ns, objectRef.name=attacker-ns-admin-binding, responseStatus.code=201. The requestObject includes roleRef.name=admin and subjects with kind=User and [email protected].

  3. Test 3Modify Existing ClusterRole to Add Wildcard Permissions

    Expected signal: Kubernetes API server audit log: verb=patch, objectRef.resource=clusterroles, objectRef.name=attacker-test-role, responseStatus.code=200. The requestObject contains JSON patch operations adding wildcard rules. This differs from 'create' operations and may be missed by detections that only look for verb=create.

  4. Test 4Create ABAC Policy Entry via ConfigMap Modification

    Expected signal: Kubernetes API server audit log: verb=create, objectRef.resource=configmaps, objectRef.name=attacker-abac-policy. If this were a real kube-system ABAC policy modification: verb=update/patch, objectRef.resource=configmaps, objectRef.namespace=kube-system. The ConfigMap data contains ABAC policy JSON granting wildcard permissions.

Unlock Pro Content

Get the full detection package for T1098.006 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections