Detection rules › Splunk

Hidden User Created - Windows (Windows Event Log)

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.19724'
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_winevent` (TERM(EventCode=4688) OR
  "<EventID>4688<" OR TERM(EventCode=4657) OR "<EventID>4657<" OR Type=Process) (TERM(ADD)
  AND "UserList" AND "/d" AND "0") OR (HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\Userlist)
  | regex process="(?i)(REG\s+?ADD).*\x5cCurrentVersion\x5cWinlogon\x5cSpecialAccounts\x5cUserlist.*0"
  | 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, "4657") '
techniques:
- defense-evasion:hide artifacts:hidden users
- defense-evasion:hide artifacts
technique_id:
- T1564.002
- T1564
data_category:
- Windows event logs
- Process command-line parameters
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_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR TERM(EventCode=4657) OR "<EventID>4657<" OR Type=Process) (TERM(ADD) AND "UserList" AND "/d" AND "0") OR (HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\Userlist)

Stage 2: regex

| regex process="(?i)(REG\s+?ADD).*\x5cCurrentVersion\x5cWinlogon\x5cSpecialAccounts\x5cUserlist.*0"

Stage 3: table

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

Stage 4: bucket

| bin span=1s

Stage 5: stats

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

Stage 6: where

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

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
  • 4657 corpus 17 (splunk 14, kusto 3)
  • 4688 corpus 313 (splunk 283, kusto 30)
processmatch
  • "(?i)(\s+ADD\s+.*\/d.*0)" corpus 2 (splunk 2)
processregex_match
  • "(?i)(REG\s+?ADD).*\x5cCurrentVersion\x5cWinlogon\x5cSpecialAccounts\x5cUserlist.*0"
signature_idmatch
  • "4657" 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>4688<"
1TERM
1"<EventID>4657<"
1TERM
1ADD
1"UserList"
1"/d"
1"0"
1HKLM\Software\Microsoft\Windows
1NT\CurrentVersion\Winlogon\SpecialAccounts\Userlist