Suspicious FromBase64String Use On Gzip Archive - Ps Script (via ps_script)
This rule detects attempts of decoding a base64 Gzip archive in a PowerShell script. This method is frequently used as a method to load hostile content into memory afterward.
SigmamediumWindowsv1
sigma
suspicious-frombase64string-use-on-gzip-archive-ps-script-via-ps-script
title: Suspicious FromBase64String Use On Gzip Archive - Ps Script (via ps_script)
id: 7a724f37-7281-5785-ac33-e9977e08c14a
status: stable
description: This rule detects attempts of decoding a base64 Gzip archive in a PowerShell script. This method is frequently used as a method to load hostile content into memory afterward.
references:
- https://attack.mitre.org/techniques/T1132/001/
- https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse?slide=43
author: Huntrule Team
date: 2026-02-16
tags:
- attack.command-and-control
- attack.t1132.001
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enabled'
detection:
selection:
ScriptBlockText|contains|all:
- 'FromBase64String'
- 'MemoryStream'
- 'H4sI'
condition: selection
falsepositives:
- Unknown
level: medium
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.