Can list and manage startup entries.1
Startup Items T1037.005
- Tactics
- Persistence, Privilege Escalation
- Platform
- macOS
- Version
- 1.1
- Created
- 15 January 2020
- Last modified
- 24 October 2025
Adversaries may use startup items automatically executed at boot initialization to establish persistence. Startup items execute during the final phase of the boot process and contain shell scripts or other executable files along with configuration information used by the system to determine the execution order for all startup items.[1]
Startup Items MITRE reference T1037.005
1 software entry is documented implementing this technique. MITRE files each as a tool or as malware; newest first, then by how many groups carry them.
All 1 software entries for this technique
Offense vs defense T1037.005
Is defensive coverage keeping up with adversary use? Eight counts, each ranked against all 697 ATT&CK techniques. Attack sits left, defense right, so a shape leaning left means adversaries are better documented here than defenders are equipped. Hover any spoke for its percentile and the share of techniques that have more. The timeline below shows when each side arrived.
How it got here
Adversary activity (campaign spans) over cumulative rule output. Each source is plotted independently from zero, so neither line includes the other. Campaign dates are year-granularity.
Startup Items detection strategy DET0429
MITRE names one behaviour worth catching for this technique and breaks it into 1 analytic, one per platform. Each carries the log sources it needs and the fields you tune per environment.
Detect Modification of macOS Startup Items
AN1197 · macOS
Detects the modification or addition of Launch Agents or Startup Items to establish persistence. Adversaries may write plist or executable files to ~/Library/LaunchAgents/, /Library/StartupItems/, or similar directories and configure them to run at user or system boot. Detection requires correlating file creation or modification events with subsequent user logon or boot-time process execution.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Process CreationDC0032 | macos:unifiedlog | launchservices or loginwindow events |
| File CreationDC0039 | macos:fsevents | /Library/StartupItems/, ~/Library/LaunchAgents/ |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| directory_path | Specific paths to monitor may differ across macOS versions or enterprise baselines. |
| user_context | Different users may have unique LaunchAgents folders—tuning may be required. |
| time_window | The correlation time between file creation and process execution may need to be adjusted for boot persistence. |
| process_name | Specific startup binaries (e.g., bash, osascript) may vary across implementations. |
Since StartupItems are deprecated, preventing all users from writing to the /Library/StartupItems directory would prevent any startup items from getting registered.
| # | Test | Platform | Executor | Elevation | Prereqs | Cleanup | Ref | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01 | Add file to Local Library StartupItems | macos | sh | Required | — | Yes | ||||||||||||||||||
Modify or create an file in /Library/StartupItems Reference Attack command sudo touch /Library/StartupItems/EvilStartup.plist Cleanup command sudo rm /Library/StartupItems/EvilStartup.plist GUID782935f9-050a-4f5e-aa95-cb99d22fe18e | ||||||||||||||||||||||||
| 02 | Add launch script to launch daemon | macos | bash | Required | 3 | Yes | ||||||||||||||||||
Add launch script to /Library/StartupItems to launch agent Example Input arguments
Attack command sudo cp #{path_startup_params} /Library/StartupItems/StartupParameters.plist
sudo cp #{path_malicious_script} /Library/StartupItems/atomic.sh
sudo cp #{path_malicious_plist} /tmp/T1037_005_daemon.plist
sudo /Library/StartupItems/atomic.sh start
Cleanup command sudo launchctl unload /tmp/T1037_005_daemon.plist sudo rm /tmp/T1037_005_daemon.plist sudo rm /Library/StartupItems/atomic.sh sudo rm /Library/StartupItems/StartupParameters.plist sudo rm /tmp/T1037_005_daemon.txt Prerequisite /Library/StartupItems must exist Check if [ ! -d /Library/StartupItems ]; then mkdir /Library/StartupItems; exit 0; fi; Satisfy echo "Failed to create /Library/StartupItems"; exit 1; Prerequisite The shared library must exist on disk at specified location (#{path_malicious_plist}) Check if [ -f #{path_malicious_plist} ]; then exit 0; else exit 1; fi;
Satisfy echo "The plist file doesn't exist. Check the path and try again."; exit 1; Prerequisite The startup script must exist on disk at specified location (#{path_malicious_script}) Check if [ -f #{path_malicious_script} ]; then exit 0; else exit 1; fi;
Satisfy echo "The startup script doesn't exist. Check the path and try again."; exit 1; GUID753be2e2-f11a-4aaa-aa6a-63fa8aca64ac | ||||||||||||||||||||||||
| 03 | Add launch script to launch agent | macos | bash | Required | 3 | Yes | ||||||||||||||||||
Add launch script to /Library/StartupItems to launch agent Example Input arguments
Attack command sudo cp #{path_startup_params} /Library/StartupItems/StartupParameters.plist
sudo cp #{path_malicious_script} /Library/StartupItems/atomic.sh
sudo cp #{path_malicious_plist} /tmp/T1037_005_agent.plist
/Library/StartupItems/atomic.sh start
Cleanup command sudo launchctl unload /tmp/T1037_005_agent.plist sudo rm /tmp/T1037_005_agent.plist sudo rm /Library/StartupItems/atomic.sh sudo rm /Library/StartupItems/StartupParameters.plist sudo rm /tmp/T1037_005_agent.txt Prerequisite /Library/StartupItems must exist Check if [ ! -d /Library/StartupItems ]; then mkdir /Library/StartupItems; exit 0; fi; Satisfy echo "Failed to create /Library/StartupItems"; exit 1; Prerequisite The shared library must exist on disk at specified location (#{path_malicious_plist}) Check if [ -f #{path_malicious_plist} ]; then exit 0; else exit 1; fi;
Satisfy echo "The plist file doesn't exist. Check the path and try again."; exit 1; Prerequisite The startup script must exist on disk at specified location (#{path_malicious_script}) Check if [ -f #{path_malicious_script} ]; then exit 0; else exit 1; fi;
Satisfy echo "The startup script doesn't exist. Check the path and try again."; exit 1; GUID9efe71f0-09ca-492c-9f51-05c1e441692c | ||||||||||||||||||||||||
Tests from Atomic Red Team (MIT licence) · technique definition