Detection rules › Splunk

Windows Renamed Powershell Execution

Author
Teoderick Contreras, Nasreddine Bencherchali, Splunk
Source
upstream

The following analytic identifies instances where the PowerShell executable has been renamed and executed under an alternate filename. This behavior is commonly associated with attempts to evade security controls or bypass logging mechanisms that monitor standard PowerShell usage. While rare in legitimate environments, renamed PowerShell binaries are frequently observed in malicious campaigns leveraging Living-off-the-Land Binaries (LOLBins) and fileless malware techniques. This detection flags executions of PowerShell where the process name does not match the default powershell.exe or pwsh.exe, especially when invoked from unusual paths or accompanied by suspicious command-line arguments.

MITRE ATT&CK coverage

TacticTechniques
Defense EvasionT1036.003 Masquerading: Rename Legitimate Utilities

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation

Stages and Predicates

Stage 1: tstats

tstats WHERE ((Processes.original_file_name="PowerShell.EXE" Processes.process_name!="powershell.exe") OR (Processes.original_file_name="powershell_ise.EXE" Processes.process_name!="powershell_ise.exe") OR (Processes.original_file_name="pwsh.dll" Processes.process_name!="pwsh.exe")) BY Processes.action, Processes.dest, Processes.original_file_name, Processes.parent_process, Processes.parent_process_exec, Processes.parent_process_guid, Processes.parent_process_id, Processes.parent_process_name, Processes.parent_process_path, Processes.process, Processes.process_exec, Processes.process_guid, Processes.process_hash, Processes.process_id, Processes.process_integrity_level, Processes.process_name, Processes.process_path, Processes.user, Processes.user_id, Processes.vendor_product

Stage 2: search

search

Stage 3: search

search

Stage 4: search

search

Stage 5: search

search `macro`

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
Processes.original_file_nameeq
  • PowerShell.EXE corpus 64 (sigma 60, splunk 4)
  • powershell_ise.EXE corpus 8 (sigma 4, splunk 4)
  • pwsh.dll corpus 72 (sigma 68, splunk 4)
Processes.process_namene
  • powershell.exe
  • powershell_ise.exe
  • pwsh.exe