Detection rules › Splunk
Suspicious Execution via Microsoft Common Console (Sysmon)
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
| Tactic | Techniques |
|---|---|
| Stealth |
References
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule body
id: '33701.59574'
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_sysmon` (TERM(EventCode=1) OR "<EventID>1<")
(TERM(mmc) OR "mmc.exe") ".msc" | where match(parent_process_name, "(?i)mmc\.exe")
and match(parent_process, "(?i)\.msc") and !match(parent_process, "(?i):\x5cWindows\x5c(System32|SysWOW64)\x5c\S+\.msc|Program\sFiles(\s\(x86\))?\x5c\S+\.msc")
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")
| 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 Sysmon
references:
- https://www.elastic.co/security-labs/grimresource
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<") (TERM(mmc) OR "mmc.exe") ".msc"
Stage 2: where
| where match(parent_process_name, "(?i)mmc\.exe") and match(parent_process, "(?i)\.msc") and !match(parent_process, "(?i):\x5cWindows\x5c(System32|SysWOW64)\x5c\S+\.msc|Program\sFiles(\s\(x86\))?\x5c\S+\.msc") 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")
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.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
parent_process | regex_match | "(?i):\x5cWindows\x5c(System32|SysWOW64)\x5c\S+.msc, Program\sFiles(\s(x86))?\x5c\S+.msc" | excludes:parent_process |
process_path | regex_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.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"1" |
parent_process | regex_match |
| field:"ParentCommandLine" kind:regex_match |
parent_process_name | regex_match |
| field:"parent_process_name" kind:regex_match |
Search terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>1<" |
| 1 | mmc |
| 1 | "mmc.exe" |
| 1 | ".msc" |