Sigma rule: Malicious PowerShell Commandlets - ScriptBlock

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-850e12d4c0e2, updated 2025-12-10T00:00:00.000Z.

Rule

Title
Malicious PowerShell Commandlets - ScriptBlock
Status
test
Level
high
Author
Sean Metcalf, Florian Roth, Bartlomiej Czyz @bczyz1, oscd.community, Nasreddine Bencherchali, Tim Shelton, Mustafa Kaan Demir, Georg Lauenstein, Max Altgelt, Tobias Michalski, Austin Songer
Date
2017-03-05
Modified
2025-12-10
File
rules/windows/powershell/powershell_script/posh_ps_malicious_commandlets.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects Commandlet names from well-known PowerShell exploitation frameworks

Log source

product
windows
category
ps_script
definition
Requirements: Script Block Logging must be enabled

Detection

selection:
    ScriptBlockText|contains:
        # Note: Please ensure alphabetical order when adding new entries
        - 'Add-Exfiltration'
        - 'Add-Persistence'
        - 'Add-RegBackdoor'
        - 'Add-RemoteRegBackdoor'
        - 'Add-ScrnSaveBackdoor'
        - 'ConvertTo-Rc4ByteStream'
        - 'Decrypt-Hash'
        - 'Disable-ADIDNSNode'
        - 'Do-Exfiltration'
        - 'Enable-ADIDNSNode'
        - 'Enabled-DuplicateToken'
        - 'Exploit-Jboss'
        - 'Export-ADRCSV'
        - 'Export-ADRExcel'
        - 'Export-ADRHTML'
        - 'Export-ADRJSON'
        - 'Export-ADRXML'
        - 'Find-Fruit'
        - 'Find-GPOLocation'
        - 'Find-TrustedDocuments'
        - 'Get-ADIDNSNodeAttribute'
        - 'Get-ADIDNSNodeOwner'
        - 'Get-ADIDNSNodeTombstoned'
        - 'Get-ADIDNSPermission'
        - 'Get-ADIDNSZone'
        - 'Get-ChromeDump'
        - 'Get-ClipboardContents'
        - 'Get-FoxDump'
        - 'Get-GPPPassword'
        - 'Get-IndexedItem'
        - 'Get-KerberosAESKey'
        - 'Get-Keystrokes'
        - 'Get-LSASecret'
        - 'Get-PassHashes'
        - 'Get-RegAlwaysInstallElevated'
        - 'Get-RegAutoLogon'
        - 'Get-RemoteBootKey'
        - 'Get-RemoteCachedCredential'
        - 'Get-RemoteLocalAccountHash'
        - 'Get-RemoteLSAKey'
        - 'Get-RemoteMachineAccountHash'
        - 'Get-RemoteNLKMKey'
        - 'Get-RickAstley'
        - 'Get-SecurityPackages'
        - 'Get-ServiceFilePermission'
        - 'Get-ServicePermission'
        - 'Get-ServiceUnquoted'
        - 'Get-SiteListPassword'
        - 'Get-System'
        - 'Get-TimedScreenshot'
        - 'Get-UnattendedInstallFile'
        - 'Get-Unconstrained'
        - 'Get-USBKeystrokes'
        - 'Get-VaultCredential'
        - 'Get-VulnAutoRun'
        - 'Get-VulnSchTask'
        - 'Grant-ADIDNSPermission'
        - 'Gupt-Backdoor'
        - 'Invoke-ACLScanner'
        - 'Invoke-ADRecon'
        - 'Invoke-ADSBackdoor'
        - 'Invoke-AgentSmith'
        - 'Invoke-AllChecks'
        - 'Invoke-ARPScan'
        - 'Invoke-AzureHound'
        - 'Invoke-BackdoorLNK'
        - 'Invoke-BadPotato'
        - 'Invoke-BetterSafetyKatz'
        - 'Invoke-BypassUAC'
        - 'Invoke-Carbuncle'
        - 'Invoke-Certify'
        - 'Invoke-ConPtyShell'
        - 'Invoke-CredentialInjection'
        - 'Invoke-DAFT'
        - 'Invoke-DCSync'
        - 'Invoke-DinvokeKatz'
        - 'Invoke-DllInjection'
        - 'Invoke-DNSUpdate'
        - 'Invoke-DNSExfiltrator'
        - 'Invoke-DomainPasswordSpray'
        - 'Invoke-DowngradeAccount'
        - 'Invoke-EgressCheck'
        - 'Invoke-Eyewitness'
        - 'Invoke-FakeLogonScreen'
        - 'Invoke-Farmer'
        - 'Invoke-Get-RBCD-Threaded'
        - 'Invoke-Gopher'
        - 'Invoke-Grouper' # Also Covers Invoke-GrouperX
        - 'Invoke-HandleKatz'
        - 'Invoke-ImpersonatedProcess'
        - 'Invoke-ImpersonateSystem'
        - 'Invoke-InteractiveSystemPowerShell'
        - 'Invoke-Internalmonologue'
        - 'Invoke-Inveigh'
        - 'Invoke-InveighRelay'
        - 'Invoke-KrbRelay'
        - 'Invoke-LdapSignCheck'
        - 'Invoke-Lockless'
        - 'Invoke-MalSCCM'
        - 'Invoke-Mimikatz'
        - 'Invoke-Mimikittenz'
        - 'Invoke-MITM6'
        - 'Invoke-NanoDump'
        - 'Invoke-NetRipper'
        - 'Invoke-Nightmare'
        - 'Invoke-NinjaCopy'
        - 'Invoke-OfficeScrape'
        - 'Invoke-OxidResolver'
        - 'Invoke-P0wnedshell'
        - 'Invoke-Paranoia'
        - 'Invoke-PortScan'
        - 'Invoke-PoshRatHttp' # Also Covers Invoke-PoshRatHttps
        - 'Invoke-PostExfil'
        - 'Invoke-PowerDump'
        - 'Invoke-PowerDPAPI'
        - 'Invoke-PowerShellTCP'
        - 'Invoke-PowerShellWMI'
        - 'Invoke-PPLDump'
        - 'Invoke-PsExec'
        - 'Invoke-PSInject'
        - 'Invoke-PsUaCme'
        - 'Invoke-ReflectivePEInjection'
        - 'Invoke-ReverseDNSLookup'
        - 'Invoke-Rubeus'
        - 'Invoke-RunAs'
        - 'Invoke-SafetyKatz'
        - 'Invoke-SauronEye'
        - 'Invoke-SCShell'
        - 'Invoke-Seatbelt'
        - 'Invoke-ServiceAbuse'
        - 'Invoke-ShadowSpray'
        - 'Invoke-Sharp' # Covers all "Invoke-Sharp" variants
        - 'Invoke-Shellcode'
        - 'Invoke-SMBScanner'
        - 'Invoke-Snaffler'
        - 'Invoke-Spoolsample'
        - 'Invoke-SpraySinglePassword'
        - 'Invoke-SSHCommand'
        - 'Invoke-StandIn'
        - 'Invoke-StickyNotesExtract'
        - 'Invoke-SystemCommand'
        - 'Invoke-Tasksbackdoor'
        - 'Invoke-Tater'
        - 'Invoke-Thunderfox'
        - 'Invoke-ThunderStruck'
        - 'Invoke-TokenManipulation'
        - 'Invoke-Tokenvator'
        - 'Invoke-TotalExec'
        - 'Invoke-UrbanBishop'
        - 'Invoke-UserHunter'
        - 'Invoke-VoiceTroll'
        - 'Invoke-Whisker'
        - 'Invoke-WinEnum'
        - 'Invoke-winPEAS'
        - 'Invoke-WireTap'
        - 'Invoke-WmiCommand'
        - 'Invoke-WMIExec'
        - 'Invoke-WScriptBypassUAC'
        - 'Invoke-Zerologon'
        - 'MailRaider'
        - 'New-ADIDNSNode'
        - 'New-HoneyHash'
        - 'New-InMemoryModule'
        - 'New-SOASerialNumberArray'
        - 'Out-Minidump'
        - 'PowerBreach'
        - 'powercat '
        - 'PowerUp'
        - 'PowerView'
        - 'Remove-ADIDNSNode'
        - 'Remove-Update'
        - 'Rename-ADIDNSNode'
        - 'Revoke-ADIDNSPermission'
        - 'Set-ADIDNSNode' # Covers: Set-ADIDNSNodeAttribute, Set-ADIDNSNodeOwner
        - 'Show-TargetScreen'
        - 'Start-CaptureServer'
        - 'Start-Dnscat2'
        - 'Start-WebcamRecorder'
        - 'VolumeShadowCopyTools'
        # - 'Check-VM'
        # - 'Disable-MachineAccount'
        # - 'Enable-MachineAccount'
        # - 'Get-ApplicationHost'
        # - 'Get-MachineAccountAttribute'
        # - 'Get-MachineAccountCreator'
        # - 'Get-Screenshot'
        # - 'HTTP-Login'
        # - 'Install-ServiceBinary'
        # - 'Install-SSP'
        # - 'New-DNSRecordArray'
        # - 'New-MachineAccount'
        # - 'Port-Scan'
        # - 'Remove-MachineAccount'
        # - 'Set-MacAttribute'
        # - 'Set-MachineAccountAttribute'
        # - 'Set-Wallpaper'
filter_optional_amazon_ec2:
    ScriptBlockText|contains:
        - Get-SystemDriveInfo  # http://bheltborg.dk/Windows/WinSxS/amd64_microsoft-windows-maintenancediagnostic_31bf3856ad364e35_10.0.10240.16384_none_91ef7543a4514b5e/CL_Utility.ps1
        - C:\ProgramData\Amazon\EC2-Windows\Launch\Module\  # false positive form Amazon EC2
condition: selection and not 1 of filter_optional_*

False positives (as the rule lists them)

  • Unknown

Tags

  • attack.execution
  • attack.discovery
  • attack.t1482
  • attack.t1087
  • attack.t1087.001
  • attack.t1087.002
  • attack.t1069.001
  • attack.t1069.002
  • attack.t1069
  • attack.t1059.001

MITRE ATT&CK ids this rule names

Related rules

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_malicious_commandlets.yml

Sources and licences

  • SigmaHQ

    "Malicious PowerShell Commandlets - ScriptBlock" by Sean Metcalf, Florian Roth, Bartlomiej Czyz @bczyz1, oscd.community, Nasreddine Bencherchali, Tim Shelton, Mustafa Kaan Demir, Georg Lauenstein, Max Altgelt, Tobias Michalski, Austin Songer (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_malicious_commandlets.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: Malicious PowerShell Commandlets - ScriptBlock",
entity page, dataset version ref-850e12d4c0e2, updated 2025-12-10T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/89819aa4-bbd6-46bc-88ec-c7f7fe30efa6 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 89819aa4-bbd6-46bc-88ec-c7f7fe30efa6, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.