Detection rules › Sigma

Potential Arbitrary Command Execution Using Msdt.EXE

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects processes leveraging the "ms-msdt" handler or the "msdt.exe" binary to execute arbitrary commands as seen in the follina (CVE-2022-30190) vulnerability

MITRE ATT&CK coverage

TacticTechniques
StealthT1202 Indirect Command Execution

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Potential Arbitrary Command Execution Using Msdt.EXE
id: 258fc8ce-8352-443a-9120-8a11e4857fa5
status: test
description: Detects processes leveraging the "ms-msdt" handler or the "msdt.exe" binary to execute arbitrary commands as seen in the follina (CVE-2022-30190) vulnerability
references:
    - https://twitter.com/nao_sec/status/1530196847679401984
    - https://app.any.run/tasks/713f05d2-fe78-4b9d-a744-f7c133e3fafb/
    - https://twitter.com/_JohnHammond/status/1531672601067675648
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-05-29
modified: 2024-03-13
tags:
    - attack.stealth
    - attack.t1202
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\msdt.exe'
        - OriginalFileName: 'msdt.exe'
    selection_cmd_inline:
        CommandLine|contains: 'IT_BrowseForFile='
    selection_cmd_answerfile_flag:
        CommandLine|contains: ' PCWDiagnostic'
    selection_cmd_answerfile_param:
        CommandLine|contains|windash: ' -af '
    condition: selection_img and (selection_cmd_inline or all of selection_cmd_answerfile_*)
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection_img and (selection_cmd_inline or all of selection_cmd_answerfile_*)

Stage 1: selection_img

selection_img:
    - Image|endswith: '\msdt.exe'
    - OriginalFileName: 'msdt.exe'

Stage 2: selection_cmd_inline

selection_cmd_inline:
    CommandLine|contains: 'IT_BrowseForFile='

Stage 3: selection_cmd_answerfile_flag

selection_cmd_answerfile_flag:
    CommandLine|contains: ' PCWDiagnostic'

Stage 4: selection_cmd_answerfile_param

selection_cmd_answerfile_param:
    CommandLine|contains|windash: ' -af '

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
CommandLinematch
  • -af transforms: windash corpus 3 (sigma 3)
  • PCWDiagnostic
  • IT_BrowseForFile= corpus 2 (sigma 1, splunk 1)
Imageends_with
  • \msdt.exe corpus 9 (sigma 9)
OriginalFileNameeq
  • msdt.exe corpus 8 (sigma 6, elastic 2)