Azure Kubernetes CronJob

Identifies when a Azure Kubernetes CronJob runs in Azure Cloud. Kubernetes Job is a controller that creates one or more pods and ensures that a specified number of them successfully terminate. Kubernetes Job can be used to run containers that perform finite tasks for batch jobs. Kubernetes CronJob is used to schedule Jobs. An Adversary may use Kubernetes CronJob for scheduling execution of malicious code that would run as a container in the cluster.

Sigma rule (View on GitHub)

 1title: Azure Kubernetes CronJob
 2id: 1c71e254-6655-42c1-b2d6-5e4718d7fc0a
 3status: test
 4description: |
 5  Identifies when a Azure Kubernetes CronJob runs in Azure Cloud. Kubernetes Job is a controller that creates one or more pods and ensures that a specified number of them successfully terminate.
 6  Kubernetes Job can be used to run containers that perform finite tasks for batch jobs. Kubernetes CronJob is used to schedule Jobs.
 7  An Adversary may use Kubernetes CronJob for scheduling execution of malicious code that would run as a container in the cluster.  
 8references:
 9    - https://learn.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#microsoftkubernetes
10    - https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
11    - https://kubernetes.io/docs/concepts/workloads/controllers/job/
12    - https://www.microsoft.com/security/blog/2020/04/02/attack-matrix-kubernetes/
13author: Austin Songer @austinsonger
14date: 2021-11-22
15modified: 2022-12-18
16tags:
17    - attack.persistence
18    - attack.t1053.003
19    - attack.privilege-escalation
20    - attack.execution
21logsource:
22    product: azure
23    service: activitylogs
24detection:
25    selection:
26        operationName|startswith:
27            - 'MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/BATCH'
28            - 'MICROSOFT.CONTAINERSERVICE/MANAGEDCLUSTERS/BATCH'
29        operationName|endswith:
30            - '/CRONJOBS/WRITE'
31            - '/JOBS/WRITE'
32    condition: selection
33falsepositives:
34    - Azure Kubernetes CronJob/Job may be done by a system administrator.
35    - If known behavior is causing false positives, it can be exempted from the rule.
36level: medium

References

Related rules

to-top