Detection rules › Splunk
SAM, System, Security Files Accessed (Windows Event Log)
This use case looks for file access of C:\Windows\System32\config(SAM|System|Security) as seen with HiveNightmare/SeriousSam CVE-2021-33757. Vulnerability that allows non-admins to access the Security Account Manager (SAM) database, which stores users’ passwords
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Credential Access | T1003.002 OS Credential Dumping: Security Account Manager |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4663 | An attempt was made to access an object. |
Rule body yaml
id: '6561.7484'
title: SAM, System, Security Files Accessed
description: 'This use case looks for file access of C:\Windows\System32\config\(SAM|System|Security)
as seen with HiveNightmare/SeriousSam CVE-2021-33757. Vulnerability that allows
non-admins to access the Security Account Manager (SAM) database, which stores users’
passwords. - Threat Actor Association: Flax Typhoon, Lapsus$ -- Software Association:
Rhysida'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4663) OR
"<EventID>4663<") TERM("C:\\Windows\\System32\\config\\*") (TERM(SAM) OR TERM(SYSTEM)
OR TERM(security))| regex Object_Name="(?i)(sam|system|security)$" | eval file_path=Object_Name|
fields _time, host, user, signature_id, process, process_*, parent_*, signature,
file_path, parameters `group_events("host", 1)` '
techniques:
- credential-access:os credential dumping:security account manager
technique_id:
- T1003.002
data_category:
- Windows event logs
- File monitoring
references:
- https://www.blumira.com/sam-database-vulnerability/
Stages and Predicates
Stage 1: search
search EventCode=4663 source="*" source IN ("WinEventLog:Security", "XmlWinEventLog:Security")
Stage 2: regex
regex match(Object_Name, "(?i)(sam|system|security)$")
Stage 3: eval
eval file_path = ({ uses: Object_Name })
Stage 4: fields
fields _time, file_path, host, parameters, parent_*, process, process_*, signature, signature_id, user
Stage 5: bucket
bucket _time
Stage 6: stats
stats BY host, _time
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
EventCode | eq |
|
Object_Name | regex_match |
|
Search terms
Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.
| Stage | Term |
|---|---|
| 1 | TERM |
| 1 | "<EventID>4663<" |
| 1 | "\" |
| 1 | C:\\\\Windows\\\\System32\\\\config\\\\*\"" |
| 1 | TERM |
| 1 | SAM |
| 1 | TERM |
| 1 | SYSTEM |
| 1 | TERM |
| 1 | security |