name: Detect Path Interception By Creation Of program exe
id: c77162d3-f93c-45cc-80c8-22f6v5264g9f
version: 3
date: '2020-07-03'
author: Patrick Bareiss, Splunk
type: batch
datamodel:
- Endpoint
description: 'The detection Detect Path Interception By Creation Of program exe is
  detecting the abuse of unquoted service paths, which is a popular technique for
  privilege escalation. '
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time)
  as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=services.exe
  by Processes.user Processes.process_name Processes.process Processes.dest | `drop_dm_object_name(Processes)`
  | rex field=process "^.*?\\\\(?<service_process>[^\\\\]*\.(?:exe|bat|com|ps1))"
  | eval process_name = lower(process_name) | eval service_process = lower(service_process)
  | where process_name != service_process | `security_content_ctime(firstTime)` |
  `security_content_ctime(lastTime)` | `detect_path_interception_by_creation_of_program_exe_filter`'
how_to_implement: You must be ingesting data that records process activity from your
  hosts to populate the Endpoint data model in the Processes node. You must also be
  ingesting logs with both the process name and command line from your endpoints.
  The command-line arguments are mapped to the "process" field in the Endpoint data
  model.
known_false_positives: unknown
references:
- https://medium.com/@SumitVerma101/windows-privilege-escalation-part-1-unquoted-service-path-c7a011a8d8ae
tags:
  analytic_story:
  - Windows Persistence Techniques
  asset_type: Endpoint
  automated_detection_testing: passed
  cis20:
  - CIS 8
  dataset:
  - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1574.009/atomic_red_team/windows-sysmon.log
  kill_chain_phases:
  - Actions on Objectives
  mitre_attack_id:
  - T1574.009
  nist:
  - PR.PT
  - DE.CM
  product:
  - Splunk Enterprise
  - Splunk Enterprise Security
  - Splunk Cloud
  required_fields:
  - _time
  - Processes.parent_process_name
  - Processes.user
  - Processes.process_name
  - Processes.process
  - Processes.dest
  security_domain: endpoint
