Sensitive Registry Hive Access via RegBack
Identifies attempts to access registry backup hives that can contain or enable access to credential material.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2024/07/01"
3integration = ["endpoint"]
4maturity = "production"
5updated_date = "2026/04/27"
6
7[rule]
8author = ["Elastic"]
9description = "Identifies attempts to access registry backup hives that can contain or enable access to credential material."
10from = "now-9m"
11index = ["logs-endpoint.events.file-*"]
12language = "eql"
13license = "Elastic License v2"
14name = "Sensitive Registry Hive Access via RegBack"
15references = [
16 "https://attack.mitre.org/techniques/T1003/002/",
17]
18risk_score = 73
19rule_id = "63e381a6-0ffe-4afb-9a26-72a59ad16d7b"
20severity = "high"
21tags = [
22 "Domain: Endpoint",
23 "OS: Windows",
24 "Use Case: Threat Detection",
25 "Tactic: Credential Access",
26 "Resources: Investigation Guide",
27 "Data Source: Elastic Defend",
28]
29timestamp_override = "event.ingested"
30type = "eql"
31
32query = '''
33file where host.os.type == "windows" and
34 event.action == "open" and event.outcome == "success" and process.executable != null and
35 file.path :
36 ("?:\\Windows\\System32\\config\\RegBack\\SAM",
37 "?:\\Windows\\System32\\config\\RegBack\\SECURITY",
38 "?:\\Windows\\System32\\config\\RegBack\\SYSTEM") and
39 not (
40 user.id == "S-1-5-18" and process.executable : (
41 "?:\\Windows\\system32\\taskhostw.exe",
42 "?:\\Windows\\system32\\taskhost.exe",
43 "?:\\Program Files\\Sophos\\Endpoint Defense\\SophosScanCoordinator.exe",
44 "?:\\Program Files\\Sophos\\Endpoint Defense\\SSPService.exe",
45 "?:\\Program Files\\Windows Defender Advanced Threat Protection\\MsSense.exe",
46 "?:\\Program Files\\Trend Micro\\AMSP\\coreServiceShell.exe",
47 "?:\\Program Files\\Symantec\\Symantec Endpoint Protection\\*\\Bin64\\ccSvcHst.exe",
48 "?:\\Program Files\\Bitdefender\\Endpoint Security\\EPSecurityService.exe",
49 "?:\\Program Files\\N-able Technologies\\AVDefender\\EPSecurityService.exe",
50 "?:\\Program Files\\Cylance\\Optics\\CyOptics.exe",
51 "?:\\Program Files\\Common Files\\McAfee\\AVSolution\\mcshield.exe",
52 "?:\\Program Files (x86)\\Padvish AV\\APCcSvc.exe"
53 )
54 )
55'''
56
57note = """## Triage and analysis
58
59### Investigating Sensitive Registry Hive Access via RegBack
60
61#### Possible investigation steps
62
63- Which RegBack hives did the process open, and is the set usable for credential access?
64 - Why: "SAM" or "SECURITY" becomes credential material when paired with "SYSTEM"; `file.size` helps assess populated hives but does not replace hive-set review.
65 - Focus: alert `file.path` and `file.size`, then same-process opens for other RegBack hives. $investigate_2
66 - Implication: escalate when one process accesses "SAM" plus "SYSTEM" or all three hives, especially with populated sizes; do not close on empty/missing size alone, and keep isolated single-hive access unresolved until identity and staging are checked.
67
68- Does the accessing process fit a recognized recovery, backup, or forensic chain?
69 - Focus: `process.executable`, `process.code_signature.subject_name`, `process.code_signature.trusted`, and `process.parent.executable`.
70 - Hint: use `process.entity_id` to tie `process.command_line` and `process.parent.command_line` to the opener; if renamed, check `process.pe.original_file_name`. Trusted signer or Microsoft path does not clear credential-hive access.
71 - Implication: escalate when the binary is unsigned, user-writable, renamed, or launched by shell, script, Office, or remote-admin lineage outside recovery/evidence collection; lower suspicion when signer, path, parent, and command lines converge on one recognized workflow.
72
73- Did the same process stage, rename, archive, or hide hive files?
74 - Focus: same-process file events by `host.id` and `process.entity_id`, especially `file.path` and `file.size`.
75 - Hint: look for temp, user-profile, admin-share, removable, archive, or deceptive names omitting "SAM", "SECURITY", or "SYSTEM".
76 - Implication: escalate when hives are copied, renamed, compressed, or staged outside a recognized evidence or backup repository; lower suspicion when copies stay inside the bounded recovery/forensic case path.
77
78- Does the user and session identity fit protected RegBack access?
79 - Focus: `user.id`, `process.Ext.authentication_id`, `process.command_line`, and `process.parent.executable`.
80 - Hint: when present, use `process.Ext.session_info.logon_type` only as support; otherwise anchor on `process.Ext.authentication_id`, parent, and command line.
81 - Implication: escalate on rare user, unexplained session identifier, or remote-admin lineage without matching process and file-path evidence for recovery or forensics; lower suspicion when account, session, parent, and command line match the bounded workflow.
82
83- Do command lines or child processes show hive parsing, cleanup, or transfer?
84 - Why: RegBack reads may pair with "reg save", shadow-copy, or raw-copy variants for offline secret extraction.
85 - Focus: `process.command_line`, child process events where `process.parent.entity_id` matches `process.entity_id`, and copied-hive `file.path` values. $investigate_3
86 - Hint: check for "reg.exe save", shadow-copy utilities, raw-copy tools, archive tools, credential dumpers, cleanup commands, removable paths, or UNC paths.
87 - Implication: escalate when the lineage parses hives, creates archives, deletes staged hives, writes UNC/removable paths, or uses reg-save/shadow-copy/raw-copy variants; absence of these follow-on artifacts does not clear populated multi-hive access.
88
89- If local evidence is suspicious or incomplete, do related alerts expand scope?
90 - Focus: related alerts for `user.id` covering credential access, privilege escalation, staging, transfer, persistence, or lateral movement. $investigate_0
91 - Hint: use `host.id` when user scope is quiet or the actor is "S-1-5-18" or another service context. $investigate_1
92 - Implication: broaden containment and credential-impact review when related alerts show adjacent post-compromise behavior; keep the case local when related alerts are quiet and all local evidence fits one recognized workflow.
93
94- Escalate on populated multi-hive access with suspicious identity, staging, transfer, privilege, or related-alert context; close only when telemetry aligns with one recognized backup, recovery, or forensic workflow and no contradictory evidence remains; preserve hives, process records, and copied artifacts when evidence is mixed, incomplete, or needs outside confirmation.
95
96### False positive analysis
97
98- Endpoint security products (AV/EDR) routinely open RegBack hives during full-disk scans. Confirm when `process.executable` is a trusted-signed binary from a `Program Files` AV/EDR install path, `user.id` is `S-1-5-18`, and the same `process.entity_id` shows no staging, copy, archive, or multi-hive credential-set access.
99- Recognized backup, recovery, or forensic workflows can legitimately access RegBack hives only when `process.executable`, `process.code_signature.subject_name`, `process.parent.executable`, `process.command_line`, copied `file.path`, `user.id`, `process.Ext.authentication_id`, and `host.id` identify the same bounded maintenance or evidence-collection scope. Leave unresolved if staging, child-process, or related-alert evidence contradicts the workflow or legitimacy rests only on owner/context.
100- Before creating an exception, require recurring `process.executable`, `process.command_line`, `file.path`, `user.id`, and `host.id` across prior alerts; avoid exceptions on the RegBack path, hive name, or host alone.
101
102### Response and remediation
103
104- If confirmed benign, release any temporary containment and document the confirmed workflow anchors: tool identity, parent and command line, bounded RegBack `file.path` set, copied path pattern, `user.id`, and `host.id`. Create an exception only if those anchors recur consistently across prior alerts from this rule.
105- If suspicious but unconfirmed, export the alert, process timeline, same-process file activity, and any copied, archived, UNC, or removable-media hive paths before containment. Preserve hive copies when present. Apply reversible containment first, such as restricting the process, copied path, share access, or involved `user.id`; escalate to host isolation only when populated multi-hive access is paired with staging, transfer paths, or related post-compromise alerts and the asset can tolerate it.
106- If confirmed malicious, record and preserve the responsible process instance, process timeline, and hive artifact paths before containment. Then use Elastic Defend response actions to isolate the host and kill or suspend the process. If direct endpoint response is unavailable, escalate with those artifacts to the team that can isolate the host or disable the involved account. Block confirmed malicious tools, paths, shares, and copied artifacts tied to the RegBack access before cleanup.
107- If the same process accessed populated "SAM", "SECURITY", and "SYSTEM" files, treat the case as higher-confidence credential exposure and begin local-account and cached-credential hygiene appropriate to the host role. On shared admin systems or servers with privileged local accounts, escalate identity-impact handling according to the credential-compromise runbook.
108- Before eradication, scope the same process identity, RegBack path set, copy destinations, `user.id`, and `host.id` across related alerts so evidence is preserved before cleanup. Then remove unauthorized tools, copied hives, archives, remote-share artifacts, and persistence mechanisms uncovered during the investigation, and remediate the access vector or privilege path that allowed RegBack access.
109- Post-incident hardening: restrict RegBack access to recognized backup, recovery, and forensic tooling; retain endpoint process and file telemetry needed for this workflow; and document any "reg save", shadow-copy, or raw-copy variants surfaced during triage for future case comparison.
110"""
111
112setup = """## Setup
113
114This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
115
116Setup instructions: https://ela.st/install-elastic-defend
117"""
118
119[rule.investigation_fields]
120field_names = [
121 "@timestamp",
122 "host.name",
123 "host.id",
124 "user.name",
125 "user.id",
126 "process.executable",
127 "process.entity_id",
128 "process.command_line",
129 "process.parent.executable",
130 "process.pe.original_file_name",
131 "process.code_signature.subject_name",
132 "process.code_signature.trusted",
133 "process.Ext.authentication_id",
134 "file.path",
135 "file.size",
136]
137
138[transform]
139
140[[transform.investigate]]
141label = "Alerts associated with the user"
142description = ""
143providers = [
144 [
145 { excluded = false, field = "event.kind", queryType = "phrase", value = "signal", valueType = "string" },
146 { excluded = false, field = "user.id", queryType = "phrase", value = "{{user.id}}", valueType = "string" }
147 ]
148]
149relativeFrom = "now-48h/h"
150relativeTo = "now"
151
152[[transform.investigate]]
153label = "Alerts associated with the host"
154description = ""
155providers = [
156 [
157 { excluded = false, field = "event.kind", queryType = "phrase", value = "signal", valueType = "string" },
158 { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" }
159 ]
160]
161relativeFrom = "now-48h/h"
162relativeTo = "now"
163
164[[transform.investigate]]
165label = "File activity for the same process"
166description = ""
167providers = [
168 [
169 { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
170 { excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.entity_id}}", valueType = "string" },
171 { excluded = false, field = "event.category", queryType = "phrase", value = "file", valueType = "string" }
172 ]
173]
174relativeFrom = "now-1h"
175relativeTo = "now"
176
177[[transform.investigate]]
178label = "Child process events for the accessing process"
179description = ""
180providers = [
181 [
182 { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
183 { excluded = false, field = "process.parent.entity_id", queryType = "phrase", value = "{{process.entity_id}}", valueType = "string" },
184 { excluded = false, field = "event.category", queryType = "phrase", value = "process", valueType = "string" }
185 ]
186]
187relativeFrom = "now-1h"
188relativeTo = "now"
189
190[[rule.threat]]
191framework = "MITRE ATT&CK"
192
193[[rule.threat.technique]]
194id = "T1003"
195name = "OS Credential Dumping"
196reference = "https://attack.mitre.org/techniques/T1003/"
197
198[[rule.threat.technique.subtechnique]]
199id = "T1003.002"
200name = "Security Account Manager"
201reference = "https://attack.mitre.org/techniques/T1003/002/"
202
203[[rule.threat.technique.subtechnique]]
204id = "T1003.004"
205name = "LSA Secrets"
206reference = "https://attack.mitre.org/techniques/T1003/004/"
207
208[[rule.threat.technique.subtechnique]]
209id = "T1003.005"
210name = "Cached Domain Credentials"
211reference = "https://attack.mitre.org/techniques/T1003/005/"
212
213[rule.threat.tactic]
214id = "TA0006"
215name = "Credential Access"
216reference = "https://attack.mitre.org/tactics/TA0006/"
Triage and analysis
Investigating Sensitive Registry Hive Access via RegBack
Possible investigation steps
-
Which RegBack hives did the process open, and is the set usable for credential access?
- Why: "SAM" or "SECURITY" becomes credential material when paired with "SYSTEM";
file.sizehelps assess populated hives but does not replace hive-set review. - Focus: alert
file.pathandfile.size, then same-process opens for other RegBack hives. $investigate_2 - Implication: escalate when one process accesses "SAM" plus "SYSTEM" or all three hives, especially with populated sizes; do not close on empty/missing size alone, and keep isolated single-hive access unresolved until identity and staging are checked.
- Why: "SAM" or "SECURITY" becomes credential material when paired with "SYSTEM";
-
Does the accessing process fit a recognized recovery, backup, or forensic chain?
- Focus:
process.executable,process.code_signature.subject_name,process.code_signature.trusted, andprocess.parent.executable. - Hint: use
process.entity_idto tieprocess.command_lineandprocess.parent.command_lineto the opener; if renamed, checkprocess.pe.original_file_name. Trusted signer or Microsoft path does not clear credential-hive access. - Implication: escalate when the binary is unsigned, user-writable, renamed, or launched by shell, script, Office, or remote-admin lineage outside recovery/evidence collection; lower suspicion when signer, path, parent, and command lines converge on one recognized workflow.
- Focus:
-
Did the same process stage, rename, archive, or hide hive files?
- Focus: same-process file events by
host.idandprocess.entity_id, especiallyfile.pathandfile.size. - Hint: look for temp, user-profile, admin-share, removable, archive, or deceptive names omitting "SAM", "SECURITY", or "SYSTEM".
- Implication: escalate when hives are copied, renamed, compressed, or staged outside a recognized evidence or backup repository; lower suspicion when copies stay inside the bounded recovery/forensic case path.
- Focus: same-process file events by
-
Does the user and session identity fit protected RegBack access?
- Focus:
user.id,process.Ext.authentication_id,process.command_line, andprocess.parent.executable. - Hint: when present, use
process.Ext.session_info.logon_typeonly as support; otherwise anchor onprocess.Ext.authentication_id, parent, and command line. - Implication: escalate on rare user, unexplained session identifier, or remote-admin lineage without matching process and file-path evidence for recovery or forensics; lower suspicion when account, session, parent, and command line match the bounded workflow.
- Focus:
-
Do command lines or child processes show hive parsing, cleanup, or transfer?
- Why: RegBack reads may pair with "reg save", shadow-copy, or raw-copy variants for offline secret extraction.
- Focus:
process.command_line, child process events whereprocess.parent.entity_idmatchesprocess.entity_id, and copied-hivefile.pathvalues. $investigate_3 - Hint: check for "reg.exe save", shadow-copy utilities, raw-copy tools, archive tools, credential dumpers, cleanup commands, removable paths, or UNC paths.
- Implication: escalate when the lineage parses hives, creates archives, deletes staged hives, writes UNC/removable paths, or uses reg-save/shadow-copy/raw-copy variants; absence of these follow-on artifacts does not clear populated multi-hive access.
-
If local evidence is suspicious or incomplete, do related alerts expand scope?
- Focus: related alerts for
user.idcovering credential access, privilege escalation, staging, transfer, persistence, or lateral movement. $investigate_0 - Hint: use
host.idwhen user scope is quiet or the actor is "S-1-5-18" or another service context. $investigate_1 - Implication: broaden containment and credential-impact review when related alerts show adjacent post-compromise behavior; keep the case local when related alerts are quiet and all local evidence fits one recognized workflow.
- Focus: related alerts for
-
Escalate on populated multi-hive access with suspicious identity, staging, transfer, privilege, or related-alert context; close only when telemetry aligns with one recognized backup, recovery, or forensic workflow and no contradictory evidence remains; preserve hives, process records, and copied artifacts when evidence is mixed, incomplete, or needs outside confirmation.
False positive analysis
- Endpoint security products (AV/EDR) routinely open RegBack hives during full-disk scans. Confirm when
process.executableis a trusted-signed binary from aProgram FilesAV/EDR install path,user.idisS-1-5-18, and the sameprocess.entity_idshows no staging, copy, archive, or multi-hive credential-set access. - Recognized backup, recovery, or forensic workflows can legitimately access RegBack hives only when
process.executable,process.code_signature.subject_name,process.parent.executable,process.command_line, copiedfile.path,user.id,process.Ext.authentication_id, andhost.ididentify the same bounded maintenance or evidence-collection scope. Leave unresolved if staging, child-process, or related-alert evidence contradicts the workflow or legitimacy rests only on owner/context. - Before creating an exception, require recurring
process.executable,process.command_line,file.path,user.id, andhost.idacross prior alerts; avoid exceptions on the RegBack path, hive name, or host alone.
Response and remediation
- If confirmed benign, release any temporary containment and document the confirmed workflow anchors: tool identity, parent and command line, bounded RegBack
file.pathset, copied path pattern,user.id, andhost.id. Create an exception only if those anchors recur consistently across prior alerts from this rule. - If suspicious but unconfirmed, export the alert, process timeline, same-process file activity, and any copied, archived, UNC, or removable-media hive paths before containment. Preserve hive copies when present. Apply reversible containment first, such as restricting the process, copied path, share access, or involved
user.id; escalate to host isolation only when populated multi-hive access is paired with staging, transfer paths, or related post-compromise alerts and the asset can tolerate it. - If confirmed malicious, record and preserve the responsible process instance, process timeline, and hive artifact paths before containment. Then use Elastic Defend response actions to isolate the host and kill or suspend the process. If direct endpoint response is unavailable, escalate with those artifacts to the team that can isolate the host or disable the involved account. Block confirmed malicious tools, paths, shares, and copied artifacts tied to the RegBack access before cleanup.
- If the same process accessed populated "SAM", "SECURITY", and "SYSTEM" files, treat the case as higher-confidence credential exposure and begin local-account and cached-credential hygiene appropriate to the host role. On shared admin systems or servers with privileged local accounts, escalate identity-impact handling according to the credential-compromise runbook.
- Before eradication, scope the same process identity, RegBack path set, copy destinations,
user.id, andhost.idacross related alerts so evidence is preserved before cleanup. Then remove unauthorized tools, copied hives, archives, remote-share artifacts, and persistence mechanisms uncovered during the investigation, and remediate the access vector or privilege path that allowed RegBack access. - Post-incident hardening: restrict RegBack access to recognized backup, recovery, and forensic tooling; retain endpoint process and file telemetry needed for this workflow; and document any "reg save", shadow-copy, or raw-copy variants surfaced during triage for future case comparison.
References
Related rules
- Modification of WDigest Security Provider
- Potential Local NTLM Relay via HTTP
- Potential Remote Credential Access via Registry
- Unusual Web Config File Access
- Wireless Credential Dumping using Netsh Command