Currently viewing ATT&CK v8.2 which was live between October 27, 2020 and April 28, 2021. Learn more about the versioning system or see the live site.

Boot or Logon Initialization Scripts

Adversaries may use scripts automatically executed at boot or logon initialization to establish persistence. Initialization scripts can be used to perform administrative functions, which may often execute other programs or send information to an internal logging server. These scripts can vary based on operating system and whether applied locally or remotely.

Adversaries may use these scripts to maintain persistence on a single system. Depending on the access configuration of the logon scripts, either local credentials or an administrator account may be necessary.

An adversary may also be able to escalate their privileges since some boot or logon initialization scripts run with higher privileges.

ID: T1037
Tactics: Persistence, Privilege Escalation
Platforms: Linux, Windows, macOS
Data Sources: File monitoring, Process monitoring
CAPEC ID: CAPEC-564
Version: 2.1
Created: 31 May 2017
Last Modified: 03 August 2020

Procedure Examples

Name Description
Rocke

Rocke has installed an "init.d" startup script to maintain persistence.[1]

Mitigations

Mitigation Description
Restrict File and Directory Permissions

Restrict write access to logon scripts to specific administrators.

Restrict Registry Permissions

Ensure proper permissions are set for Registry hives to prevent users from modifying keys for logon scripts that may lead to persistence.

Detection

Monitor logon scripts for unusual access by abnormal users or at abnormal times. Look for files added or modified by unusual accounts outside of normal administration duties. Monitor running process for actions that could be indicative of abnormal programs or executables running upon logon.

References