Suspicious PowerShell Invocations - Specific
Detects suspicious PowerShell invocation command parameters
Sigma rule (View on GitHub)
1title: Suspicious PowerShell Invocations - Specific
2id: ae7fbf8e-f3cb-49fd-8db4-5f3bed522c71
3related:
4 - id: fce5f582-cc00-41e1-941a-c6fabf0fdb8c
5 type: obsolete
6 - id: 8ff28fdd-e2fa-4dfa-aeda-ef3d61c62090
7 type: similar
8 - id: 536e2947-3729-478c-9903-745aaffe60d2
9 type: similar
10status: test
11description: Detects suspicious PowerShell invocation command parameters
12references:
13 - Internal Research
14author: Florian Roth (Nextron Systems), Jonhnathan Ribeiro
15date: 2017-03-05
16modified: 2023-01-05
17tags:
18 - attack.execution
19 - attack.t1059.001
20logsource:
21 product: windows
22 category: ps_script
23 definition: 'Requirements: Script Block Logging must be enabled'
24detection:
25 selection_convert_b64:
26 ScriptBlockText|contains|all:
27 - '-nop'
28 - ' -w '
29 - 'hidden'
30 - ' -c '
31 - '[Convert]::FromBase64String'
32 selection_iex_selection:
33 ScriptBlockText|contains|all:
34 - ' -w '
35 - 'hidden'
36 - '-noni'
37 - '-nop'
38 - ' -c '
39 - 'iex'
40 - 'New-Object'
41 selection_enc_selection:
42 ScriptBlockText|contains|all:
43 - ' -w '
44 - 'hidden'
45 - '-ep'
46 - 'bypass'
47 - '-Enc'
48 selection_reg_selection:
49 ScriptBlockText|contains|all:
50 - 'powershell'
51 - 'reg'
52 - 'add'
53 - 'HKCU\software\microsoft\windows\currentversion\run'
54 selection_webclient_selection:
55 ScriptBlockText|contains|all:
56 - 'bypass'
57 - '-noprofile'
58 - '-windowstyle'
59 - 'hidden'
60 - 'new-object'
61 - 'system.net.webclient'
62 - '.download'
63 selection_iex_webclient:
64 ScriptBlockText|contains|all:
65 - 'iex'
66 - 'New-Object'
67 - 'Net.WebClient'
68 - '.Download'
69 filter_chocolatey:
70 ScriptBlockText|contains:
71 - "(New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1"
72 - "(New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')"
73 - 'Write-ChocolateyWarning'
74 condition: 1 of selection_* and not 1 of filter_*
75falsepositives:
76 - Unknown
77level: high
References
Related rules
- AWS EC2 Startup Shell Script Change
- Alternate PowerShell Hosts - PowerShell Module
- Bad Opsec Powershell Code Artifacts
- BloodHound Collection Files
- Certificate Exported Via PowerShell