Sigma rule: PSScriptPolicyTest Creation By Uncommon Process
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-024a4045012d, updated 2026-10-19T00:00:00.000Z.
Rule
- Title
- PSScriptPolicyTest Creation By Uncommon Process
- Status
- test
- Level
- medium
- Author
- Nasreddine Bencherchali (Nextron Systems)
- Date
- 2023-06-01
- Modified
- 2026-10-19
- File
- rules/windows/file/file_event/file_event_win_ps_script_policy_test_creation_by_uncommon_process.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects the creation of the "PSScriptPolicyTest" PowerShell script by an uncommon process. This file is usually generated by Microsoft Powershell to test against Applocker.
Log source
- product
- windows
- category
- file_event
Detection
selection:
TargetFilename|contains: '__PSScriptPolicyTest_'
filter_main_powershell:
Image:
- 'C:\Program Files\PowerShell\7-preview\pwsh.exe'
- 'C:\Program Files\PowerShell\7\pwsh.exe'
- 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe'
- 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
- 'C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell_ise.exe'
- 'C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe'
filter_main_pwsh_preview:
Image|contains:
- 'C:\Program Files\WindowsApps\Microsoft.PowerShellPreview'
- '\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShellPreview'
Image|endswith: '\pwsh.exe'
filter_main_generic:
Image:
- 'C:\Windows\System32\dsac.exe'
- 'C:\Windows\System32\sdiagnhost.exe'
- 'C:\Windows\System32\ServerManager.exe'
- 'C:\Windows\System32\wsmprovhost.exe'
- 'C:\Windows\SysWOW64\sdiagnhost.exe'
filter_optional_gethelp:
Image|startswith: 'C:\Program Files\WindowsApps\Microsoft.GetHelp_'
Image|endswith: '\GetHelp.exe'
filter_optional_citrix:
Image|startswith:
- 'C:\Program Files\Citrix\ConfigSync\'
- 'C:\Program Files (x86)\Citrix\ConfigSync\'
Image|endswith: '\ConfigSyncRun.exe'
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*False positives (as the rule lists them)
- Unknown
Tags
- attack.stealth
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/file/file_event/file_event_win_ps_script_policy_test_creation_by_uncommon_process.yml
Sources and licences
SigmaHQ
"PSScriptPolicyTest Creation By Uncommon Process" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/file/file_event/file_event_win_ps_script_policy_test_creation_by_uncommon_process.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: PSScriptPolicyTest Creation By Uncommon Process",
entity page, dataset version ref-024a4045012d, updated 2026-10-19T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/1027d292-dd87-4a1a-8701-2abe04d7783c (accessed 2026-11-03).
Underlying source: SigmaHQ rule 1027d292-dd87-4a1a-8701-2abe04d7783c, 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.