Sensitive Registry Hive Access via RegBack

Identifies attempts to access sensitive registry hives which contain credentials from the registry backup folder.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2024/07/01"
 3integration = ["endpoint"]
 4maturity = "production"
 5updated_date = "2024/07/01"
 6
 7[rule]
 8author = ["Elastic"]
 9description = "Identifies attempts to access sensitive registry hives which contain credentials from the registry backup folder."
10from = "now-9m"
11index = ["logs-endpoint.events.file*"]
12language = "eql"
13license = "Elastic License v2"
14name = "Sensitive Registry Hive Access via RegBack"
15note = """## Triage and analysis
16
17### Investigating Sensitive Registry Hive Access via RegBack
18
19Collecting registry hives is a common way to access credential information as some hives store credential material.
20
21For example, the SAM hive stores locally cached credentials (SAM Secrets), and the SECURITY hive stores domain cached credentials (LSA secrets).
22
23Dumping these hives in combination with the SYSTEM hive enables the attacker to decrypt these secrets.
24
25#### Possible investigation steps
26
27- Investigate the script 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.
28- Identify the user account that performed the action and whether it should perform this kind of action.
29- Contact the account owner and confirm whether they are aware of this activity.
30- Investigate other alerts associated with the user/host during the past 48 hours.
31- Investigate if the credential material was exfiltrated or processed locally by other tools.
32- Investigate potentially compromised accounts. Analysts can do this by searching for login events (e.g., 4624) to the target host.
33
34### False positive analysis
35
36- Administrators can export registry hives for backup purposes. Check whether the user is legitamitely performing this kind of activity.
37
38### Related rules
39
40- Registry Hive File Creation via SMB - a4c7473a-5cb4-4bc1-9d06-e4a75adbc494
41
42### Response and remediation
43
44- Initiate the incident response process based on the outcome of the triage.
45- Isolate the involved hosts to prevent further post-compromise behavior.
46- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
47- Reimage the host operating system and restore compromised files to clean versions.
48- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
49- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
50- 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).
51"""
52risk_score = 73
53rule_id = "63e381a6-0ffe-4afb-9a26-72a59ad16d7b"
54severity = "high"
55tags = [
56    "Domain: Endpoint",
57    "OS: Windows",
58    "Use Case: Threat Detection",
59    "Tactic: Credential Access",
60    "Resources: Investigation Guide",
61    "Data Source: Elastic Defend",
62]
63timestamp_override = "event.ingested"
64type = "eql"
65
66query = '''
67file where host.os.type == "windows" and 
68 event.action == "open" and event.outcome == "success" and process.executable != null and 
69 file.path :
70      ("?:\\Windows\\System32\\config\\RegBack\\SAM",
71       "?:\\Windows\\System32\\config\\RegBack\\SECURITY",
72       "?:\\Windows\\System32\\config\\RegBack\\SYSTEM") and 
73 not (user.id == "S-1-5-18" and process.executable : "?:\\Windows\\system32\\taskhostw.exe")
74'''
75
76
77[[rule.threat]]
78framework = "MITRE ATT&CK"
79[[rule.threat.technique]]
80id = "T1003"
81name = "OS Credential Dumping"
82reference = "https://attack.mitre.org/techniques/T1003/"
83[[rule.threat.technique.subtechnique]]
84id = "T1003.002"
85name = "Security Account Manager"
86reference = "https://attack.mitre.org/techniques/T1003/002/"
87
88[[rule.threat.technique.subtechnique]]
89id = "T1003.004"
90name = "LSA Secrets"
91reference = "https://attack.mitre.org/techniques/T1003/004/"
92
93
94
95[rule.threat.tactic]
96id = "TA0006"
97name = "Credential Access"
98reference = "https://attack.mitre.org/tactics/TA0006/"

Triage and analysis

Investigating Sensitive Registry Hive Access via RegBack

Collecting registry hives is a common way to access credential information as some hives store credential material.

For example, the SAM hive stores locally cached credentials (SAM Secrets), and the SECURITY hive stores domain cached credentials (LSA secrets).

Dumping these hives in combination with the SYSTEM hive enables the attacker to decrypt these secrets.

Possible investigation steps

  • Investigate the script 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.
  • Identify the user account that performed the action and whether it should perform this kind of action.
  • Contact the account owner and confirm whether they are aware of this activity.
  • Investigate other alerts associated with the user/host during the past 48 hours.
  • Investigate if the credential material was exfiltrated or processed locally by other tools.
  • Investigate potentially compromised accounts. Analysts can do this by searching for login events (e.g., 4624) to the target host.

False positive analysis

  • Administrators can export registry hives for backup purposes. Check whether the user is legitamitely performing this kind of activity.
  • Registry Hive File Creation via SMB - a4c7473a-5cb4-4bc1-9d06-e4a75adbc494

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.
  • Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
  • Reimage the host operating system and restore compromised files to clean versions.
  • Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
  • 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).

Related rules

to-top