-
Notifications
You must be signed in to change notification settings - Fork 502
/
credential_access_moving_registry_hive_via_smb.toml
118 lines (96 loc) · 4.89 KB
/
credential_access_moving_registry_hive_via_smb.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
[metadata]
creation_date = "2022/02/16"
integration = ["endpoint"]
maturity = "production"
updated_date = "2024/08/06"
[rule]
author = ["Elastic"]
description = """
Identifies the creation or modification of a medium-size registry hive file on a Server Message Block (SMB) share, which
may indicate an exfiltration attempt of a previously dumped Security Account Manager (SAM) registry hive for credential
extraction on an attacker-controlled system.
"""
from = "now-9m"
index = ["logs-endpoint.events.file-*"]
language = "eql"
license = "Elastic License v2"
name = "Windows Registry File Creation in SMB Share"
note = """## Triage and analysis
### Investigating Windows Registry File Creation in SMB Share
Dumping registry hives is a common way to access credential information. Some hives store credential material, as is the case for the SAM hive, which stores locally cached credentials (SAM secrets), and the SECURITY hive, which stores domain cached credentials (LSA secrets). Dumping these hives in combination with the SYSTEM hive enables the attacker to decrypt these secrets.
Attackers can try to evade detection on the host by transferring this data to a system that is not monitored to be parsed and decrypted. This rule identifies the creation or modification of a medium-size registry hive file on an SMB share, which may indicate this kind of exfiltration attempt.
#### Possible investigation steps
- Investigate other alerts associated with the user/source host during the past 48 hours.
- 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.
- Inspect the source host for suspicious or abnormal behaviors in the alert timeframe.
- Capture the registry file(s) to determine the extent of the credential compromise in an eventual incident response.
### False positive analysis
- Administrators can export registry hives for backup purposes. Check whether the user should be performing this kind of activity and is aware of it.
### Related rules
- Credential Acquisition via Registry Hive Dumping - a7e7bfa3-088e-4f13-b29e-3986e0e756b8
### 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).
"""
references = ["https://www.elastic.co/security-labs/detect-credential-access"]
risk_score = 47
rule_id = "a4c7473a-5cb4-4bc1-9d06-e4a75adbc494"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Lateral Movement",
"Tactic: Credential Access",
"Resources: Investigation Guide",
"Data Source: Elastic Defend",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
file where host.os.type == "windows" and event.type == "creation" and
/* regf file header */
file.Ext.header_bytes : "72656766*" and file.size >= 30000 and
process.pid == 4 and user.id : ("S-1-5-21*", "S-1-12-1-*") and
not file.path : (
"?:\\*\\UPM_Profile\\NTUSER.DAT",
"?:\\*\\UPM_Profile\\NTUSER.DAT.LASTGOOD.LOAD",
"?:\\*\\UPM_Profile\\AppData\\Local\\Microsoft\\Windows\\UsrClass.dat*",
"?:\\Windows\\Netwrix\\Temp\\????????.???.offreg",
"?:\\*\\AppData\\Local\\Packages\\Microsoft.*\\Settings\\settings.dat*"
)
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1003"
name = "OS Credential Dumping"
reference = "https://attack.mitre.org/techniques/T1003/"
[[rule.threat.technique.subtechnique]]
id = "T1003.002"
name = "Security Account Manager"
reference = "https://attack.mitre.org/techniques/T1003/002/"
[rule.threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1021"
name = "Remote Services"
reference = "https://attack.mitre.org/techniques/T1021/"
[[rule.threat.technique.subtechnique]]
id = "T1021.002"
name = "SMB/Windows Admin Shares"
reference = "https://attack.mitre.org/techniques/T1021/002/"
[rule.threat.tactic]
id = "TA0008"
name = "Lateral Movement"
reference = "https://attack.mitre.org/tactics/TA0008/"