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
- Linked actors
- APT-C-36 · APT10 · APT19 · APT27 · APT28 · APT29 · APT3 · APT32 · APT33 · APT35 · APT39 · APT40 · APT42 · APT5 · blackbyte · Blue Mockingbird · BRONZE HIGHLAND · BRONZE STARLIGHT · Chimera · Cobalt · Confucius · CopyKittens · DarkHydrus · DarkVishnya · DustSquad · Earth Kapre · Earth Lusca · ENERGETIC BEAR · FIN10 · FIN13 · FIN6 · FIN8 · Fox Kitten · GALLIUM · Gallmaker · Gamaredon Group · GOLD SOUTHFIELD · HAFNIUM · Inception Framework · INDRIK SPIDER · Kimsuky · LazyScripter · LYCEUM · Medusa Group · Molerats · MoustachedBouncer · MuddyWater · OilRig · play · Poseidon Group · QUILTED TIGER · RAZOR TIGER · SaintBear · Sandworm · Scattered Spider · Silence group · Stealth Falcon · Storm-0501 · Storm-1567 · TA2541 · TA459 · TA505 · TeamTNT · The Gorgon Group · Thrip · Tick · ToddyCat · Tonto Team · Tortoiseshell · Turla · UNC3886 · UNC4393 · Void Manticore · Volt Typhoon · Winter Vivern · WIRTE · WIZARD SPIDER
- 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.Paste the XQL into Incident Response > Investigation > Query Builder > XQL Search.
- 2.To alert, save it as a Correlation Rule and set the MITRE tactic and technique printed with the rule.
- 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
- attack.mitre.org/techniques/T1059/001/ ↗
- skopnix.com/actors/apt-c-36 ↗
- skopnix.com/actors/apt10 ↗
- skopnix.com/actors/apt19 ↗
- skopnix.com/actors/apt27 ↗
- skopnix.com/actors/apt28 ↗
- skopnix.com/actors/apt29 ↗
- skopnix.com/actors/apt3 ↗
- skopnix.com/actors/apt32 ↗
- skopnix.com/actors/apt33 ↗
- skopnix.com/actors/apt35 ↗