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", "crowdstrike"]
4maturity = "production"
5updated_date = "2024/10/31"
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 "logs-crowdstrike.fdr*",
27]
28language = "eql"
29license = "Elastic License v2"
30name = "New ActiveSyncAllowedDeviceID Added via PowerShell"
31references = [
32 "https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/",
33 "https://docs.microsoft.com/en-us/powershell/module/exchange/set-casmailbox?view=exchange-ps",
34]
35risk_score = 47
36rule_id = "ce64d965-6cb0-466d-b74f-8d2c76f47f05"
37severity = "medium"
38tags = [
39 "Domain: Endpoint",
40 "OS: Windows",
41 "Use Case: Threat Detection",
42 "Tactic: Persistence",
43 "Tactic: Execution",
44 "Data Source: Elastic Endgame",
45 "Data Source: Elastic Defend",
46 "Data Source: System",
47 "Data Source: Microsoft Defender for Endpoint",
48 "Data Source: Sysmon",
49 "Data Source: SentinelOne",
50 "Data Source: Crowdstrike",
51]
52timestamp_override = "event.ingested"
53type = "eql"
54
55query = '''
56process where host.os.type == "windows" and event.type == "start" and
57 process.name: ("powershell.exe", "pwsh.exe", "powershell_ise.exe") and process.args : "Set-CASMailbox*ActiveSyncAllowedDeviceIDs*"
58'''
59
60
61[[rule.threat]]
62framework = "MITRE ATT&CK"
63[[rule.threat.technique]]
64id = "T1098"
65name = "Account Manipulation"
66reference = "https://attack.mitre.org/techniques/T1098/"
67[[rule.threat.technique.subtechnique]]
68id = "T1098.002"
69name = "Additional Email Delegate Permissions"
70reference = "https://attack.mitre.org/techniques/T1098/002/"
71
72
73
74[rule.threat.tactic]
75id = "TA0003"
76name = "Persistence"
77reference = "https://attack.mitre.org/tactics/TA0003/"
78[[rule.threat]]
79framework = "MITRE ATT&CK"
80[[rule.threat.technique]]
81id = "T1059"
82name = "Command and Scripting Interpreter"
83reference = "https://attack.mitre.org/techniques/T1059/"
84[[rule.threat.technique.subtechnique]]
85id = "T1059.001"
86name = "PowerShell"
87reference = "https://attack.mitre.org/techniques/T1059/001/"
88
89
90
91[rule.threat.tactic]
92id = "TA0002"
93name = "Execution"
94reference = "https://attack.mitre.org/tactics/TA0002/"
References
Related rules
- Suspicious MS Office Child Process
- Volume Shadow Copy Deletion via PowerShell
- Command Execution via SolarWinds Process
- Enumeration Command Spawned via WMIPrvSE
- Potential Foxmail Exploitation