Query Details
// KQL URL Protection Report // https://www.linkedin.com/posts/activity-7190735644749426691-SQlH/ // For organization subscribed to Defender for Office 365, M365 or security admin would most of time go to DefenderXDR portal "Reports" > "Email & Collaboration" > "URL protection report" to check if a particular user has click on a malicious link and if it was blocked by Office 365 ATP. // Do you know you can access all these Threat Intelligence URL Click Data in CloudAppEvents table? 😎 // Using DefenderXDR Advanced Hunting and the below KQL will provide information similar to the "URL Protection Report", you can further summarize these set of data to allow you to better understand the threats currently faced by your suite of Office 365 applications that support SafeLinks and possibly tweak your SafeLinks configuration to improve your organization Office 365 application protection.🛡️ CloudAppEvents | where ActionType == "TIUrlClickData" | where RawEventData.Workload=="ThreatIntelligence" | extend AppName = RawEventData.AppName | extend AccountUpn = RawEventData.UserId | extend UserIP = RawEventData.UserIp | extend ClickURL = RawEventData.Url | extend UrlClickAction = RawEventData.UrlClickAction | extend TimeOfClick = RawEventData.TimeOfClick | where ActivityType=="Basic" | project AppName, AccountUpn, UserIP, ClickURL, UrlClickAction, TimeOfClick | where UrlClickAction == 2 //User blocked from navigating to the URL
This KQL query is designed to generate a report similar to the "URL Protection Report" available in the DefenderXDR portal for organizations subscribed to Defender for Office 365. The query retrieves data from the CloudAppEvents table to identify instances where users have clicked on malicious links that were subsequently blocked by Office 365 Advanced Threat Protection (ATP).
Here's a step-by-step breakdown of what the query does:
CloudAppEvents table.ActionType is "TIUrlClickData", which pertains to URL click data related to threat intelligence.Workload is "ThreatIntelligence".AppName: The name of the application.AccountUpn: The user ID.UserIP: The IP address of the user.ClickURL: The URL that was clicked.UrlClickAction: The action taken when the URL was clicked.TimeOfClick: The time when the URL was clicked.ActivityType of "Basic".AppName, AccountUpn, UserIP, ClickURL, UrlClickAction, and TimeOfClick.UrlClickAction is 2, indicating that the user was blocked from navigating to the URL.In summary, this query helps security administrators to identify and analyze instances where users attempted to click on malicious links but were blocked by Office 365 ATP, providing insights into potential threats and helping to improve the organization's security posture.

Steven Lim
Released: August 2, 2024
Tables
Keywords
Operators