Detection rules › Splunk

Create Remote Thread In Shell Application

Status
production
Severity
medium
Group by
StartFunction, StartModule, dest, process_guid, process_id, signature, signature_id, source_process_name, target_process_name, vendor_product
Author
Teoderick Contreras, Splunk
Source
github.com/splunk/security_content

The following analytic detects suspicious process injection in command shell applications, specifically targeting cmd.exe and powershell.exe. It leverages Sysmon EventCode 8 to identify the creation of remote threads within these shell processes. This activity is significant because it is a common technique used by malware, such as IcedID, to inject malicious code and execute it within legitimate processes. If confirmed malicious, this behavior could allow an attacker to execute arbitrary code, escalate privileges, or maintain persistence within the environment, posing a severe threat to system security.

Known false positives

  • No false positives have been identified at this time.

MITRE ATT&CK coverage

TacticTechniques
Privilege Escalation
Stealth

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 8: CreateRemoteThread

Rule body

name: Create Remote Thread In Shell Application
id: 10399c1e-f51e-11eb-b920-acde48001122
version: 13
creation_date: '2021-08-05'
modification_date: '2026-06-29'
author: Teoderick Contreras, Splunk
status: production
type: TTP
description: |-
    The following analytic detects suspicious process injection in command shell applications, specifically targeting `cmd.exe` and `powershell.exe`.
    It leverages Sysmon EventCode 8 to identify the creation of remote threads within these shell processes.
    This activity is significant because it is a common technique used by malware, such as IcedID, to inject malicious code and execute it within legitimate processes.
    If confirmed malicious, this behavior could allow an attacker to execute arbitrary code, escalate privileges, or maintain persistence within the environment, posing a severe threat to system security.
data_source:
    - Sysmon EventID 8
search: |-
    `sysmon`
    EventCode=8
    TargetImage IN (
        "*\\cmd.exe",
        "*\\powershell_ise.exe",
        "*\\powershell.exe",
        "*\\pwsh.exe"
    )
    | stats count min(_time) as firstTime
                  max(_time) as lastTime
                  values(NewThreadId) as "NewThreadId"
                  values(StartAddress) as "StartAddress"
      by dest signature_id signature
         SourceProcessGuid SourceProcessId SourceImage
         TargetProcessGuid TargetProcessId TargetImage
         StartModule StartFunction vendor_product
    | `security_content_ctime(firstTime)`
    | `security_content_ctime(lastTime)`
    | `create_remote_thread_in_shell_application_filter`
how_to_implement: To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.
known_false_positives: No false positives have been identified at this time.
references:
    - https://thedfirreport.com/2021/07/19/icedid-and-cobalt-strike-vs-antivirus/
finding:
    title: The process $SourceImage$ created a remote thread into the shell app process $TargetImage$ in host $dest$
    entity:
        field: dest
        type: system
        score: 50
threat_objects:
    - field: SourceImage
      type: process_name
    - field: TargetImage
      type: process_name
analytic_story:
    - IcedID
    - Qakbot
    - Warzone RAT
asset_type: Endpoint
mitre_attack_id:
    - T1055
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: search

`sysmon`
EventCode=8
TargetImage IN (
    "*\\cmd.exe",
    "*\\powershell_ise.exe",
    "*\\powershell.exe",
    "*\\pwsh.exe"
)

Stage 2: stats

| stats count min(_time) as firstTime
              max(_time) as lastTime
              values(NewThreadId) as "NewThreadId"
              values(StartAddress) as "StartAddress"
  by dest signature_id signature
     SourceProcessGuid SourceProcessId SourceImage
     TargetProcessGuid TargetProcessId TargetImage
     StartModule StartFunction vendor_product

Stage 3: search

| `security_content_ctime(firstTime)`

Stage 4: search

| `security_content_ctime(lastTime)`

Stage 5: search

| `create_remote_thread_in_shell_application_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 8 corpus 10 (splunk 9, elastic 1)
field:"EventID" kind:eq value:"8"
TargetImagein
  • "*\\cmd.exe"
  • "*\\powershell.exe"
  • "*\\powershell_ise.exe"
  • "*\\pwsh.exe"
field:"TargetImage" kind:in