PSScriptPolicyTest Creation By Uncommon Process

Last updated on:

About the rule

Rule Type

Standard

Rule Description

Detects the creation of the "PSScriptPolicyTest" PowerShell script by an uncommon process. This file is usually generated by Microsoft Powershell to test against Applocker.

Severity

Trouble

Rule Requirement

Criteria

Action1: actionname = "File Created or Modified" AND (FILENAME contains "__PSScriptPolicyTest_" OR OBJECTNAME contains "__PSScriptPolicyTest_") AND PROCESSNAME notendswith ":\Program Files\PowerShell\7-preview\pwsh.exe,:\Program Files\PowerShell\7\pwsh.exe,:\Windows\System32\dsac.exe,:\Windows\System32\sdiagnhost.exe,:\Windows\System32\ServerManager.exe,:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe,:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe,:\Windows\System32\wsmprovhost.exe,:\Windows\SysWOW64\sdiagnhost.exe,:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell_ise.exe,:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe" select Action1.HOSTNAME,Action1.MESSAGE,Action1.USERNAME,Action1.DOMAIN,Action1.OBJECTNAME,Action1.FILENAME,Action1.PROCESSNAME

Detection

Execution Mode

realtime

Log Sources

Windows

Author

Nasreddine Bencherchali (Nextron Systems)