|
| 1 | +# --- Query Metadata --- |
| 2 | +# Human-readable name for the query. Will be displayed as the title. |
| 3 | +name: Detection of DNS Requests to AI-Related Domains |
| 4 | + |
| 5 | +# Description of what the query does and its purpose. |
| 6 | +# Using the YAML block scalar `|` allows for multi-line strings. |
| 7 | +description: | |
| 8 | + This query identifies DNS requests to domains listed in the AI-Domains.csv lookup. It filters out browser-initiated traffic from Chrome and Edge. The result highlights which hosts and processes are generating the most DNS requests to those domains. |
| 9 | +
|
| 10 | +# The author or team that created the query. |
| 11 | +author: ByteRay |
| 12 | + |
| 13 | +# The required log sources to run this query successfully in Next-Gen SIEM. |
| 14 | +# This will be displayed in the UI to inform the user. |
| 15 | +log_sources: |
| 16 | + - Endpoint |
| 17 | + |
| 18 | +# The CrowdStrike modules required to run this query. |
| 19 | +cs_required_modules: |
| 20 | + - Insight |
| 21 | + |
| 22 | +# Tags for filtering and categorization. |
| 23 | +# Include relevant techniques, tactics, or platforms. |
| 24 | +tags: |
| 25 | + - Hunting |
| 26 | + |
| 27 | +# --- Query Content --- |
| 28 | +# The actual CrowdStrike Query Language (CQL) code. |
| 29 | +# Using the YAML block scalar `|` allows for multi-line strings. |
| 30 | +cql: | |
| 31 | + #event_simpleName=DnsRequest event_platform=Win |
| 32 | + | match(file="AI-Domains.csv", field=[DomainName],column=Domain,ignoreCase=true,mode=glob) |
| 33 | + | !in(field=ContextBaseFileName, values=[msedge.exe,chrome.exe],ignoreCase=true) |
| 34 | + | SourceProcess := ContextBaseFileName |
| 35 | + | groupBy([DomainName, ComputerName,SourceProcess],function=count(as=Count)) |
| 36 | + | sort(field=Count,type=number,order=desc) |
| 37 | +
|
| 38 | +# Explanation of the query. |
| 39 | +# Using the YAML block scalar `|` allows for multi-line strings. |
| 40 | +# Uses markdown for formatting on the webpage. |
| 41 | +explanation: | |
| 42 | + The query relies on an lookup file with at least one column named Domain. The lookup provides the set of AI-related domains to check against. Without this file, the match() operator cannot resolve which DNS requests should be considered relevant. |
| 43 | + |
| 44 | + **Example** |
| 45 | + |
| 46 | + |Domain |
| 47 | + |--- |
| 48 | + |chat.openai.com |
| 49 | + |chatgpt.com |
| 50 | + |openai.com |
| 51 | + |claude.ai |
| 52 | + |anthropic.com |
| 53 | + |bard.google.com |
| 54 | + |*.ai |
| 55 | + |*.openai.com |
0 commit comments