An analyst is writing a complex XQL (XDR Query Language) query in Cortex XDR to find all process executions where a PowerShell script was executed with hidden window styles. Which syntax structure correctly filters datasets for this query?
Trap 1: search xdr_data | stats count by command_line | where command_line…
Using stats before filtering the specific process execution is inefficient and syntactically incorrect for raw process searches.
Trap 2: SELECT * FROM xdr_data WHERE event_type == 'PROCESS_START' AND…
XQL does not use standard SQL SELECT syntax; it uses dataset name and pipe notation.
Trap 3: collect xdr_data where event_type = 'PROCESS_START' | parse…
'collect' is not the correct command to initiate an XQL search stream.
- A
search xdr_data | stats count by command_line | where command_line = 'Hidden'
Why it fails: Using stats before filtering the specific process execution is inefficient and syntactically incorrect for raw process searches.
- B
dataset = xdr_data | filter event_type = 'PROCESS_START' and command_line contains 'Hidden'
This syntax correctly targets the dataset, uses the pipe operator, filters by event type, and checks the command line.
- C
SELECT * FROM xdr_data WHERE event_type == 'PROCESS_START' AND command_line LIKE '%Hidden%'
Why it fails: XQL does not use standard SQL SELECT syntax; it uses dataset name and pipe notation.
- D
collect xdr_data where event_type = 'PROCESS_START' | parse command_line as Hidden
Why it fails: 'collect' is not the correct command to initiate an XQL search stream.