Invoke-Obfuscation COMPRESS OBFUSCATION - Security

 Original Source: [Sigma source]
Title: Invoke-Obfuscation COMPRESS OBFUSCATION - Security
Status: test
Description:Detects Obfuscated Powershell via COMPRESS OBFUSCATION
References:
  -https://github.com/SigmaHQ/sigma/issues/1009
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