Detection rules › Sigma

Failed Logon From Public IP

Status
test
Severity
medium
Log source
product windows, service security
Author
NVISO
Source
github.com/SigmaHQ/sigma

Detects a failed logon attempt from a public IP. A login from a public IP can indicate a misconfigured firewall or network boundary.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
Security-AuditingEvent ID 4625An account failed to log on.

Rule body yaml

title: Failed Logon From Public IP
id: f88e112a-21aa-44bd-9b01-6ee2a2bbbed1
status: test
description: Detects a failed logon attempt from a public IP. A login from a public IP can indicate a misconfigured firewall or network boundary.
references:
    - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4625
author: NVISO
date: 2020-05-06
modified: 2024-03-11
tags:
    - attack.privilege-escalation
    - attack.initial-access
    - attack.persistence
    - attack.stealth
    - attack.t1078
    - attack.t1190
    - attack.t1133
logsource:
    product: windows
    service: security
detection:
    selection:
        EventID: 4625
    filter_main_ip_unknown:
        IpAddress|contains: '-'
    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
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Legitimate logon attempts over the internet
    - IPv4-to-IPv6 mapped IPs
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    EventID: 4625

Stage 2: not filter_main_*

filter_main_ip_unknown:
    IpAddress|contains: '-'
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'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
IpAddresscidr_match10.0.0.0/8
IpAddresscidr_match127.0.0.0/8
IpAddresscidr_match169.254.0.0/16
IpAddresscidr_match172.16.0.0/12
IpAddresscidr_match192.168.0.0/16
IpAddresscidr_match::1/128
IpAddresscidr_matchfc00::/7
IpAddresscidr_matchfe80::/10
IpAddressmatch-