Detection rules › Sigma

Account Tampering - Suspicious Failed Logon Reasons

Status
test
Severity
medium
Log source
product windows, service security
Author
Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

This method uses uncommon error codes on failed logons to determine suspicious activity and tampering with accounts that have been disabled or somehow restricted.

MITRE ATT&CK coverage

TacticTechniques
Initial AccessT1078 Valid Accounts
PersistenceT1078 Valid Accounts
Privilege EscalationT1078 Valid Accounts
StealthT1078 Valid Accounts

Event coverage

Rule body yaml

title: Account Tampering - Suspicious Failed Logon Reasons
id: 9eb99343-d336-4020-a3cd-67f3819e68ee
status: test
description: This method uses uncommon error codes on failed logons to determine suspicious activity and tampering with accounts that have been disabled or somehow restricted.
references:
    - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4625
    - https://twitter.com/SBousseaden/status/1101431884540710913
author: Florian Roth (Nextron Systems)
date: 2017-02-19
modified: 2025-10-17
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.initial-access
    - attack.stealth
    - attack.t1078
logsource:
    product: windows
    service: security
detection:
    selection_eid:
        EventID:
            - 4625
            - 4776
    selection_status:
        - Status:
              - '0xC0000072'  # User logon to account disabled by administrator
              - '0xC000006F'  # User logon outside authorized hours
              - '0xC0000070'  # User logon from unauthorized workstation
              - '0xC0000413'  # Logon Failure: The machine you are logging onto is protected by an authentication firewall. The specified account is not allowed to authenticate to the machine
              - '0xC000018C'  # The logon request failed because the trust relationship between the primary domain and the trusted domain failed
              - '0xC000015B'  # The user has not been granted the requested logon type (aka logon right) at this machine
        - SubStatus:
              - '0xC0000072'  # User logon to account disabled by administrator
              - '0xC000006F'  # User logon outside authorized hours
              - '0xC0000070'  # User logon from unauthorized workstation
              - '0xC0000413'  # Logon Failure: The machine you are logging onto is protected by an authentication firewall. The specified account is not allowed to authenticate to the machine
              - '0xC000018C'  # The logon request failed because the trust relationship between the primary domain and the trusted domain failed
              - '0xC000015B'  # The user has not been granted the requested logon type (aka logon right) at this machine
    filter:
        SubjectUserSid: 'S-1-0-0'
    condition: all of selection_* and not filter
falsepositives:
    - User using a disabled account
level: medium

Stages and Predicates

Stage 0: condition

all of selection_* and not filter

Stage 1: selection_eid

selection_eid:
    EventID:
        - 4625
        - 4776

Stage 2: selection_status

selection_status:
    - Status:
          - '0xC0000072'
          - '0xC000006F'
          - '0xC0000070'
          - '0xC0000413'
          - '0xC000018C'
          - '0xC000015B'
    - SubStatus:
          - '0xC0000072'
          - '0xC000006F'
          - '0xC0000070'
          - '0xC0000413'
          - '0xC000018C'
          - '0xC000015B'

Stage 3: not filter

filter:
    SubjectUserSid: 'S-1-0-0'

Exclusions

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

FieldKindExcluded values
SubjectUserSideqS-1-0-0

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
Statuseq
  • 0xC000006F corpus 2 (sigma 2)
  • 0xC0000070 corpus 2 (sigma 2)
  • 0xC0000072
  • 0xC000015B corpus 2 (sigma 2)
  • 0xC000018C
  • 0xC0000413 corpus 2 (sigma 2)
SubStatuseq
  • 0xC000006F
  • 0xC0000070
  • 0xC0000072
  • 0xC000015B
  • 0xC000018C
  • 0xC0000413