Sigma rule: Potentially Suspicious Powershell Script Execution From Temp Folder

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-ff801716b725, updated 2026-02-17T00:00:00.000Z.

Rule

Title
Potentially Suspicious Powershell Script Execution From Temp Folder
Status
test
Level
medium
Author
Florian Roth (Nextron Systems), Max Altgelt (Nextron Systems), Tim Shelton
Date
2021-07-14
Modified
2026-02-17
File
rules/windows/process_creation/proc_creation_win_powershell_script_exec_from_temp_folder.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects a potentially suspicious powershell script executions from temporary folder

Log source

product
windows
category
process_creation

Detection

selection:
    Image|endswith:
        - '\powershell.exe'
        - '\pwsh.exe'
    CommandLine|contains:
        - '\Windows\Temp'
        - '\Temporary Internet'
        - '\AppData\Local\Temp'
        - '\AppData\Roaming\Temp'
        - '%TEMP%'
        - '%TMP%'
        - '%LocalAppData%\Temp'
filter_optional_vscode:
    CommandLine|contains: '-WindowStyle hidden -Verb runAs'
filter_optional_amazon_ec2:
    CommandLine|contains: '\Windows\system32\config\systemprofile\AppData\Local\Temp\Amazon\EC2-Windows\'
filter_optional_generic:
    CommandLine|contains:
        - ' >'
        - 'Out-File'
        - 'ConvertTo-Json'
filter_optional_chocolatey_installer:
    ParentImage:
        - 'C:\Windows\System32\Msiexec.exe'
        - 'C:\Windows\SysWOW64\Msiexec.exe'
    Image|endswith: '\powershell.exe'
    CommandLine|contains|all:
        - '-NoProfile -ExecutionPolicy Bypass -Command'
        - 'AppData\Local\Temp\'
        - 'Install-Chocolatey.ps1'
condition: selection and not 1 of filter_optional_*

False positives (as the rule lists them)

  • Administrative scripts

Tags

  • attack.execution
  • attack.t1059.001

MITRE ATT&CK ids this rule names

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_powershell_script_exec_from_temp_folder.yml

Sources and licences

  • SigmaHQ

    "Potentially Suspicious Powershell Script Execution From Temp Folder" by Florian Roth (Nextron Systems), Max Altgelt (Nextron Systems), Tim Shelton (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_powershell_script_exec_from_temp_folder.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: Potentially Suspicious Powershell Script Execution From Temp Folder",
entity page, dataset version ref-ff801716b725, updated 2026-02-17T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/a6a39bdb-935c-4f0a-ab77-35f4bbf44d33 (accessed 2026-11-03).
Underlying source: SigmaHQ rule a6a39bdb-935c-4f0a-ab77-35f4bbf44d33, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.