Malicious Powershell Executed As A Service
The following analytic identifies the execution of malicious PowerShell commands or payloads via the Windows SC.exe utility. It detects this activity by analyzing Windows System logs (EventCode 7045) and filtering…
Description
The following analytic identifies the execution of malicious PowerShell commands or payloads via the Windows SC.exe utility. It detects this activity by analyzing Windows System logs (EventCode 7045) and filtering for specific PowerShell-related patterns in the ImagePath field. This behavior is significant because it indicates potential abuse of the Windows Service Control Manager to run unauthorized or harmful scripts, which could lead to system compromise. If confirmed malicious, this activity could allow attackers to execute arbitrary code, escalate privileges, or maintain persistence 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
- windows_event_log_system_7045
Known benign triggers
- Creating a hidden powershell service is rare and could key off of those instances.
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 |
|---|---|
| az4n6.blogspot.com/2017/ | Only this detection cites it |
| www.danielbohannon.com/blog-1/2017/3/12/powershell-execution-argument-obfuscation-how-it-can-make-detection-easier | Only this detection cites it |
| www.fireeye.com/content/dam/fireeye-www/blog/pdfs/dosfuscation-report.pdf | 2from 2 sources |
From the source
- At source
- Open at source
- Upstream identifier
- 8e204dfd-cae0-4ea8-a61d-e972a1ff2ff8
- Tagged by the source as
- Compromised Windows HostMalicious PowerShellRhysida RansomwareEndpointendpointSplunk CloudSplunk EnterpriseSplunk Enterprise Securityendpoint
Licence
- Published under
- Apache License 2.0Read the licence
- Attribution
- Required
- Obtained under
- Apache-2.0Read the origin licence
Authorship
- Written by
- Published
- Aug 26, 2026
- Version
- 1