Query Details
//This query checks DeviceNetworkEvents against known malicious Cloudflare workers from Netskope let NetskopeCloudflareWorkers = externaldata(Url: string)[@"https://raw.githubusercontent.com/netskopeoss/NetskopeThreatLabsIOCs/main/Phishing/CloudflareWorkers/IOCs/README.md"] with (format="csv", ignoreFirstRecord=True); let DomainList = NetskopeCloudflareWorkers | where Url <> "```text" | where Url <> "- **URLs**" | where Url <> "```" | extend domain = split(Url,'/') | extend domain = split(domain,'.') | extend url = strcat(domain[1],domain[2]) | extend RemoteUrl = replace_string(url,'[.]','.') | project domain; DeviceNetworkEvents | where RemoteUrl in (DomainList)
This query is designed to identify potentially malicious network activity on devices by comparing network events against a list of known malicious Cloudflare worker URLs provided by Netskope. Here's a breakdown of what the query does:
Data Import: It imports a list of malicious URLs from an external CSV file hosted on GitHub by Netskope. This file contains indicators of compromise (IOCs) related to phishing activities using Cloudflare workers.
Data Cleaning and Preparation:
[.]) with the actual dot (.) to form a valid domain name.Comparison with Device Network Events:
RemoteUrl field in the DeviceNetworkEvents table.RemoteUrl matches one of the domains in the list, indicating potential malicious activity.In simple terms, this query checks if any network activity on devices matches known malicious URLs associated with Cloudflare workers, helping to detect potential phishing threats.

Jay Kerai
Released: November 10, 2024
Tables
Keywords
Operators