Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Adversaries may abuse task scheduling functionality provided by container orchestration tools such as Kubernetes to schedule deployment of containers configured to execute malicious code.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | -39% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -33% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 42% | 0% |
> Sub-technique of: T1053
Adversaries may abuse task scheduling functionality provided by container orchestration tools such as Kubernetes to schedule deployment of containers configured to execute malicious code. Container orchestration jobs run these automated tasks at a specific date and time, similar to cron jobs on a Linux system. Deployments of this type can also be configured to maintain a quantity of containers over time, automating the process of maintaining persistence within a cluster.
In Kubernetes, a CronJob may be used to schedule a Job that runs one or more containers to perform specific tasks. An adversary therefore may utilize a CronJob to schedule deployment of a Job that executes malicious code in various nodes within a cluster.
Platforms: Containers
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
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. Attackers may use Kubernetes CronJob for scheduling execution of malicious code that would run as a container in the cluster.
Supported Platforms: containers
bashkubectl get cronjobs -n #{namespace}
Dependencies:
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. Attackers may use Kubernetes CronJob for scheduling execution of malicious code that would run as a container in the cluster.
Supported Platforms: containers
bashkubectl create -f src/cronjob.yaml -n #{namespace}
Dependencies:
If Atomic Red Team tests are not applicable, manually verify the technique by:
Limit privileges of user accounts and remediate privilege escalation vectors so only authorized administrators can create container orchestration jobs.
Ensure containers are not running as root by default. In Kubernetes environments, consider defining Pod Security Standards that prevent pods from running privileged containers.
| Finding | Severity | Impact | | ------------------------------------------------ | -------- | --------- | | Container Orchestration Job technique applicable | Low | Execution |
| CWE ID | Title | | ------ | -------------------------------------- | | CWE-94 | Improper Control of Generation of Code |
Other measured skills in the registry, with their headline benchmark lift.