# T1037.005 - Startup Items
## [Description from ATT&CK](https://attack.mitre.org/techniques/T1037/005)
<blockquote>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. (Citation: Startup Items)

This is technically a deprecated technology (superseded by [Launch Daemon](https://attack.mitre.org/techniques/T1543/004)), 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 (Citation: Methods of Mac Malware Persistence). Additionally, since StartupItems run during the bootup phase of macOS, they will run as the elevated root user.</blockquote>

## Atomic Tests

- [Atomic Test #1 - Add file to Local Library StartupItems](#atomic-test-1---add-file-to-local-library-startupitems)


<br/>

## Atomic Test #1 - Add file to Local Library StartupItems
Modify or create an file in /Library/StartupItems

[Reference](https://www.alienvault.com/blogs/labs-research/diversity-in-recent-mac-malware)

**Supported Platforms:** macOS


**auto_generated_guid:** 134627c3-75db-410e-bff8-7a920075f198






#### Attack Commands: Run with `sh`!  Elevation Required (e.g. root or admin) 


```sh
sudo touch /Library/StartupItems/EvilStartup.plist
```

#### Cleanup Commands:
```sh
sudo rm /Library/StartupItems/EvilStartup.plist
```





<br/>
