Kubernetes Unauthorized or Unauthenticated Access

Detects when a request to the Kubernetes API is rejected due to lack of authorization or due to an expired authentication token being used. This may indicate an attacker attempting to leverage credentials they have obtained.

Sigma rule (View on GitHub)

 1title: Kubernetes Unauthorized or Unauthenticated Access
 2id: 0d933542-1f1f-420d-97d4-21b2c3c492d9
 3status: experimental
 4description: |
 5    Detects when a request to the Kubernetes API is rejected due to lack of authorization or due to an expired authentication token being used.
 6    This may indicate an attacker attempting to leverage credentials they have obtained.    
 7references:
 8    - https://kubernetes.io/docs/reference/config-api/apiserver-audit.v1/
 9    - https://www.datadoghq.com/blog/monitor-kubernetes-audit-logs/#monitor-api-authentication-issues
10author: kelnage
11date: 2024-04-12
12tags:
13    - attack.privilege-escalation
14logsource:
15    product: kubernetes
16    service: audit
17detection:
18    selection:
19        responseStatus.code:
20            - 401 # Unauthorized
21            - 403 # Forbidden
22    condition: selection
23falsepositives:
24    - A misconfigured RBAC policy, a mistake by a valid user, or a wider issue with authentication tokens can also generate these errors.
25level: low

References

Related rules

to-top