Skip to content
skopnix
Detections · Rule
← Cortex XDR detectionsCortex XDR · Behaviour (ATT&CK technique)

PowerShell download cradle executed from the command line (T1059.001)

XQLhighconfidence 80/100generated 2026-10-18

powershell.exe / pwsh.exe whose command line both downloads (Net.WebClient DownloadString / DownloadFile / DownloadData) and executes (IEX / Invoke-Expression) — the classic in-memory loader. Observed for: APT-C-36, APT10, APT19, APT27, APT28, APT29 and 71 more.

Correlation
set the rule's MITRE tactic to TA0002 and technique to T1059.001
False positives
All three conditions must hold (PowerShell binary, a download method, an execute verb); plain Invoke-WebRequest file downloads and encoded management scripts do not match.

XQL query

skopnix-cortex-ttp-t1059-001-6eb984ce.xqldownload .xql ↓
dataset = xdr_data
| filter event_type = ENUM.PROCESS and event_sub_type = ENUM.PROCESS_START
| filter lowercase(action_process_image_name) in ("powershell.exe", "pwsh.exe") and (lowercase(action_process_image_command_line) contains ".downloadstring(" or lowercase(action_process_image_command_line) contains ".downloadfile(" or lowercase(action_process_image_command_line) contains ".downloaddata(") and (lowercase(action_process_image_command_line) contains "iex" or lowercase(action_process_image_command_line) contains "invoke-expression")
| fields _time, agent_hostname, actor_effective_username, action_process_image_name, action_process_image_command_line, actor_process_image_name, causality_actor_process_image_name
| sort desc _time

How to deploy on Cortex XDR

  1. 1.Paste the XQL into Incident Response > Investigation > Query Builder > XQL Search.
  2. 2.To alert, save it as a Correlation Rule and set the MITRE tactic and technique printed with the rule.
  3. 3.Schedule it on the interval you hunt at; keep the fields stage for the alert's columns.

Check · CVE rules read PAN-OS URL logs (panw_ngfw_url_raw), which need the NGFW integration and, for HTTPS, decryption.

References