Possible PowerShell Script Dropped Through PowerShell.EXE (via file_event)

This rule detects PowerShell creating a PowerShell file (.ps1). While frequently times this behavior is benign, sometimes it can be a sign of a dropper script trying to achieve persistence.

SigmalowWindowsv1
sigma
title: Possible PowerShell Script Dropped Through PowerShell.EXE (via file_event)
id: df84c58a-be49-548c-9f02-0bea4342e7b8
status: stable
description: This rule detects PowerShell creating a PowerShell file (.ps1). While frequently times this behavior is benign, sometimes it can be a sign of a dropper script trying to achieve persistence.
references:
    - https://www.zscaler.com/blogs/security-research/onenote-growing-threat-malware-distribution
author: Huntrule Team
date: 2026-05-19
tags:
    - attack.persistence
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    category: file_event
detection:
    selection:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
        TargetFilename|endswith: '.ps1'
    filter_main_psscriptpolicytest:
        TargetFilename|contains: '__PSScriptPolicyTest_'
    filter_main_appdata:
        TargetFilename|startswith: 'C:\Users\'
        TargetFilename|contains: '\AppData\Local\Temp\'
    filter_main_windows_temp:
        TargetFilename|startswith: 'C:\Windows\Temp\'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Unknown
level: low

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.