T1220

XSL Script Processing

Adversaries may bypass application control and obscure execution of code by embedding scripts inside XSL files. Extensible Stylesheet Language (XSL) files support embedded scripting in JavaScript, VBScript, and other languages. Two primary abuse vectors exist: (1) msxsl.exe, Microsoft's command-line XSLT transformation utility, which can execute arbitrary JavaScript or VBScript embedded in local or remote XSL files; and (2) wmic.exe with the /FORMAT switch ('Squiblytwo'), which invokes JScript or VBScript within XSL via WMI. Both techniques leverage trusted Windows tooling to proxy malicious code execution while evading application control solutions such as AppLocker. Since msxsl.exe is not installed by default, adversaries typically drop it alongside their payloads. Real-world usage includes Astaroth, Cobalt Group, and Higaisa.

Microsoft Sentinel / Defender
kusto
let MsxslExecutions = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "msxsl.exe"
| extend RemoteXsl = ProcessCommandLine has_any ("http://", "https://", "ftp://", "\\\\")
| extend SameFileArg = extract(@"(\S+\.\w+)\s+\1", 0, ProcessCommandLine) != ""
| extend ArbitraryExt = ProcessCommandLine matches regex @"\.(jpeg|jpg|png|gif|txt|dat|bin|log)\s"
| extend Indicator = case(
    RemoteXsl, "remote-xsl-load",
    SameFileArg, "same-file-twice",
    ArbitraryExt, "arbitrary-extension",
    "local-xsl-exec")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
         InitiatingProcessFileName, InitiatingProcessCommandLine,
         RemoteXsl, SameFileArg, ArbitraryExt, Indicator;
let WmicSquiblytwo = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "wmic.exe"
| where ProcessCommandLine has "/FORMAT"
| where ProcessCommandLine has_any (".xsl", ".xslt", "http://", "https://")
| extend RemoteFormat = ProcessCommandLine has_any ("http://", "https://")
| extend LocalXslFormat = ProcessCommandLine matches regex @"/FORMAT[:\s]+\S*\.xsl"
| extend WmiAlias = extract(@"wmic\s+(\w+)\s+", 1, tolower(ProcessCommandLine))
| extend Indicator = iff(RemoteFormat, "squiblytwo-remote", "squiblytwo-local")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
         InitiatingProcessFileName, InitiatingProcessCommandLine,
         RemoteFormat, LocalXslFormat, WmiAlias, Indicator;
union MsxslExecutions, WmicSquiblytwo
| sort by Timestamp desc
high severity high confidence

Data Sources

Process: Process Creation Command: Command Execution Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents

False Positives

  • Legitimate XSLT transformations performed by developers or build pipelines using msxsl.exe — rare since the tool is not installed by default
  • WMIC reporting scripts that use /FORMAT with built-in XSL stylesheets from %SystemRoot%\System32\wbem\en-US\ (e.g., wmic process list /FORMAT:list.xsl)
  • XML/XSLT tooling in CI/CD pipelines or data processing workflows that invoke msxsl.exe for document transformation
  • System administration scripts that legitimately use wmic /FORMAT for structured output — verify the XSL path resolves to a known-good system location

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections