MITRE ATT&CK / Techniques / T1137.001

Office Application Startup: Office Template Macros

ID
T1137.001
Tactics
TA0003 Persistence
Sub-technique of
T1137 Office Application Startup
Platforms
Office Suite, Windows
Data sources
File Creation, File Metadata, Process Creation, Windows Registry Key Modification, Command Execution
Source
attack.mitre.org
MITRE 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. [3]

Office Visual Basic for Applications (VBA) macros [4] can be inserted into the base template and used to execute code when the respective Office application starts in order to obtain persistence. Examples for both Word and Excel have been discovered and published. By default, Word has a Normal.dotm template created that can be modified to include a malicious macro. Excel does not have a template file created by default, but one can be added that will automatically be loaded.[5][6] Shared templates may also be stored and pulled from remote locations.[7]

Word Normal.dotm location:<br>
C:\Users\&lt;username&gt;\AppData\Roaming\Microsoft\Templates\Normal.dotm

Excel Personal.xlsb location:<br>
C:\Users\&lt;username&gt;\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLSB

Adversaries may also change the location of the base template to point to their own by hijacking the application's search order, e.g. Word 2016 will first look for Normal.dotm under C:\Program Files (x86)\Microsoft Office\root\Office16\, or by modifying the GlobalDotName registry key. By modifying the GlobalDotName registry key an adversary can specify an arbitrary location, file name, and file extension to use for the template that will be loaded on application startup. To abuse GlobalDotName, adversaries may first need to register the template as a trusted document or place it in a trusted location.[7]

An adversary may need to enable macros to execute unrestricted depending on the system or enterprise security policy on use of macros.

Detection

Mitigations (2)

M1040 Behavior Prevention on Endpoint

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. [1]

M1042 Disable or Remove Feature or Program

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. [2]

Groups (1)

Software (3)

References

  1. win10_asr
  2. MRWLabs Office Persistence Add-ins
  3. Microsoft Change Normal Template
  4. MSDN VBA in Office
  5. enigma0x3 normal.dotm
  6. Hexacorn Office Template Macros
  7. GlobalDotName Jun 2019