
title: Change PowerShell Policies to a Unsecure Level
author: frack113
date: 2021/10/20
description: Detects use of Set-ExecutionPolicy to set a unsecure policies
detection:
  SELECTION_1:
    ScriptBlockText: '*Set-ExecutionPolicy*'
  SELECTION_2:
    ScriptBlockText:
    - '*Unrestricted*'
    - '*bypass*'
    - '*RemoteSigned*'
  condition: (SELECTION_1 and SELECTION_2)
falsepositives:
- Administrator script
id: 61d0475c-173f-4844-86f7-f3eebae1c66b
level: high
logsource:
  category: ps_script
  product: windows
references:
- https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7.1
- https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.1
- https://adsecurity.org/?p=2604
status: experimental
tags:
- attack.execution
- attack.t1059.001
ruletype: SIGMA
