PowerShell script alias obfuscation via -Value (-join(...))
Flags PowerShell script blocks that set aliases using -Value with a (-join(...)) character-joining obfuscation pattern.
- Product
- windows
- Category
- ps_script
- Author
- Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
- Published
- 2023-01-09
- 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 content that includes both alias creation keywords (New-Alias/Set-Alias) and an obfuscated value built with the -Value (-join(...)) pattern. Attackers may use string joining to conceal alias targets within scripts and reduce straightforward inspection. It relies on Script Block Text containing the required substrings, such as "-Alias" and " -Value (-join(".
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: PowerShell script alias obfuscation via -Value (-join(...))
id: c239e4f9-f87f-467e-b86c-2f05d8f90138
related:
- id: 96cd126d-f970-49c4-848a-da3a09f55c55
type: derived
- id: e8314f79-564d-4f79-bc13-fbc0bf2660d8
type: derived
status: test
description: This rule flags PowerShell script content that includes both alias creation keywords (New-Alias/Set-Alias) and an obfuscated value built with the -Value (-join(...)) pattern. Attackers may use string joining to conceal alias targets within scripts and reduce straightforward inspection. It relies on Script Block Text containing the required substrings, such as "-Alias" and " -Value (-join(".
references:
- Internal Research
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_susp_alias_obfscuation.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2023-01-09
tags:
- attack.execution
- attack.stealth
- attack.t1027
- attack.t1059.001
logsource:
product: windows
category: ps_script
definition: "Requirements: Script Block Logging must be enabled"
detection:
selection:
ScriptBlockText|contains|all:
- -Alias
- " -Value (-join("
condition: selection
falsepositives:
- Unknown
level: low
license: DRL-1.1