Logon initialisation spawns a process other than the shell
T1037.001 is the `HKCU\Environment\UserInitMprLogonScript` value, and the process that runs whatever that value points at is `userinit.exe` — so this rule gates on `userinit.exe` as the parent and treats any child that is not the shell as the hit, rather than listing script interpreters, because the value can name an executable directly. The same gate also covers AN0199's other configuration path, a script named by the user object's `scriptPath` attribute. Two exclusions shape it: the shell, pinned to `\Windows\explorer.exe` rather than to any file named explorer.exe so that a payload dropped under that name elsewhere is still a hit, and a command line naming one of the domain script shares, because `scriptPath` resolves against NETLOGON and the ordinary domain logon script would otherwise match at every logon. MITRE's `script_path_keywords` knob names NETLOGON and SYSVOL as paths to tune on; it is used inversely here, populated with those two share names as a suppression rather than a selection, and the cost of that choice is that a script an adversary stages on either share is outside this rule's reach. The exclusion is the two share names rather than "any UNC prefix" on purpose: the command line is written by whoever set the registry value, so a blanket contains-`\\` filter would let any value carrying a UNC-shaped string — `\\127.0.0.1\C$\Users\Public\p.bat` for a purely local file — silence the whole rule. The brief maps Security EventID 4688 onto Sigma's `process_creation` category, which is Sysmon-shaped — this rule is written in that vocabulary (`Image`, `ParentImage`, `CommandLine`), and a raw 4688 feed, whose native names are `NewProcessName` and `ParentProcessName`, needs the usual field mapping applied before it can match. 4688 also needs *Audit Process Creation*, and the share exclusion additionally needs the separate *Include command line in process creation events* policy; without it `CommandLine` is absent, nothing is suppressed and the rule gets noisier rather than quieter. AN0199's Group Policy half — `gpscript.exe` and System 1502/1503 — is not used: those scripts run from the local Group Policy cache at every logon, and configuring them is Group Policy modification rather than the per-user registry value this technique defines. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0072, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full descriptionShow less
The detection
The 4 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.
detection.yml
Sentinel · KQL
Run this as a search.
DeviceProcessEvents| where ((InitiatingProcessFolderPath endswith "\\userinit.exe" and not (FolderPath endswith "\\Windows\\explorer.exe")) and not ((ProcessCommandLine contains "\\netlogon\\" or ProcessCommandLine contains "\\sysvol\\")))
Splunk · SPL
Run this as a search.
index=* ((ParentImage="*\\userinit.exe" AND NOT (Image="*\\Windows\\explorer.exe")) AND NOT ((CommandLine="*\\netlogon\\*" OR CommandLine="*\\sysvol\\*")))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE ((TO_LOWER(process.parent.executable) LIKE "*\\\\userinit.exe" AND NOT (TO_LOWER(process.executable) LIKE "*\\\\windows\\\\explorer.exe")) AND NOT ((TO_LOWER(process.command_line) LIKE "*\\\\netlogon\\\\*" OR TO_LOWER(process.command_line) LIKE "*\\\\sysvol\\\\*")))
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,windows,process_creation,"> <!-- Rule ids must be unique on your manager; 100000+ is the user range. --> <rule id="100000" level="5"> <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. --> <field name="ParentImage" type="pcre2">(?i)\\userinit\.exe$</field> <field name="Image" negate="yes" type="pcre2">(?i)\\Windows\\explorer\.exe$</field> <field name="CommandLine" negate="yes" type="pcre2">(?i)(\\netlogon\\|\\sysvol\\)</field> <description>Logon initialisation spawns a process other than the shell</description> <mitre> <id>T1037.001</id> </mitre> </rule></group>
Verdicts · reactions · comments
Community
Verdicts from engineers who actually deployed it, and the conversation around it.
Nobody has run this in a real environment and said what happened.
Verdicts from engineers who deployed it
0 castNo verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.
Log in to report a verdict.
Log in to join the discussion.
No comments yet. Someone who deploys this will have something to say about it.