Hunts & Detections

Source dated

Com-affiliated vishing targets cloud identities

Original query

Microsoft Defender XDR ยท KQL

Highlights concentrated discovery of mail folders, messages and attachments.

Telemetry GraphAPIAuditEvents

KQL

GraphAPIAuditEvents 
| where Timestamp > ago(24h) 
| where toint(ResponseStatusCode) between (200 .. 299) 
| extend Uri = tolower(RequestUri), 
         ActorId = coalesce(AccountObjectId, 
                            ServicePrincipalId, ApplicationId), 
         Path = tostring(split(tolower(RequestUri), "?")[0]) 
| where Uri has_any ("/messages", "/mailfolders", "/attachments") 
| summarize Requests=count(), 
            DistinctPaths=dcount(Path), 
            MessageRequests=countif(Uri has "/messages"), 
            AttachmentRequests=countif(Uri has "/attachments"), 
            TotalResponseBytes=sum(coalesce(ResponseSize, 0)), 
            SampleUris=make_set(RequestUri, 12) 
    by ActorId, IpAddress, ApplicationId, bin(Timestamp, 30m) 
| where (Requests >= 8 and DistinctPaths >= 4) or AttachmentRequests >= 3 
| order by AttachmentRequests desc, Requests desc