Secrets

OperationDescriptionSampleRule
get-secretsSecret accessed (credential theft; service account tokens, TLS certs, API keys).YY
list-secretsSecrets enumerated across a namespace or cluster.YY
watch-secretsOpens a long-lived watch on Secret changes across a namespace. Elastic's new-terms rule flags a first-seen client streaming secrets instead of polling.YY
create-secretsCreates a new Secret. Sigma covers create alongside update/patch/delete; attackers stage a token or key this way, smuggled in as ordinary config.YY
update-secretsReplaces a Secret's data wholesale. Same Sigma/Elastic write coverage as patch; Secrets hold tokens, TLS keys, and API credentials, so this is credential access.YY
patch-secretsModifies an existing Secret's data. Sigma and Elastic's Azure Arc proxy rule both flag this write as credential-access activity on a stored credential.YY
delete-secretsDeletes a Secret, destroying credentials in use or covering tracks after copying its contents beforehand. The same Sigma secrets-modified-or-deleted rule matches this verb.YY
deletecollection-secretsYN
any-secretsSynthetic aggregation for rules that filter the secrets resource with no specific verb. Not a distinct audit record; hosts rule listings that key on objectRef.resource alone.NY

get secrets

#
Resource
secrets

Description

Secret accessed (credential theft; service account tokens, TLS certs, API keys).

Example Audit Event #

{
  "kind": "Event",
  "apiVersion": "audit.k8s.io/v1",
  "level": "Metadata",
  "auditID": "71e17297-aa99-4e08-9147-ee36753f7dbf",
  "stage": "ResponseComplete",
  "requestURI": "/api/v1/namespaces/default/secrets/my-secret",
  "verb": "get",
  "user": {
    "username": "kubernetes-admin",
    "uid": "aws-iam-authenticator:591511147606:AIDAYTOGP2RLJGRCUIGJZ",
    "groups": [
      "system:masters",
      "system:authenticated"
    ]
  },
  "sourceIPs": [
    "203.0.113.10"
  ],
  "userAgent": "kubectl/v1.27.2 (darwin/arm64) kubernetes/7f6f68f",
  "objectRef": {
    "resource": "secrets",
    "namespace": "default",
    "name": "my-secret",
    "apiVersion": "v1"
  },
  "responseStatus": {
    "metadata": {},
    "code": 200
  },
  "requestReceivedTimestamp": "2023-12-05T15:10:15.127831Z",
  "stageTimestamp": "2023-12-05T15:10:15.160004Z",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": ""
  }
}

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
objectRef.resourceeqsecrets6 rulesfalco, splunk
verbeqget6 rulesfalco, splunk
ServiceName (elastic rule field)eqk8s.io5 ruleselastic
src_ip (elastic rule field)is_not_null5 ruleselastic
kubernetes.audit.verb (elastic rule field)inget4 ruleselastic
kubernetes.audit.verb (elastic rule field)inlist4 ruleselastic
EventType (elastic rule field)eqio.k8s.core.v1.secrets.get3 ruleselastic
EventType (elastic rule field)inio.k8s.core.v1.secrets.get3 ruleselastic
EventType (elastic rule field)inio.k8s.core.v1.secrets.list3 ruleselastic
client.user.email (elastic rule field)is_not_null2 ruleselastic
client.user.email (elastic rule field)starts_withsystem:serviceaccount:2 ruleselastic
jevt.rawtime (falco rule field)is_not_null2 rulesfalco
kubernetes.audit.objectRef.resource (elastic rule field)eqsecrets2 ruleselastic
kubernetes.audit.objectRef.resource (elastic rule field)inconfigmaps2 ruleselastic
kubernetes.audit.objectRef.resource (elastic rule field)insecrets2 ruleselastic

Detection Rules #

Full rule details for this event, including ATT&CK technique mappings and native queries →

Elastic #

  • Azure AKS Secret get or list with Suspicious User Agent source high: Detects successful AKS (Azure Kubernetes Service) secret get or list operations where the user agent matches scripting runtimes (python, ruby, perl), command-line HTTP clients (curl, wget, HTTPie), or generic HTTP libraries (Go-http-client, okhttp, Apache-HttpClient, Guzzle, axios, undici) rather than typical kubectl or named controller traffic. Reading Kubernetes secrets with a generic client is a common credential-access step after a token or kubeconfig is stolen, and offensive tooling (for example peirates and kdigger) frequently reaches the API with a default Go HTTP client.T1552, T1552.007↳ also matches list-secrets: list secrets
    Investigation guide

    Triage and analysis#

    Investigating Azure AKS Secret get or list with Suspicious User Agent#

    AKS kube-audit events are carried under the flattened azure.platformlogs.properties.log.* subtree and share the ARM operation event.action: Microsoft.ContainerService/managedClusters/diagnosticLogs/Read. This rule fires when a successful get or list against Kubernetes secrets is issued with a user agent that matches scripting runtimes (python, ruby, perl), command-line HTTP clients (curl, wget, HTTPie), or generic HTTP libraries (Go-http-client, okhttp, Apache-HttpClient, Guzzle, axios, undici) rather than typical kubectl or named controller traffic. The user agent is trivially spoofable (the telemetry shows offensive tooling masquerading as kubectl), so this is a corroborating indicator, not proof.

    Possible investigation steps#

    • Identify the acting identity in azure.platformlogs.properties.log.user.username and its group memberships in azure.platformlogs.properties.log.user.groups. Control-plane and node identities (system:apiserver, aksService, system:node:*, system:serviceaccount:kube-system:*) are expected; a human or service-principal identity reading secrets with a scripted client is not.
    • Confirm the request was authorized by checking azure.platformlogs.properties.log.annotations.authorization.k8s.io/decision (allow vs forbid) and the azure.platformlogs.properties.log.responseStatus.code.
    • Review the targeted secret via azure.platformlogs.properties.log.objectRef.namespace and azure.platformlogs.properties.log.objectRef.name, and the exact API path in azure.platformlogs.properties.log.requestURI.
    • Evaluate the source in azure.platformlogs.properties.log.sourceIPs. In-cluster control-plane traffic uses loopback (::1) or node subnet addresses; a public or pod-network source for a secret read is more suspicious. Pivot on the source for other API bursts, exec sessions, or RBAC changes.
    • Correlate with recent Entra ID sign-ins or role assignments for the identity to determine whether the token was recently issued or scoped unusually.

    False positive analysis#

    • Approved scripts, CI jobs, or penetration tests may use generic HTTP clients. Validate identity scope before treating as compromise.
    • Internal automation using generic libraries can be excluded by stable service account after review.
    • The kubelet and controllers built on client-go can default to a Go-http-client/2.0 user agent when no custom agent is set (see kubernetes/kubernetes#108726), so an operator or platform component reading secrets may match Go-http*. Exclude the specific benign identity (for example system:serviceaccount:kube-system:* or a validated operator service account) rather than removing the Go-http* pattern, which also catches default-user-agent offensive tooling.

    Response and remediation#

    • If unauthorized, revoke the identity's tokens and kubeconfig, rotate the exposed secrets, and review RBAC that permits secret reads.
    • Hunt for downstream use of the retrieved secrets, such as new sign-ins, workload deployments, or outbound connections.
    • Collect kube-audit and identity artifacts per incident response procedures.
  • GKE Rapid Secret GET Activity Against Multiple Objects source high: Detects an unusual volume of GKE API get requests against multiple distinct Secret objects from the same client fingerprint (user, source IP, and user agent) within the rule lookback window. This can indicate credential access or in-cluster reconnaissance, where a user or token is used to enumerate and retrieve sensitive data such as service account tokens, registry credentials, TLS material, or application configuration. Failed get requests are included and can signal RBAC probing; system service accounts are excluded only when secret reads succeed, since failed secret access by a service account may indicate compromise or misconfiguration worth investigating.T1552, T1552.007
    Investigation guide

    Triage and analysis#

    Investigating GKE Rapid Secret GET Activity Against Multiple Objects#

    This rule surfaces clusters of get operations on secrets where the same identity and client path (client.user.email, source.ip, user_agent.original) touch several different secret resource paths within the lookback window. Allowed and denied outcomes are included: successful reads may indicate harvesting; repeated failure responses can still signal reconnaissance or RBAC probing. System service accounts and core controllers are excluded only for successful secret reads, failed attempts from those identities still alert.

    Investigation steps#

    • Inspect Esql.event_outcome_values for a mix of success vs failure and whether failures cluster on sensitive namespaces.
    • Map the identity to RBAC and namespace scope; review Esql.gcp_audit_resource_name_values for high-value targets (tokens, registry credentials, TLS bundles, application secrets).
    • Pivot on the same source.ip and user for follow-on API activity (exec, pod create, role changes, broad list on secrets).
    • Validate against expected automation (CI, GitOps, backup, in-cluster controllers) before treating as malicious.

    False positives#

    • Controllers and Helm may legitimately read many secrets in one window; tune exclusions after baselining known automation.

    Setup#

    The GCP Fleet integration with GKE audit logs enabled is required to be compatible with this rule.

  • GKE Secret Access from Node or Denied Service Account source medium: Detects GKE Secrets API activity that should not occur in normal cluster operation: a node identity (system:node:*) performing secrets get or list, or a pod service account failing a secrets get. Kubelet and node credentials are not expected to call the Secrets API for enumeration or direct reads, and a denied service-account secret get could indicate stolen-token probing or over-privileged tooling reaching beyond its RBAC.T1552, T1552.007↳ also matches list-secrets: list secrets
    Investigation guide

    Triage and analysis#

    Investigating GKE Secret Access from Node or Denied Service Account#

    This rule fires on two high-confidence patterns in GKE audit logs:

    • system:node:* successfully or unsuccessfully calling secrets.get or secrets.list
    • system:serviceaccount:* receiving event.outcome:failure on secrets.get

    Treat node-originated Secrets API calls as priority. For denied service-account gets, determine whether the identity is probing secrets outside its Role/ClusterRole or using an unexpected client from a compromised token.

    Possible investigation steps#

    • Resolve client.user.email to the node or workload and review RBAC bindings for secret get/list scope.
    • Inspect gcp.audit.resource_name, source.ip, and user_agent.original for anomalous clients or cross-namespace targets.
    • Correlate with successful secret reads, pod exec, token creation, or RoleBinding changes in the same window.
    • For node events, confirm whether kubelet, CSI, or maintenance tooling on that node should ever call the Secrets API.

    False positive analysis#

    • Node diagnostics or custom CSI helpers may rarely issue Secrets API calls; allowlist only after confirming the path is approved.
    • Broken RBAC on a newly deployed workload can produce repeated denied gets until permissions are fixed.

    Response and remediation#

    • If malicious, revoke the node or service-account credentials, isolate the host or workload, rotate exposed secrets, and tighten RBAC to least privilege for the affected identity.

Splunk #

Panther #

Falco #

References #

list secrets

#
Resource
secrets

Description

Secrets enumerated across a namespace or cluster.

Example Audit Event #

{
  "kind": "Event",
  "apiVersion": "audit.k8s.io/v1",
  "level": "Metadata",
  "auditID": "00000000-0000-0000-0000-000000000000",
  "stage": "ResponseComplete",
  "requestURI": "/api/v1/namespaces/dw-harn/secrets?limit=500&timeout=3s",
  "verb": "list",
  "user": {
    "username": "kubernetes-admin",
    "groups": [
      "kubeadm:cluster-admins",
      "system:authenticated"
    ],
    "extra": {
      "authentication.kubernetes.io/credential-id": [
        "X509SHA256=9bb0383c49b319fbf6b5ed61ab944378956d4292c784d32244ce2fa4dd846a3c"
      ]
    }
  },
  "sourceIPs": [
    "203.0.113.10"
  ],
  "userAgent": "kubectl/v1.36.2 (linux/amd64) kubernetes/24e2b02",
  "objectRef": {
    "resource": "secrets",
    "namespace": "dw-harn",
    "apiVersion": "v1"
  },
  "responseStatus": {
    "metadata": {},
    "code": 200
  },
  "requestReceivedTimestamp": "2026-07-02T04:46:46.821160Z",
  "stageTimestamp": "2026-07-02T04:46:46.822669Z",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by ClusterRoleBinding \"kubeadm:cluster-admins\" of ClusterRole \"cluster-admin\" to Group \"kubeadm:cluster-admins\""
  }
}

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
ServiceName (elastic rule field)eqk8s.io4 ruleselastic
kubernetes.audit.verb (elastic rule field)inget4 ruleselastic
kubernetes.audit.verb (elastic rule field)inlist4 ruleselastic
EventType (elastic rule field)eqgetsecretvalue1 ruleelastic
EventType (elastic rule field)eqio.k8s.core.v1.secrets.get1 ruleelastic
EventType (elastic rule field)inio.k8s.core.v1.secrets.get3 ruleselastic
EventType (elastic rule field)inio.k8s.core.v1.secrets.list3 ruleselastic
EventType (elastic rule field)inkeyget1 ruleelastic
kubernetes.audit.objectRef.resource (elastic rule field)eqsecrets2 ruleselastic
kubernetes.audit.objectRef.resource (elastic rule field)inconfigmaps2 ruleselastic
kubernetes.audit.objectRef.resource (elastic rule field)insecrets2 ruleselastic
username (panther rule field)containsserviceaccount2 rulespanther
verb (panther rule field)inget2 rulespanther
verb (panther rule field)inlist2 rulespanther
verb (panther rule field)inwatch2 rulespanther

Detection Rules #

Full rule details for this event, including ATT&CK technique mappings and native queries →

Sigma #

Elastic #

  • GKE Secrets List from Unusual Source AS Organization source high: Detects the first time a human GKE caller lists secrets cluster-wide or in default or kube-system from a source autonomous system that is not attributed to common cloud provider organizations. This can indicate remote secret enumeration using stolen credentials from an unusual network.T1552, T1552.007, T1613
    Investigation guide

    Triage and analysis#

    Investigating GKE Secrets List from Unusual Source AS Organization#

    New-terms rule on user.email and source.as.number for cluster-wide or sensitive namespace secret list operations.

    Investigation steps#

    • Confirm gcp.audit.resource_name and whether listing was authorized.
    • Review source.ip, source.as.organization.name, and follow-on secret get or exec activity.

    False positives#

    • First-time legitimate admin access from a new office or VPN provider.

    Setup#

    The GCP Fleet integration with GKE audit logs enabled is required to be compatible with this rule.

  • Multiple Cloud Secrets Accessed by Source Address source high: This rule detects authenticated sessions accessing secret stores across multiple environments from the same source address within a short period of time, including cloud providers (AWS, GCP, Azure) and Kubernetes clusters. Adversaries with access to compromised credentials or session tokens may attempt to retrieve secrets from services such as AWS Secrets Manager, Google Secret Manager, Azure Key Vault, or Kubernetes Secrets in rapid succession to expand their access or exfiltrate sensitive information.T1555, T1555.006↳ also matches get-secrets: get secrets
    Investigation guide

    Triage and analysis#

    Multiple Cloud Secrets Accessed by Source Address#

    This alert identifies a single source IP address accessing secret-management APIs across multiple cloud providers (e.g., AWS Secrets Manager, Google Secret Manager, Azure Key Vault) within a short timeframe. This behavior is strongly associated with credential theft, session hijacking, or token replay, where an adversary uses stolen authenticated sessions to harvest secrets across cloud environments.

    Unexpected cross-cloud secret retrieval is uncommon and typically indicates automation misuse or malicious activity.

    Possible investigation steps#

    • Validate the principal
      • Identify the user, service account, workload identity, or application making the requests.
      • Confirm whether this identity is expected to operate across more than one cloud provider.
    • Review related activity
      • Look for additional alerts involving the same identity, source IP, or token over the last 24–48 hours.
      • Identify whether the source IP has been observed performing unusual authentication, privilege escalation, or reconnaissance.
    • Check application or service context
      • Determine whether any workload legitimately pulls secrets from multiple cloud providers.
      • Review deployment pipelines or integration layers that might legitimately bridge AWS, Azure, and GCP.
    • Analyze user agent and invocation patterns
      • Compare user_agent.original or equivalent fields against expected SDKs or automation tools.
      • Suspicious indicators include CLI tools, unknown libraries, browser user agents, or custom scripts.
    • Inspect IP reputation and origin
      • Determine whether the source IP corresponds to a managed workload (EC2, GCE, Azure VM) or an unexpected host.
      • Validate that the associated instance or host is under your control and behaving normally.
    • Review IAM permissions and accessed secrets
      • Check the policies attached to the identity.
      • Verify whether the accessed secrets are sensitive, unused, or unrelated to the identity’s purpose.
    • Assess potential compromise scope
      • If compromise is suspected, enumerate other assets accessed by the same identity in the last 24 hours.
      • Look for lateral movement, privilege escalation, or abnormal API usage.
    • Review Kubernetes activity
      • Identify the Kubernetes user, service account, or workload performing the secret access.
      • Determine whether the access originated from a pod, node, or external client.
      • Validate whether the identity is expected to access secrets in the affected namespaces.
      • Investigate whether the activity corresponds to application behavior or manual/API access.

    False positive analysis#

    • Validate whether the source IP is associated with a legitimate multi-cloud orchestration tool, automation pipeline, or shared CI/CD system.
    • Confirm that the identity is authorized to access secrets across multiple cloud services.
    • If activity is expected, consider adding exceptions that pair account identity, source IP, and expected user agent to reduce noise.
    • Determine whether the source IP is associated with Kubernetes nodes, controllers, or internal workloads that legitimately retrieve secrets alongside cloud provider integrations.

    Response and remediation#

    • Initiate incident response** if the activity is unauthorized or suspicious.
    • Restrict or disable** the affected credentials or service accounts.
    • Rotate all accessed secrets** and review other secrets the identity can access.
    • Analyze systems** that may have leaked credentials, such as compromised hosts or exposed tokens.
    • Harden identity security:
      • Enforce MFA for users where applicable.
      • Reduce permissions to least privilege.
      • Review trust relationships, workload identities, and cross-cloud integrations.
    • Search for persistence mechanisms** such as newly created keys, roles, or service accounts.
    • If Kubernetes access is involved:
      • Rotate Kubernetes secrets and service account tokens.
      • Review RBAC permissions and restrict secret access to least privilege.
      • Inspect affected pods or nodes for compromise.
    • Improve monitoring and audit visibility** by ensuring logging is enabled across all cloud environments.
    • Determine root cause** (phishing, malware, token replay, exposed credential, etc.) and close the vector to prevent recurrence.
  • Direct Interactive Kubernetes API Request by Unusual Utilities source low: This rule leverages a combination of Defend for Containers and Kubernetes audit logs to detect the execution of direct interactive Kubernetes API requests via unusual utilities. An adversary may need to execute direct interactive Kubernetes API requests to gain access to the Kubernetes API server or other resources within the cluster. These requests are often used to enumerate the Kubernetes API server or other resources within the cluster, and may indicate an attempt to move laterally within the cluster.T1059, T1059.004, T1069, T1087, T1609, T1610↳ also matches get-secrets: get secrets, watch-secrets: watch secrets, create-secrets: create secrets, update-secrets: update secrets, patch-secrets: patch secrets
    Investigation guide

    Triage and analysis#

    Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

    Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#

    This rule detects interactive commands executed inside containers that use atypical utilities to hit the Kubernetes API, paired with near-simultaneous API activity on pods, secrets, service accounts, roles/bindings, or pod exec/attach/log/portforward. It surfaces hands-on-keyboard discovery and lateral movement using custom scripts that evade common tool allowlists; for example, an intruder opens a shell in a pod, uses Python to query the in-cluster API to list secrets, then triggers pods/exec to pivot into another workload.

    Possible investigation steps#

    • Identify the implicated pod, container image, and executing service account, then quickly review its RBAC bindings and effective permissions to determine blast radius.
    • Inspect the container’s interactive session context by pulling recent command lines, shell history, environment variables, and mounted service account tokens, and look for custom scripts or binaries issuing HTTP requests.
    • Correlate nearby Kubernetes audit entries tied to the same principal and pod to map accessed resources and verbs, noting any exec/attach/portforward or sensitive object interactions across namespaces.
    • Review network activity from the pod to the API server and any in-pod proxies, including DNS lookups and outbound connections, to spot nonstandard clients or tunneling behavior.
    • If suspicious, isolate the pod or node, capture runtime artifacts (e.g., process memory or HTTP client traffic), revoke and rotate the service account credentials, and verify image provenance and integrity.

    False positive analysis#

    • An operator interactively attaches to a pod and uses a Python REPL or bash with /dev/tcp to call the in-cluster API for routine troubleshooting (e.g., list pods, read ConfigMaps, or run selfsubjectaccessreviews), producing normal audit entries that match the rule signature.
    • A correlation artifact arises when two namespaces have pods with the same name: one pod starts an interactive shell while another independently performs get/list/watch calls, and the 1-second sequence keyed only on pod-name links the unrelated events.

    Response and remediation#

    • Immediately isolate the implicated pod that issued direct API calls using a nonstandard utility by applying a deny-all egress NetworkPolicy in its namespace (including to kubernetes.default.svc:443), terminating the interactive session, and scaling its owning Deployment/Job/StatefulSet to zero replicas.
    • Before teardown, capture a runtime snapshot of the container and node including the binary or script used to query the API (e.g., files under /tmp or /dev/tcp usage), shell history, environment, and the mounted service account token and CA bundle at /var/run/secrets/kubernetes.io/serviceaccount/.
    • Revoke access by removing the service account’s RoleBindings/ClusterRoleBindings, deleting all pods that mount that service account to force token rotation, rotating any Secrets and ConfigMaps that were read or created during the window, and deleting any unauthorized Jobs, CronJobs, or Deployments created by the same principal.
    • Restore workloads from a known-good image digest, re-enable the Deployment only after image scan and integrity checks pass, and monitor subsequent Kubernetes audit logs for pods/exec, portforward, and access to secrets across the affected namespaces.
    • Escalate to incident response leadership and consider cluster-wide containment if audit logs show create/patch of ClusterRoleBindings, access to secrets outside the workload’s namespace, or use of pods/exec to pivot into other nodes or system namespaces such as kube-system.
    • Harden access by enforcing least-privilege RBAC that denies pods/exec and attach for application service accounts, setting automountServiceAccountToken: false on workloads that do not need it, restricting egress to the API server with NetworkPolicies, and requiring just-in-time break-glass roles for interactive access.

Panther #

References #

watch secrets

#
Resource
secrets

Description

Opens a long-lived watch on Secret changes across a namespace. Elastic's new-terms rule flags a first-seen client streaming secrets instead of polling.

Example Audit Event #

{
  "kind": "Event",
  "apiVersion": "audit.k8s.io/v1",
  "level": "Metadata",
  "auditID": "00000000-0000-0000-0000-000000000000",
  "stage": "ResponseComplete",
  "requestURI": "/api/v1/namespaces/dw-harn/secrets?resourceVersion=1360&timeout=3s&watch=true",
  "verb": "watch",
  "user": {
    "username": "kubernetes-admin",
    "groups": [
      "kubeadm:cluster-admins",
      "system:authenticated"
    ],
    "extra": {
      "authentication.kubernetes.io/credential-id": [
        "X509SHA256=9bb0383c49b319fbf6b5ed61ab944378956d4292c784d32244ce2fa4dd846a3c"
      ]
    }
  },
  "sourceIPs": [
    "203.0.113.10"
  ],
  "userAgent": "kubectl/v1.36.2 (linux/amd64) kubernetes/24e2b02",
  "objectRef": {
    "resource": "secrets",
    "namespace": "dw-harn",
    "apiVersion": "v1"
  },
  "responseStatus": {
    "metadata": {},
    "code": 200
  },
  "requestReceivedTimestamp": "2026-07-02T04:46:46.823738Z",
  "stageTimestamp": "2026-07-02T04:46:49.827914Z",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by ClusterRoleBinding \"kubeadm:cluster-admins\" of ClusterRole \"cluster-admin\" to Group \"kubeadm:cluster-admins\""
  }
}

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
verb (panther rule field)inget2 rulespanther
verb (panther rule field)inlist2 rulespanther
verb (panther rule field)inwatch2 rulespanther

Detection Rules #

Full rule details for this event, including ATT&CK technique mappings and native queries →

Elastic #

  • Direct Interactive Kubernetes API Request by Unusual Utilities source low: This rule leverages a combination of Defend for Containers and Kubernetes audit logs to detect the execution of direct interactive Kubernetes API requests via unusual utilities. An adversary may need to execute direct interactive Kubernetes API requests to gain access to the Kubernetes API server or other resources within the cluster. These requests are often used to enumerate the Kubernetes API server or other resources within the cluster, and may indicate an attempt to move laterally within the cluster.T1059, T1059.004, T1069, T1087, T1609, T1610↳ also matches get-secrets: get secrets, list-secrets: list secrets, create-secrets: create secrets, update-secrets: update secrets, patch-secrets: patch secrets
    Investigation guide

    Triage and analysis#

    Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

    Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#

    This rule detects interactive commands executed inside containers that use atypical utilities to hit the Kubernetes API, paired with near-simultaneous API activity on pods, secrets, service accounts, roles/bindings, or pod exec/attach/log/portforward. It surfaces hands-on-keyboard discovery and lateral movement using custom scripts that evade common tool allowlists; for example, an intruder opens a shell in a pod, uses Python to query the in-cluster API to list secrets, then triggers pods/exec to pivot into another workload.

    Possible investigation steps#

    • Identify the implicated pod, container image, and executing service account, then quickly review its RBAC bindings and effective permissions to determine blast radius.
    • Inspect the container’s interactive session context by pulling recent command lines, shell history, environment variables, and mounted service account tokens, and look for custom scripts or binaries issuing HTTP requests.
    • Correlate nearby Kubernetes audit entries tied to the same principal and pod to map accessed resources and verbs, noting any exec/attach/portforward or sensitive object interactions across namespaces.
    • Review network activity from the pod to the API server and any in-pod proxies, including DNS lookups and outbound connections, to spot nonstandard clients or tunneling behavior.
    • If suspicious, isolate the pod or node, capture runtime artifacts (e.g., process memory or HTTP client traffic), revoke and rotate the service account credentials, and verify image provenance and integrity.

    False positive analysis#

    • An operator interactively attaches to a pod and uses a Python REPL or bash with /dev/tcp to call the in-cluster API for routine troubleshooting (e.g., list pods, read ConfigMaps, or run selfsubjectaccessreviews), producing normal audit entries that match the rule signature.
    • A correlation artifact arises when two namespaces have pods with the same name: one pod starts an interactive shell while another independently performs get/list/watch calls, and the 1-second sequence keyed only on pod-name links the unrelated events.

    Response and remediation#

    • Immediately isolate the implicated pod that issued direct API calls using a nonstandard utility by applying a deny-all egress NetworkPolicy in its namespace (including to kubernetes.default.svc:443), terminating the interactive session, and scaling its owning Deployment/Job/StatefulSet to zero replicas.
    • Before teardown, capture a runtime snapshot of the container and node including the binary or script used to query the API (e.g., files under /tmp or /dev/tcp usage), shell history, environment, and the mounted service account token and CA bundle at /var/run/secrets/kubernetes.io/serviceaccount/.
    • Revoke access by removing the service account’s RoleBindings/ClusterRoleBindings, deleting all pods that mount that service account to force token rotation, rotating any Secrets and ConfigMaps that were read or created during the window, and deleting any unauthorized Jobs, CronJobs, or Deployments created by the same principal.
    • Restore workloads from a known-good image digest, re-enable the Deployment only after image scan and integrity checks pass, and monitor subsequent Kubernetes audit logs for pods/exec, portforward, and access to secrets across the affected namespaces.
    • Escalate to incident response leadership and consider cluster-wide containment if audit logs show create/patch of ClusterRoleBindings, access to secrets outside the workload’s namespace, or use of pods/exec to pivot into other nodes or system namespaces such as kube-system.
    • Harden access by enforcing least-privilege RBAC that denies pods/exec and attach for application service accounts, setting automountServiceAccountToken: false on workloads that do not need it, restricting egress to the API server with NetworkPolicies, and requiring just-in-time break-glass roles for interactive access.

Panther #

References #

create secrets

#
Resource
secrets

Description

Creates a new Secret. Sigma covers create alongside update/patch/delete; attackers stage a token or key this way, smuggled in as ordinary config.

Example Audit Event #

{
  "kind": "Event",
  "apiVersion": "audit.k8s.io/v1",
  "level": "RequestResponse",
  "auditID": "00000000-0000-0000-0000-000000000000",
  "stage": "ResponseComplete",
  "requestURI": "/api/v1/namespaces/dw-harn/secrets?fieldManager=kubectl-create&fieldValidation=Strict",
  "verb": "create",
  "user": {
    "username": "kubernetes-admin",
    "groups": [
      "kubeadm:cluster-admins",
      "system:authenticated"
    ],
    "extra": {
      "authentication.kubernetes.io/credential-id": [
        "X509SHA256=9bb0383c49b319fbf6b5ed61ab944378956d4292c784d32244ce2fa4dd846a3c"
      ]
    }
  },
  "sourceIPs": [
    "203.0.113.10"
  ],
  "userAgent": "kubectl/v1.36.2 (linux/amd64) kubernetes/24e2b02",
  "objectRef": {
    "resource": "secrets",
    "namespace": "dw-harn",
    "name": "dw-harn-secrets",
    "apiVersion": "v1"
  },
  "responseStatus": {
    "metadata": {},
    "code": 201
  },
  "requestObject": {
    "kind": "Secret",
    "apiVersion": "v1",
    "metadata": {
      "name": "dw-harn-secrets",
      "namespace": "dw-harn"
    },
    "data": {
      "key": "dmFsdWU="
    },
    "type": "Opaque"
  },
  "responseObject": {
    "kind": "Secret",
    "apiVersion": "v1",
    "metadata": {
      "name": "dw-harn-secrets",
      "namespace": "dw-harn",
      "uid": "00000000-0000-0000-0000-000000000000",
      "resourceVersion": "1360",
      "creationTimestamp": "2026-07-02T04:46:46Z"
    },
    "data": {
      "key": "dmFsdWU="
    },
    "type": "Opaque"
  },
  "requestReceivedTimestamp": "2026-07-02T04:46:46.628343Z",
  "stageTimestamp": "2026-07-02T04:46:46.631258Z",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by ClusterRoleBinding \"kubeadm:cluster-admins\" of ClusterRole \"cluster-admin\" to Group \"kubeadm:cluster-admins\""
  }
}

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
kubernetes.audit.objectRef.resource (elastic rule field)inconfigmaps2 ruleselastic
kubernetes.audit.objectRef.resource (elastic rule field)insecrets2 ruleselastic
kubernetes.audit.verb (elastic rule field)inlist2 ruleselastic
objectRef.resourceeqsecrets2 rulesfalco, sigma
objectRef.namespace (falco rule field)nekube-system1 rulefalco

Detection Rules #

Full rule details for this event, including ATT&CK technique mappings and native queries →

Sigma #

Elastic #

  • Direct Interactive Kubernetes API Request by Unusual Utilities source low: This rule leverages a combination of Defend for Containers and Kubernetes audit logs to detect the execution of direct interactive Kubernetes API requests via unusual utilities. An adversary may need to execute direct interactive Kubernetes API requests to gain access to the Kubernetes API server or other resources within the cluster. These requests are often used to enumerate the Kubernetes API server or other resources within the cluster, and may indicate an attempt to move laterally within the cluster.T1059, T1059.004, T1069, T1087, T1609, T1610↳ also matches get-secrets: get secrets, list-secrets: list secrets, watch-secrets: watch secrets, update-secrets: update secrets, patch-secrets: patch secrets
    Investigation guide

    Triage and analysis#

    Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

    Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#

    This rule detects interactive commands executed inside containers that use atypical utilities to hit the Kubernetes API, paired with near-simultaneous API activity on pods, secrets, service accounts, roles/bindings, or pod exec/attach/log/portforward. It surfaces hands-on-keyboard discovery and lateral movement using custom scripts that evade common tool allowlists; for example, an intruder opens a shell in a pod, uses Python to query the in-cluster API to list secrets, then triggers pods/exec to pivot into another workload.

    Possible investigation steps#

    • Identify the implicated pod, container image, and executing service account, then quickly review its RBAC bindings and effective permissions to determine blast radius.
    • Inspect the container’s interactive session context by pulling recent command lines, shell history, environment variables, and mounted service account tokens, and look for custom scripts or binaries issuing HTTP requests.
    • Correlate nearby Kubernetes audit entries tied to the same principal and pod to map accessed resources and verbs, noting any exec/attach/portforward or sensitive object interactions across namespaces.
    • Review network activity from the pod to the API server and any in-pod proxies, including DNS lookups and outbound connections, to spot nonstandard clients or tunneling behavior.
    • If suspicious, isolate the pod or node, capture runtime artifacts (e.g., process memory or HTTP client traffic), revoke and rotate the service account credentials, and verify image provenance and integrity.

    False positive analysis#

    • An operator interactively attaches to a pod and uses a Python REPL or bash with /dev/tcp to call the in-cluster API for routine troubleshooting (e.g., list pods, read ConfigMaps, or run selfsubjectaccessreviews), producing normal audit entries that match the rule signature.
    • A correlation artifact arises when two namespaces have pods with the same name: one pod starts an interactive shell while another independently performs get/list/watch calls, and the 1-second sequence keyed only on pod-name links the unrelated events.

    Response and remediation#

    • Immediately isolate the implicated pod that issued direct API calls using a nonstandard utility by applying a deny-all egress NetworkPolicy in its namespace (including to kubernetes.default.svc:443), terminating the interactive session, and scaling its owning Deployment/Job/StatefulSet to zero replicas.
    • Before teardown, capture a runtime snapshot of the container and node including the binary or script used to query the API (e.g., files under /tmp or /dev/tcp usage), shell history, environment, and the mounted service account token and CA bundle at /var/run/secrets/kubernetes.io/serviceaccount/.
    • Revoke access by removing the service account’s RoleBindings/ClusterRoleBindings, deleting all pods that mount that service account to force token rotation, rotating any Secrets and ConfigMaps that were read or created during the window, and deleting any unauthorized Jobs, CronJobs, or Deployments created by the same principal.
    • Restore workloads from a known-good image digest, re-enable the Deployment only after image scan and integrity checks pass, and monitor subsequent Kubernetes audit logs for pods/exec, portforward, and access to secrets across the affected namespaces.
    • Escalate to incident response leadership and consider cluster-wide containment if audit logs show create/patch of ClusterRoleBindings, access to secrets outside the workload’s namespace, or use of pods/exec to pivot into other nodes or system namespaces such as kube-system.
    • Harden access by enforcing least-privilege RBAC that denies pods/exec and attach for application service accounts, setting automountServiceAccountToken: false on workloads that do not need it, restricting egress to the API server with NetworkPolicies, and requiring just-in-time break-glass roles for interactive access.
  • Kubernetes Secret or ConfigMap Access via Azure Arc Proxy source medium: Detects when secrets or configmaps are accessed, created, modified, or deleted in a Kubernetes cluster by the Azure Arc AAD proxy service account. When operations are routed through the Azure Arc Cluster Connect proxy, the Kubernetes audit log records the acting user as system:serviceaccount:azure-arc:azure-arc-kube-aad-proxy-sa with the actual caller identity in the impersonatedUser field. This pattern indicates that someone is accessing the cluster through the Azure ARM API rather than directly via kubectl against the API server. While legitimate for Arc-managed workflows, adversaries with stolen service principal credentials can abuse Arc Cluster Connect to read, exfiltrate, or modify secrets and configmaps while appearing as the Arc proxy service account in K8s audit logs.T1213, T1530, T1552, T1552.007, T1565, T1565.001↳ also matches get-secrets: get secrets, list-secrets: list secrets, update-secrets: update secrets, patch-secrets: patch secrets, delete-secrets: delete secrets
    Investigation guide

    Triage and analysis#

    Investigating Kubernetes Secret or ConfigMap Access via Azure Arc Proxy#

    When Kubernetes operations are performed through Azure Arc Cluster Connect, the K8s audit log shows the Arc AAD proxy service account as the authenticated user, with the actual Azure AD identity in the impersonatedUser field. This rule detects non-system secret and configmap access — including reads, writes, and deletions — routed through this proxy path. Read operations (get, list) are particularly important to detect as they represent the most common adversary action: exfiltrating secrets without leaving obvious modification traces.

    Possible investigation steps#

    • Check the kubernetes.audit.impersonatedUser.username field — this contains the Azure AD object ID of the actual caller. Cross-reference with Azure AD to identify the service principal or user.
    • Review the kubernetes.audit.impersonatedUser.extra.oid field for the Azure AD object ID.
    • Examine the namespace — operations in default or application namespaces are more suspicious than azure-arc or kube-system.
    • Check the kubernetes.audit.objectRef.name — look for suspicious secret/configmap names that don't match known application resources.
    • Correlate with Azure Activity Logs for the same time window to find the LISTCLUSTERUSERCREDENTIAL operation that initiated the Arc proxy session.
    • Review Azure Sign-In Logs for the impersonated identity's authentication source IP and geolocation.

    Response and remediation#

    • If the impersonated identity is not recognized, revoke its Azure AD credentials immediately.
    • Remove the ClusterRoleBinding or RoleBinding that grants the identity access to secrets/configmaps.
    • Rotate any Kubernetes secrets that may have been read or exfiltrated.
    • Review the Arc connection and consider disconnecting it if compromised.

Falco #

References #

update secrets

#
Resource
secrets

Description

Replaces a Secret's data wholesale. Same Sigma/Elastic write coverage as patch; Secrets hold tokens, TLS keys, and API credentials, so this is credential access.

Example Audit Event #

{
  "kind": "Event",
  "apiVersion": "audit.k8s.io/v1",
  "level": "RequestResponse",
  "auditID": "00000000-0000-0000-0000-000000000000",
  "stage": "ResponseComplete",
  "requestURI": "/api/v1/namespaces/dw-harn/secrets/dw-harn-secrets?fieldManager=kubectl-replace&fieldValidation=Strict",
  "verb": "update",
  "user": {
    "username": "kubernetes-admin",
    "groups": [
      "kubeadm:cluster-admins",
      "system:authenticated"
    ],
    "extra": {
      "authentication.kubernetes.io/credential-id": [
        "X509SHA256=4cf95d11cbd90036bab41cdc6b88cc8f91550e9135ed4bb61495b02f647812ff"
      ]
    }
  },
  "sourceIPs": [
    "203.0.113.10"
  ],
  "userAgent": "kubectl/v1.36.2 (linux/amd64) kubernetes/24e2b02",
  "objectRef": {
    "resource": "secrets",
    "namespace": "dw-harn",
    "name": "dw-harn-secrets",
    "uid": "00000000-0000-0000-0000-000000000000",
    "apiVersion": "v1",
    "resourceVersion": "508"
  },
  "responseStatus": {
    "metadata": {},
    "code": 200
  },
  "requestObject": {
    "kind": "Secret",
    "apiVersion": "v1",
    "metadata": {
      "name": "dw-harn-secrets",
      "namespace": "dw-harn",
      "uid": "00000000-0000-0000-0000-000000000000",
      "resourceVersion": "508",
      "creationTimestamp": "2026-07-02T21:30:08Z",
      "labels": {
        "dw-harn-patched": "1"
      }
    },
    "data": {
      "key": "dmFsdWU="
    },
    "type": "Opaque"
  },
  "responseObject": {
    "kind": "Secret",
    "apiVersion": "v1",
    "metadata": {
      "name": "dw-harn-secrets",
      "namespace": "dw-harn",
      "uid": "00000000-0000-0000-0000-000000000000",
      "resourceVersion": "508",
      "creationTimestamp": "2026-07-02T21:30:08Z",
      "labels": {
        "dw-harn-patched": "1"
      }
    },
    "data": {
      "key": "dmFsdWU="
    },
    "type": "Opaque"
  },
  "requestReceivedTimestamp": "2026-07-02T21:30:11.768133Z",
  "stageTimestamp": "2026-07-02T21:30:11.770730Z",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by ClusterRoleBinding \"kubeadm:cluster-admins\" of ClusterRole \"cluster-admin\" to Group \"kubeadm:cluster-admins\""
  }
}

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
objectRef.resource (sigma rule field)eqsecrets1 rulesigma

Detection Rules #

Full rule details for this event, including ATT&CK technique mappings and native queries →

Sigma #

Elastic #

  • Direct Interactive Kubernetes API Request by Unusual Utilities source low: This rule leverages a combination of Defend for Containers and Kubernetes audit logs to detect the execution of direct interactive Kubernetes API requests via unusual utilities. An adversary may need to execute direct interactive Kubernetes API requests to gain access to the Kubernetes API server or other resources within the cluster. These requests are often used to enumerate the Kubernetes API server or other resources within the cluster, and may indicate an attempt to move laterally within the cluster.T1059, T1059.004, T1069, T1087, T1609, T1610↳ also matches get-secrets: get secrets, list-secrets: list secrets, watch-secrets: watch secrets, create-secrets: create secrets, patch-secrets: patch secrets
    Investigation guide

    Triage and analysis#

    Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

    Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#

    This rule detects interactive commands executed inside containers that use atypical utilities to hit the Kubernetes API, paired with near-simultaneous API activity on pods, secrets, service accounts, roles/bindings, or pod exec/attach/log/portforward. It surfaces hands-on-keyboard discovery and lateral movement using custom scripts that evade common tool allowlists; for example, an intruder opens a shell in a pod, uses Python to query the in-cluster API to list secrets, then triggers pods/exec to pivot into another workload.

    Possible investigation steps#

    • Identify the implicated pod, container image, and executing service account, then quickly review its RBAC bindings and effective permissions to determine blast radius.
    • Inspect the container’s interactive session context by pulling recent command lines, shell history, environment variables, and mounted service account tokens, and look for custom scripts or binaries issuing HTTP requests.
    • Correlate nearby Kubernetes audit entries tied to the same principal and pod to map accessed resources and verbs, noting any exec/attach/portforward or sensitive object interactions across namespaces.
    • Review network activity from the pod to the API server and any in-pod proxies, including DNS lookups and outbound connections, to spot nonstandard clients or tunneling behavior.
    • If suspicious, isolate the pod or node, capture runtime artifacts (e.g., process memory or HTTP client traffic), revoke and rotate the service account credentials, and verify image provenance and integrity.

    False positive analysis#

    • An operator interactively attaches to a pod and uses a Python REPL or bash with /dev/tcp to call the in-cluster API for routine troubleshooting (e.g., list pods, read ConfigMaps, or run selfsubjectaccessreviews), producing normal audit entries that match the rule signature.
    • A correlation artifact arises when two namespaces have pods with the same name: one pod starts an interactive shell while another independently performs get/list/watch calls, and the 1-second sequence keyed only on pod-name links the unrelated events.

    Response and remediation#

    • Immediately isolate the implicated pod that issued direct API calls using a nonstandard utility by applying a deny-all egress NetworkPolicy in its namespace (including to kubernetes.default.svc:443), terminating the interactive session, and scaling its owning Deployment/Job/StatefulSet to zero replicas.
    • Before teardown, capture a runtime snapshot of the container and node including the binary or script used to query the API (e.g., files under /tmp or /dev/tcp usage), shell history, environment, and the mounted service account token and CA bundle at /var/run/secrets/kubernetes.io/serviceaccount/.
    • Revoke access by removing the service account’s RoleBindings/ClusterRoleBindings, deleting all pods that mount that service account to force token rotation, rotating any Secrets and ConfigMaps that were read or created during the window, and deleting any unauthorized Jobs, CronJobs, or Deployments created by the same principal.
    • Restore workloads from a known-good image digest, re-enable the Deployment only after image scan and integrity checks pass, and monitor subsequent Kubernetes audit logs for pods/exec, portforward, and access to secrets across the affected namespaces.
    • Escalate to incident response leadership and consider cluster-wide containment if audit logs show create/patch of ClusterRoleBindings, access to secrets outside the workload’s namespace, or use of pods/exec to pivot into other nodes or system namespaces such as kube-system.
    • Harden access by enforcing least-privilege RBAC that denies pods/exec and attach for application service accounts, setting automountServiceAccountToken: false on workloads that do not need it, restricting egress to the API server with NetworkPolicies, and requiring just-in-time break-glass roles for interactive access.
  • Kubernetes Secret or ConfigMap Access via Azure Arc Proxy source medium: Detects when secrets or configmaps are accessed, created, modified, or deleted in a Kubernetes cluster by the Azure Arc AAD proxy service account. When operations are routed through the Azure Arc Cluster Connect proxy, the Kubernetes audit log records the acting user as system:serviceaccount:azure-arc:azure-arc-kube-aad-proxy-sa with the actual caller identity in the impersonatedUser field. This pattern indicates that someone is accessing the cluster through the Azure ARM API rather than directly via kubectl against the API server. While legitimate for Arc-managed workflows, adversaries with stolen service principal credentials can abuse Arc Cluster Connect to read, exfiltrate, or modify secrets and configmaps while appearing as the Arc proxy service account in K8s audit logs.T1213, T1530, T1552, T1552.007, T1565, T1565.001↳ also matches get-secrets: get secrets, list-secrets: list secrets, create-secrets: create secrets, patch-secrets: patch secrets, delete-secrets: delete secrets
    Investigation guide

    Triage and analysis#

    Investigating Kubernetes Secret or ConfigMap Access via Azure Arc Proxy#

    When Kubernetes operations are performed through Azure Arc Cluster Connect, the K8s audit log shows the Arc AAD proxy service account as the authenticated user, with the actual Azure AD identity in the impersonatedUser field. This rule detects non-system secret and configmap access — including reads, writes, and deletions — routed through this proxy path. Read operations (get, list) are particularly important to detect as they represent the most common adversary action: exfiltrating secrets without leaving obvious modification traces.

    Possible investigation steps#

    • Check the kubernetes.audit.impersonatedUser.username field — this contains the Azure AD object ID of the actual caller. Cross-reference with Azure AD to identify the service principal or user.
    • Review the kubernetes.audit.impersonatedUser.extra.oid field for the Azure AD object ID.
    • Examine the namespace — operations in default or application namespaces are more suspicious than azure-arc or kube-system.
    • Check the kubernetes.audit.objectRef.name — look for suspicious secret/configmap names that don't match known application resources.
    • Correlate with Azure Activity Logs for the same time window to find the LISTCLUSTERUSERCREDENTIAL operation that initiated the Arc proxy session.
    • Review Azure Sign-In Logs for the impersonated identity's authentication source IP and geolocation.

    Response and remediation#

    • If the impersonated identity is not recognized, revoke its Azure AD credentials immediately.
    • Remove the ClusterRoleBinding or RoleBinding that grants the identity access to secrets/configmaps.
    • Rotate any Kubernetes secrets that may have been read or exfiltrated.
    • Review the Arc connection and consider disconnecting it if compromised.

References #

patch secrets

#
Resource
secrets

Description

Modifies an existing Secret's data. Sigma and Elastic's Azure Arc proxy rule both flag this write as credential-access activity on a stored credential.

Example Audit Event #

{
  "kind": "Event",
  "apiVersion": "audit.k8s.io/v1",
  "level": "RequestResponse",
  "auditID": "00000000-0000-0000-0000-000000000000",
  "stage": "ResponseComplete",
  "requestURI": "/api/v1/namespaces/dw-harn/secrets/dw-harn-secrets?fieldManager=kubectl-patch",
  "verb": "patch",
  "user": {
    "username": "kubernetes-admin",
    "groups": [
      "kubeadm:cluster-admins",
      "system:authenticated"
    ],
    "extra": {
      "authentication.kubernetes.io/credential-id": [
        "X509SHA256=9bb0383c49b319fbf6b5ed61ab944378956d4292c784d32244ce2fa4dd846a3c"
      ]
    }
  },
  "sourceIPs": [
    "203.0.113.10"
  ],
  "userAgent": "kubectl/v1.36.2 (linux/amd64) kubernetes/24e2b02",
  "objectRef": {
    "resource": "secrets",
    "namespace": "dw-harn",
    "name": "dw-harn-secrets",
    "apiVersion": "v1"
  },
  "responseStatus": {
    "metadata": {},
    "code": 200
  },
  "requestObject": {
    "metadata": {
      "labels": {
        "dw-harn-patched": "1"
      }
    }
  },
  "responseObject": {
    "kind": "Secret",
    "apiVersion": "v1",
    "metadata": {
      "name": "dw-harn-secrets",
      "namespace": "dw-harn",
      "uid": "00000000-0000-0000-0000-000000000000",
      "resourceVersion": "1366",
      "creationTimestamp": "2026-07-02T04:46:46Z",
      "labels": {
        "dw-harn-patched": "1"
      }
    },
    "data": {
      "key": "dmFsdWU="
    },
    "type": "Opaque"
  },
  "requestReceivedTimestamp": "2026-07-02T04:46:49.903267Z",
  "stageTimestamp": "2026-07-02T04:46:49.907362Z",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by ClusterRoleBinding \"kubeadm:cluster-admins\" of ClusterRole \"cluster-admin\" to Group \"kubeadm:cluster-admins\""
  }
}

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
objectRef.resource (sigma rule field)eqsecrets1 rulesigma

Detection Rules #

Full rule details for this event, including ATT&CK technique mappings and native queries →

Sigma #

Elastic #

  • Direct Interactive Kubernetes API Request by Unusual Utilities source low: This rule leverages a combination of Defend for Containers and Kubernetes audit logs to detect the execution of direct interactive Kubernetes API requests via unusual utilities. An adversary may need to execute direct interactive Kubernetes API requests to gain access to the Kubernetes API server or other resources within the cluster. These requests are often used to enumerate the Kubernetes API server or other resources within the cluster, and may indicate an attempt to move laterally within the cluster.T1059, T1059.004, T1069, T1087, T1609, T1610↳ also matches get-secrets: get secrets, list-secrets: list secrets, watch-secrets: watch secrets, create-secrets: create secrets, update-secrets: update secrets
    Investigation guide

    Triage and analysis#

    Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

    Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#

    This rule detects interactive commands executed inside containers that use atypical utilities to hit the Kubernetes API, paired with near-simultaneous API activity on pods, secrets, service accounts, roles/bindings, or pod exec/attach/log/portforward. It surfaces hands-on-keyboard discovery and lateral movement using custom scripts that evade common tool allowlists; for example, an intruder opens a shell in a pod, uses Python to query the in-cluster API to list secrets, then triggers pods/exec to pivot into another workload.

    Possible investigation steps#

    • Identify the implicated pod, container image, and executing service account, then quickly review its RBAC bindings and effective permissions to determine blast radius.
    • Inspect the container’s interactive session context by pulling recent command lines, shell history, environment variables, and mounted service account tokens, and look for custom scripts or binaries issuing HTTP requests.
    • Correlate nearby Kubernetes audit entries tied to the same principal and pod to map accessed resources and verbs, noting any exec/attach/portforward or sensitive object interactions across namespaces.
    • Review network activity from the pod to the API server and any in-pod proxies, including DNS lookups and outbound connections, to spot nonstandard clients or tunneling behavior.
    • If suspicious, isolate the pod or node, capture runtime artifacts (e.g., process memory or HTTP client traffic), revoke and rotate the service account credentials, and verify image provenance and integrity.

    False positive analysis#

    • An operator interactively attaches to a pod and uses a Python REPL or bash with /dev/tcp to call the in-cluster API for routine troubleshooting (e.g., list pods, read ConfigMaps, or run selfsubjectaccessreviews), producing normal audit entries that match the rule signature.
    • A correlation artifact arises when two namespaces have pods with the same name: one pod starts an interactive shell while another independently performs get/list/watch calls, and the 1-second sequence keyed only on pod-name links the unrelated events.

    Response and remediation#

    • Immediately isolate the implicated pod that issued direct API calls using a nonstandard utility by applying a deny-all egress NetworkPolicy in its namespace (including to kubernetes.default.svc:443), terminating the interactive session, and scaling its owning Deployment/Job/StatefulSet to zero replicas.
    • Before teardown, capture a runtime snapshot of the container and node including the binary or script used to query the API (e.g., files under /tmp or /dev/tcp usage), shell history, environment, and the mounted service account token and CA bundle at /var/run/secrets/kubernetes.io/serviceaccount/.
    • Revoke access by removing the service account’s RoleBindings/ClusterRoleBindings, deleting all pods that mount that service account to force token rotation, rotating any Secrets and ConfigMaps that were read or created during the window, and deleting any unauthorized Jobs, CronJobs, or Deployments created by the same principal.
    • Restore workloads from a known-good image digest, re-enable the Deployment only after image scan and integrity checks pass, and monitor subsequent Kubernetes audit logs for pods/exec, portforward, and access to secrets across the affected namespaces.
    • Escalate to incident response leadership and consider cluster-wide containment if audit logs show create/patch of ClusterRoleBindings, access to secrets outside the workload’s namespace, or use of pods/exec to pivot into other nodes or system namespaces such as kube-system.
    • Harden access by enforcing least-privilege RBAC that denies pods/exec and attach for application service accounts, setting automountServiceAccountToken: false on workloads that do not need it, restricting egress to the API server with NetworkPolicies, and requiring just-in-time break-glass roles for interactive access.
  • Kubernetes Secret or ConfigMap Access via Azure Arc Proxy source medium: Detects when secrets or configmaps are accessed, created, modified, or deleted in a Kubernetes cluster by the Azure Arc AAD proxy service account. When operations are routed through the Azure Arc Cluster Connect proxy, the Kubernetes audit log records the acting user as system:serviceaccount:azure-arc:azure-arc-kube-aad-proxy-sa with the actual caller identity in the impersonatedUser field. This pattern indicates that someone is accessing the cluster through the Azure ARM API rather than directly via kubectl against the API server. While legitimate for Arc-managed workflows, adversaries with stolen service principal credentials can abuse Arc Cluster Connect to read, exfiltrate, or modify secrets and configmaps while appearing as the Arc proxy service account in K8s audit logs.T1213, T1530, T1552, T1552.007, T1565, T1565.001↳ also matches get-secrets: get secrets, list-secrets: list secrets, create-secrets: create secrets, update-secrets: update secrets, delete-secrets: delete secrets
    Investigation guide

    Triage and analysis#

    Investigating Kubernetes Secret or ConfigMap Access via Azure Arc Proxy#

    When Kubernetes operations are performed through Azure Arc Cluster Connect, the K8s audit log shows the Arc AAD proxy service account as the authenticated user, with the actual Azure AD identity in the impersonatedUser field. This rule detects non-system secret and configmap access — including reads, writes, and deletions — routed through this proxy path. Read operations (get, list) are particularly important to detect as they represent the most common adversary action: exfiltrating secrets without leaving obvious modification traces.

    Possible investigation steps#

    • Check the kubernetes.audit.impersonatedUser.username field — this contains the Azure AD object ID of the actual caller. Cross-reference with Azure AD to identify the service principal or user.
    • Review the kubernetes.audit.impersonatedUser.extra.oid field for the Azure AD object ID.
    • Examine the namespace — operations in default or application namespaces are more suspicious than azure-arc or kube-system.
    • Check the kubernetes.audit.objectRef.name — look for suspicious secret/configmap names that don't match known application resources.
    • Correlate with Azure Activity Logs for the same time window to find the LISTCLUSTERUSERCREDENTIAL operation that initiated the Arc proxy session.
    • Review Azure Sign-In Logs for the impersonated identity's authentication source IP and geolocation.

    Response and remediation#

    • If the impersonated identity is not recognized, revoke its Azure AD credentials immediately.
    • Remove the ClusterRoleBinding or RoleBinding that grants the identity access to secrets/configmaps.
    • Rotate any Kubernetes secrets that may have been read or exfiltrated.
    • Review the Arc connection and consider disconnecting it if compromised.

References #

delete secrets

#
Resource
secrets

Description

Deletes a Secret, destroying credentials in use or covering tracks after copying its contents beforehand. The same Sigma secrets-modified-or-deleted rule matches this verb.

Example Audit Event #

{
  "kind": "Event",
  "apiVersion": "audit.k8s.io/v1",
  "level": "RequestResponse",
  "auditID": "00000000-0000-0000-0000-000000000000",
  "stage": "ResponseComplete",
  "requestURI": "/api/v1/namespaces/dw-harn/secrets/dw-harn-secrets",
  "verb": "delete",
  "user": {
    "username": "kubernetes-admin",
    "groups": [
      "kubeadm:cluster-admins",
      "system:authenticated"
    ],
    "extra": {
      "authentication.kubernetes.io/credential-id": [
        "X509SHA256=9bb0383c49b319fbf6b5ed61ab944378956d4292c784d32244ce2fa4dd846a3c"
      ]
    }
  },
  "sourceIPs": [
    "203.0.113.10"
  ],
  "userAgent": "kubectl/v1.36.2 (linux/amd64) kubernetes/24e2b02",
  "objectRef": {
    "resource": "secrets",
    "namespace": "dw-harn",
    "name": "dw-harn-secrets",
    "apiVersion": "v1"
  },
  "responseStatus": {
    "metadata": {},
    "status": "Success",
    "details": {
      "name": "dw-harn-secrets",
      "kind": "secrets",
      "uid": "00000000-0000-0000-0000-000000000000"
    },
    "code": 200
  },
  "requestObject": {
    "kind": "DeleteOptions",
    "apiVersion": "meta.k8s.io/__internal",
    "propagationPolicy": "Background"
  },
  "responseObject": {
    "kind": "Status",
    "apiVersion": "v1",
    "metadata": {},
    "status": "Success",
    "details": {
      "name": "dw-harn-secrets",
      "kind": "secrets",
      "uid": "00000000-0000-0000-0000-000000000000"
    }
  },
  "requestReceivedTimestamp": "2026-07-02T04:46:49.968365Z",
  "stageTimestamp": "2026-07-02T04:46:49.972561Z",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by ClusterRoleBinding \"kubeadm:cluster-admins\" of ClusterRole \"cluster-admin\" to Group \"kubeadm:cluster-admins\""
  }
}

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
objectRef.resourceeqsecrets2 rulesfalco, sigma
verbeqdelete2 rulesfalco, sigma
objectRef.namespace (falco rule field)nekube-system1 rulefalco

Detection Rules #

Full rule details for this event, including ATT&CK technique mappings and native queries →

Sigma #

Elastic #

  • Kubernetes Secret or ConfigMap Access via Azure Arc Proxy source medium: Detects when secrets or configmaps are accessed, created, modified, or deleted in a Kubernetes cluster by the Azure Arc AAD proxy service account. When operations are routed through the Azure Arc Cluster Connect proxy, the Kubernetes audit log records the acting user as system:serviceaccount:azure-arc:azure-arc-kube-aad-proxy-sa with the actual caller identity in the impersonatedUser field. This pattern indicates that someone is accessing the cluster through the Azure ARM API rather than directly via kubectl against the API server. While legitimate for Arc-managed workflows, adversaries with stolen service principal credentials can abuse Arc Cluster Connect to read, exfiltrate, or modify secrets and configmaps while appearing as the Arc proxy service account in K8s audit logs.T1213, T1530, T1552, T1552.007, T1565, T1565.001↳ also matches get-secrets: get secrets, list-secrets: list secrets, create-secrets: create secrets, update-secrets: update secrets, patch-secrets: patch secrets
    Investigation guide

    Triage and analysis#

    Investigating Kubernetes Secret or ConfigMap Access via Azure Arc Proxy#

    When Kubernetes operations are performed through Azure Arc Cluster Connect, the K8s audit log shows the Arc AAD proxy service account as the authenticated user, with the actual Azure AD identity in the impersonatedUser field. This rule detects non-system secret and configmap access — including reads, writes, and deletions — routed through this proxy path. Read operations (get, list) are particularly important to detect as they represent the most common adversary action: exfiltrating secrets without leaving obvious modification traces.

    Possible investigation steps#

    • Check the kubernetes.audit.impersonatedUser.username field — this contains the Azure AD object ID of the actual caller. Cross-reference with Azure AD to identify the service principal or user.
    • Review the kubernetes.audit.impersonatedUser.extra.oid field for the Azure AD object ID.
    • Examine the namespace — operations in default or application namespaces are more suspicious than azure-arc or kube-system.
    • Check the kubernetes.audit.objectRef.name — look for suspicious secret/configmap names that don't match known application resources.
    • Correlate with Azure Activity Logs for the same time window to find the LISTCLUSTERUSERCREDENTIAL operation that initiated the Arc proxy session.
    • Review Azure Sign-In Logs for the impersonated identity's authentication source IP and geolocation.

    Response and remediation#

    • If the impersonated identity is not recognized, revoke its Azure AD credentials immediately.
    • Remove the ClusterRoleBinding or RoleBinding that grants the identity access to secrets/configmaps.
    • Rotate any Kubernetes secrets that may have been read or exfiltrated.
    • Review the Arc connection and consider disconnecting it if compromised.

Falco #

References #

deletecollection secrets

#
Resource
secrets

Example Audit Event #

{
  "kind": "Event",
  "apiVersion": "audit.k8s.io/v1",
  "level": "RequestResponse",
  "auditID": "00000000-0000-0000-0000-000000000000",
  "stage": "ResponseComplete",
  "requestURI": "/api/v1/namespaces/dw-harn/secrets?labelSelector=dw-harn-patched",
  "verb": "deletecollection",
  "user": {
    "username": "kubernetes-admin",
    "groups": [
      "kubeadm:cluster-admins",
      "system:authenticated"
    ],
    "extra": {
      "authentication.kubernetes.io/credential-id": [
        "X509SHA256=3ffde68ef687218e01296d94b0aa59c81cc98de2bd73ab70e21510c8cd4b9cec"
      ]
    }
  },
  "sourceIPs": [
    "203.0.113.10"
  ],
  "userAgent": "kubectl/v1.36.2 (linux/amd64) kubernetes/24e2b02",
  "objectRef": {
    "resource": "secrets",
    "namespace": "dw-harn",
    "apiVersion": "v1"
  },
  "responseStatus": {
    "metadata": {},
    "code": 200
  },
  "responseObject": {
    "kind": "SecretList",
    "apiVersion": "v1",
    "metadata": {
      "resourceVersion": "571"
    },
    "items": [
      {
        "metadata": {
          "name": "dw-harn-secrets",
          "namespace": "dw-harn",
          "uid": "00000000-0000-0000-0000-000000000000",
          "resourceVersion": "571",
          "creationTimestamp": "2026-07-02T23:12:08Z",
          "labels": {
            "dw-harn-patched": "1"
          }
        },
        "data": {
          "key": "dmFsdWU="
        },
        "type": "Opaque"
      }
    ]
  },
  "requestReceivedTimestamp": "2026-07-02T23:12:12.545713Z",
  "stageTimestamp": "2026-07-02T23:12:12.551013Z",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by ClusterRoleBinding \"kubeadm:cluster-admins\" of ClusterRole \"cluster-admin\" to Group \"kubeadm:cluster-admins\""
  }
}

References #

any verb on secrets (synthetic aggregation)

#
Resource
secrets

Description

Synthetic aggregation for rules that filter the secrets resource with no specific verb. Not a distinct audit record; hosts rule listings that key on objectRef.resource alone.

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
kubernetes.audit.objectRef.resource (elastic rule field)eqsecrets4 ruleselastic
EventType (elastic rule field)inget2 ruleselastic
EventType (elastic rule field)inlist2 ruleselastic
user (elastic rule field)is_not_null1 ruleelastic
user (elastic rule field)starts_withsystem:serviceaccount:1 ruleelastic

Detection Rules #

Full rule details for this event, including ATT&CK technique mappings and native queries →

Elastic #

  • Kubernetes Rapid Secret GET Activity Against Multiple Objects source high: This rule detects an unusual volume of Kubernetes API get requests against multiple distinct Secret objects from the same client fingerprint (user, source IP, and user agent) within a defined lookback window. This can indicate credential access or in-cluster reconnaissance, where a user or token is used to enumerate and retrieve sensitive data such as service account tokens, registry credentials, TLS material, or application configuration. Failed get requests are also included, as they may reveal RBAC boundaries, confirm the existence of targeted secrets, or reflect automated probing activity.T1552, T1552.007
  • Kubernetes Secret get or list with Suspicious User Agent source high: Detects read access to Kubernetes Secrets (get/list) with a user agent matching a curated set of non-standard or attacker-leaning clients, for example minimal HTTP tooling, common scripting stacks, default library fingerprints, or distribution-tagged strings associated with offensive-security Linux images. Legitimate in-cluster automation usually presents stable, purpose-specific user agents (for example controller or client-go variants used by known components).T1552, T1552.007
  • Kubernetes Secret get or list from Node or Pod Service Account source medium: Kubernetes audit identities for kubelet (system:node:*) and workloads (system:serviceaccount:*) are meant to operate with tight, predictable API usage. Direct get or list on the Secrets API from those principals is often a sign of credential access. Attackers who stole a pod service-account token or node credentials sweep Secret objects for tokens, registry credentials, TLS keys, or application configuration. Even denied attempts still reveal intent to reach sensitive material. Legitimate controllers do read secrets they mount or manage, so this signal is most valuable when paired with triage (namespace scope, user agent, RBAC, and whether the identity should touch those secret names at all).T1552, T1552.007