Boot or Logon Initialization Scripts T1037

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

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

Authoring guide

Patterns shared across the 10 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 (15 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
TargetObject2contains 1, wildcard 1hkey_users\*\control panel\desktop\scrnsave.exe, hkey_users\*\environment\userinitmprlogonscript, hkey_users\*\software\microsoft\command processor\autorun, userinitmprlogonscript
AccessList1contains 1%%4417
AttributeLDAPDisplayName1eq 1gpcmachineextensionnames, gpcuserextensionnames
AttributeValue1contains 140b6664f-4972-11d1-a7ca-0000f87571e3, 40b66650-4972-11d1-a7ca-0000f87571e3, 42b5faae-6536-11d2-ae5a-0000f87571e3
Details1length_compare 10, >
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
RelativeTargetName1ends_with 1\psscripts.ini, \scripts.ini
ShareName1wildcard 1\\*\SYSVOL
Type1eq 1
event.type1eq 1change
event_type1in 1childproc, netconn, proc
registry_path1ends_with 1\\environment\\userinitmprlogonscript

Top indicator values (84 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
AccessListcontains
%%4417
111
AttributeLDAPDisplayNameeq
gpcmachineextensionnames
17
AttributeLDAPDisplayNameeq
gpcuserextensionnames
14
AttributeValuecontains
40b6664f-4972-11d1-a7ca-0000f87571e3
12
AttributeValuecontains
40b66650-4972-11d1-a7ca-0000f87571e3
12
AttributeValuecontains
42b5faae-6536-11d2-ae5a-0000f87571e3
12
CommandLinecontains
netlogon.bat
1
CommandLinecontains
userinitmprlogonscript
1
CommandLinecontains
usrlogon.cmd
1
CommandLineeq
PowerShell.exe
1
Detailslength_compare
0
14
Detailslength_compare
>
14
EventIDeq
4104
1268
EventIDeq
4688
1312
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
14
Imageends_with
:\windows\system32\proquota.exe
1
Imageends_with
:\windows\syswow64\proquota.exe
1
ParentImageends_with
\userinit.exe
13
RelativeTargetNameends_with
\psscripts.ini
12
RelativeTargetNameends_with
\scripts.ini
12
ShareNamewildcard
\\*\SYSVOL
12
TargetObjectcontains
userinitmprlogonscript
1
TargetObjectwildcard
hkey_users\*\control panel\desktop\scrnsave.exe
1
TargetObjectwildcard
hkey_users\*\environment\userinitmprlogonscript
12

Exclusions (33 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
Detailseq
%windir%\system32\Ribbons.scr
1
Detailseq
%windir%\system32\rundll32.exe user32.dll,LockWorkStation
1
Detailseq
C:\Windows\System32\poqexec.exe /skip_critical_poq /display_progress...
1
Detailseq
C:\windows\System32\poqexec.exe /display_progress \SystemRoot\WinSxS\pending.xml
1
Detailseq
scrnsave.scr
1
Detailswildcard
C:\Program Files (x86)\*.exe
1
Detailswildcard
C:\Program Files\*.exe
1
Detailswildcard
C:\Windows\system32\userinit.exe
1
Detailswildcard
cmd.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

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 3 rules

Elastic 2 rules

Splunk 5 rules