Creation of Hidden Launch Agent or Daemon
Identifies the creation of a hidden launch agent or daemon. An adversary may establish persistence by installing a new launch agent or daemon which executes at login.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/01/05"
3integration = ["endpoint"]
4maturity = "production"
5updated_date = "2024/05/21"
6
7[rule]
8author = ["Elastic"]
9description = """
10Identifies the creation of a hidden launch agent or daemon. An adversary may establish persistence by installing a new
11launch agent or daemon which executes at login.
12"""
13from = "now-9m"
14index = ["logs-endpoint.events.*"]
15language = "eql"
16license = "Elastic License v2"
17name = "Creation of Hidden Launch Agent or Daemon"
18references = [
19 "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html",
20]
21risk_score = 47
22rule_id = "092b068f-84ac-485d-8a55-7dd9e006715f"
23setup = """## Setup
24
25This rule requires data coming in from Elastic Defend.
26
27### Elastic Defend Integration Setup
28Elastic 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.
29
30#### Prerequisite Requirements:
31- Fleet is required for Elastic Defend.
32- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
33
34#### The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
35- Go to the Kibana home page and click "Add integrations".
36- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
37- Click "Add Elastic Defend".
38- Configure the integration name and optionally add a description.
39- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
40- 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).
41- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
42- 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.
43For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
44- Click "Save and Continue".
45- 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.
46For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
47"""
48severity = "medium"
49tags = [
50 "Domain: Endpoint",
51 "OS: macOS",
52 "Use Case: Threat Detection",
53 "Tactic: Persistence",
54 "Tactic: Defense Evasion",
55 "Data Source: Elastic Defend",
56]
57timestamp_override = "event.ingested"
58type = "eql"
59
60query = '''
61file where host.os.type == "macos" and event.type != "deletion" and
62 file.path :
63 (
64 "/System/Library/LaunchAgents/.*.plist",
65 "/Library/LaunchAgents/.*.plist",
66 "/Users/*/Library/LaunchAgents/.*.plist",
67 "/System/Library/LaunchDaemons/.*.plist",
68 "/Library/LaunchDaemons/.*.plist"
69 )
70'''
71
72
73[[rule.threat]]
74framework = "MITRE ATT&CK"
75[[rule.threat.technique]]
76id = "T1543"
77name = "Create or Modify System Process"
78reference = "https://attack.mitre.org/techniques/T1543/"
79[[rule.threat.technique.subtechnique]]
80id = "T1543.001"
81name = "Launch Agent"
82reference = "https://attack.mitre.org/techniques/T1543/001/"
83
84
85
86[rule.threat.tactic]
87id = "TA0003"
88name = "Persistence"
89reference = "https://attack.mitre.org/tactics/TA0003/"
90[[rule.threat]]
91framework = "MITRE ATT&CK"
92[[rule.threat.technique]]
93id = "T1564"
94name = "Hide Artifacts"
95reference = "https://attack.mitre.org/techniques/T1564/"
96[[rule.threat.technique.subtechnique]]
97id = "T1564.001"
98name = "Hidden Files and Directories"
99reference = "https://attack.mitre.org/techniques/T1564/001/"
100
101
102
103[rule.threat.tactic]
104id = "TA0005"
105name = "Defense Evasion"
106reference = "https://attack.mitre.org/tactics/TA0005/"
References
Related rules
- Suspicious Hidden Child Process of Launchd
- Attempt to Disable Gatekeeper
- Attempt to Enable the Root Account
- Attempt to Install Root Certificate
- Attempt to Unload Elastic Endpoint Security Kernel Extension