Creation of a Hidden Local User Account
Identifies the creation of a hidden local user account by appending the dollar sign to the account name. This is sometimes done by attackers to increase access to a system and avoid appearing in the results of accounts listing using the net users command.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/12/18"
3integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
4maturity = "production"
5updated_date = "2024/10/15"
6min_stack_version = "8.14.0"
7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
8
9[rule]
10author = ["Elastic"]
11description = """
12Identifies the creation of a hidden local user account by appending the dollar sign to the account name. This is
13sometimes done by attackers to increase access to a system and avoid appearing in the results of accounts listing using
14the net users command.
15"""
16from = "now-9m"
17index = ["winlogbeat-*", "logs-endpoint.events.registry-*", "logs-windows.sysmon_operational-*", "endgame-*", "logs-m365_defender.event-*", "logs-sentinel_one_cloud_funnel.*"]
18language = "eql"
19license = "Elastic License v2"
20name = "Creation of a Hidden Local User Account"
21note = """## Triage and analysis
22
23### Investigating Creation of a Hidden Local User Account
24
25Attackers can create accounts ending with a `$` symbol to make the account hidden to user enumeration utilities and bypass detections that identify computer accounts by this pattern to apply filters.
26
27This rule uses registry events to identify the creation of local hidden accounts.
28
29#### Possible investigation steps
30
31- Identify the user account that performed the action and whether it should perform this kind of action.
32- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
33- Investigate other alerts associated with the user/host during the past 48 hours.
34
35### False positive analysis
36
37- This activity is unlikely to happen legitimately. Benign true positive (B-TPs) can be added as exceptions if necessary.
38
39### Response and remediation
40
41- Initiate the incident response process based on the outcome of the triage.
42- Isolate the involved hosts to prevent further post-compromise behavior.
43- Delete the hidden account.
44- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.
45- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
46- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
47"""
48references = [
49 "http://web.archive.org/web/20230329153858/https://blog.menasec.net/2019/02/threat-hunting-6-hiding-in-plain-sights_8.html",
50 "https://github.com/CyberMonitor/APT_CyberCriminal_Campagin_Collections/tree/master/2020/2020.12.15.Lazarus_Campaign",
51]
52risk_score = 73
53rule_id = "2edc8076-291e-41e9-81e4-e3fcbc97ae5e"
54severity = "high"
55tags = [
56 "Domain: Endpoint",
57 "OS: Windows",
58 "Use Case: Threat Detection",
59 "Tactic: Persistence",
60 "Resources: Investigation Guide",
61 "Data Source: Elastic Endgame",
62 "Data Source: Elastic Defend",
63 "Data Source: Sysmon",
64 "Data Source: Microsoft Defender for Endpoint",
65 "Data Source: SentinelOne",
66]
67timestamp_override = "event.ingested"
68type = "eql"
69
70query = '''
71registry where host.os.type == "windows" and event.type == "change" and
72 registry.path : (
73 "HKLM\\SAM\\SAM\\Domains\\Account\\Users\\Names\\*$\\",
74 "\\REGISTRY\\MACHINE\\SAM\\SAM\\Domains\\Account\\Users\\Names\\*$\\",
75 "MACHINE\\SAM\\SAM\\Domains\\Account\\Users\\Names\\*$\\"
76)
77'''
78
79
80[[rule.threat]]
81framework = "MITRE ATT&CK"
82[[rule.threat.technique]]
83id = "T1136"
84name = "Create Account"
85reference = "https://attack.mitre.org/techniques/T1136/"
86[[rule.threat.technique.subtechnique]]
87id = "T1136.001"
88name = "Local Account"
89reference = "https://attack.mitre.org/techniques/T1136/001/"
90
91
92
93[rule.threat.tactic]
94id = "TA0003"
95name = "Persistence"
96reference = "https://attack.mitre.org/tactics/TA0003/"
Triage and analysis
Investigating Creation of a Hidden Local User Account
Attackers can create accounts ending with a $
symbol to make the account hidden to user enumeration utilities and bypass detections that identify computer accounts by this pattern to apply filters.
This rule uses registry events to identify the creation of local hidden accounts.
Possible investigation steps
- Identify the user account that performed the action and whether it should perform this kind of action.
- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
- Investigate other alerts associated with the user/host during the past 48 hours.
False positive analysis
- This activity is unlikely to happen legitimately. Benign true positive (B-TPs) can be added as exceptions if necessary.
Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Isolate the involved hosts to prevent further post-compromise behavior.
- Delete the hidden account.
- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
References
Related rules
- Adobe Hijack Persistence
- Persistent Scripts in the Startup Directory
- Registry Persistence via AppInit DLL
- Startup Persistence by a Suspicious Process
- Suspicious Startup Shell Folder Modification