← Back to SOC feed Coverage →

evasive-powershell-strings

kql MEDIUM Azure-Sentinel
DeviceProcessEvents
backdoorhuntingmicrosoftofficialpowershell
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-05T03:15:55Z · Confidence: medium

Hunt Hypothesis

Adversaries may use evasive PowerShell techniques with specific string patterns to exfiltrate data or execute additional processes without triggering standard detection mechanisms. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential data exfiltration or lateral movement attempts that evade traditional detection methods.

KQL Query

DeviceProcessEvents
| where FileName == "powershell.exe"
| where ProcessCommandLine has_all("-ep bypass","-command","get-content","remove-item","iex")

Analytic Rule Definition

id: d08b4ce0-3c97-4637-9577-0856f6cdd222
name: evasive-powershell-strings
description: |
  This query searches for a string pattern detected in evasive PowerShell usage. Jupyter or SolarMarker will iterate on this pattern multiple times to read data and call additional processes. This query is not fully specific to Jupyter or SolarMarker, and will also return other malicious malware, but is unlikely to return false positives.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
tactics:
- Execution
- Defense evasion
query: |
  DeviceProcessEvents
  | where FileName == "powershell.exe"
  | where ProcessCommandLine has_all("-ep bypass","-command","get-content","remove-item","iex")

Required Data Sources

Sentinel TableNotes
DeviceProcessEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Campaigns/Jupyter-Solarmaker/evasive-powershell-strings.yaml