Windows System: Service Control Manager PowerShell Obfuscation Using COMPRESS OBFUSCATION
Flags new Windows services whose ImagePath includes obfuscated PowerShell markers using COMPRESS/stream decompression.
- Product
- windows
- Service
- system
- Author
- Timur Zinniatullin, oscd.community (SigmaHQ), DRL 1.1
- Published
- 2020-10-18
- Updated
- 2026-07-31
ATT&CK techniques
Execution → Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule identifies a Windows service creation attempt where the Service Control Manager launches PowerShell-like scripting indicators that include obfuscation and compression components. Attackers may use obfuscated command content to evade string-based detections and to package or decode payloads at execution time. The detection relies on System service control events (Event ID 7045) and inspects the registered ImagePath for specific PowerShell and .NET compression/stream reader substrings.
Reporting behind it
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: "Windows System: Service Control Manager PowerShell Obfuscation Using COMPRESS OBFUSCATION"
id: 804e82d2-4506-4458-a3aa-bc6d43391d6f
status: test
description: This rule identifies a Windows service creation attempt where the Service Control Manager launches PowerShell-like scripting indicators that include obfuscation and compression components. Attackers may use obfuscated command content to evade string-based detections and to package or decode payloads at execution time. The detection relies on System service control events (Event ID 7045) and inspects the registered ImagePath for specific PowerShell and .NET compression/stream reader substrings.
references:
- https://github.com/SigmaHQ/sigma/issues/1009
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/system/service_control_manager/win_system_invoke_obfuscation_via_compress_services.yml
author: Timur Zinniatullin, oscd.community, Huntrule Team
date: 2020-10-18
modified: 2022-11-29
tags:
- attack.stealth
- attack.t1027
- attack.execution
- attack.t1059.001
logsource:
product: windows
service: system
detection:
selection:
Provider_Name: Service Control Manager
EventID: 7045
ImagePath|contains|all:
- new-object
- text.encoding]::ascii
- readtoend
ImagePath|contains:
- :system.io.compression.deflatestream
- system.io.streamreader
condition: selection
falsepositives:
- Unknown
level: medium
license: DRL-1.1
related:
- id: 175997c5-803c-4b08-8bb0-70b099f47595
type: derived