PowerShell Downgrade Attempts via -Version 2 on Windows Process Creation
Alerts on PowerShell executions specifying a -Version 2 argument, consistent with potential downgrade attempts.
FreeUnreviewedSigmamediumv1
powershell-downgrade-attempts-via-version-2-on-windows-process-creation-b3512211
title: PowerShell Downgrade Attempts via -Version 2 on Windows Process Creation
id: 679911ce-c6f1-444b-8447-64f363cbff23
related:
- id: 6331d09b-4785-4c13-980f-f96661356249
type: derived
- id: b3512211-c67e-4707-bedc-66efc7848863
type: derived
status: test
description: This rule flags PowerShell processes where the command line includes indications of using the -version parameter set to 2. Attackers may downgrade the PowerShell engine version to change available defenses and behavior, including reducing protections that depend on newer versions. It relies on Windows process creation telemetry, specifically the process image path ending in powershell.exe and matching command-line substrings that contain version 2 arguments.
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-
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_powershell_downgrade_attack.yml
author: Harish Segar (rule), Huntrule Team
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
license: DRL-1.1
What it detects
This rule flags PowerShell processes where the command line includes indications of using the -version parameter set to 2. Attackers may downgrade the PowerShell engine version to change available defenses and behavior, including reducing protections that depend on newer versions. It relies on Windows process creation telemetry, specifically the process image path ending in powershell.exe and matching command-line substrings that contain version 2 arguments.
Known false positives
- Unknown
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.