Query Details
//This query identifies ISPs with only failed sign-in attempts //Helps detect potentially malicious ISPs and associated IPs //Configurable threshold for minimum number of failed attempts IdentityLogonEvents | where Timestamp > ago(30d) | project ISP, Location, IPAddress, FailureReason | summarize valid = countif(isempty(FailureReason) or FailureReason contains "Success"), failure = countif( isnotempty(FailureReason) and FailureReason !contains "Success"), make_set(IPAddress) by ISP, Location | order by failure | where valid == 0 and failure > 5
This query is designed to identify Internet Service Providers (ISPs) that have only experienced failed sign-in attempts over the past 30 days. It helps in detecting potentially malicious ISPs and their associated IP addresses. Here's a breakdown of what the query does:
IdentityLogonEvents table.valid: The number of successful sign-ins (where FailureReason is empty or contains "Success").failure: The number of failed sign-ins (where FailureReason is not empty and does not contain "Success").valid == 0).failure > 5).In simple terms, this query finds ISPs that have only failed login attempts, with more than five failures, to help identify suspicious activity.

Sergio Albea
Released: November 10, 2024
Tables
Keywords
Operators