← Back to SOC feed Coverage →

Excel Macro Execution

kql MEDIUM Azure-Sentinel
DeviceProcessEvents
huntingmicrosoftofficial
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-04-25T09:00:00Z · Confidence: medium

Hunt Hypothesis

Bazacall adversaries leverage malicious Excel macro files to execute payloads and establish initial access. SOC teams should proactively hunt for unusual macro execution activity in Azure Sentinel to detect and mitigate potential compromise early.

KQL Query

DeviceProcessEvents
| where InitiatingProcessFileName =~ "excel.exe"
    and ProcessCommandLine has_all('mkdir', '&& copy', 'certutil.exe')

Analytic Rule Definition

id: fa2c1c3a-18f8-4c83-8501-ea110873f99f
name: Excel Macro Execution
description: |
  Bazacall uses malicious macro-enabled Excel documents to execute their payload.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
tactics:
- Execution
query: |
  DeviceProcessEvents
  | where InitiatingProcessFileName =~ "excel.exe"
      and ProcessCommandLine has_all('mkdir', '&& copy', 'certutil.exe')

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/Bazacall/Excel Macro Execution.yaml