- Home
- Techniques
- Enterprise
- System Services
- Launchctl
System Services: Launchctl
Other sub-techniques of System Services (2)
ID | Name |
---|---|
T1569.001 | Launchctl |
T1569.002 | Service Execution |
Adversaries may abuse launchctl to execute commands or programs. Launchctl controls the macOS launchd process, which handles things like Launch Agents and Launch Daemons, but can execute other commands or programs itself. Launchctl supports taking subcommands on the command-line, interactively, or even redirected from standard input.[1]
By loading or reloading Launch Agents or Launch Daemons, adversaries can install persistence or execute changes they made.[2]
Running a command from launchctl is as simple as launchctl submit -l
. Adversaries can abuse this functionality to execute code or even bypass application control if launchctl is an allowed process.
Procedure Examples
Name | Description |
---|---|
Calisto |
Calisto uses launchctl to enable screen sharing on the victim’s machine.[3] |
LoudMiner |
LoudMiner launched the QEMU services in the |
Mitigations
Mitigation | Description |
---|---|
User Account Management |
Prevent users from installing their own launch agents or launch daemons. |
Detection
KnockKnock can be used to detect persistent programs such as those installed via launchctl as launch agents or launch daemons. Additionally, every launch agent or launch daemon must have a corresponding plist file on disk which can be monitored. Monitor process execution from launchctl/launchd for unusual or unknown processes.