ID | Name |
---|---|
T1037.001 | Logon Script (Windows) |
T1037.002 | Logon Script (Mac) |
T1037.003 | Network Logon Script |
T1037.004 | RC Scripts |
T1037.005 | Startup Items |
Adversaries may use macOS logon scripts automatically executed at logon initialization to establish persistence. macOS allows logon scripts (known as login hooks) to be executed whenever a specific user logs into a system. A login hook tells Mac OS X to execute a certain script when a user logs in, but unlike Startup Items, a login hook executes as the elevated root user.[1]
Adversaries may use these login hooks to maintain persistence on a single system.[2] Access to login hook scripts may allow an adversary to insert additional malicious code. There can only be one login hook at a time though and depending on the access configuration of the hooks, either local credentials or an administrator account may be necessary.
ID | Mitigation | Description |
---|---|---|
M1022 | Restrict File and Directory Permissions |
Restrict write access to logon scripts to specific administrators. |
ID | Data Source | Data Component |
---|---|---|
DS0017 | Command | Command Execution |
DS0022 | File | File Creation |
File Modification | ||
DS0009 | Process | Process Creation |
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.