Detection rules › Splunk

Cmstp Execution (Sysmon)

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

Adversaries may abuse CMSTP to proxy execution of malicious code. The Microsoft Connection Manager Profile Installer (CMSTP.exe) is a command-line program used to install Connection Manager service profiles. CMSTP.exe accepts an installation information file (INF) as a parameter and installs a service profile leveraged for remote access connections

MITRE ATT&CK coverage

References

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

id: '13810.20276'
title: Cmstp Execution
description: 'Adversaries may abuse CMSTP to proxy execution of malicious code. The
  Microsoft Connection Manager Profile Installer (CMSTP.exe) is a command-line program
  used to install Connection Manager service profiles. CMSTP.exe accepts an installation
  information file (INF) as a parameter and installs a service profile leveraged for
  remote access connections. Living Off the Land Binary and Scripts (LOLBAS) (LOLBIN)
  Atomics T1218.003 Test #1 Atomics T1218.003 Test #2'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<"
  OR Type=Process) ("cmstp.exe") OR ("/s" "/.inf") OR "/ni" OR "/ns" | regex process="(?i)cmstp|\s+\/s\s+.+\.inf|\s+\/ni\s+.{4,}|\s+\/ns\s+.{4,}"
  | table _time, host, user process, process_*, signature_id, parent_* | bin span=1s
  | stats values(*) as * by _time, host '
techniques:
- defense-evasion:system binary proxy execution:cmstp
technique_id:
- T1218.003
data_category:
- Windows Sysmon
references:
- https://lolbas-project.github.io/lolbas/Binaries/Cmstp/

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<" OR Type=Process) ("cmstp.exe") OR ("/s" "/.inf") OR "/ni" OR "/ns"

Stage 2: regex

| regex process="(?i)cmstp|\s+\/s\s+.+\.inf|\s+\/ni\s+.{4,}|\s+\/ns\s+.{4,}"

Stage 3: table

| table _time, host, user process, process_*, signature_id, parent_*

Stage 4: bucket

| bin span=1s

Stage 5: stats

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

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
EventCodeeq
  • 1 corpus 237 (splunk 224, kusto 13)
processregex_match
    • "(?i)cmstp
    • \s+\/s\s+.+.inf
    • \s+\/ni\s+.{4,}
    • \s+\/ns\s+.{4,}"
    corpus 2 (splunk 2)

Search terms

Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.

StageTerm
1TERM
1"<EventID>1<"
1"cmstp.exe"
1"/s"
1"/.inf"
1"/ni"
1"/ns"