Detect VAR++ LAUNCHER-Style Obfuscated PowerShell Command Block
Detects VAR++ LAUNCHER-like PowerShell obfuscation patterns in ScriptBlockText.
- Product
- windows
- Category
- ps_script
- Author
- Timur Zinniatullin, oscd.community (SigmaHQ), DRL 1.1
- Published
- 2020-10-13
- Updated
- 2026-07-31
ATT&CK techniques
Execution → Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags PowerShell script block content that matches a VAR++ LAUNCHER-style obfuscation pattern, including use of && with format-string driven substitutions and cmd /c invocation. Obfuscated PowerShell is commonly used to conceal intent, hinder analysis, and execute further commands with reduced visibility. The detection relies on Script Block Logging telemetry that records PowerShell ScriptBlockText for matching the specific obfuscation string structure.
Reporting behind it
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: Detect VAR++ LAUNCHER-Style Obfuscated PowerShell Command Block
id: e78f41df-dcb0-43bc-b728-47a34b3d0dfa
status: test
description: This rule flags PowerShell script block content that matches a VAR++ LAUNCHER-style obfuscation pattern, including use of && with format-string driven substitutions and cmd /c invocation. Obfuscated PowerShell is commonly used to conceal intent, hinder analysis, and execute further commands with reduced visibility. The detection relies on Script Block Logging telemetry that records PowerShell ScriptBlockText for matching the specific obfuscation string structure.
references:
- https://github.com/SigmaHQ/sigma/issues/1009
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_invoke_obfuscation_via_var.yml
author: Timur Zinniatullin, oscd.community, Huntrule Team
date: 2020-10-13
modified: 2024-04-05
tags:
- attack.stealth
- attack.t1027
- attack.execution
- attack.t1059.001
logsource:
product: windows
category: ps_script
definition: "Requirements: Script Block Logging must be enabled"
detection:
selection_4104:
ScriptBlockText|re: (?i)&&set.*(\{\d\}){2,}\\"\s+?-f.*&&.*cmd.*/c
condition: selection_4104
falsepositives:
- Unknown
level: high
license: DRL-1.1
related:
- id: e54f5149-6ba3-49cf-b153-070d24679126
type: derived