Cross-source coverage

T1547.015 / ATT&CK

Boot or Logon Autostart Execution: Login Items

2 rules across 2 sources.

From MITRE ATT&CK 19.2

Adversaries may add login items to execute upon user login to gain persistence or escalate privileges. Login items are applications, documents, folders, or server connections that are automatically launched when a user logs in. Login items can be added via a shared file list or Service Management Framework. Shared file list login items can be set using scripting languages such as AppleScript, whereas the Service Management Framework uses the API call SMLoginItemSetEnabled.

Login items installed using the Service Management Framework leverage launchd, are not visible in the System Preferences, and can only be removed by the application that created them. Login items created using a shared file list are visible in System Preferences, can hide the application when it launches, and are executed through LaunchServices, not launchd, to open applications, documents, or URLs without using Finder. Users and applications use login items to configure their user environment to launch commonly used services or applications, such as email, chat, and music applications.

Adversaries can utilize AppleScript and Native API calls to create a login item to spawn malicious executables. Prior to version 10.5 on macOS, adversaries can add login items by using AppleScript to send an Apple events to the “System Events” process, which has an AppleScript dictionary for manipulating login items. Adversaries can use a command such as tell application “System Events” to make login item at end with properties /path/to/executable. This command adds the path of the malicious executable to the login item file list located in ~/Library/Application Support/com.apple.backgroundtaskmanagementagent/backgrounditems.btm. Adversaries can also use login items to launch executables that can be used to control the victim system remotely or as a means to gain privilege escalation by prompting for user credentials.

Platforms
macOS
Telemetry
macos:unifiedlog

How MITRE says to detect it DET0121

Detection Strategy for T1547.015 – Login Items on macOS

macOS Analytic 0340

Creation or modification of Login Items using AppleScript or Service Management Framework. Detection focuses on file creation/modification of `backgrounditems.btm`, new executables in `Contents/Library/LoginItems/`, use of `SMLoginItemSetEnabled` API, or suspicious processes triggered post-login without user interaction. Behavioral pivot includes anomalous AppleEvents, suspicious parent-child process pairs, and login-triggered execution chains.

  • macos:unifiedlog Post-login execution of unrecognized child process from launchd or loginwindow
  • macos:unifiedlog Modification of backgrounditems.btm or creation of LoginItems subdirectory in .app bundle
  • macos:unifiedlog Invocation of SMLoginItemSetEnabled by non-system or recently installed application
  • macos:unifiedlog AppleScript creating login item via 'System Events' dictionary

SigmaHQ/sigma

1 rule
Detection Severity Format
Windows Terminal Profile Settings Modification By Uncommon Process Medium Sigma

elastic/detection-rules

1 rule
Detection Severity Format
Creation of Hidden Login Item via Apple Script Medium Elastic TOML

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.