Detection rules › Splunk

Suspicious Execution via Microsoft Common Console (Windows Event Log)

Group by
_time, host
Source
github.com/anvilogic-forge/armory

Microsoft Management Console (MMC) can be used to create, open, and save custom consoles that contain administrative tools created by Microsoft, called snap-ins. These snap-ins may be used to manage Windows systems locally or remotely. MMC can also be used to open Microsoft created .msc files to manage system configuration. Threat actors may leverage malicious .msc files to gain full code execution via mmc.exe as observed in the GrimResource technique. This use case child processes created by mmc.exe that do not originate from common system directories or standard application paths. NOTE: Due to its extended logging capabilities for parent process behaviors and attributes, Sysmon is recommended for best rule fidelity.

MITRE ATT&CK coverage

References

Telemetry coverage

Rule body

id: '33701.59575'
title: Suspicious Execution via Microsoft Common Console
description: 'Microsoft Management Console (MMC) can be used to create, open, and
  save custom consoles that contain administrative tools created by Microsoft, called
  snap-ins. These snap-ins may be used to manage Windows systems locally or remotely.
  MMC can also be used to open Microsoft created .msc files to manage system configuration.
  Threat actors may leverage malicious .msc files to gain full code execution via
  mmc.exe as observed in the GrimResource technique. This use case child processes
  created by mmc.exe that do not originate from common system directories or standard
  application paths. NOTE: Due to its extended logging capabilities for parent process
  behaviors and attributes, Sysmon is recommended for best rule fidelity.'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
  "<EventID>4688<" OR Type=Process) (TERM(mmc) OR "mmc.exe") | where match(parent_process_name,
  "(?i)mmc\.exe") and !match(process_path, "(?i):\x5c(Windows\x5c(System32|SysWOW64)\x5c(mmc|wermgr|WerFault)\.exe)|Program\sFiles(\s\(x86\))?\x5c.*\.exe|Windows\x5cSystem32\x5cspool\x5cdrivers\x5cx64\x5c3\x5c\S+\.exe")
  and !match(process, "(?i):\x5c(Windows\x5c(System32|SysWOW64)\x5c(wermgr|WerFault)\.exe)")
  | table _time, host, user, process, parent_process, parent_process_*, process_*
  | bin span=1s | stats values(*) as * by _time, host '
techniques:
- defense-evasion:system binary proxy execution
technique_id: 
- T1218.014
data_category:
- Windows event logs
references:
- https://www.elastic.co/security-labs/grimresource

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) (TERM(mmc) OR "mmc.exe")

Stage 2: where

| where match(parent_process_name, "(?i)mmc\.exe") and !match(process_path, "(?i):\x5c(Windows\x5c(System32|SysWOW64)\x5c(mmc|wermgr|WerFault)\.exe)|Program\sFiles(\s\(x86\))?\x5c.*\.exe|Windows\x5cSystem32\x5cspool\x5cdrivers\x5cx64\x5c3\x5c\S+\.exe") and !match(process, "(?i):\x5c(Windows\x5c(System32|SysWOW64)\x5c(wermgr|WerFault)\.exe)")

Stage 3: table

| table _time, host, user, process, parent_process, parent_process_*, process_*

Stage 4: bucket

| bin span=1s

Stage 5: stats

| stats values(*) as * by _time, host

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
processregex_match"(?i):\x5c(Windows\x5c(System32|SysWOW64)\x5c(wermgr|WerFault).exe)"excludes:process
process_pathregex_match"(?i):\x5c(Windows\x5c(System32|SysWOW64)\x5c(mmc|wermgr|WerFault).exe), Program\sFiles(\s(x86))?\x5c.*.exe, Windows\x5cSystem32\x5cspool\x5cdrivers\x5cx64\x5c3\x5c\S+.exe"excludes:process_path

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 4688 corpus 317 (splunk 283, kusto 33, elastic 1)
field:"EventID" kind:eq value:"4688"
parent_process_nameregex_match
  • "(?i)mmc.exe" corpus 2 (splunk 2)
field:"parent_process_name" kind:regex_match

Search terms

These SPL tokens match against raw event text.

StageTerm
1"<EventID>4688<"
1mmc
1"mmc.exe"