Detectionmediumtest

Suspicious FromBase64String Usage On Gzip Archive - Ps Script

Detects attempts of decoding a base64 Gzip archive in a PowerShell script. This technique is often used as a method to load malicious content into memory afterward.

Convert In Phoenix Studio

Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.

Launch
François HubautCreated Fri Dec 23df69cb1d-b891-4cd9-90c7-d617d90100cewindows
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script

Definition

Requirements: Script Block Logging must be enabled

Detection Logic
Detection Logic1 selector
detection:
    selection:
        ScriptBlockText|contains|all:
            - 'FromBase64String'
            - 'MemoryStream'
            - 'H4sI'
    condition: selection
False Positives

Legitimate administrative script

Rule Metadata
Rule ID
df69cb1d-b891-4cd9-90c7-d617d90100ce
Status
test
Level
medium
Type
Detection
Created
Fri Dec 23
Path
rules/windows/powershell/powershell_script/posh_ps_frombase64string_archive.yml
Raw Tags
attack.command-and-controlattack.t1132.001
View on GitHub