Skip to content
Threat Feed
high advisory

Suspicious PowerShell Download and Execution Patterns

Adversaries frequently leverage specific PowerShell cmdlets to download and execute malicious payloads, a common technique observed in stagers and ransomware deployment campaigns.

Security research and incident response data from various campaigns, including LV ransomware operations, identify a consistent pattern of abuse involving PowerShell's System.Net.WebClient class. Attackers use these cmdlets to fetch remote scripts or binaries directly into memory or the local filesystem for execution. By leveraging commands like DownloadString or DownloadFile, malicious actors bypass traditional file-based detection mechanisms. This behavior is commonly observed in the initial stager phases of an attack, where a small script is used to bootstrap more complex malware or C2 agents. Defenders should focus on process-creation logging to identify these specific command-line strings, as they are rarely used by legitimate business-critical applications.

Impact

Successful execution of these commands leads to the unauthorized retrieval of malicious code or secondary payloads, often resulting in complete system compromise, credential theft, or the deployment of ransomware. These patterns have been historically associated with exploitation of vulnerabilities in public-facing services like Microsoft Exchange (e.g., ProxyShell) and subsequent lateral movement or impact.

Recommendation

Deploy the provided Sigma rule to your SIEM to monitor for PowerShell command lines matching the suspicious download and execution patterns. Ensure your logging backend processes these strings as case-insensitive to avoid evasion via mixed-case variations.

  • Enable Sysmon or Windows Event ID 4688 to capture the command-line arguments of all spawned PowerShell processes.
  • Implement an allowlist for known, legitimate software installers or management scripts that utilize remote downloads to reduce false positives.
  • Prioritize alerts for these command patterns when originating from web servers or public-facing applications.

Immediate actions

Deploy the Sigma detection rule to monitor for PowerShell download patterns.

Detection Engineering 48h

Threat Hunt

Search for instances of Net.WebClient in PowerShell command lines within the last 30 days.

T1059.001 high high confidence hunt now

Data: Process creation logs

Detection coverage 1

Detect Suspicious PowerShell Download and Execute Pattern

high

Detects common PowerShell command patterns used to download and execute remote payloads via Net.WebClient

sigma tactics: execution techniques: T1059.001 sources: process_creation, windows

Detection queries are available on the platform. Get full rules →