Windows Registry File Creation in SMB Shareedit

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.

Rule type: eql

Rule indices:

  • logs-endpoint.events.*

Severity: medium

Risk score: 47

Runs every: 5 minutes

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

Tags:

  • Elastic
  • Host
  • Windows
  • Threat Detection
  • Lateral Movement
  • Credential Access

Version: 1

Added (Elastic Stack release): 8.2.0

Rule authors: Elastic

Rule license: Elastic License v2

Investigation guideedit

## 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 related to the user/host in the last 48 hours.
- Confirm whether the account owner is aware of the operation.
- Examine command line logs for the period when the alert was triggered.
- Capture the registry file(s) to scope the compromised credentials 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.
- Scope compromised credentials and disable associated accounts.
- Reset passwords for compromised accounts.
- Reimage the host operating system and restore compromised files to clean versions.

Rule queryedit

file where 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*"

Threat mappingedit

Framework: MITRE ATT&CKTM