name: Script Execution via WMI
id: aa73f80d-d728-4077-b226-81ea0c8be589
version: 3
date: '2020-03-16'
author: Rico Valdez, Splunk
type: batch
datamodel: []
description: This search looks for scripts launched via WMI.
search: '| tstats `security_content_summariesonly` count values(Processes.process)
  as process min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes
  where Processes.process_name = "scrcons.exe" by Processes.user Processes.dest Processes.process_name  |
  `drop_dm_object_name("Processes")` | `security_content_ctime(firstTime)`| `security_content_ctime(lastTime)`|
  `script_execution_via_wmi_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: Although unlikely, administrators may use wmi to launch scripts
  for legitimate purposes.
references: []
tags:
  analytic_story:
  - Suspicious WMI Use
  asset_type: Endpoint
  automated_detection_testing: passed
  cis20:
  - CIS 3
  - CIS 5
  dataset:
  - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1047/execution_scrcons/windows-sysmon.log
  kill_chain_phases:
  - Actions on Objectives
  mitre_attack_id:
  - T1047
  nist:
  - PR.PT
  - PR.AT
  - PR.AC
  - PR.IP
  product:
  - Splunk Enterprise
  - Splunk Enterprise Security
  - Splunk Cloud
  required_fields:
  - _time
  - Processes.process_name
  - Processes.user
  - Processes.dest
  security_domain: endpoint
