Uncommon Userinit Child Process

Detects uncommon "userinit.exe" child processes, which could be a sign of uncommon shells or login scripts used for persistence.

Sigma rule (View on GitHub)

 1title: Uncommon Userinit Child Process
 2id: 0a98a10c-685d-4ab0-bddc-b6bdd1d48458
 3related:
 4    - id: 21d856f9-9281-4ded-9377-51a1a6e2a432
 5      type: similar
 6status: test
 7description: Detects uncommon "userinit.exe" child processes, which could be a sign of uncommon shells or login scripts used for persistence.
 8references:
 9    - https://cocomelonc.github.io/persistence/2022/12/09/malware-pers-20.html
10    - https://learn.microsoft.com/en-us/windows-server/administration/server-core/server-core-sconfig#powershell-is-the-default-shell-on-server-core
11author: Tom Ueltschi (@c_APT_ure), Tim Shelton
12date: 2019-01-12
13modified: 2023-11-14
14tags:
15    - attack.privilege-escalation
16    - attack.t1037.001
17    - attack.persistence
18logsource:
19    category: process_creation
20    product: windows
21detection:
22    selection:
23        ParentImage|endswith: '\userinit.exe'
24    filter_main_explorer:
25        Image|endswith: ':\WINDOWS\explorer.exe'
26    filter_optional_logonscripts:
27        CommandLine|contains:
28            - 'netlogon.bat'
29            - 'UsrLogon.cmd'
30    filter_optional_windows_core:
31        # Note: This filter is mandatory on Windows Core machines as the default shell spawned by "userinit" is "powershell.exe".
32        # https://learn.microsoft.com/en-us/windows-server/administration/server-core/server-core-sconfig#powershell-is-the-default-shell-on-server-core
33        CommandLine: 'PowerShell.exe'
34    filter_optional_proquota:
35        Image|endswith:
36            - ':\Windows\System32\proquota.exe'
37            - ':\Windows\SysWOW64\proquota.exe'
38    filter_optional_citrix:
39        Image|endswith:
40            # As reported by https://github.com/SigmaHQ/sigma/issues/4569
41            - ':\Program Files (x86)\Citrix\HDX\bin\cmstart.exe' # https://support.citrix.com/article/CTX983798/purpose-of-cmstart-command
42            - ':\Program Files (x86)\Citrix\HDX\bin\icast.exe' # https://support.citrix.com/article/CTX983798/purpose-of-cmstart-command
43            - ':\Program Files (x86)\Citrix\System32\icast.exe'
44            - ':\Program Files\Citrix\HDX\bin\cmstart.exe' # https://support.citrix.com/article/CTX983798/purpose-of-cmstart-command
45            - ':\Program Files\Citrix\HDX\bin\icast.exe' # https://support.citrix.com/article/CTX983798/purpose-of-cmstart-command
46            - ':\Program Files\Citrix\System32\icast.exe'
47    filter_optional_image_null:
48        Image: null
49    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
50falsepositives:
51    - Legitimate logon scripts or custom shells may trigger false positives. Apply additional filters accordingly.
52level: high

References

Related rules

to-top