name: Scheduled Task Deleted Or Created via CMD
id: d5af132c-7c17-439c-9d31-13d55340f36c
version: 5
date: '2020-12-17'
author: Bhavin Patel, Splunk
type: batch
datamodel:
- Endpoint
description: This search looks for flags passed to schtasks.exe on the command-line
  that indicate a task was created via command like. This has been associated with
  the Dragonfly threat actor, and the SUNBURST attack against Solarwinds.
search: '| tstats `security_content_summariesonly` count values(Processes.process)
  as process values(Processes.parent_process) as parent_process min(_time) as firstTime
  max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=schtasks.exe
  (Processes.process=*delete* OR Processes.process=*create*) by Processes.user Processes.process_name
  Processes.parent_process_name Processes.dest | `drop_dm_object_name(Processes)`
  | `security_content_ctime(firstTime)`| `security_content_ctime(lastTime)` | `scheduled_task_deleted_or_created_via_cmd_filter` '
how_to_implement: You must be ingesting endpoint data that tracks process activity,
  including parent-child relationships from your endpoints to populate the Endpoint
  data model in the Processes node. The command-line arguments are mapped to the "process"
  field in the Endpoint data model.
known_false_positives: Tasks should not be manually created via CLI, this is rarely
  done by admins as well
references: []
tags:
  analytic_story:
  - DHS Report TA18-074A
  - NOBELIUM Group
  asset_type: Endpoint
  automated_detection_testing: passed
  cis20:
  - CIS 3
  dataset:
  - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.005/atomic_red_team/windows-sysmon.log
  kill_chain_phases:
  - Actions on Objectives
  mitre_attack_id:
  - T1053.005
  nist:
  - PR.IP
  product:
  - Splunk Enterprise
  - Splunk Enterprise Security
  - Splunk Cloud
  required_fields:
  - _time
  - Processes.process
  - Processes.parent_process
  - Processes.process_name
  - Processes.user
  - Processes.parent_process_name
  - Processes.dest
  security_domain: endpoint
