Detection rules › Splunk

Hidden User Created - Windows (Sysmon)

Group by
_time, host
Source
github.com/anvilogic-forge/armory

Adversaries may hide user accounts in Windows by setting the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList Registry key value to 0 for a specific user to prevent that user from being listed on the logon screen

MITRE ATT&CK coverage

References

Event coverage

Rule body yaml

id: '13615.19725'
title: Hidden User Created - Windows
description: 'Adversaries may hide user accounts in Windows by setting the HKLM\SOFTWARE\Microsoft\Windows
  NT\CurrentVersion\Winlogon\SpecialAccounts\UserList Registry key value to 0 for
  a specific user to prevent that user from being listed on the logon screen. -- Threat
  Actor Association: Unfading Sea Haze - Software Association: Dagon Locker, IcedID
  -- Atomics T1564.002 Test #3'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<"
  OR TERM(EventCode=12) OR "<EventID>12<" OR TERM(EventCode=13) OR "<EventID>13<")
  (TERM(ADD) AND "UserList" AND "/d" AND "0") OR (HKLM\Software\Microsoft\Windows
  NT\CurrentVersion\Winlogon\SpecialAccounts\Userlist) | table _time, host, user signature_id,
  process, process_*, parent_*, signature, user_id | bin span=1s | stats values(*)
  as * by _time, host | where match(process, "(?i)(\s+ADD\s+.*\/d.*0)") OR match(signature_id,
  "12") OR match(signature_id, "13") '
techniques:
- defense-evasion:hide artifacts:hidden users
- defense-evasion:hide artifacts
technique_id:
- T1564.002
- T1564
data_category:
- Process command-line parameters
- Windows Sysmon
references:
- https://thedfirreport.com/2022/07/11/select-xmrig-from-sqlserver/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1564.002/T1564.002.md#atomic-test-3---create-hidden-user-in-registry

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<" OR TERM(EventCode=12) OR "<EventID>12<" OR TERM(EventCode=13) OR "<EventID>13<") (TERM(ADD) AND "UserList" AND "/d" AND "0") OR (HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\Userlist)

Stage 2: table

| table _time, host, user signature_id, process, process_*, parent_*, signature, user_id

Stage 3: bucket

| bin span=1s

Stage 4: stats

| stats values(*) as * by _time, host

Stage 5: where

| where match(process, "(?i)(\s+ADD\s+.*\/d.*0)") OR match(signature_id, "12") OR match(signature_id, "13")

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
EventCodeeq
  • 1 corpus 237 (splunk 224, kusto 13)
  • 12 corpus 9 (splunk 9)
  • 13 corpus 22 (splunk 18, kusto 4)
processmatch
  • "(?i)(\s+ADD\s+.*\/d.*0)" corpus 2 (splunk 2)
signature_idmatch
  • "12"
  • "13" corpus 2 (splunk 2)

Search terms

Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.

StageTerm
1TERM
1"<EventID>1<"
1TERM
1"<EventID>12<"
1TERM
1"<EventID>13<"
1TERM
1ADD
1"UserList"
1"/d"
1"0"
1HKLM\Software\Microsoft\Windows
1NT\CurrentVersion\Winlogon\SpecialAccounts\Userlist