Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Adversaries may create or modify Launch Daemons to execute malicious payloads as part of persistence.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 35% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-16 | ✗→✓ | ▲ Improved | -20% | 0% |
| case-13 | ✓→✗ | ▼ Worse | 50% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 58% | 0% |
> Sub-technique of: T1543
Adversaries may create or modify Launch Daemons to execute malicious payloads as part of persistence. Launch Daemons are plist files used to interact with Launchd, the service management framework used by macOS. Launch Daemons require elevated privileges to install, are executed for every user on a system prior to login, and run in the background without the need for user interaction. During the macOS initialization startup, the launchd process loads the parameters for launch-on-demand system-level daemons from plist files found in <code>/System/Library/LaunchDaemons/</code> and <code>/Library/LaunchDaemons/</code>. Required Launch Daemons parameters include a <code>Label</code> to identify the task, <code>Program</code> to provide a path to the executable, and <code>RunAtLoad</code> to specify when the task is run. Launch Daemons are often used to provide access to shared resources, updates to software, or conduct automation tasks.
Adversaries may install a Launch Daemon configured to execute at startup by using the <code>RunAtLoad</code> parameter set to <code>true</code> and the <code>Program</code> parameter set to the malicious executable path. The daemon name may be disguised by using a name from a related operating system or benign software (i.e. Masquerading). When the Launch Daemon is executed, the program inherits administrative permissions.
Additionally, system configuration changes (such as the installation of third party package managing software) may cause folders such as <code>usr/local/bin</code> to become globally writeable. So, it is possible for poor configurations to allow an adversary to modify executables referenced by current Launch Daemon's plist files.
Platforms: macOS
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Utilize LaunchDaemon to launch Hello World
Supported Platforms: macos Elevation Required: Yes
bashsudo cp #{path_malicious_plist} /Library/LaunchDaemons/#{plist_filename} sudo launchctl load -w /Library/LaunchDaemons/#{plist_filename}
Dependencies:
If Atomic Red Team tests are not applicable, manually verify the technique by:
Limit privileges of user accounts and remediate Privilege Escalation vectors so only authorized administrators can create new Launch Daemons.
Use auditing tools capable of detecting folder permissions abuse opportunities on systems, especially reviewing changes made to folders by third-party software.
| Finding | Severity | Impact | | ---------------------------------- | -------- | ----------- | | Launch Daemon technique applicable | High | Persistence |
| CWE ID | Title | | ------- | ----------------------------- | | CWE-276 | Incorrect Default Permissions |
Other measured skills in the registry, with their headline benchmark lift.