Detection rules › Splunk
Potential EternalBlue via Metasploit (Windows Event Log)
Adversaries may use Valid Accounts to interact with a remote network share using Server Message Block (SMB). The adversary may then perform actions as the logged-on user. This use case detects attempts to authenticate to an SMB share using Metasploit-Framework's EternalBlue module. False positives may be generated for workstations using 16-character alphanumeric naming conventions; allowlisting specific hostnames following this naming convention is recommended for best fidelity.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement | T1021.002 Remote Services: SMB/Windows Admin Shares |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4624 | An account was successfully logged on. |
| Security-Auditing | Event ID 4625 | An account failed to log on. |
| Security-Auditing | Event ID 4776 | The domain controller attempted to validate the credentials for an account. |
Rule body yaml
id: '33131.58750'
title: Potential EternalBlue via Metasploit
description: Adversaries may use Valid Accounts to interact with a remote network
share using Server Message Block (SMB). The adversary may then perform actions as
the logged-on user. This use case detects attempts to authenticate to an SMB share
using Metasploit-Framework's EternalBlue module. False positives may be generated
for workstations using 16-character alphanumeric naming conventions; allowlisting
specific hostnames following this naming convention is recommended for best fidelity.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` ((TERM(EventCode=4625) OR
"<EventID>4625<") OR (TERM(EventCode=4624) OR "<EventID>4624<") AND AuthenticationPackageName=NTLM
AND LogonType=3) OR (TERM(EventCode=4776) OR "<EventID>4776<") | regex Source_Workstation="^[A-Za-z0-9]{16}$"
| table _time, host, user, src, src_*, dest, dest_*, Source_Workstation, signature_id,
AuthenticationPackageName, LogonType, | bin span=1s | stats values(*) as * by _time,
host '
techniques:
- lateral-movement:remote services:smb/windows admin shares
technique_id:
- T1021.002
data_category:
- Windows event logs
references:
- https://attack.mitre.org/techniques/T1021/002/
- https://github.com/rapid7/metasploit-framework/tree/master
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/security/win_security_metasploit_authentication.yml
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_winevent` ((TERM(EventCode=4625) OR "<EventID>4625<") OR (TERM(EventCode=4624) OR "<EventID>4624<") AND AuthenticationPackageName=NTLM AND LogonType=3) OR (TERM(EventCode=4776) OR "<EventID>4776<")
Stage 2: regex
| regex Source_Workstation="^[A-Za-z0-9]{16}$"
Stage 3: table
| table _time, host, user, src, src_*, dest, dest_*, Source_Workstation, signature_id, AuthenticationPackageName, LogonType,
Stage 4: bucket
| bin span=1s
Stage 5: stats
| stats values(*) as * by _time, host
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 |
|---|---|---|
AuthenticationPackageName | eq |
|
EventCode | eq |
|
LogonType | eq |
|
Source_Workstation | 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>4625<" |
| 1 | TERM |
| 1 | "<EventID>4624<" |
| 1 | TERM |
| 1 | "<EventID>4776<" |