Detection rules › Sigma

Invoke-Obfuscation COMPRESS OBFUSCATION - Security

Status
test
Severity
medium
Log source
product windows, service security
Author
Timur Zinniatullin, oscd.community
Source
github.com/SigmaHQ/sigma

Detects Obfuscated Powershell via COMPRESS OBFUSCATION

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Invoke-Obfuscation COMPRESS OBFUSCATION - Security
id: 7a922f1b-2635-4d6c-91ef-af228b198ad3
related:
    - id: 175997c5-803c-4b08-8bb0-70b099f47595
      type: derived
status: test
description: Detects Obfuscated Powershell via COMPRESS OBFUSCATION
references:
    - https://github.com/SigmaHQ/sigma/issues/1009 # (Task 19)
author: Timur Zinniatullin, oscd.community
date: 2020-10-18
modified: 2022-11-29
tags:
    - attack.stealth
    - attack.t1027
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    service: security
    definition: The 'System Security Extension' audit subcategory need to be enabled to log the EID 4697
detection:
    selection:
        EventID: 4697
        ServiceFileName|contains|all:
            - 'new-object'
            - 'text.encoding]::ascii'
            - 'readtoend'
        ServiceFileName|contains:
            - 'system.io.compression.deflatestream'
            - 'system.io.streamreader'
    condition: selection
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    EventID: 4697
    ServiceFileName|contains|all:
        - 'new-object'
        - 'text.encoding]::ascii'
        - 'readtoend'
    ServiceFileName|contains:
        - 'system.io.compression.deflatestream'
        - 'system.io.streamreader'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
ServiceFileNamematch
  • new-object
  • readtoend
  • system.io.compression.deflatestream
  • system.io.streamreader
  • text.encoding]::ascii