T1221: Template Injection
Tactics: Stealth. Platforms: Windows.
Adversaries may create or modify references in user document templates to conceal malicious code or force authentication attempts.
MITRE's description
Adversaries may create or modify references in user document templates to conceal malicious code or force authentication attempts. For example, Microsoft’s Office Open XML (OOXML) specification defines an XML-based format for Office documents (.docx, xlsx, .pptx) to replace older binary formats (.doc, .xls, .ppt). OOXML files are packed together ZIP archives compromised of various XML files, referred to as parts, containing properties that collectively define how a document is rendered.
Telemetry that detects it
- Network Connection Creation
- Process Creation
Mitigations
- Network Intrusion Prevention
- Network/Host intrusion prevention systems, antivirus, and detonation chambers can be employed to prevent documents from fetching and/or executing malicious payloads.
- User Training
- Train users to identify social engineering techniques and spearphishing emails that could be used to deliver malicious documents.
- Antivirus/Antimalware
- Network/Host intrusion prevention systems, antivirus, and detonation chambers can be employed to prevent documents from fetching and/or executing malicious payloads.
- Disable or Remove Feature or Program
- Consider disabling Microsoft Office macros/active content to prevent the execution of malicious payloads in documents , though this setting may not mitigate the Forced…
Groups documented using it
Procedure examples
- APT28 used weaponized Microsoft Word documents abusing the remote template function to retrieve a malicious macro.
- Chaes changed the template target of the settings.xml file embedded in the Word document and populated that field with the downloaded URL of the next payload.
- Confucius has used a weaponized Microsoft Word document with an embedded RTF exploit.
- DarkHydrus used an open-source tool, Phishery, to inject malicious remote template URLs into Microsoft Word documents and then sent them to victims to enable Forced Authentication.
12 documented uses in all. These are a sample.
MITRE ATT&CK Enterprise 19.2. © 2026 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation.