Try in Splunk Security Cloud


The following analytic identifies access to SAM, SYSTEM or SECURITY databases' within the file path of windows\system32\config using Windows Security EventCode 4663. This particular behavior is related to credential access, an attempt to either use a Shadow Copy or recent CVE-2021-36934 to access the SAM database. The Security Account Manager (SAM) is a database file in Windows XP, Windows Vista, Windows 7, 8.1 and 10 that stores users' passwords.

  • Type: Hunting
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2024-04-26
  • Author: Michael Haag, Mauricio Velazco, Splunk
  • ID: 57551656-ebdb-11eb-afdf-acde48001122




ID Technique Tactic
T1003.002 Security Account Manager Credential Access
T1003 OS Credential Dumping Credential Access
Kill Chain Phase
  • Exploitation
  • DE.AE
  • CIS 10

| ID | Summary | CVSS | | ———– | ———– | ————– | | CVE-2021-36934 | <p>An elevation of privilege vulnerability exists because of overly permissive Access Control Lists (ACLs) on multiple system files, including the Security Accounts Manager (SAM) database. An attacker who successfully exploited this vulnerability could run arbitrary code with SYSTEM privileges. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights.</p> <p>An attacker must have the ability to execute code on a victim system to exploit this vulnerability.</p> <p>After installing this security update, you <em>must</em> manually delete all shadow copies of system files, including the SAM database, to fully mitigate this vulnerabilty. <strong>Simply installing this security update will not fully mitigate this vulnerability.</strong> See <a href="">KB5005357- Delete Volume Shadow Copies</a>.</p> | 4.6 |

`wineventlog_security` (EventCode=4663)  ProcessName!=*\\dllhost.exe ObjectName IN ("*\\Windows\\System32\\config\\SAM*","*\\Windows\\System32\\config\\SYSTEM*","*\\Windows\\System32\\config\\SECURITY*") 
| stats values(AccessList) count by ProcessName ObjectName dest src_user 
| rename ProcessName as process_name 
| `sam_database_file_access_attempt_filter`


The SPL above uses the following Macros:

:information_source: sam_database_file_access_attempt_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • process_name
  • Object_Name
  • dest
  • user

How To Implement

To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663. For 4663, enable "Audit Object Access" in Group Policy. Then check the two boxes listed for both "Success" and "Failure."

Known False Positives

Natively, dllhost.exe will access the files. Every environment will have additional native processes that do as well. Filter by process_name. As an aside, one can remove process_name entirely and add Object_Name=*ShadowCopy*.

Associated Analytic Story


Risk Score Impact Confidence Message
80.0 80 100 The following process $process_name$ accessed the object $ObjectName$ attempting to gain access to credentials on $dest$ by user $src_user$.

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.


Test Dataset

Replay any dataset to Splunk Enterprise by using our tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range

source | version: 2