Detection rules › Kusto Query Language

SecurityEvent - Multiple authentication failures followed by a success

Source
upstream

'Identifies accounts who have failed to logon to the domain multiple times in a row, followed by a successful authentication within a short time frame. Multiple failed attempts followed by a success can be an indication of a brute force attempt or possible mis-configuration of a service account within an environment. The lookback is set to 2h and the authentication window and threshold are set to 1h and 5, meaning we need to see a minimum of 5 failures followed by a success for an account within 1 hour to surface an alert.'

MITRE ATT&CK coverage

TacticTechniques
Credential AccessT1110 Brute Force

Event coverage

ProviderEvent IDTitle
Security-Auditing4624An account was successfully logged on.
Security-Auditing4625An account failed to log on.

Stages and Predicates

Stage 1: source

SecurityEvent

Stage 2: where

 macro "(TimeGenerated > ago(timeRange))"

Stage 3: where

EventID in ["4624", "4625"]

Stage 4: where

and
  Account is_not_null
  IpAddress ne "-"

Stage 5: extend

Stage 6: summarize

Stage 7: project

Stage 8: sort

Stage 9: macro

Stage 10: extend

Stage 11: summarize

Stage 12: where

 macro "(array_index_of(list_Outcome, \"Success\") != 0)"

Stage 13: where

 macro "(array_index_of(list_Outcome, \"Success\") == (array_length(list_Outcome) - 1))"

Stage 14: project-away

Stage 15: where

FailureCountBeforeSuccess ge "authenticationThreshold"

Stage 16: mv-expand

Stage 17: extend

Stage 18: extend

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
EventIDin
  • 4624
  • 4625
FailureCountBeforeSuccessge
  • authenticationThreshold
IpAddressne
  • -