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.t1037.001
16    - attack.persistence
17logsource:
18    category: process_creation
19    product: windows
20detection:
21    selection:
22        ParentImage|endswith: '\userinit.exe'
23    filter_main_explorer:
24        Image|endswith: ':\WINDOWS\explorer.exe'
25    filter_optional_logonscripts:
26        CommandLine|contains:
27            - 'netlogon.bat'
28            - 'UsrLogon.cmd'
29    filter_optional_windows_core:
30        # Note: This filter is mandatory on Windows Core machines as the default shell spawned by "userinit" is "powershell.exe".
31        # https://learn.microsoft.com/en-us/windows-server/administration/server-core/server-core-sconfig#powershell-is-the-default-shell-on-server-core
32        CommandLine: 'PowerShell.exe'
33    filter_optional_proquota:
34        Image|endswith:
35            - ':\Windows\System32\proquota.exe'
36            - ':\Windows\SysWOW64\proquota.exe'
37    filter_optional_citrix:
38        Image|endswith:
39            # As reported by https://github.com/SigmaHQ/sigma/issues/4569
40            - ':\Program Files (x86)\Citrix\HDX\bin\cmstart.exe' # https://support.citrix.com/article/CTX983798/purpose-of-cmstart-command
41            - ':\Program Files (x86)\Citrix\HDX\bin\icast.exe' # https://support.citrix.com/article/CTX983798/purpose-of-cmstart-command
42            - ':\Program Files (x86)\Citrix\System32\icast.exe'
43            - ':\Program Files\Citrix\HDX\bin\cmstart.exe' # https://support.citrix.com/article/CTX983798/purpose-of-cmstart-command
44            - ':\Program Files\Citrix\HDX\bin\icast.exe' # https://support.citrix.com/article/CTX983798/purpose-of-cmstart-command
45            - ':\Program Files\Citrix\System32\icast.exe'
46    filter_optional_image_null:
47        Image: null
48    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
49falsepositives:
50    - Legitimate logon scripts or custom shells may trigger false positives. Apply additional filters accordingly.
51level: high

References

Related rules

to-top