LaunchDaemon Creation or Modification and Immediate Loading

Indicates the creation or modification of a launch daemon, which adversaries may use to repeatedly execute malicious payloads as part of persistence.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/12/07"
 3integration = ["endpoint"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/02/22"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Indicates the creation or modification of a launch daemon, which adversaries may use to repeatedly execute malicious
13payloads as part of persistence.
14"""
15false_positives = ["Trusted applications persisting via LaunchDaemons"]
16from = "now-9m"
17index = ["auditbeat-*", "logs-endpoint.events.*"]
18language = "eql"
19license = "Elastic License v2"
20name = "LaunchDaemon Creation or Modification and Immediate Loading"
21references = [
22    "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html",
23]
24risk_score = 21
25rule_id = "9d19ece6-c20e-481a-90c5-ccca596537de"
26severity = "low"
27tags = ["Elastic", "Host", "macOS", "Threat Detection", "Persistence"]
28type = "eql"
29
30query = '''
31sequence by host.id with maxspan=1m
32 [file where host.os.type == "macos" and event.type != "deletion" and file.path : ("/System/Library/LaunchDaemons/*", "/Library/LaunchDaemons/*")]
33 [process where host.os.type == "macos" and event.type in ("start", "process_started") and process.name == "launchctl" and process.args == "load"]
34'''
35
36
37[[rule.threat]]
38framework = "MITRE ATT&CK"
39[[rule.threat.technique]]
40id = "T1543"
41name = "Create or Modify System Process"
42reference = "https://attack.mitre.org/techniques/T1543/"
43
44
45[rule.threat.tactic]
46id = "TA0003"
47name = "Persistence"
48reference = "https://attack.mitre.org/tactics/TA0003/"

to-top