Windows PowerShell Execution of Obfuscated One-Liner for In-Memory Module Download
Alerts on Windows PowerShell one-liners containing an obfuscated in-memory download/execute pattern from an HTTP URL.
- Product
- windows
- Category
- process_creation
- Author
- @Kostastsale, TheDFIRReport (SigmaHQ), DRL 1.1
- Published
- 2022-05-09
- Updated
- 2026-07-30
ATT&CK techniques
ExecutionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags process creation events where PowerShell is invoked with a command line containing a specific obfuscated one-liner pattern used to fetch content from an HTTP URL and execute it in memory. This matters because attackers commonly use obfuscation plus in-memory execution to reduce disk artifacts while running additional PowerShell logic. The detection relies on Windows process creation telemetry, matching PowerShell image path ending in \powershell.exe and required substrings in the command line.
Reporting behind it
- thedfirreport.comhttps://thedfirreport.com/2022/05/09/seo-poisoning-a-gootloader-story/
- gist.github.comhttps://gist.github.com/mgeeky/3b11169ab77a7de354f4111aa2f0df38
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_powershell_download_cradle_obfuscated.yml
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: Windows PowerShell Execution of Obfuscated One-Liner for In-Memory Module Download
id: 1f8ae3d3-91b8-4522-b8a1-5d5065ba1c62
status: test
description: This rule flags process creation events where PowerShell is invoked with a command line containing a specific obfuscated one-liner pattern used to fetch content from an HTTP URL and execute it in memory. This matters because attackers commonly use obfuscation plus in-memory execution to reduce disk artifacts while running additional PowerShell logic. The detection relies on Windows process creation telemetry, matching PowerShell image path ending in \powershell.exe and required substrings in the command line.
references:
- https://thedfirreport.com/2022/05/09/seo-poisoning-a-gootloader-story/
- https://gist.github.com/mgeeky/3b11169ab77a7de354f4111aa2f0df38
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_powershell_download_cradle_obfuscated.yml
author: "@Kostastsale, TheDFIRReport, Huntrule Team"
date: 2022-05-09
modified: 2025-04-16
tags:
- attack.execution
- attack.defense-impairment
- attack.t1059.001
- attack.t1685
logsource:
product: windows
category: process_creation
detection:
selection:
Image|endswith: \powershell.exe
CommandLine|contains|all:
- http://127.0.0.1
- "%{(IRM $_)}"
- Invoke
condition: selection
falsepositives:
- Unknown
level: high
license: DRL-1.1
related:
- id: 44e24481-6202-4c62-9127-5a0ae8e3fe3d
type: derived