Suspicious PowerShell Invocations - Generic

 Original Source: [Sigma source]
Title: Suspicious PowerShell Invocations - Generic
Status: test
Description:Detects suspicious PowerShell invocation command parameters
References:
  -Internal Research
Author: Florian Roth (Nextron Systems)
Date: 2017-03-12
modified:2023-01-03
Tags:
  • -'attack.execution'
  • -'attack.t1059.001'
Logsource:
  • product: windows
  • category: ps_script
  • definition: Requirements: Script Block Logging must be enabled
Detection:
  selection_encoded:
    ScriptBlockText|contains:
      -' -enc '
      -' -EncodedCommand '
      -' -ec '

  selection_hidden:
    ScriptBlockText|contains:
      -' -w hidden '
      -' -window hidden '
      -' -windowstyle hidden '
      -' -w 1 '

  selection_noninteractive:
    ScriptBlockText|contains:
      -' -noni '
      -' -noninteractive '

  condition:all of selection*
Falsepositives:
  -Very special / sneaky PowerShell scripts
Level: high