Windows Registry File Creation in SMB Share

edit

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

References:

Tags:

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

Version: 102 (version history)

Added (Elastic Stack release): 8.2.0

Last modified (Elastic Stack release): 8.6.0

Rule authors: Elastic

Rule license: Elastic License v2

Investigation guide

edit
## 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).

Rule query

edit
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*", "S-1-12-1-*")

Threat mapping

edit

Framework: MITRE ATT&CKTM

Rule version history

edit
Version 102 (8.6.0 release)
  • Updated query, changed from:

    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*"
Version 101 (8.5.0 release)
  • Formatting only
Version 3 (8.4.0 release)
  • Formatting only
Version 2 (8.3.0 release)
  • Formatting only