T1053.007 CrowdStrike LogScale · LogScale

Detect Container Orchestration Job in CrowdStrike LogScale

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 may utilize a CronJob to schedule deployment of a Job that executes malicious code in various nodes within a cluster.

MITRE ATT&CK

Tactic
Execution Persistence Privilege Escalation
Technique
T1053 Scheduled Task/Job
Sub-technique
T1053.007 Container Orchestration Job
Canonical reference
https://attack.mitre.org/techniques/T1053/007/

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
// Requires Falcon for Containers with Kubernetes Admission Controller (KAC) or K8s audit log ingestion into LogScale
(#event_simpleName = /K8sAdmissionReview|K8sCronJobCreated|K8sJobCreated/i)
OR (ResourceType = /^(cronjobs|jobs)$/i AND Verb = /^(create|update|patch)$/i)
| IsSuspiciousImage := if(
    ImageName = /(?i)(alpine|busybox|ubuntu|debian|kali|python|perl|ruby|php|ncat|netcat|nmap|masscan)/,
    then=1, else=0)
| IsSuspiciousCmd := if(
    CommandLine = /(?i)(bash -i|\/dev\/tcp|mkfifo|socat|base64 -d|ncat|chmod \+x)/
    OR ContainerArgs = /(?i)(bash -i|\/dev\/tcp|mkfifo|socat|base64 -d)/,
    then=1, else=0)
| IsHostPath := if(VolumeType = "hostPath" OR HostPathMount = "true", then=1, else=0)
| IsPrivileged := if(Privileged = "true" OR PrivilegedContainer = "true", then=1, else=0)
| IsHostNetwork := if(HostNetwork = "true", then=1, else=0)
| IsSensitiveMount := if(
    MountPath = /(\/var\/run\/docker\.sock|\/proc|\/sys|\/etc)/,
    then=1, else=0)
| SuspicionScore := IsSuspiciousImage + IsSuspiciousCmd + IsHostPath + IsPrivileged + IsHostNetwork + IsSensitiveMount
| SuspicionScore > 0
| select([_timestamp, ComputerName, UserName, Namespace, ResourceName, ResourceType, ImageName, CommandLine, Verb, IsPrivileged, IsHostNetwork, IsHostPath, IsSuspiciousImage, IsSuspiciousCmd, IsSensitiveMount, SuspicionScore])
| sort(SuspicionScore, order=desc)
high severity medium confidence

CrowdStrike LogScale detection query for suspicious Kubernetes CronJob and Job creation events using Falcon for Containers telemetry from the Kubernetes Admission Controller (KAC) or ingested K8s API server audit logs. Applies a six-factor suspicion scoring model evaluating container image names, command line arguments, hostPath volume usage, privileged container flags, host network sharing, and sensitive filesystem mount paths. Events with any suspicion indicator are surfaced ranked by total score descending.

Data Sources

CrowdStrike Falcon for Containers — Kubernetes Admission Controller (KAC) telemetryFalcon LogScale K8s audit log ingestion connectorFalcon Horizon cloud security posture events for container workloads

Required Tables

Falcon event types: K8sAdmissionReview, K8sCronJobCreated, K8sJobCreated; fields: ImageName, CommandLine, ContainerArgs, VolumeType, HostPathMount, Privileged, PrivilegedContainer, HostNetwork, MountPath, Namespace, ResourceName, ResourceType, Verb

False Positives & Tuning

  • Legitimate workload deployments by development teams using alpine or ubuntu base images in approved application namespaces
  • Authorized penetration testing exercises scheduling offensive tooling containers in isolated lab or staging clusters
  • Node-level observability agents (Prometheus node exporter, Falco, Datadog) deployed as privileged DaemonSet jobs requiring hostPath mounts and host network access
Download portable Sigma rule (.yml)

Other platforms for T1053.007


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 Malicious Kubernetes CronJob with Reverse Shell Command

    Expected signal: Kubernetes API audit log: verb=create, objectRef.resource=cronjobs, objectRef.namespace=default, objectRef.name=argus-test-cronjob. Request body will contain image=alpine:latest, command /bin/sh -c, args with nc reverse shell. Subsequent Job and Pod creation events will appear as the schedule triggers. Pod logs will show connection failure.

  2. Test 2Create Privileged Kubernetes Job with Host Path Mount

    Expected signal: Kubernetes API audit log: verb=create, objectRef.resource=jobs, request body contains image=busybox:latest, securityContext.privileged=true, hostPath.path=/etc. Pod creation event follows. Container process execution visible in node container runtime logs and Falco alerts if deployed.

  3. Test 3Create Kubernetes CronJob Using Docker Socket Mount for Container Escape

    Expected signal: Kubernetes API audit log: verb=create, objectRef.resource=cronjobs, request body contains hostPath.path=/var/run/docker.sock. Schedule */5 * * * * triggers Jobs periodically. Container execution attempts to access the Docker socket. Falco rule 'Write below monitored dir' or 'Container with sensitive mount' may trigger.

  4. Test 4Deploy Cryptomining CronJob via kubectl

    Expected signal: Kubernetes API audit log: verb=create, objectRef.resource=cronjobs, request body contains image=ubuntu:20.04, command with curl download, chmod +x, and execution of downloaded binary. Subsequent pod creation when schedule triggers. Container logs show download failure. Sysmon/auditd on node would show curl process and chmod if running.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections