Authentication From Suspicious DeviceName
KQL Queries
// Define a list of known suspicious workstation patterns
let SuspiciousWorkstations = dynamic(["UNKNOWN", "TEMP", "WORKSTATION-", "DESKTOP-"]);
// Query authentication logs
SecurityEvent
| where EventID in (4624, 4625) // Filter for logon success (4624) or failure (4625) events
| extend WorkstationName = iff(isnotempty(Workstation), Workstation, Computer) // Extract workstation/computer name
| where WorkstationName has_any (SuspiciousWorkstations)
or WorkstationName matches regex @"^(TEMP|DESKTOP|UNKNOWN|WORKSTATION-).*$" // Match dynamic list or regex patterns
| summarize
LogonAttempts = count(),
UniqueUserCount = dcount(TargetUserName),
FailedAttempts = countif(EventID == 4625)
by WorkstationName, TargetUserName, LogonType, bin(TimeGenerated, 1h)
| extend LogonTypeDescription = case(
LogonType == 2, "Interactive",
LogonType == 3, "Network",
LogonType == 10, "Remote Interactive",
LogonType == 7, "Unlock",
LogonType == 5, "Service",
LogonType == 4, "Batch",
"Unknown"
)
| order by LogonAttempts desc
| project TimeGenerated, WorkstationName, TargetUserName, LogonTypeDescription, LogonAttempts, FailedAttempts, UniqueUserCountSplunk Query:
PreviousInvestigating a Suspected AD FS Distributed Key Management (DKM) AttackNextIdentifying Interactive or RemoteInteractive Session From Service Account
Last updated