Detection rules › Kusto Query Language
User login from different countries within 3 hours (Uses Authentication Normalization)
'This query searches for successful user logins from different countries within 3 hours. To use this analytics rule, make sure you have deployed the ASIM normalization parsers'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | T1078 Valid Accounts |
| Persistence | T1078 Valid Accounts |
| Privilege Escalation | T1078 Valid Accounts |
| Defense Evasion | T1078 Valid Accounts |
Event coverage
| Provider | Event ID | Title |
|---|---|---|
| Security-Auditing | 4624 | An account was successfully logged on. |
| Security-Auditing | 4625 | An account failed to log on. |
| Security-Auditing | 4634 | An account was logged off. |
Stages and Predicates
Stage 1: source
imAuthentication
Stage 2: where
TimeGenerated gt "timeframe"
Stage 3: where
and
EventResult eq "Success"
EventType eq "Logon"
Stage 4: where
SrcGeoCountry is_not_null
Stage 5: summarize
Stage 6: where
NumOfCountries ge "threshold"
Stage 7: where
not
TargetUserType in ["Application", "Machine", "Other", "Service", "ServicePrincipal", "System"]
Stage 8: extend
Exclusions
Top-level NOT(...) conjuncts — predicates this rule actively suppresses.
| Stage | Field | Kind | Excluded values |
|---|---|---|---|
| 1 | TargetUserType | in | Application, Machine, Other, Service, ServicePrincipal, System |
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.
| Field | Kind | Values |
|---|---|---|
EventResult | eq |
|
EventType | eq |
|
NumOfCountries | ge |
|
TimeGenerated | gt |
|