CmdID / Techniques / T1569
T1569.001 System Services: Launchctl
Adversaries may abuse launchctl to execute commands or programs. MITRE ATT&CK
1 Sigma rule T1569.001 on attack.mitre.org
Part of
Sigma rules tagged with it
Command lines CmdID reads as it
Activate a user-specific agent to be loaded into launchd whenever the user logs in on the page for launchctl
launchctl load ~/Library/LaunchAgents/my_script.plistIdentifyActivate an agent which requires root privileges to run and/or should be loaded whenever any user logs in (note the absence of ~ in the path) on the page for launchctl
sudo launchctl load /Library/LaunchAgents/root_script.plistIdentifyActivate a system-wide daemon to be loaded whenever the system boots up (even if no user logs in) on the page for launchctl
sudo launchctl load /Library/LaunchDaemons/system_daemon.plistIdentifyUnload a currently loaded agent, e.g. to make changes (Note: The plist file is automatically loaded into launchd after a reboot and/or logging in) on the page for launchctl
launchctl unload ~/Library/LaunchAgents/my_script.plistIdentifyManually run a known (loaded) agent/daemon, even if it is not the right time (Note: This command uses the agent's label, rather than the filename) on the page for launchctl
launchctl start script_fileIdentifyAn example is here when CmdID’s reading of it names T1569.001: a Sigma rule it trips is tagged with it, or its abuse is documented as it.