Detection rules › Sigma

Remote Thread Created In Shell Application

Status
test
Severity
medium
Log source
category create_remote_thread, product windows
Author
Splunk Research Team
Source
github.com/SigmaHQ/sigma

Detects remote thread creation in command shell applications, such as "Cmd.EXE" and "PowerShell.EXE". It is a common technique used by malware, such as IcedID, to inject malicious code and execute it within legitimate processes.

MITRE ATT&CK coverage

TacticTechniques
Privilege Escalation
Stealth

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 8: CreateRemoteThread

Rule body

title: Remote Thread Created In Shell Application
id: a9d4d3fa-8fc0-41bc-80b1-30b9fda79d6f
status: test
description: |
    Detects remote thread creation in command shell applications, such as "Cmd.EXE" and "PowerShell.EXE".
    It is a common technique used by malware, such as IcedID, to inject malicious code and execute it within legitimate processes.
references:
    - https://research.splunk.com/endpoint/10399c1e-f51e-11eb-b920-acde48001122/
    - https://www.binarydefense.com/resources/blog/icedid-gziploader-analysis/
author: Splunk Research Team
date: 2024-07-29
modified: 2025-07-04
tags:
    - attack.privilege-escalation
    - attack.stealth
    - attack.t1055
    - detection.threat-hunting
logsource:
    product: windows
    category: create_remote_thread
detection:
    selection:
        TargetImage|endswith:
            - '\cmd.exe'
            - '\powershell.exe'
            - '\pwsh.exe'
    filter_main_system:
        SourceImage|startswith:
            - 'C:\Windows\System32\'
            - 'C:\Windows\SysWOW64\'
            - 'C:\Program Files (x86)\'
            - 'C:\Program Files\'
    filter_optional_defender:
        SourceImage|endswith: '\MsMpEng.exe'
    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_* and not 1 of filter_optional_*

Stage 1: selection

selection:
    TargetImage|endswith:
        - '\cmd.exe'
        - '\powershell.exe'
        - '\pwsh.exe'

Stage 2: not filter_main_system

filter_main_system:
    SourceImage|startswith:
        - 'C:\Windows\System32\'
        - 'C:\Windows\SysWOW64\'
        - 'C:\Program Files (x86)\'
        - 'C:\Program Files\'

Stage 3: not filter_optional_defender

filter_optional_defender:
    SourceImage|endswith: '\MsMpEng.exe'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
SourceImagestarts_withC:\Program Files (x86)\excludes:SourceImage field:"SourceImage" value:"C:\Program Files (x86)\"
SourceImagestarts_withC:\Program Files\excludes:SourceImage field:"SourceImage" value:"C:\Program Files\"
SourceImagestarts_withC:\Windows\SysWOW64\excludes:SourceImage field:"SourceImage" value:"C:\Windows\SysWOW64\"
SourceImagestarts_withC:\Windows\System32\excludes:SourceImage field:"SourceImage" value:"C:\Windows\System32\"
SourceImageends_with\MsMpEng.exeexcludes:SourceImage field:"SourceImage" value:"\MsMpEng.exe"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
TargetImageends_with
  • \cmd.exe
  • \powershell.exe
  • \pwsh.exe
field:"TargetImage" kind:ends_with