Authorization Plugin Modification
Authorization plugins are used to extend the authorization services API and implement mechanisms that are not natively supported by the OS, such as multi-factor authentication with third party software. Adversaries may abuse this feature to persist and/or collect clear text credentials as they traverse the registered plugins during user logon.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2021/01/13"
3integration = ["endpoint"]
4maturity = "production"
5updated_date = "2024/05/21"
6
7[rule]
8author = ["Elastic"]
9description = """
10Authorization plugins are used to extend the authorization services API and implement mechanisms that are not natively
11supported by the OS, such as multi-factor authentication with third party software. Adversaries may abuse this feature
12to persist and/or collect clear text credentials as they traverse the registered plugins during user logon.
13"""
14from = "now-9m"
15index = ["logs-endpoint.events.*"]
16language = "kuery"
17license = "Elastic License v2"
18name = "Authorization Plugin Modification"
19references = [
20 "https://developer.apple.com/documentation/security/authorization_plug-ins",
21 "https://www.xorrior.com/persistent-credential-theft/",
22]
23risk_score = 47
24rule_id = "e6c98d38-633d-4b3e-9387-42112cd5ac10"
25setup = """## Setup
26
27This rule requires data coming in from Elastic Defend.
28
29### Elastic Defend Integration Setup
30Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
31
32#### Prerequisite Requirements:
33- Fleet is required for Elastic Defend.
34- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
35
36#### The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
37- Go to the Kibana home page and click "Add integrations".
38- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
39- Click "Add Elastic Defend".
40- Configure the integration name and optionally add a description.
41- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
42- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
43- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
44- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
45For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
46- Click "Save and Continue".
47- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
48For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
49"""
50severity = "medium"
51tags = [
52 "Domain: Endpoint",
53 "OS: macOS",
54 "Use Case: Threat Detection",
55 "Tactic: Persistence",
56 "Data Source: Elastic Defend",
57]
58timestamp_override = "event.ingested"
59type = "query"
60
61query = '''
62event.category:file and host.os.type:macos and not event.type:deletion and
63 file.path:(/Library/Security/SecurityAgentPlugins/* and
64 not (/Library/Security/SecurityAgentPlugins/KandjiPassport.bundle/* or /Library/Security/SecurityAgentPlugins/TeamViewerAuthPlugin.bundle/*)) and
65 not (process.name:shove and process.code_signature.trusted:true)
66'''
67
68
69[[rule.threat]]
70framework = "MITRE ATT&CK"
71[[rule.threat.technique]]
72id = "T1547"
73name = "Boot or Logon Autostart Execution"
74reference = "https://attack.mitre.org/techniques/T1547/"
75[[rule.threat.technique.subtechnique]]
76id = "T1547.002"
77name = "Authentication Package"
78reference = "https://attack.mitre.org/techniques/T1547/002/"
79
80
81
82[rule.threat.tactic]
83id = "TA0003"
84name = "Persistence"
85reference = "https://attack.mitre.org/tactics/TA0003/"
References
Related rules
- Attempt to Enable the Root Account
- Bash Shell Profile Modification
- Creation of Hidden Launch Agent or Daemon
- Creation of Hidden Login Item via Apple Script
- Emond Rules Creation or Modification