Skip to content

Siemphony is in beta and still being built. How a rule earns its badge.

Siemphony’s repertoire

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 description

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

title: Logon initialisation spawns a process other than the shellid: 8df64ad3-948c-45d0-9443-b86f4ae096a5status: experimentaldescription: |  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.references:  - https://attack.mitre.org/techniques/T1037/001  - https://attack.mitre.org/detectionstrategies/DET0072author: Siemphony pipeline (machine-derived from MITRE ATT&CK v19.2)date: 2026-08-16tags:  - attack.persistence  - attack.privilege-escalation  - attack.t1037.001logsource:  category: process_creation  product: windowsdetection:  selection_logon_init:    ParentImage|endswith: '\userinit.exe'  filter_shell:    Image|endswith: '\Windows\explorer.exe'  filter_domain_share:    CommandLine|contains:      - '\\netlogon\\'      - '\\sysvol\\'  condition: selection_logon_init and not filter_shell and not filter_domain_sharefalsepositives:  - "Endpoint-management, drive-mapping and printer-deployment products that hook logon by writing UserInitMprLogonScript or a local logon script themselves, which is the same mechanism this technique uses and fires at every logon on every host carrying the agent. This is the highest-volume match by a wide margin and is why the rule is low rather than medium."  - "Estates that still run a per-user logon script served from an ordinary file share or copied to a local path such as C:\\ProgramData rather than from NETLOGON or SYSVOL, where the share exclusion does not apply and userinit.exe launches the script at each affected user's logon."  - "Kiosk and task-station builds that replace the shell, so the configured application starts under userinit.exe instead of explorer.exe and falls outside the shell exclusion on every logon."  - "Software installers and repair tasks that queue work to run at next logon through the same per-user logon script value, producing a single match on the following logon."level: low

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.

Log in to react
Not yet reported on

Nobody has run this in a real environment and said what happened.

Verdicts from engineers who deployed it

0 cast

No 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.