Has used a Word Template, Normal.dotm, for persistence.1
Office Template Macros T1137.001
- Tactic
- Persistence
- Platforms
- Office Suite, Windows
- Version
- 1.2
- Created
- 07 November 2019
- Last modified
- 12 May 2026
Adversaries may abuse Microsoft Office templates to obtain persistence on a compromised system. Microsoft Office contains templates that are part of common Office applications and are used to customize styles. The base templates within the application are used each time an application starts. [1]
Office Template Macros MITRE reference T1137.001
1 group has been recorded using this technique. Newest first; each entry carries MITRE’s procedure text and a link to the group’s full record. Click a name to filter the rules below.
All 1 groups for this technique
1 campaign has been recorded using this technique. Listed newest first; dates are year-granularity and attribution is MITRE’s.
During Operation AkaiRyū, MirrorFace loaded malicious Word templates containing VBA code leading to installation of UPPERCUT.1
All 1 campaigns for this technique
3 software entries are documented implementing this technique. MITRE files each as a tool or as malware; newest first, then by how many groups carry them.
Has been loaded as a Word Template file when victims opened a decoy document placed in %APPDATA%\Microsoft\Templates alongside a ROAMINGHOUSE macro.1
Has the ability to use hidden columns in Excel spreadsheets to store executable files or commands for VBA macros.1
Has the ability to use an Excel Workbook to execute additional code by enabling Office to trust macros and execute code without user permission.1
All 3 software entries for this technique
Offense vs defense T1137.001
Is defensive coverage keeping up with adversary use? Eight counts, each ranked against all 697 ATT&CK techniques. Attack sits left, defense right, so a shape leaning left means adversaries are better documented here than defenders are equipped. Hover any spoke for its percentile and the share of techniques that have more. The timeline below shows when each side arrived.
Office Template Macros detection strategy DET0519
MITRE names one behaviour worth catching for this technique and breaks it into 2 analytics, one per platform. Each carries the log sources it needs and the fields you tune per environment.
Detect Persistence via Office Template Macro Injection or Registry Hijack
AN1436 · Windows
Adversaries inject VBA macros into Office templates such as Normal.dotm or Personal.xlsb or redirect Office template load path via registry key (GlobalDotName) to gain persistence. Template macros trigger execution of malicious code on application startup.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Process CreationDC0032 | WinEventLog:Sysmon | EventCode=1 |
| File CreationDC0039 | WinEventLog:Sysmon | EventCode=11 |
| File MetadataDC0059 | WinEventLog:Sysmon | EventCode=15 |
| Windows Registry Key ModificationDC0063 | WinEventLog:Sysmon | EventCode=13, 14 |
| Command ExecutionDC0064 | WinEventLog:Microsoft-Office-Alerts | Office application warning or alert on macro execution from template |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| TemplatePath | Path to Normal.dotm, Personal.xlsb, or Excel/Word startup templates may vary by Office version and user |
| RegistryPath | GlobalDotName or equivalent registry keys may differ across Office versions or deployments |
| TimeWindow | Office process creation and macro execution timing after system or user login |
| UserContext | May be scoped to high-value users or those with access to sensitive templates |
AN1437 · Office Suite
Malicious VBA macros embedded in base templates like Normal.dotm or Personal.xlsb are automatically loaded and executed at startup. Template path may be hijacked to load a remote or attacker-controlled template via GlobalDotName registry setting.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Command ExecutionDC0064 | m365:unified | Set-Mailbox, Set-MailboxPolicy, Set-TrustedLocation |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| TemplateSource | Macros may be embedded in local user templates or retrieved from shared network paths |
| MacroSecurityLevel | Macro execution policy (disabled, warn, enabled) varies by tenant or user configuration |
On Windows 10, enable Attack Surface Reduction (ASR) rules to prevent Office applications from creating child processes and from writing potentially malicious executable content to disk.
Follow Office macro security best practices suitable for your environment. Disable Office VBA macros from executing. Disable Office add-ins. If they are required, follow best practices for securing them by requiring them to be signed and disabling user notification for allowing add-ins. For some add-ins types (WLL, VBA) additional mitigation is likely required as disabling add-ins in the Office Trust Center does not disable WLL nor does it prevent VBA code from executing.
Tests from Atomic Red Team (MIT licence) · technique definition