Detection rules › Sigma

Suspicious MSHTA Child Process

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Michael Haag
Source
github.com/SigmaHQ/sigma

Detects a suspicious process spawning from an "mshta.exe" process, which could be indicative of a malicious HTA script execution

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Suspicious MSHTA Child Process
id: 03cc0c25-389f-4bf8-b48d-11878079f1ca
status: test
description: Detects a suspicious process spawning from an "mshta.exe" process, which could be indicative of a malicious HTA script execution
references:
    - https://www.trustedsec.com/july-2015/malicious-htas/
author: Michael Haag
date: 2019-01-16
modified: 2023-02-06
tags:
    - attack.stealth
    - attack.t1218.005
    - car.2013-02-003
    - car.2013-03-001
    - car.2014-04-003
logsource:
    category: process_creation
    product: windows
detection:
    selection_parent:
        ParentImage|endswith: '\mshta.exe'
    selection_child:
        - Image|endswith:
              - '\cmd.exe'
              - '\powershell.exe'
              - '\pwsh.exe'
              - '\wscript.exe'
              - '\cscript.exe'
              - '\sh.exe'
              - '\bash.exe'
              - '\reg.exe'
              - '\regsvr32.exe'
              - '\bitsadmin.exe'
        - OriginalFileName:
              - 'Cmd.Exe'
              - 'PowerShell.EXE'
              - 'pwsh.dll'
              - 'wscript.exe'
              - 'cscript.exe'
              - 'Bash.exe'
              - 'reg.exe'
              - 'REGSVR32.EXE'
              - 'bitsadmin.exe'
    condition: all of selection*
falsepositives:
    - Printer software / driver installations
    - HP software
level: high

Stages and Predicates

Stage 0: condition

all of selection*

Stage 1: selection_parent

selection_parent:
    ParentImage|endswith: '\mshta.exe'

Stage 2: selection_child

selection_child:
    - Image|endswith:
          - '\cmd.exe'
          - '\powershell.exe'
          - '\pwsh.exe'
          - '\wscript.exe'
          - '\cscript.exe'
          - '\sh.exe'
          - '\bash.exe'
          - '\reg.exe'
          - '\regsvr32.exe'
          - '\bitsadmin.exe'
    - OriginalFileName:
          - 'Cmd.Exe'
          - 'PowerShell.EXE'
          - 'pwsh.dll'
          - 'wscript.exe'
          - 'cscript.exe'
          - 'Bash.exe'
          - 'reg.exe'
          - 'REGSVR32.EXE'
          - 'bitsadmin.exe'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
Imageends_with
  • \bash.exe corpus 22 (sigma 22)
  • \bitsadmin.exe corpus 29 (sigma 29)
  • \cmd.exe corpus 130 (sigma 130)
  • \cscript.exe corpus 73 (sigma 73)
  • \powershell.exe corpus 182 (sigma 182)
  • \pwsh.exe corpus 168 (sigma 168)
  • \reg.exe corpus 58 (sigma 58)
  • \regsvr32.exe corpus 65 (sigma 65)
  • \sh.exe corpus 16 (sigma 16)
  • \wscript.exe corpus 75 (sigma 75)
OriginalFileNameeq
  • Bash.exe corpus 4 (sigma 3, elastic 1)
  • Cmd.Exe corpus 65 (sigma 43, splunk 17, elastic 5)
  • PowerShell.EXE corpus 120 (sigma 84, splunk 30, elastic 6)
  • REGSVR32.EXE corpus 26 (sigma 17, splunk 6, elastic 3)
  • bitsadmin.exe corpus 12 (sigma 9, splunk 2, kusto 1)
  • cscript.exe corpus 19 (sigma 17, elastic 2)
  • pwsh.dll corpus 112 (sigma 79, splunk 30, elastic 3)
  • reg.exe corpus 42 (sigma 32, splunk 8, elastic 2)
  • wscript.exe corpus 20 (sigma 17, elastic 3)
ParentImageends_with
  • \mshta.exe corpus 13 (sigma 13)