← Back to SOC feed Coverage →

Execution of Powershell Script in Public Folder

sigma HIGH SigmaHQ
T1059.001
imProcessCreate
powershell
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at SigmaHQ →
Retrieved: 2026-05-12T23:00:00Z · Confidence: medium

Hunt Hypothesis

This rule detects execution of PowerShell scripts located in the “C:\Users\Public” folder

Detection Rule

Sigma (Original)

title: Execution of Powershell Script in Public Folder
id: fb9d3ff7-7348-46ab-af8c-b55f5fbf39b4
status: test
description: This rule detects execution of PowerShell scripts located in the "C:\Users\Public" folder
references:
    - https://www.mandiant.com/resources/evolution-of-fin7
author: Max Altgelt (Nextron Systems)
date: 2022-04-06
modified: 2022-07-14
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
        CommandLine|contains:
            - '-f C:\Users\Public'
            - '-f "C:\Users\Public'
            - '-f %Public%'
            - '-fi C:\Users\Public'
            - '-fi "C:\Users\Public'
            - '-fi %Public%'
            - '-fil C:\Users\Public'
            - '-fil "C:\Users\Public'
            - '-fil %Public%'
            - '-file C:\Users\Public'
            - '-file "C:\Users\Public'
            - '-file %Public%'
    condition: selection
falsepositives:
    - Unlikely
level: high

KQL (Azure Sentinel)

imProcessCreate
| where (TargetProcessName endswith "\\powershell.exe" or TargetProcessName endswith "\\pwsh.exe") and (TargetProcessCommandLine contains "-f C:\\Users\\Public" or TargetProcessCommandLine contains "-f \"C:\\Users\\Public" or TargetProcessCommandLine contains "-f %Public%" or TargetProcessCommandLine contains "-fi C:\\Users\\Public" or TargetProcessCommandLine contains "-fi \"C:\\Users\\Public" or TargetProcessCommandLine contains "-fi %Public%" or TargetProcessCommandLine contains "-fil C:\\Users\\Public" or TargetProcessCommandLine contains "-fil \"C:\\Users\\Public" or TargetProcessCommandLine contains "-fil %Public%" or TargetProcessCommandLine contains "-file C:\\Users\\Public" or TargetProcessCommandLine contains "-file \"C:\\Users\\Public" or TargetProcessCommandLine contains "-file %Public%")

Required Data Sources

Sentinel TableNotes
imProcessCreateEnsure this data connector is enabled

False Positive Guidance

MITRE ATT&CK Context

References

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_powershell_public_folder.yml