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.
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: selectionFalse Positives
Legitimate administrative script
References
MITRE ATT&CK
Tactics
Sub-techniques
Rule Metadata
Rule ID
df69cb1d-b891-4cd9-90c7-d617d90100ce
Status
test
Level
medium
Type
Detection
Created
2022-12-23
Author
Path
rules/windows/powershell/powershell_script/posh_ps_frombase64string_archive.yml
Raw Tags
attack.command-and-controlattack.t1132.001