Powershell Decrypt And Execute Base64 Data

powershell decrypts and execute hardcoded base64 blob

Sigma rule (View on GitHub)

 1title: Powershell Decrypt And Execute Base64 Data
 2status: experimental
 3description: powershell decrypts and execute hardcoded base64 blob 
 4author: Joe Security
 5date: 2019-10-22
 6id: 200006
 7threatname:
 8behaviorgroup: 1
 9classification: 8
10mitreattack:
11
12logsource:
13    category: process_creation
14    product: windows
15detection:
16    selection:
17        CommandLine:
18            - '*\powershell.exe* $* = [string][System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String(*;iex $*'
19            - '*FromBase64String(*;IEX (*'
20            - '*frombase64string(*start-process $*'
21            - '*iex ([system.text.encoding]::ascii.getstring([system.convert]::frombase64string(*'
22            - '*invoke-expression $(new-object io.streamreader ($(new-object io.compression.deflatestream ($(new-object io.memorystream (,$([convert]::frombase64string(*'
23            - '*:frombase64string(*iex $*'
24            - '*.processstartinfo*::frombase64string*'
25    condition: selection
26level: critical
to-top