CMSTP
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 for remote access connections. Adversaries may supply CMSTP.exe with INF files infected with malicious commands to load and execute DLLs or COM scriptlets (SCT) from remote servers. This technique bypasses AppLocker since CMSTP.exe is a signed Microsoft binary. CMSTP.exe can also be abused to bypass UAC through an auto-elevated COM interface. Groups including MuddyWater, Cobalt Group, and malware like CHIMNEYSWEEP and LockBit 3.0 have used this technique.
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "cmstp.exe"
| extend AutoClose = ProcessCommandLine has_any ("/s", "/au")
| extend NoUserInteraction = ProcessCommandLine has_any ("/ns", "/ni")
| extend HasINF = ProcessCommandLine has ".inf"
| extend SuspiciousINFPath = ProcessCommandLine has_any ("Temp", "AppData", "Downloads", "Public", "ProgramData", "\\Users\\")
| extend RemoteLoad = ProcessCommandLine has_any ("http://", "https://")
| extend SuspiciousParent = InitiatingProcessFileName has_any ("cmd.exe", "powershell.exe", "wscript.exe", "cscript.exe", "mshta.exe", "winword.exe", "excel.exe", "outlook.exe")
| project Timestamp, DeviceName, AccountName, ProcessCommandLine, InitiatingProcessFileName,
InitiatingProcessCommandLine, AutoClose, NoUserInteraction, HasINF,
SuspiciousINFPath, RemoteLoad, SuspiciousParent
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- Legitimate VPN client installations using CMSTP.exe to install Connection Manager profiles from Program Files
- Enterprise network configuration deployment using CMSTP with signed INF files from controlled paths
- IT administrators manually installing connection profiles via CMSTP for remote access setup
- Legacy Windows Remote Access Service configurations deployed via CMSTP
References (7)
- https://attack.mitre.org/techniques/T1218/003/
- https://msitpros.com/?p=3960
- https://web.archive.org/web/20190316220149/http://www.endurant.io/cmstp/detecting-cmstp-enabled-code-execution-and-uac-bypass-with-sysmon/
- https://github.com/api0cradle/UltimateAppLockerByPassList
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.003/T1218.003.md
- https://www.fireeye.com/blog/threat-research/2018/03/suspected-iranian-influence-operation.html
- https://www.mandiant.com/resources/blog/roadsweep-august-2022
Unlock Pro Content
Get the full detection package for T1218.003 including response playbook, investigation guide, and atomic red team tests.