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 |
References
Telemetry coverage
Rule body
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
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
AuthenticationPackageName | eq |
| field:"AuthenticationPackageName" kind:eq value:"NTLM" |
EventCode | eq |
| field:"EventID" kind:eq |
LogonType | eq |
| field:"LogonType" kind:eq value:"3" |
Source_Workstation | regex_match |
| field:"Source_Workstation" kind:regex_match |
Search terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>4625<" |
| 1 | "<EventID>4624<" |
| 1 | "<EventID>4776<" |