Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Adversaries may use startup items automatically executed at boot initialization to establish persistence.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 33% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -33% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -23% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 8% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 3% | 0% |
> Sub-technique of: T1037
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.
This is technically a deprecated technology (superseded by Launch Daemon), and thus the appropriate folder, <code>/Library/StartupItems</code> isn’t guaranteed to exist on the system by default, but does appear to exist by default on macOS Sierra. A startup item is a directory whose executable and configuration property list (plist), <code>StartupParameters.plist</code>, reside in the top-level directory.
An adversary can create the appropriate folders/files in the StartupItems directory to register their own persistence mechanism. Additionally, since StartupItems run during the bootup phase of macOS, they will run as the elevated root user.
Platforms: macOS
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Modify or create an file in /Library/StartupItems Reference
Supported Platforms: macos Elevation Required: Yes
bashsudo touch /Library/StartupItems/EvilStartup.plist
Add launch script to /Library/StartupItems to launch agent Example
Supported Platforms: macos Elevation Required: Yes
bashsudo 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
Dependencies:
Add launch script to /Library/StartupItems to launch agent Example
Supported Platforms: macos Elevation Required: Yes
bashsudo 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
Dependencies:
If Atomic Red Team tests are not applicable, manually verify the technique by:
Since StartupItems are deprecated, preventing all users from writing to the <code>/Library/StartupItems</code> directory would prevent any startup items from getting registered.
| Finding | Severity | Impact | | ---------------------------------- | -------- | ----------- | | Startup Items technique applicable | Low | Persistence |
| CWE ID | Title | | ------- | ----------------------------- | | CWE-276 | Incorrect Default Permissions |
Other measured skills in the registry, with their headline benchmark lift.