Boot or Logon Initialization Scripts: Logon Script (Windows) T1037.001

Tactics: Persistence, Privilege Escalation

Adversaries may use Windows logon scripts automatically executed at logon initialization to establish persistence. Windows allows logon scripts to be run whenever a specific user or group of users log into a system. This is done via adding a path to a script to the HKCU\Environment\UserInitMprLogonScript Registry key.

Events covered

5 catalog events are tagged with this technique by at least one rule.

Authoring guide

Patterns shared across the 8 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 (8 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.

FieldRulesHowSample values
CommandLine2contains 2, eq 1PowerShell.exe, netlogon.bat, userinitmprlogonscript, usrlogon.cmd
EventID2eq 24104, 4688
Image1ends_with 1, is_null 1:\program files (x86)\citrix\hdx\bin\cmstart.exe, :\program files (x86)\citrix\hdx\bin\icast.exe, :\program files (x86)\citrix\system32\icast.exe
ParentImage1ends_with 1\userinit.exe
TargetObject1contains 1userinitmprlogonscript
Type1eq 1
event_type1in 1childproc, netconn, proc
registry_path1ends_with 1\\environment\\userinitmprlogonscript

Top indicator values (21 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.

FieldKindValueRules (here)Corpus reach
CommandLinecontains
netlogon.bat
1
CommandLinecontains
userinitmprlogonscript
1
CommandLinecontains
usrlogon.cmd
1
CommandLineeq
PowerShell.exe
1
EventIDeq
4104
1268
EventIDeq
4688
1313
Imageends_with
:\program files (x86)\citrix\hdx\bin\cmstart.exe
1
Imageends_with
:\program files (x86)\citrix\hdx\bin\icast.exe
1
Imageends_with
:\program files (x86)\citrix\system32\icast.exe
1
Imageends_with
:\program files\citrix\hdx\bin\cmstart.exe
1
Imageends_with
:\program files\citrix\hdx\bin\icast.exe
1
Imageends_with
:\program files\citrix\system32\icast.exe
1
Imageends_with
:\windows\explorer.exe
1
Imageends_with
:\windows\system32\proquota.exe
1
Imageends_with
:\windows\syswow64\proquota.exe
1
ParentImageends_with
\userinit.exe
13
TargetObjectcontains
userinitmprlogonscript
1
event_typein
childproc
127
event_typein
netconn
127
event_typein
proc
127
registry_pathends_with
\\environment\\userinitmprlogonscript
1

Exclusions (12 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.

FieldKindValueRules excluding
CommandLinecontains
netlogon.bat
1
CommandLinecontains
usrlogon.cmd
1
CommandLineeq
PowerShell.exe
1
Imageends_with
:\program files (x86)\citrix\hdx\bin\cmstart.exe
1
Imageends_with
:\program files (x86)\citrix\hdx\bin\icast.exe
1
Imageends_with
:\program files (x86)\citrix\system32\icast.exe
1
Imageends_with
:\program files\citrix\hdx\bin\cmstart.exe
1
Imageends_with
:\program files\citrix\hdx\bin\icast.exe
1
Imageends_with
:\program files\citrix\system32\icast.exe
1
Imageends_with
:\windows\explorer.exe
1
Imageends_with
:\windows\system32\proquota.exe
1
Imageends_with
:\windows\syswow64\proquota.exe
1

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.

Platform (all)
Domain (all)

Sigma 3 rules

Splunk 5 rules