Detection rules › Sigma
External Remote SMB Logon from Public IP
Detects successful logon from public IP address via SMB. This can indicate a publicly-exposed SMB port.
Known false positives
- Legitimate or intentional inbound connections from public IP addresses on the SMB port.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Persistence | |
| Privilege Escalation | |
| Stealth | |
| Credential Access |
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4624: An account was successfully logged on. |
Rule body
title: External Remote SMB Logon from Public IP
id: 78d5cab4-557e-454f-9fb9-a222bd0d5edc
related:
- id: 259a9cdf-c4dd-4fa2-b243-2269e5ab18a2
type: derived
status: test
description: Detects successful logon from public IP address via SMB. This can indicate a publicly-exposed SMB port.
references:
- https://www.inversecos.com/2020/04/successful-4624-anonymous-logons-to.html
- https://twitter.com/Purp1eW0lf/status/1616144561965002752
author: Micah Babinski (@micahbabinski), Zach Mathis (@yamatosecurity)
date: 2023-01-19
modified: 2024-03-11
tags:
- attack.privilege-escalation
- attack.persistence
- attack.initial-access
- attack.credential-access
- attack.stealth
- attack.t1133
- attack.t1078
- attack.t1110
logsource:
product: windows
service: security
detection:
selection:
EventID: 4624
LogonType: 3
filter_main_local_ranges:
IpAddress|cidr:
- '::1/128' # IPv6 loopback
- '10.0.0.0/8'
- '127.0.0.0/8'
- '172.16.0.0/12'
- '192.168.0.0/16'
- '169.254.0.0/16'
- 'fc00::/7' # IPv6 private addresses
- 'fe80::/10' # IPv6 link-local addresses
filter_main_empty:
IpAddress: '-'
condition: selection and not 1 of filter_main_*
falsepositives:
- Legitimate or intentional inbound connections from public IP addresses on the SMB port.
level: high
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
EventID: 4624
LogonType: 3
Stage 2: not filter_main_*
filter_main_local_ranges:
IpAddress|cidr:
- '::1/128'
- '10.0.0.0/8'
- '127.0.0.0/8'
- '172.16.0.0/12'
- '192.168.0.0/16'
- '169.254.0.0/16'
- 'fc00::/7'
- 'fe80::/10'
filter_main_empty:
IpAddress: '-'
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
IpAddress | cidr_match | 10.0.0.0/8 | excludes:IpAddress field:"IpAddress" value:"10.0.0.0/8" |
IpAddress | cidr_match | 127.0.0.0/8 | excludes:IpAddress field:"IpAddress" value:"127.0.0.0/8" |
IpAddress | cidr_match | 169.254.0.0/16 | excludes:IpAddress field:"IpAddress" value:"169.254.0.0/16" |
IpAddress | cidr_match | 172.16.0.0/12 | excludes:IpAddress field:"IpAddress" value:"172.16.0.0/12" |
IpAddress | cidr_match | 192.168.0.0/16 | excludes:IpAddress field:"IpAddress" value:"192.168.0.0/16" |
IpAddress | cidr_match | ::1/128 | excludes:IpAddress field:"IpAddress" value:"::1/128" |
IpAddress | cidr_match | fc00::/7 | excludes:IpAddress field:"IpAddress" value:"fc00::/7" |
IpAddress | cidr_match | fe80::/10 | excludes:IpAddress field:"IpAddress" value:"fe80::/10" |
IpAddress | eq | - | excludes:IpAddress field:"IpAddress" value:"-" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
LogonType | eq |
| field:"LogonType" kind:eq value:"3" |