Suspicious Zip A Folder With PowerShell For Staging In Temp - PowerShell Script (via ps_script)

This rule detects PowerShell scripts that make use of the "Compress-Archive" Cmdlet to compress folders and files where the output is stored in a potentially anomalous location that is used frequently by malware for exfiltration. An adversary might compress data (e.g., sensitive documents) that is collected prior to exfiltration to make it portable and minimize the amount of data sent over the network.

SigmamediumWindowsv1
sigma
title: Suspicious Zip A Folder With PowerShell For Staging In Temp - PowerShell Script (via ps_script)
id: 2cd48d93-1e3b-58c5-8d6d-b76f7ea25703
status: stable
description: This rule detects PowerShell scripts that make use of the "Compress-Archive" Cmdlet to compress folders and files where the output is stored in a potentially anomalous location that is used frequently by malware for exfiltration. An adversary might compress data (e.g., sensitive documents) that is collected prior to exfiltration to make it portable and minimize the amount of data sent over the network.
references:
    - https://attack.mitre.org/techniques/T1074/001/
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1074.001/T1074.001.md
    - https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-347a
author: Huntrule Team
date: 2026-06-13
tags:
    - attack.collection
    - attack.t1074.001
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        ScriptBlockText|contains:
            - 'Compress-Archive -Path*-DestinationPath $env:TEMP'
            - 'Compress-Archive -Path*-DestinationPath*\AppData\Local\Temp\'
            - 'Compress-Archive -Path*-DestinationPath*:\Windows\Temp\'
    condition: selection
falsepositives:
    - Unknown
level: medium

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.