Boot or Logon Initialization Scripts T1037
Tactics: Persistence, Privilege Escalation
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.
Events covered
12 catalog events are tagged with this technique by at least one rule.
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process creation |
| Sysmon | Event ID 11 | FileCreate |
| Sysmon | Event ID 12 | RegistryEvent (Object create and delete) |
| Sysmon | Event ID 13 | RegistryEvent (Value Set) |
| Sysmon | Event ID 14 | RegistryEvent (Key and Value Rename) |
| Security-Auditing | Event ID 4688 | A new process has been created. |
| Security-Auditing | Event ID 5136 | A directory service object was modified. |
| Security-Auditing | Event ID 5145 | A network share object was checked to see whether client can be granted desired access. |
| ESF | open | File Open (NOTIFY) |
| ESF | create | File or Directory Create (NOTIFY) |
| ESF | write | File Write (NOTIFY) |
| PowerShell | Event ID 4104 | Creating Scriptblock text (MessageNumber of MessageTotal). |
Authoring guide
Patterns shared across the 37 rules above: which fields they filter on, what specific values they look for, and what they exclude. The catalog normalizes field names across vendors so Sigma's Image, Elastic's process.name, and Splunk's process_name collapse into one row. Each rule contributes at most once per row.
Fields filtered most (36 distinct)
The fields most rules look at when detecting this technique. The How column shows the operators authors use (eq, wildcard, regex_match, match) and how often each appears. Sample values are concrete examples to start from, not an exhaustive list.
Top indicator values (648 distinct)
Specific (field, operator, value) combinations the rules check for, ranked by how many rules under this technique use each one. The Corpus reach column counts how many rules across the entire catalog (any technique) check the same combination. High numbers point to widely-used indicators that are likely noisy on their own; combine them with another condition for useful signal. Blank means the combination is specific to rules under this technique. Click a value to expand the rules under this technique that use it.
Exclusions (302 distinct)
Field/operator/value combinations excluded by rules under this technique (top-level not() clauses), sorted by how many rules exclude each. These are the false-positive paths the community has learned to filter out. A new rule that ignores the high-count entries here will likely fire on the same noisy paths. Click a value to expand the rules under this technique that exclude it.
Rules under this technique
Every rule in the catalog tagged with this technique, grouped by vendor. Click a rule title for its full predicates, exclusions, and indicators.
Sigma 4 rules
- Potential Persistence Via Logon Scripts - CommandLine
- Potential Persistence Via Logon Scripts - Registry
- Startup Item File Created - MacOS
- Uncommon Userinit Child Process
Elastic 24 rules
- Chkconfig Service Add
- Executable Bit Set for Potential Persistence Script
- GenAI Process Accessing Sensitive Files
- Message-of-the-Day (MOTD) File Creation
- Modification of Persistence Relevant Files Detected via Defend for Containers
- Persistence via Folder Action Script
- Persistence via Login or Logout Hook
- Pod or Container Creation with Suspicious Command-Line
- Potential Execution of rc.local Script
- Potential Persistence via Atom Init Script Modification
- Potential Persistence via File Modification
- Potential Persistence via Login Hook
- Potential Suspicious File Edit
- Process Spawned from Message-of-the-Day (MOTD)
- rc.local/rc.common File Creation
- Startup/Logon Script added to Group Policy Object
- Suspicious Echo or Printf Execution Detected via Defend for Containers
- Suspicious Network Activity to the Internet by Previously Unknown Executable
- Suspicious rc.local Error Message
- Suspicious StartupItem Plist Creation
- System V Init Script Created
- Systemd-udevd Rule File Creation
- Uncommon Registry Persistence Change
- Unusual Exim4 Child Process
Splunk 7 rules
- Linux File Creation In Init Boot Directory
- Logon Script Event Trigger Execution
- Logon Script Registry Key added (EDR)
- Logon Script Registry Key added (PowerShell)
- Logon Script Registry Key added (Sysmon)
- Logon Script Registry Key added (Windows Event Log)
- MacOS LoginHook Persistence