Detection rules › Splunk
Hidden User Created - Windows (Windows Event Log)
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
| Tactic | Techniques |
|---|---|
| Stealth | T1564.002 Hide Artifacts: Hidden Users |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4657 | A registry value was modified. |
| Security-Auditing | Event ID 4688 | A new process has been created. |
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.
| Field | Kind | Values |
|---|---|---|
EventCode | eq |
|
process | match |
|
process | regex_match |
|
signature_id | match |
|
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.
| Stage | Term |
|---|---|
| 1 | TERM |
| 1 | "<EventID>4688<" |
| 1 | TERM |
| 1 | "<EventID>4657<" |
| 1 | TERM |
| 1 | ADD |
| 1 | "UserList" |
| 1 | "/d" |
| 1 | "0" |
| 1 | HKLM\Software\Microsoft\Windows |
| 1 | NT\CurrentVersion\Winlogon\SpecialAccounts\Userlist |