Run PowerShell Script from Redirected Input Stream

 Original Source: [Sigma source]
Title: Run PowerShell Script from Redirected Input Stream
Status: test
Description:Detects PowerShell script execution via input stream redirect
References:
  -https://github.com/LOLBAS-Project/LOLBAS/blob/4db780e0f0b2e2bb8cb1fa13e09196da9b9f1834/yml/LOLUtilz/OSBinaries/Powershell.yml
  -https://twitter.com/Moriarty_Meng/status/984380793383370752
Author: Moriarty Meng (idea), Anton Kutepov (rule), oscd.community
Date: 2020-10-17
modified:2021-11-27
Tags:
  • -'attack.execution'
  • -'attack.t1059'
Logsource:
  • category: process_creation
  • product: windows
Detection:
  selection:
    Image|endswith:
      -'\powershell.exe'
      -'\pwsh.exe'

    CommandLine|re: '\s-\s*<'
  condition:selection
Falsepositives:
  -Unknown
Level: high