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"]
 4maturity = "production"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Identifies the use of the Exchange PowerShell cmdlet, Set-CASMailbox, to add a new ActiveSync allowed device.
11Adversaries may target user email to collect sensitive information.
12"""
13false_positives = ["Legitimate exchange system administration activity."]
14from = "now-9m"
15index = [
16    "logs-endpoint.events.process-*",
17    "winlogbeat-*",
18    "logs-windows.*",
19    "endgame-*",
20    "logs-system.security*",
21]
22language = "eql"
23license = "Elastic License v2"
24name = "New ActiveSyncAllowedDeviceID Added via PowerShell"
25references = [
26    "https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/",
27    "https://docs.microsoft.com/en-us/powershell/module/exchange/set-casmailbox?view=exchange-ps",
28]
29risk_score = 47
30rule_id = "ce64d965-6cb0-466d-b74f-8d2c76f47f05"
31setup = """## Setup
32
33If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
34events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
35Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
36`event.ingested` to @timestamp.
37For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
38"""
39severity = "medium"
40tags = [
41    "Domain: Endpoint",
42    "OS: Windows",
43    "Use Case: Threat Detection",
44    "Tactic: Persistence",
45    "Tactic: Execution",
46    "Data Source: Elastic Endgame",
47    "Data Source: Elastic Defend",
48]
49timestamp_override = "event.ingested"
50type = "eql"
51
52query = '''
53process where host.os.type == "windows" and event.type == "start" and
54  process.name: ("powershell.exe", "pwsh.exe", "powershell_ise.exe") and process.args : "Set-CASMailbox*ActiveSyncAllowedDeviceIDs*"
55'''
56
57
58[[rule.threat]]
59framework = "MITRE ATT&CK"
60[[rule.threat.technique]]
61id = "T1098"
62name = "Account Manipulation"
63reference = "https://attack.mitre.org/techniques/T1098/"
64[[rule.threat.technique.subtechnique]]
65id = "T1098.002"
66name = "Additional Email Delegate Permissions"
67reference = "https://attack.mitre.org/techniques/T1098/002/"
68
69
70
71[rule.threat.tactic]
72id = "TA0003"
73name = "Persistence"
74reference = "https://attack.mitre.org/tactics/TA0003/"
75[[rule.threat]]
76framework = "MITRE ATT&CK"
77[[rule.threat.technique]]
78id = "T1059"
79name = "Command and Scripting Interpreter"
80reference = "https://attack.mitre.org/techniques/T1059/"
81[[rule.threat.technique.subtechnique]]
82id = "T1059.001"
83name = "PowerShell"
84reference = "https://attack.mitre.org/techniques/T1059/001/"
85
86
87
88[rule.threat.tactic]
89id = "TA0002"
90name = "Execution"
91reference = "https://attack.mitre.org/tactics/TA0002/"

References

Related rules

to-top