Execution with Explicit Credentials via Scripting
Identifies execution of the security_authtrampoline process via a scripting interpreter. This occurs when programs use AuthorizationExecute-WithPrivileges from the Security.framework to run another program with root privileges. It should not be run by itself, as this is a sign of execution with explicit logon credentials.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/12/07"
3integration = ["endpoint"]
4maturity = "production"
5updated_date = "2024/05/21"
6
7[rule]
8author = ["Elastic"]
9description = """
10Identifies execution of the security_authtrampoline process via a scripting interpreter. This occurs when programs use
11AuthorizationExecute-WithPrivileges from the Security.framework to run another program with root privileges. It should
12not be run by itself, as this is a sign of execution with explicit logon credentials.
13"""
14from = "now-9m"
15index = ["logs-endpoint.events.*"]
16language = "kuery"
17license = "Elastic License v2"
18name = "Execution with Explicit Credentials via Scripting"
19references = [
20 "https://objectivebythesea.com/v2/talks/OBTS_v2_Thomas.pdf",
21 "https://www.manpagez.com/man/8/security_authtrampoline/",
22]
23risk_score = 47
24rule_id = "f0eb70e9-71e9-40cd-813f-bf8e8c812cb1"
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: Execution",
56 "Tactic: Privilege Escalation",
57 "Data Source: Elastic Defend",
58]
59timestamp_override = "event.ingested"
60type = "query"
61
62query = '''
63event.category:process and host.os.type:macos and event.type:(start or process_started) and
64 process.name:"security_authtrampoline" and
65 process.parent.name:(osascript or com.apple.automator.runner or sh or bash or dash or zsh or python* or Python or perl* or php* or ruby or pwsh)
66'''
67
68
69[[rule.threat]]
70framework = "MITRE ATT&CK"
71[[rule.threat.technique]]
72id = "T1078"
73name = "Valid Accounts"
74reference = "https://attack.mitre.org/techniques/T1078/"
75
76[[rule.threat.technique]]
77id = "T1548"
78name = "Abuse Elevation Control Mechanism"
79reference = "https://attack.mitre.org/techniques/T1548/"
80[[rule.threat.technique.subtechnique]]
81id = "T1548.004"
82name = "Elevated Execution with Prompt"
83reference = "https://attack.mitre.org/techniques/T1548/004/"
84
85
86
87[rule.threat.tactic]
88id = "TA0004"
89name = "Privilege Escalation"
90reference = "https://attack.mitre.org/tactics/TA0004/"
91[[rule.threat]]
92framework = "MITRE ATT&CK"
93[[rule.threat.technique]]
94id = "T1059"
95name = "Command and Scripting Interpreter"
96reference = "https://attack.mitre.org/techniques/T1059/"
97
98
99[rule.threat.tactic]
100id = "TA0002"
101name = "Execution"
102reference = "https://attack.mitre.org/tactics/TA0002/"
References
Related rules
- Apple Script Execution followed by Network Connection
- Creation of Hidden Login Item via Apple Script
- EggShell Backdoor Execution
- Execution via Electron Child Process Node.js Module
- MacOS Installer Package Spawns Network Event