Unusual Execution via Microsoft Common Console File
Identifies the execution of a child process from a Microsoft Common Console file. Adversaries may embed a malicious command in an MSC file in order to trick victims into executing malicious commands.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2024/05/12"
3integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
4maturity = "production"
5updated_date = "2024/10/15"
6min_stack_version = "8.14.0"
7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
8
9[rule]
10author = ["Elastic"]
11description = """
12Identifies the execution of a child process from a Microsoft Common Console file. Adversaries may embed a malicious
13command in an MSC file in order to trick victims into executing malicious commands.
14"""
15from = "now-9m"
16index = ["winlogbeat-*", "logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*", "endgame-*", "logs-m365_defender.event-*", "logs-sentinel_one_cloud_funnel.*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Unusual Execution via Microsoft Common Console File"
20note = """## Triage and analysis
21
22### Investigating Execution via Microsoft Common Console File
23
24- Investigate the source of the MSC file.
25- Investigate the process execution chain (all spawned child processes and their descendants).
26- Investigate the process and it's descendants network and file events.
27- Identify the user account that performed the action and whether it should perform this kind of action.
28- Contact the account owner and confirm whether they are aware of this activity.
29
30### Response and remediation
31- Initiate the incident response process based on the outcome of the triage.
32- Isolate the involved host to prevent further post-compromise behavior.
33- If the triage identified malware, search the environment for additional compromised hosts.
34 - Implement temporary network rules, procedures, and segmentation to contain the malware.
35 - Stop suspicious processes.
36 - Immediately block the identified indicators of compromise (IoCs).
37 - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
38- Remove and block malicious artifacts identified during triage.
39- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
40- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
41- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
42- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
43"""
44references = ["https://www.genians.co.kr/blog/threat_intelligence/facebook"]
45risk_score = 73
46rule_id = "e760c72b-bb1f-44f0-9f0d-37d51744ee75"
47severity = "high"
48tags = [
49 "Domain: Endpoint",
50 "OS: Windows",
51 "Use Case: Threat Detection",
52 "Tactic: Execution",
53 "Tactic: Initial Access",
54 "Resources: Investigation Guide",
55 "Data Source: Elastic Endgame",
56 "Data Source: Elastic Defend",
57 "Data Source: Sysmon",
58 "Data Source: Microsoft Defender for Endpoint",
59 "Data Source: SentinelOne",
60]
61timestamp_override = "event.ingested"
62type = "eql"
63
64query = '''
65process where host.os.type == "windows" and event.type == "start" and
66 process.parent.executable : "?:\\Windows\\System32\\mmc.exe" and endswith~(process.parent.args, ".msc") and
67 not process.parent.args : ("?:\\Windows\\System32\\*.msc", "?:\\Windows\\SysWOW64\\*.msc", "?:\\Program files\\*.msc", "?:\\Program Files (x86)\\*.msc")
68'''
69
70
71[[rule.threat]]
72framework = "MITRE ATT&CK"
73[[rule.threat.technique]]
74id = "T1204"
75name = "User Execution"
76reference = "https://attack.mitre.org/techniques/T1204/"
77[[rule.threat.technique.subtechnique]]
78id = "T1204.002"
79name = "Malicious File"
80reference = "https://attack.mitre.org/techniques/T1204/002/"
81
82
83
84[rule.threat.tactic]
85id = "TA0002"
86name = "Execution"
87reference = "https://attack.mitre.org/tactics/TA0002/"
88[[rule.threat]]
89framework = "MITRE ATT&CK"
90[[rule.threat.technique]]
91id = "T1566"
92name = "Phishing"
93reference = "https://attack.mitre.org/techniques/T1566/"
94[[rule.threat.technique.subtechnique]]
95id = "T1566.001"
96name = "Spearphishing Attachment"
97reference = "https://attack.mitre.org/techniques/T1566/001/"
98
99[[rule.threat.technique.subtechnique]]
100id = "T1566.002"
101name = "Spearphishing Link"
102reference = "https://attack.mitre.org/techniques/T1566/002/"
103
104
105
106[rule.threat.tactic]
107id = "TA0001"
108name = "Initial Access"
109reference = "https://attack.mitre.org/tactics/TA0001/"
Triage and analysis
Investigating Execution via Microsoft Common Console File
- Investigate the source of the MSC file.
- Investigate the process execution chain (all spawned child processes and their descendants).
- Investigate the process and it's descendants network and file events.
- Identify the user account that performed the action and whether it should perform this kind of action.
- Contact the account owner and confirm whether they are aware of this activity.
Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Isolate the involved host to prevent further post-compromise behavior.
- If the triage identified malware, search the environment for additional compromised hosts.
- Implement temporary network rules, procedures, and segmentation to contain the malware.
- Stop suspicious processes.
- Immediately block the identified indicators of compromise (IoCs).
- Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
- Remove and block malicious artifacts identified during triage.
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
References
Related rules
- Windows Script Executing PowerShell
- Conhost Spawned By Suspicious Parent Process
- Execution from Unusual Directory - Command Line
- Microsoft Exchange Worker Spawning Suspicious Processes
- Suspicious Explorer Child Process