Detection rules › Sigma

Suspicious PowerShell Download and Execute Pattern

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects suspicious PowerShell download patterns that are often used in malicious scripts, stagers or downloaders (make sure that your backend applies the strings case-insensitive)

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Suspicious PowerShell Download and Execute Pattern
id: e6c54d94-498c-4562-a37c-b469d8e9a275
related:
    - id: 3b6ab547-8ec2-4991-b9d2-2b06702a48d7
      type: derived
status: test
description: Detects suspicious PowerShell download patterns that are often used in malicious scripts, stagers or downloaders (make sure that your backend applies the strings case-insensitive)
references:
    - https://gist.github.com/jivoi/c354eaaf3019352ce32522f916c03d70
    - https://www.trendmicro.com/en_us/research/22/j/lv-ransomware-exploits-proxyshell-in-attack.html
author: Florian Roth (Nextron Systems)
date: 2022-02-28
modified: 2022-03-01
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        CommandLine|contains: # make sure that your backend applies the strings case-insensitive
            - 'IEX ((New-Object Net.WebClient).DownloadString'
            - 'IEX (New-Object Net.WebClient).DownloadString'
            - 'IEX((New-Object Net.WebClient).DownloadString'
            - 'IEX(New-Object Net.WebClient).DownloadString'
            - ' -command (New-Object System.Net.WebClient).DownloadFile('
            - ' -c (New-Object System.Net.WebClient).DownloadFile('
    condition: selection
falsepositives:
    - Software installers that pull packages from remote systems and execute them
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    CommandLine|contains:
        - 'IEX ((New-Object Net.WebClient).DownloadString'
        - 'IEX (New-Object Net.WebClient).DownloadString'
        - 'IEX((New-Object Net.WebClient).DownloadString'
        - 'IEX(New-Object Net.WebClient).DownloadString'
        - ' -command (New-Object System.Net.WebClient).DownloadFile('
        - ' -c (New-Object System.Net.WebClient).DownloadFile('

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • -c (New-Object System.Net.WebClient).DownloadFile(
  • -command (New-Object System.Net.WebClient).DownloadFile(
  • IEX ((New-Object Net.WebClient).DownloadString
  • IEX (New-Object Net.WebClient).DownloadString
  • IEX((New-Object Net.WebClient).DownloadString
  • IEX(New-Object Net.WebClient).DownloadString