Suspicious Powershell Inline Execution From A File (via process_creation)

This rule detects inline execution of PowerShell code from a file

SigmamediumWindowsv1
sigma
title: Suspicious Powershell Inline Execution From A File (via process_creation)
id: 150bca74-0ae6-5da5-b5fd-f3931022c213
status: stable
description: This rule detects inline execution of PowerShell code from a file
references:
    - https://attack.mitre.org/techniques/T1059/001/
    - https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse?slide=50
author: Huntrule Team
date: 2026-02-10
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    category: process_creation
detection:
    selection_exec:
        CommandLine|contains:
            - 'iex '
            - 'Invoke-Expression '
            - 'Invoke-Command '
            - 'icm '
    selection_read:
        CommandLine|contains:
            - 'cat '
            - 'get-content '
            - 'type '
    selection_raw:
        CommandLine|contains: ' -raw'
    condition: all of 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.