Run PowerShell Script from Redirected Input Stream

Detects PowerShell script execution via input stream redirect

Sigma rule (View on GitHub)

 1title: Run PowerShell Script from Redirected Input Stream
 2id: c83bf4b5-cdf0-437c-90fa-43d734f7c476
 3status: test
 4description: Detects PowerShell script execution via input stream redirect
 5references:
 6    - https://github.com/LOLBAS-Project/LOLBAS/blob/4db780e0f0b2e2bb8cb1fa13e09196da9b9f1834/yml/LOLUtilz/OSBinaries/Powershell.yml
 7    - https://twitter.com/Moriarty_Meng/status/984380793383370752
 8author: Moriarty Meng (idea), Anton Kutepov (rule), oscd.community
 9date: 2020-10-17
10modified: 2021-11-27
11tags:
12    - attack.execution
13    - attack.t1059
14logsource:
15    category: process_creation
16    product: windows
17detection:
18    selection:
19        Image|endswith:
20            - '\powershell.exe'
21            - '\pwsh.exe'
22        CommandLine|re: '\s-\s*<'
23    condition: selection
24falsepositives:
25    - Unknown
26level: high

References

Related rules

to-top