Windows PowerShell Script Block With Malicious String
The following analytic detects the execution of multiple offensive toolkits and commands by leveraging PowerShell Script Block Logging (EventCode=4104). This method captures and logs the full command sent to…
Description
The following analytic detects the execution of multiple offensive toolkits and commands by leveraging PowerShell Script Block Logging (EventCode=4104). This method captures and logs the full command sent to PowerShell, allowing for the identification of suspicious activities including several well-known tools used for credential theft, lateral movement, and persistence. If confirmed malicious, this could lead to unauthorized access, privilege escalation, and potential compromise of sensitive information within the environment.
Detection logic
Detection requirements
- Platform
- Windows
The rule states no platform. This is derived from the ATT&CK technique it maps to.
- Log source category
- powershell_script_block_logging_4104
Known benign triggers
- No false positives have been identified at this time. commands with overlap.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| attack.mitre.org/techniques/T1059/001/ | 6 |
| github.com/PowerShellEmpire/ | 2 |
| github.com/PowerShellMafia/PowerSploit | 4from 2 sources |
| github.com/S3cur3Th1sSh1t/PowerSharpPack | 2 |
From the source
- At source
- Open at source
- Upstream identifier
- 0f09cedd-10f1-4b9f-bdea-7a8b06ea575d
- Tagged by the source as
- Malicious PowerShellEndpointendpointSplunk CloudSplunk EnterpriseSplunk Enterprise Securitythreat
Licence
- Published under
- Apache License 2.0Read the licence
- Attribution
- Required
- Obtained under
- Apache-2.0Read the origin licence
Authorship
- Written by
- Published
- Oct 6, 2026
- Version
- 2