Detection rules › Sigma

Suspicious FromBase64String Usage On Gzip Archive - Process Creation

Status
test
Severity
medium
Log source
category process_creation, product windows
Author
frack113
Source
github.com/SigmaHQ/sigma

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

Known false positives

  • Legitimate administrative script

MITRE ATT&CK coverage

TacticTechniques
Command & Control

Telemetry coverage

Rule body

title: Suspicious FromBase64String Usage On Gzip Archive - Process Creation
id: d75d6b6b-adb9-48f7-824b-ac2e786efe1f
related:
    - id: df69cb1d-b891-4cd9-90c7-d617d90100ce
      type: similar
status: test
description: Detects attempts of decoding a base64 Gzip archive via PowerShell. This technique is often used as a method to load malicious content into memory afterward.
references:
    - https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse?slide=43
author: frack113
date: 2022-12-23
tags:
    - attack.command-and-control
    - attack.t1132.001
logsource:
    product: windows
    category: process_creation
detection:
    selection:
        CommandLine|contains|all:
            - 'FromBase64String'
            - 'MemoryStream'
            - 'H4sI'
    condition: selection
falsepositives:
    - Legitimate administrative script
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    CommandLine|contains|all:
        - 'FromBase64String'
        - 'MemoryStream'
        - 'H4sI'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • FromBase64String corpus 15 (sigma 9, elastic 4, splunk 2)
  • H4sI
  • MemoryStream
field:"CommandLine" kind:match