Windows PowerShell: Decompress via Expand-Archive Command

Alerts on PowerShell usage of Expand-Archive, a common decompression step attackers may use to unpack files.

FreeUnreviewedSigmainformationalv1
title: "Windows PowerShell: Decompress via Expand-Archive Command"
id: fcb4079c-a1f5-4e1a-911d-cc2c2cbad00b
related:
  - id: 81fbdce6-ee49-485a-908d-1a728c5dcb09
    type: derived
  - id: 1ddc1472-8e52-4f7d-9f11-eab14fc171f5
    type: derived
status: test
description: This rule flags PowerShell module telemetry where the command payload contains the decompression cmdlet Expand-Archive. Adversaries may use decompression to unpack files for execution or staging, making this activity a useful stealth-related signal. It relies on Windows PowerShell logs that include a payload field containing the matched command text.
references:
  - https://github.com/OTRF/detection-hackathon-apt29/issues/8
  - https://github.com/OTRF/ThreatHunter-Playbook/blob/2d4257f630f4c9770f78d0c1df059f891ffc3fec/docs/evals/apt29/detections/4.A.3_09F29912-8E93-461E-9E89-3F06F6763383.md
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_module/posh_pm_decompress_commands.yml
author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research), Huntrule Team
date: 2020-05-02
modified: 2022-12-25
tags:
  - attack.stealth
  - attack.t1140
logsource:
  product: windows
  category: ps_module
  definition: 0ad03ef1-f21b-4a79-8ce8-e6900c54b65b
detection:
  selection_4103:
    Payload|contains: Expand-Archive
  condition: selection_4103
falsepositives:
  - Unknown
level: informational
license: DRL-1.1

What it detects

This rule flags PowerShell module telemetry where the command payload contains the decompression cmdlet Expand-Archive. Adversaries may use decompression to unpack files for execution or staging, making this activity a useful stealth-related signal. It relies on Windows PowerShell logs that include a payload field containing the matched command text.

Known false positives

  • Unknown

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.