T1027.017 Splunk · SPL

Detect SVG Smuggling in Splunk

Adversaries may smuggle data and files past content filters by hiding malicious payloads inside of seemingly benign SVG files. SVGs are vector-based image files constructed using XML and can legitimately include <script> tags, enabling adversaries to embed malicious JavaScript payloads. SVGs may appear less suspicious to users than other executable file types since they are often treated as image files. SVG smuggling can assemble or download malicious payloads, redirect users to malicious websites, or display interactive content such as fake login forms. SVG Smuggling may be used in conjunction with HTML Smuggling where an SVG with a malicious payload is included inside an HTML file.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1027 Obfuscated Files or Information
Sub-technique
T1027.017 SVG Smuggling
Canonical reference
https://attack.mitre.org/techniques/T1027/017/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational"
| eval BrowserParent=case(
    match(ParentImage, "(?i)(chrome\.exe|msedge\.exe|firefox\.exe|iexplore\.exe|opera\.exe|brave\.exe)"), 1,
    true(), 0)
| eval MailClientParent=case(
    match(ParentImage, "(?i)(outlook\.exe|thunderbird\.exe|winmail\.exe)"), 1,
    true(), 0)
| eval SuspiciousChild=case(
    match(Image, "(?i)(cmd\.exe|powershell\.exe|pwsh\.exe|wscript\.exe|cscript\.exe|mshta\.exe|rundll32\.exe|regsvr32\.exe|certutil\.exe|msiexec\.exe|bitsadmin\.exe|curl\.exe|wget\.exe)"), 1,
    true(), 0)
| eval SvgInCommandLine=case(
    match(CommandLine, "(?i)\.svg"), 1,
    match(ParentCommandLine, "(?i)\.svg"), 1,
    true(), 0)
| eval SvgFileEvent=case(
    EventCode=11 AND match(TargetFilename, "(?i)\.svg$"), 1,
    true(), 0)
| eval DropPathExecution=case(
    match(Image, "(?i)(cmd\.exe|powershell\.exe|wscript\.exe|mshta\.exe)") AND match(Image, "(?i)(downloads|temp|appdata)"), 1,
    true(), 0)
| where (EventCode=1 AND (BrowserParent=1 OR MailClientParent=1) AND SuspiciousChild=1)
    OR (EventCode=11 AND (BrowserParent=1 OR MailClientParent=1) AND SvgFileEvent=1)
    OR (EventCode=1 AND (BrowserParent=1 OR MailClientParent=1) AND SvgInCommandLine=1)
| eval DetectionType=case(
    EventCode=1 AND SuspiciousChild=1 AND SvgInCommandLine=1, "SVG_Spawned_Suspicious_Process_With_SVG_Context",
    EventCode=1 AND SuspiciousChild=1, "Browser_Or_Mail_Spawned_Suspicious_Process",
    EventCode=11 AND SvgFileEvent=1, "SVG_File_Written_By_Browser_Or_Mail",
    true(), "SVG_Smuggling_Indicator")
| eval RiskScore=BrowserParent + MailClientParent + SuspiciousChild + SvgInCommandLine + SvgFileEvent
| table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine, TargetFilename, DetectionType, RiskScore
| sort - _time
high severity medium confidence

Detects SVG smuggling activity using Sysmon Event ID 1 (Process Creation) and Event ID 11 (File Creation). Identifies three key patterns: browsers or mail clients spawning suspicious processes, SVG files written to disk by these applications, and SVG context in command lines. Assigns a composite risk score to help analysts prioritize alerts. Covers Chrome, Edge, Firefox, Outlook, and Thunderbird as common delivery vectors.

Data Sources

File: File CreationProcess: Process CreationSysmon Event ID 1Sysmon Event ID 11

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Legitimate SVG downloads from design or documentation tools where developers open SVG files normally
  • Web development workflows where SVG files are edited and executed locally via browser for testing
  • Corporate applications that use SVG icons or graphics and invoke browser rendering legitimately
  • Email clients that preview SVG images attached to legitimate business communications
Download portable Sigma rule (.yml)

Other platforms for T1027.017


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Create and Open Malicious SVG with Embedded JavaScript

    Expected signal: Sysmon Event ID 11: File Create — TargetFilename ending in Invoice-2024.svg written to Downloads directory by powershell.exe. Sysmon Event ID 1: Process Create — browser process (e.g., msedge.exe or chrome.exe) launched with the SVG file path as argument. Sysmon Event ID 3: Network Connection — may be generated if browser makes requests after opening file.

  2. Test 2SVG Smuggling with Blob URL Payload Download Simulation

    Expected signal: Sysmon Event ID 11: File Create — document-viewer.svg written to Downloads by powershell.exe. If opened in browser: Sysmon Event ID 11 — browser may write document.exe to Downloads directory. Sysmon Event ID 1 — browser process launch with SVG path. Network telemetry: Blob URL creation stays local (no external network), but browser history records the file:// URI.

  3. Test 3SVG File Delivered via Email Simulation with Zone Identifier Check

    Expected signal: Sysmon Event ID 11: File Create — Invoice_March2024.svg created in Outlook INetCache directory by powershell.exe. Sysmon Event ID 15 (FileCreateStreamHash): ADS Zone.Identifier written to the SVG file, indicating internet-sourced content (Zone=3). This ADS event is a strong indicator of an externally-sourced file.

  4. Test 4SVG Embedded in HTML File (HTML Smuggling Combination)

    Expected signal: Sysmon Event ID 11: File Create — invoice-document.html written to Downloads by powershell.exe. Select-String output confirms presence of <svg>, <script>, atob, and blob indicators in the file. If opened in browser: potential Sysmon Event ID 11 for invoice.exe creation in Downloads.

Unlock Pro Content

Get the full detection package for T1027.017 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections