New ActiveSyncAllowedDeviceID Added via PowerShell
Identifies the use of the Exchange PowerShell cmdlet, Set-CASMailbox, to add a new ActiveSync allowed device. Adversaries may target user email to collect sensitive information.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/12/15"
3integration = ["endpoint", "windows", "system", "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 use of the Exchange PowerShell cmdlet, Set-CASMailbox, to add a new ActiveSync allowed device.
13Adversaries may target user email to collect sensitive information.
14"""
15false_positives = ["Legitimate exchange system administration activity."]
16from = "now-9m"
17index = [
18 "logs-endpoint.events.process-*",
19 "winlogbeat-*",
20 "logs-windows.forwarded*",
21 "logs-windows.sysmon_operational-*",
22 "endgame-*",
23 "logs-system.security*",
24 "logs-m365_defender.event-*",
25 "logs-sentinel_one_cloud_funnel.*",
26]
27language = "eql"
28license = "Elastic License v2"
29name = "New ActiveSyncAllowedDeviceID Added via PowerShell"
30references = [
31 "https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/",
32 "https://docs.microsoft.com/en-us/powershell/module/exchange/set-casmailbox?view=exchange-ps",
33]
34risk_score = 47
35rule_id = "ce64d965-6cb0-466d-b74f-8d2c76f47f05"
36severity = "medium"
37tags = [
38 "Domain: Endpoint",
39 "OS: Windows",
40 "Use Case: Threat Detection",
41 "Tactic: Persistence",
42 "Tactic: Execution",
43 "Data Source: Elastic Endgame",
44 "Data Source: Elastic Defend",
45 "Data Source: System",
46 "Data Source: Microsoft Defender for Endpoint",
47 "Data Source: Sysmon",
48 "Data Source: SentinelOne",
49]
50timestamp_override = "event.ingested"
51type = "eql"
52
53query = '''
54process where host.os.type == "windows" and event.type == "start" and
55 process.name: ("powershell.exe", "pwsh.exe", "powershell_ise.exe") and process.args : "Set-CASMailbox*ActiveSyncAllowedDeviceIDs*"
56'''
57
58
59[[rule.threat]]
60framework = "MITRE ATT&CK"
61[[rule.threat.technique]]
62id = "T1098"
63name = "Account Manipulation"
64reference = "https://attack.mitre.org/techniques/T1098/"
65[[rule.threat.technique.subtechnique]]
66id = "T1098.002"
67name = "Additional Email Delegate Permissions"
68reference = "https://attack.mitre.org/techniques/T1098/002/"
69
70
71
72[rule.threat.tactic]
73id = "TA0003"
74name = "Persistence"
75reference = "https://attack.mitre.org/tactics/TA0003/"
76[[rule.threat]]
77framework = "MITRE ATT&CK"
78[[rule.threat.technique]]
79id = "T1059"
80name = "Command and Scripting Interpreter"
81reference = "https://attack.mitre.org/techniques/T1059/"
82[[rule.threat.technique.subtechnique]]
83id = "T1059.001"
84name = "PowerShell"
85reference = "https://attack.mitre.org/techniques/T1059/001/"
86
87
88
89[rule.threat.tactic]
90id = "TA0002"
91name = "Execution"
92reference = "https://attack.mitre.org/tactics/TA0002/"
References
Related rules
- Persistence via WMI Event Subscription
- Web Shell Detection: Script Process Child of Common Web Processes
- Adding Hidden File Attribute via Attrib
- Clearing Windows Console History
- Command Execution via SolarWinds Process