Detection rules › Sigma

Suspicious PowerShell Download - PoshModule

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

Detects suspicious PowerShell download command

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Suspicious PowerShell Download - PoshModule
id: de41232e-12e8-49fa-86bc-c05c7e722df9
related:
    - id: 65531a81-a694-4e31-ae04-f8ba5bc33759
      type: derived
status: test
description: Detects suspicious PowerShell download command
references:
    - https://learn.microsoft.com/en-us/dotnet/api/system.net.webclient.downloadfile?view=net-8.0
    - https://learn.microsoft.com/en-us/dotnet/api/system.net.webclient.downloadstring?view=net-8.0
author: Florian Roth (Nextron Systems)
date: 2017-03-05
modified: 2023-01-20
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    category: ps_module
    definition: 0ad03ef1-f21b-4a79-8ce8-e6900c54b65b
detection:
    selection_webclient_:
        ContextInfo|contains: 'System.Net.WebClient'
    selection_function:
        ContextInfo|contains:
            - '.DownloadFile('
            - '.DownloadString('
    condition: all of selection_*
falsepositives:
    - PowerShell scripts that download content from the Internet
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_webclient_

selection_webclient_:
    ContextInfo|contains: 'System.Net.WebClient'

Stage 2: selection_function

selection_function:
    ContextInfo|contains:
        - '.DownloadFile('
        - '.DownloadString('

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
ContextInfomatch
  • .DownloadFile(
  • .DownloadString(
  • System.Net.WebClient corpus 2 (sigma 2)