Windows Process Injection With Public Source Path

Original Source: [splunk source]
Name:Windows Process Injection With Public Source Path
id:492f09cf-5d60-4d87-99dd-0bc325532dda
version:4
date:2024-10-17
author:Teoderick Contreras, Splunk
status:production
type:Hunting
Description:The following analytic detects a process from a non-standard file path on Windows attempting to create a remote thread in another process. This is identified using Sysmon EventCode 8, focusing on processes not originating from typical system directories. This behavior is significant as it often indicates process injection, a technique used by adversaries to evade detection or escalate privileges. If confirmed malicious, this activity could allow an attacker to execute arbitrary code within another process, potentially leading to unauthorized actions and further compromise of the system.
Data_source:
  • -Sysmon EventID 8
search:`sysmon` EventCode=8 TargetImage = "*.exe" AND NOT(SourceImage IN("C:\\Windows\\*", "C:\\Program File*", "%systemroot%\\*"))
| stats count min(_time) as firstTime max(_time) as lastTime by SourceImage TargetImage signature TargetProcessGuid SourceProcessGuid TargetProcessId SourceProcessId StartAddress EventCode dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_process_injection_with_public_source_path_filter`


how_to_implement:To successfully implement this search, you must be ingesting data that records process activity from your hosts to populate the endpoint data model in the processes node. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.
known_false_positives:Some security products or third party applications may utilize CreateRemoteThread, filter as needed before enabling as a notable.
References:
  -https://unit42.paloaltonetworks.com/brute-ratel-c4-tool/
drilldown_searches:
  :
tags:
  analytic_story:
    - 'Brute Ratel C4'
  asset_type:Endpoint
  confidence:80
  impact:80
  message:process $SourceImage$ create a remote thread to process $TargetImage$ on host $dest$
  mitre_attack_id:
    - 'T1055'
    - 'T1055.002'
  observable:
    name:'dest'
    type:'Hostname'
    - role:
      - 'Victim'
    name:'SourceImage'
    type:'Process'
    - role:
      - 'Attacker'
    name:'TargetImage'
    type:'Process'
    - role:
      - 'Attacker'
  product:
    - 'Splunk Enterprise'
    - 'Splunk Enterprise Security'
    - 'Splunk Cloud'
  required_fields:
    - '_time'
    - 'SourceImage'
    - 'TargetImage'
    - 'TargetProcessId'
    - 'SourceProcessId'
    - 'StartAddress'
    - 'EventCode'
    - 'dest'
    - 'signature'
    - 'TargetProcessGuid'
    - 'SourceProcessGuid'
    - 'StartAddress'
  risk_score:64
  security_domain:endpoint

tests:
name:'True Positive Test'
 attack_data:
  data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/brute_ratel/create_remote_thread/sysmon.log
  source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
  sourcetype: XmlWinEventLog
  update_timestamp: True
manual_test:None

Related Analytic Stories


Brute Ratel C4