Detection rules › Splunk

Potential EternalBlue via Metasploit (Windows Event Log)

Group by
_time, host
Source
github.com/anvilogic-forge/armory

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

References

Event coverage

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.

FieldKindValues
AuthenticationPackageNameeq
  • NTLM corpus 9 (sigma 5, elastic 2, splunk 1, kusto 1)
EventCodeeq
  • 4624 corpus 25 (splunk 13, kusto 8, chronicle 4)
  • 4625 corpus 15 (splunk 11, chronicle 2, kusto 2)
  • 4776 corpus 5 (splunk 5)
LogonTypeeq
  • 3 corpus 40 (splunk 13, sigma 12, elastic 9, kusto 6)
Source_Workstationregex_match
  • "^[A-Za-z0-9]{16}$"

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.

StageTerm
1TERM
1"<EventID>4625<"
1TERM
1"<EventID>4624<"
1TERM
1"<EventID>4776<"