← Back to SOC feed Coverage →

Potentially malicious svg file delivered to Inbox

kql MEDIUM Azure-Sentinel
T1566
EmailAttachmentInfoEmailEvents
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-05-10T11:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may use malicious SVG files to exploit vulnerabilities in applications that render SVG content, allowing for code execution or data exfiltration. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate potential command and control or persistence mechanisms early in the attack lifecycle.

KQL Query

let SuspiciousDisplayNames = pack_array("Help Desk", "Help Desk Team", "Help Desk IT", "Microsoft Security", "IT Support", "Helpdesk");
EmailAttachmentInfo
| where FileName contains ".svg" and FileType == "html" // SVG files which render as only an image will display FileType as Text, unless containing Javascript which displays FileType as Html
| join EmailEvents on NetworkMessageId
// | where SenderDisplayName has_any (SuspiciousDisplayNames) // Optionally remove comment to also evaluate and filter based on email display name
| where LatestDeliveryLocation == "Inbox/folder"

Analytic Rule Definition

id: ca777d68-fdd7-4f84-8c56-7c3af68f92d3
name: Potentially malicious svg file delivered to Inbox
description: |
  This query can be used as a Custom Detection Rule (CDR) to trigger when a potentially malicious .SVG file has been delivered into an Inbox.
description-detailed: |
  This query can be used as a Custom Detection Rule (CDR) to trigger when a potentially malicious .SVG file containing JavaScript has been delivered into an Inbox. Allows granular control of SVG files, compared to adding type to Common Attachment Filter. https://learn.microsoft.com/en-us/defender-xdr/custom-detection-rules
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - EmailEvents
  - EmailAttachmentInfo
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  let SuspiciousDisplayNames = pack_array("Help Desk", "Help Desk Team", "Help Desk IT", "Microsoft Security", "IT Support", "Helpdesk");
  EmailAttachmentInfo
  | where FileName contains ".svg" and FileType == "html" // SVG files which render as only an image will display FileType as Text, unless containing Javascript which displays FileType as Html
  | join EmailEvents on NetworkMessageId
  // | where SenderDisplayName has_any (SuspiciousDisplayNames) // Optionally remove comment to also evaluate and filter based on email display name
  | where LatestDeliveryLocation == "Inbox/folder"
version: 1.0.0

Required Data Sources

Sentinel TableNotes
EmailAttachmentInfoEnsure this data connector is enabled
EmailEventsEnsure 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/Email and Collaboration Queries/Custom Detections/Potentially malicious SVG file delivered into Inbox.yaml