Detection rules › Sigma

Potential PowerShell Downgrade Attack

Status
test
Severity
medium
Log source
product windows, category process_creation
Author
Harish Segar (rule)
Source
github.com/SigmaHQ/sigma

Detects PowerShell downgrade attack by comparing the host versions with the actually used engine version 2.0

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Potential PowerShell Downgrade Attack
id: b3512211-c67e-4707-bedc-66efc7848863
related:
    - id: 6331d09b-4785-4c13-980f-f96661356249
      type: derived
status: test
description: Detects PowerShell downgrade attack by comparing the host versions with the actually used engine version 2.0
references:
    - http://www.leeholmes.com/blog/2017/03/17/detecting-and-preventing-powershell-downgrade-attacks/
    - https://github.com/r00t-3xp10it/hacking-material-books/blob/43cb1e1932c16ff1f58b755bc9ab6b096046853f/obfuscation/simple_obfuscation.md#bypass-or-avoid-amsi-by-version-downgrade-
author: Harish Segar (rule)
date: 2020-03-20
modified: 2023-01-04
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\powershell.exe'
        CommandLine|contains:
            - ' -version 2 '
            - ' -versio 2 '
            - ' -versi 2 '
            - ' -vers 2 '
            - ' -ver 2 '
            - ' -ve 2 '
            - ' -v 2 '
    condition: selection
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    Image|endswith: '\powershell.exe'
    CommandLine|contains:
        - ' -version 2 '
        - ' -versio 2 '
        - ' -versi 2 '
        - ' -vers 2 '
        - ' -ver 2 '
        - ' -ve 2 '
        - ' -v 2 '

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
  • -v 2
  • -ve 2
  • -ver 2
  • -vers 2
  • -versi 2
  • -versio 2
  • -version 2
Imageends_with
  • \powershell.exe corpus 182 (sigma 182)