Detection rules › Elastic

Potential Account Takeover - Logon from New Source IP

Author
Elastic
Source
upstream

Identifies a user account that normally logs in with high volume from one source IP suddenly logging in from a different source IP. This pattern (one IP with many successful logons, another IP with very few) may indicate account takeover or use of stolen credentials from a new location.

MITRE ATT&CK coverage

TacticTechniques
Initial AccessT1078 Valid Accounts
PersistenceT1078 Valid Accounts
Privilege EscalationT1078 Valid Accounts
Defense EvasionT1078 Valid Accounts

Event coverage

ProviderEvent IDTitle
Security-Auditing4624An account was successfully logged on.

Stages and Predicates

Stage 1: esql:from

Stage 2: esql:where

not user.name:"*$" and not :"::" and event.action:"logged-in" and event.category:"authentication" and event.outcome:"success" and source.ip:* and not source.ip:"127.0.0.1" and winlog.logon.type:("Network" or "RemoteInteractive")

Stage 3: esql:stats

Stage 4: esql:stats

Stage 5: esql:where

Esql.count_distinct_source_ip:2 and Esql.max_logon >= 1000 and Esql.min_logon >= 1 and Esql.min_logon <= 5 and Esql.unique_host_count >= 2

Stage 6: esql:eval

Stage 7: esql:keep

Exclusions

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

StageFieldKindExcluded values
1userends_with$

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
Esql.count_distinct_source_ipeq
  • 2
Esql.max_logonge
  • 1000 corpus 2 (elastic 2)
Esql.min_logonge
  • 1 corpus 2 (elastic 2)
Esql.min_logonle
  • 5
Esql.unique_host_countge
  • 2 corpus 2 (elastic 2)
event.actioneq
  • logged-in corpus 7 (elastic 7)
event.categoryeq
  • authentication corpus 5 (elastic 5)
event.outcomeeq
  • success corpus 8 (elastic 8)
source.ipne
  • 127.0.0.1 corpus 8 (elastic 8)
winlog.logon.typein
  • Network
  • RemoteInteractive

Neighbors

Stricter alternatives (narrower than this rule)

The rules below may be useful if you find the current rule is too noisy / lacks specificity.