Detection rules › Elastic
Suspicious Registry Hive Dump
Identifies attempts to dump registry hives containing access credential secrets, adversaries may dump registry to prepare for credential access.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Rule body
[rule]
description = """
Identifies attempts to dump registry hives containing access credential secrets, adversaries may dump registry to
prepare for credential access.
"""
id = "e7358500-1ef6-4f81-ab2d-f8da696375e8"
license = "Elastic License v2"
name = "Suspicious Registry Hive Dump"
os_list = ["windows"]
reference = [
"https://adsecurity.org/?page_id=1821",
"https://github.com/gentilkiwi/mimikatz/wiki/module-~-lsadump",
]
version = "1.0.8"
query = '''
any where
(
(event.category == "registry" and event.action == "save" and registry.path : ("HKLM\\SAM", "HKLM\\security", "HKLM\\SECURITY\\Policy\\Secrets") and
not (process.executable : "?:\\Windows\\System32\\svchost.exe" and
process.thread.Ext.call_stack_summary == "ntdll.dll|regsvc.dll|rpcrt4.dll|kernelbase.dll|ntdll.dll|kernel32.dll|ntdll.dll")) or
(event.category == "file" and file.Ext.header_bytes like "72656766*" and file.size >= 20000 and
process.thread.Ext.call_stack_summary like "*advapi32.dll|Unbacked*" and
_arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: "*advapi32.dll!RegSaveKey*") and
_arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: "Unbacked*" and $entry.callsite_trailing_bytes : "?*"))
) and
process.executable != null and
not (process.code_signature.subject_name == "VS REVO GROUP OOD" and process.code_signature.trusted == true) and
not process.executable : ("?:\\Program Files\\Commvault\\ContentStore\\Base\\CLBackup.exe",
"?:\\Program Files (x86)\\Commvault\\ContentStore\\Base\\CLBackup.exe",
"?:\\Program Files\\VS Revo Group\\Revo Uninstaller Pro\\RevoUninPro.exe",
"?:\\Program Files (x86)\\VS Revo Group\\Revo Uninstaller Pro\\RevoUninPro.exe",
"?:\\Program Files (x86)\\IObit\\Advanced SystemCare\\ASC.exe",
"?:\\Program Files\\IObit\\Advanced SystemCare\\ASC.exe",
"?:\\Program Files\\Carbonite\\Replication\\DoubleTake.exe",
"?:\\Program Files (x86)\\Carbonite\\Replication\\DoubleTake.exe",
"C:\\Program Files\\Microsoft SQL Server\\*\\Setup Bootstrap\\Release\\x64\\setup*.exe")
'''
min_endpoint_version = "8.8.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1003"
name = "OS Credential Dumping"
reference = "https://attack.mitre.org/techniques/T1003/"
[[threat.technique.subtechnique]]
id = "T1003.002"
name = "Security Account Manager"
reference = "https://attack.mitre.org/techniques/T1003/002/"
[threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[internal]
min_endpoint_version = "8.8.0"
Stages and Predicates
Stage 1: any
any where
(
(event.category == "registry" and event.action == "save" and registry.path : ("HKLM\\SAM", "HKLM\\security", "HKLM\\SECURITY\\Policy\\Secrets") and
not (process.executable : "?:\\Windows\\System32\\svchost.exe" and
process.thread.Ext.call_stack_summary == "ntdll.dll|regsvc.dll|rpcrt4.dll|kernelbase.dll|ntdll.dll|kernel32.dll|ntdll.dll")) or
(event.category == "file" and file.Ext.header_bytes like "72656766*" and file.size >= 20000 and
process.thread.Ext.call_stack_summary like "*advapi32.dll|Unbacked*" and
_arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: "*advapi32.dll!RegSaveKey*") and
_arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: "Unbacked*" and $entry.callsite_trailing_bytes : "?*"))
) and
process.executable != null and
not (process.code_signature.subject_name == "VS REVO GROUP OOD" and process.code_signature.trusted == true) and
not process.executable : ("?:\\Program Files\\Commvault\\ContentStore\\Base\\CLBackup.exe",
"?:\\Program Files (x86)\\Commvault\\ContentStore\\Base\\CLBackup.exe",
"?:\\Program Files\\VS Revo Group\\Revo Uninstaller Pro\\RevoUninPro.exe",
"?:\\Program Files (x86)\\VS Revo Group\\Revo Uninstaller Pro\\RevoUninPro.exe",
"?:\\Program Files (x86)\\IObit\\Advanced SystemCare\\ASC.exe",
"?:\\Program Files\\IObit\\Advanced SystemCare\\ASC.exe",
"?:\\Program Files\\Carbonite\\Replication\\DoubleTake.exe",
"?:\\Program Files (x86)\\Carbonite\\Replication\\DoubleTake.exe",
"C:\\Program Files\\Microsoft SQL Server\\*\\Setup Bootstrap\\Release\\x64\\setup*.exe")
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.code_signature.subject_name | eq | VS REVO GROUP OOD | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"VS REVO GROUP OOD" |
process.code_signature.trusted | eq | true | excludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true" |
process.executable | wildcard | ?:\Program Files\Commvault\ContentStore\Base\CLBackup.exe, ?:\Program Files (x86)\Commvault\ContentStore\Base\CLBackup.exe, ?:\Program Files\VS Revo Group\Revo Uninstaller Pro\RevoUninPro.exe, ?:\Program Files (x86)\VS Revo Group\Revo Uninstaller Pro\RevoUninPro.exe, ?:\Program Files (x86)\IObit\Advanced SystemCare\ASC.exe, ?:\Program Files\IObit\Advanced SystemCare\ASC.exe, ?:\Program Files\Carbonite\Replication\DoubleTake.exe, ?:\Program Files (x86)\Carbonite\Replication\DoubleTake.exe, C:\Program Files\Microsoft SQL Server\*\Setup Bootstrap\Release\x64\setup*.exe | excludes:process.executable |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"save" |
event.category | eq |
| field:"event.category" kind:eq |
file.Ext.header_bytes | wildcard |
| field:"file.Ext.header_bytes" kind:wildcard value:"72656766*" |
file.size | ge |
| field:"file.size" kind:ge value:"20000" |
process.executable | is_not_null | field:"Image" kind:is_not_null | |
process.thread.Ext.call_stack_summary | wildcard |
| field:"process.thread.Ext.call_stack_summary" kind:wildcard value:"*advapi32.dll|Unbacked*" |
registry.path | wildcard |
| field:"TargetObject" kind:wildcard |