Windows PowerShell: Suspicious Unblock-File to Remove Zone.Identifier

Flags PowerShell use of Unblock-File (-Path) that can remove Zone.Identifier downloaded-file metadata.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
frack113 (SigmaHQ), DRL 1.1
Published
2022-02-01
Updated
2026-07-31
title: "Windows PowerShell: Suspicious Unblock-File to Remove Zone.Identifier"
id: 80aac208-ee81-41f4-85a4-493ed16d2381
status: test
description: This rule flags PowerShell script block content that calls Unblock-File with a -Path argument, indicating removal of the Zone.Identifier alternate data stream. Attackers may use this to reduce evidence that a file was downloaded from the internet, impairing user and security visibility. Detection relies on Script Block Logging capturing the PowerShell command text containing the expected arguments.
references:
  - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1553.005/T1553.005.md#atomic-test-3---remove-the-zoneidentifier-alternate-data-stream
  - https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/unblock-file?view=powershell-7.2
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_susp_unblock_file.yml
author: frack113, Huntrule Team
date: 2022-02-01
tags:
  - attack.defense-impairment
  - attack.t1553.005
logsource:
  product: windows
  category: ps_script
  definition: "Requirements: Script Block Logging must be enabled"
detection:
  selection:
    ScriptBlockText|contains|all:
      - "Unblock-File "
      - "-Path "
  condition: selection
falsepositives:
  - Legitimate PowerShell scripts
level: medium
license: DRL-1.1
related:
  - id: 5947497f-1aa4-41dd-9693-c9848d58727d
    type: derived