Possible Powershell Directory Enumeration (via ps_script)

This rule detects method used by MAZE ransomware to enumerate directories using Powershell

SigmamediumWindowsv1
sigma
title: Possible Powershell Directory Enumeration (via ps_script)
id: f2343e17-2546-5fe6-9306-6fe8acad2ead
status: stable
description: This rule detects method used by MAZE ransomware to enumerate directories using Powershell
references:
    - https://attack.mitre.org/techniques/T1083/
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1083/T1083.md
    - https://www.mandiant.com/resources/tactics-techniques-procedures-associated-with-maze-ransomware-incidents
author: Huntrule Team
date: 2026-04-24
tags:
    - attack.discovery
    - attack.t1083
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        ScriptBlockText|contains|all:
            - foreach
            - Get-ChildItem
            - '-Path '
            - '-ErrorAction '
            - SilentlyContinue
            - 'Out-File '
            - '-append'
    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.