Malicious PowerShell Commandlets - ProcessCreation

Detects Commandlet names from well-known PowerShell exploitation frameworks

Sigma rule (View on GitHub)

  1title: Malicious PowerShell Commandlets - ProcessCreation
  2id: 02030f2f-6199-49ec-b258-ea71b07e03dc
  3related:
  4    - id: 89819aa4-bbd6-46bc-88ec-c7f7fe30efa6
  5      type: derived
  6    - id: 7d0d0329-0ef1-4e84-a9f5-49500f9d7c6c
  7      type: similar
  8status: experimental
  9description: Detects Commandlet names from well-known PowerShell exploitation frameworks
 10references:
 11    - https://adsecurity.org/?p=2921
 12    - https://github.com/S3cur3Th1sSh1t/PowerSharpPack/tree/master/PowerSharpBinaries
 13    - https://github.com/BC-SECURITY/Invoke-ZeroLogon/blob/111d17c7fec486d9bb23387e2e828b09a26075e4/Invoke-ZeroLogon.ps1
 14    - https://github.com/xorrior/RandomPS-Scripts/blob/848c919bfce4e2d67b626cbcf4404341cfe3d3b6/Get-DXWebcamVideo.ps1
 15    - https://github.com/rvrsh3ll/Misc-Powershell-Scripts/blob/6f23bb41f9675d7e2d32bacccff75e931ae00554/OfficeMemScraper.ps1
 16    - https://github.com/dafthack/DomainPasswordSpray/blob/b13d64a5834694aa73fd2aea9911a83027c465a7/DomainPasswordSpray.ps1
 17    - https://unit42.paloaltonetworks.com/threat-assessment-black-basta-ransomware/ # Invoke-TotalExec
 18    - https://research.nccgroup.com/2022/06/06/shining-the-light-on-black-basta/ # Invoke-TotalExec
 19    - https://github.com/calebstewart/CVE-2021-1675 # Invoke-Nightmare
 20    - https://github.com/BloodHoundAD/BloodHound/blob/0927441f67161cc6dc08a53c63ceb8e333f55874/Collectors/AzureHound.ps1
 21    - https://bloodhound.readthedocs.io/en/latest/data-collection/azurehound.html
 22    - https://github.com/HarmJ0y/DAMP
 23    - https://github.com/samratashok/nishang
 24    - https://github.com/DarkCoderSc/PowerRunAsSystem/
 25    - https://github.com/besimorhino/powercat
 26    - https://github.com/Kevin-Robertson/Powermad
 27    - https://github.com/adrecon/ADRecon
 28    - https://github.com/adrecon/AzureADRecon
 29author: Nasreddine Bencherchali (Nextron Systems)
 30date: 2023-01-02
 31modified: 2024-01-25
 32tags:
 33    - attack.execution
 34    - attack.discovery
 35    - attack.t1482
 36    - attack.t1087
 37    - attack.t1087.001
 38    - attack.t1087.002
 39    - attack.t1069.001
 40    - attack.t1069.002
 41    - attack.t1069
 42    - attack.t1059.001
 43logsource:
 44    category: process_creation
 45    product: windows
 46detection:
 47    selection:
 48        # Note: Please ensure alphabetical order when adding new entries
 49        CommandLine|contains:
 50            - 'Add-Exfiltration'
 51            - 'Add-Persistence'
 52            - 'Add-RegBackdoor'
 53            - 'Add-RemoteRegBackdoor'
 54            - 'Add-ScrnSaveBackdoor'
 55            - 'Check-VM'
 56            - 'ConvertTo-Rc4ByteStream'
 57            - 'Decrypt-Hash'
 58            - 'Disable-ADIDNSNode'
 59            - 'Disable-MachineAccount'
 60            - 'Do-Exfiltration'
 61            - 'Enable-ADIDNSNode'
 62            - 'Enable-MachineAccount'
 63            - 'Enabled-DuplicateToken'
 64            - 'Exploit-Jboss'
 65            - 'Export-ADR'
 66            - 'Export-ADRCSV'
 67            - 'Export-ADRExcel'
 68            - 'Export-ADRHTML'
 69            - 'Export-ADRJSON'
 70            - 'Export-ADRXML'
 71            - 'Find-Fruit'
 72            - 'Find-GPOLocation'
 73            - 'Find-TrustedDocuments'
 74            - 'Get-ADIDNS' # Covers: Get-ADIDNSNodeAttribute, Get-ADIDNSNodeOwner, Get-ADIDNSNodeTombstoned, Get-ADIDNSPermission, Get-ADIDNSZone
 75            - 'Get-ApplicationHost'
 76            - 'Get-ChromeDump'
 77            - 'Get-ClipboardContents'
 78            - 'Get-FoxDump'
 79            - 'Get-GPPPassword'
 80            - 'Get-IndexedItem'
 81            - 'Get-KerberosAESKey'
 82            - 'Get-Keystrokes'
 83            - 'Get-LSASecret'
 84            - 'Get-MachineAccountAttribute'
 85            - 'Get-MachineAccountCreator'
 86            - 'Get-PassHashes'
 87            - 'Get-RegAlwaysInstallElevated'
 88            - 'Get-RegAutoLogon'
 89            - 'Get-RemoteBootKey'
 90            - 'Get-RemoteCachedCredential'
 91            - 'Get-RemoteLocalAccountHash'
 92            - 'Get-RemoteLSAKey'
 93            - 'Get-RemoteMachineAccountHash'
 94            - 'Get-RemoteNLKMKey'
 95            - 'Get-RickAstley'
 96            - 'Get-Screenshot'
 97            - 'Get-SecurityPackages'
 98            - 'Get-ServiceFilePermission'
 99            - 'Get-ServicePermission'
100            - 'Get-ServiceUnquoted'
101            - 'Get-SiteListPassword'
102            - 'Get-System'
103            - 'Get-TimedScreenshot'
104            - 'Get-UnattendedInstallFile'
105            - 'Get-Unconstrained'
106            - 'Get-USBKeystrokes'
107            - 'Get-VaultCredential'
108            - 'Get-VulnAutoRun'
109            - 'Get-VulnSchTask'
110            - 'Grant-ADIDNSPermission'
111            - 'Gupt-Backdoor'
112            - 'HTTP-Login'
113            - 'Install-ServiceBinary'
114            - 'Install-SSP'
115            - 'Invoke-ACLScanner'
116            - 'Invoke-ADRecon'
117            - 'Invoke-ADSBackdoor'
118            - 'Invoke-AgentSmith'
119            - 'Invoke-AllChecks'
120            - 'Invoke-ARPScan'
121            - 'Invoke-AzureHound'
122            - 'Invoke-BackdoorLNK'
123            - 'Invoke-BadPotato'
124            - 'Invoke-BetterSafetyKatz'
125            - 'Invoke-BypassUAC'
126            - 'Invoke-Carbuncle'
127            - 'Invoke-Certify'
128            - 'Invoke-ConPtyShell'
129            - 'Invoke-CredentialInjection'
130            - 'Invoke-DAFT'
131            - 'Invoke-DCSync'
132            - 'Invoke-DinvokeKatz'
133            - 'Invoke-DllInjection'
134            - 'Invoke-DNSUpdate'
135            - 'Invoke-DomainPasswordSpray'
136            - 'Invoke-DowngradeAccount'
137            - 'Invoke-EgressCheck'
138            - 'Invoke-Eyewitness'
139            - 'Invoke-FakeLogonScreen'
140            - 'Invoke-Farmer'
141            - 'Invoke-Get-RBCD-Threaded'
142            - 'Invoke-Gopher'
143            - 'Invoke-Grouper' # Also Covers Invoke-GrouperX
144            - 'Invoke-HandleKatz'
145            - 'Invoke-ImpersonatedProcess'
146            - 'Invoke-ImpersonateSystem'
147            - 'Invoke-InteractiveSystemPowerShell'
148            - 'Invoke-Internalmonologue'
149            - 'Invoke-Inveigh'
150            - 'Invoke-InveighRelay'
151            - 'Invoke-KrbRelay'
152            - 'Invoke-LdapSignCheck'
153            - 'Invoke-Lockless'
154            - 'Invoke-MalSCCM'
155            - 'Invoke-Mimikatz'
156            - 'Invoke-Mimikittenz'
157            - 'Invoke-MITM6'
158            - 'Invoke-NanoDump'
159            - 'Invoke-NetRipper'
160            - 'Invoke-Nightmare'
161            - 'Invoke-NinjaCopy'
162            - 'Invoke-OfficeScrape'
163            - 'Invoke-OxidResolver'
164            - 'Invoke-P0wnedshell'
165            - 'Invoke-Paranoia'
166            - 'Invoke-PortScan'
167            - 'Invoke-PoshRatHttp' # Also Covers Invoke-PoshRatHttps
168            - 'Invoke-PostExfil'
169            - 'Invoke-PowerDump'
170            - 'Invoke-PowerShellTCP'
171            - 'Invoke-PowerShellWMI'
172            - 'Invoke-PPLDump'
173            - 'Invoke-PsExec'
174            - 'Invoke-PSInject'
175            - 'Invoke-PsUaCme'
176            - 'Invoke-ReflectivePEInjection'
177            - 'Invoke-ReverseDNSLookup'
178            - 'Invoke-Rubeus'
179            - 'Invoke-RunAs'
180            - 'Invoke-SafetyKatz'
181            - 'Invoke-SauronEye'
182            - 'Invoke-SCShell'
183            - 'Invoke-Seatbelt'
184            - 'Invoke-ServiceAbuse'
185            - 'Invoke-ShadowSpray'
186            - 'Invoke-Sharp' # Covers all "Invoke-Sharp" variants
187            - 'Invoke-Shellcode'
188            - 'Invoke-SMBScanner'
189            - 'Invoke-Snaffler'
190            - 'Invoke-Spoolsample'
191            - 'Invoke-SpraySinglePassword'
192            - 'Invoke-SSHCommand'
193            - 'Invoke-StandIn'
194            - 'Invoke-StickyNotesExtract'
195            - 'Invoke-SystemCommand'
196            - 'Invoke-Tasksbackdoor'
197            - 'Invoke-Tater'
198            - 'Invoke-Thunderfox'
199            - 'Invoke-ThunderStruck'
200            - 'Invoke-TokenManipulation'
201            - 'Invoke-Tokenvator'
202            - 'Invoke-TotalExec'
203            - 'Invoke-UrbanBishop'
204            - 'Invoke-UserHunter'
205            - 'Invoke-VoiceTroll'
206            - 'Invoke-Whisker'
207            - 'Invoke-WinEnum'
208            - 'Invoke-winPEAS'
209            - 'Invoke-WireTap'
210            - 'Invoke-WmiCommand'
211            - 'Invoke-WMIExec'
212            - 'Invoke-WScriptBypassUAC'
213            - 'Invoke-Zerologon'
214            - 'MailRaider'
215            - 'New-ADIDNSNode'
216            - 'New-DNSRecordArray'
217            - 'New-HoneyHash'
218            - 'New-InMemoryModule'
219            - 'New-MachineAccount'
220            - 'New-SOASerialNumberArray'
221            - 'Out-Minidump'
222            - 'Port-Scan'
223            - 'PowerBreach'
224            - 'powercat '
225            - 'PowerUp'
226            - 'PowerView'
227            - 'Remove-ADIDNSNode'
228            - 'Remove-MachineAccount'
229            - 'Remove-Update'
230            - 'Rename-ADIDNSNode'
231            - 'Revoke-ADIDNSPermission'
232            - 'Set-ADIDNSNode' # Covers: Set-ADIDNSNodeAttribute, Set-ADIDNSNodeOwner
233            - 'Set-MacAttribute'
234            - 'Set-MachineAccountAttribute'
235            - 'Set-Wallpaper'
236            - 'Show-TargetScreen'
237            - 'Start-CaptureServer'
238            - 'Start-Dnscat2'
239            - 'Start-WebcamRecorder'
240            - 'VolumeShadowCopyTools'
241    condition: selection
242falsepositives:
243    - Unknown
244level: high

References

Related rules

to-top