Techniques › T1137 › T1137.001
T1137.001 Office Template Macros
persistence — Office Suite, Windows · attack.mitre.org · JSON
1
MITRE detection strategy
2
analytics
0
Sigma rules tagged attack.t1137.001
0
KEV CVEs mapped here
<p>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.</p><p>Office Visual Basic for Applications (VBA) macros 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. Shared templates may also be stored and pulled from remote locations.</p><p>Word Normal.dotm location:<br> <code>C:\Users\<username>\AppData\Roaming\Microsoft\Templates\Normal.dotm</code></p><p>Excel Personal.xlsb location:<br> <code>C:\Users\<username>\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLSB</code></p><p>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 <code>C:\Program Files (x86)\Microsoft Office\root\Office16\</code>, 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.</p><p>An adversary may need to enable macros to execute unrestricted depending on the system or enterprise security policy on use of macros.</p>
KEV CVEs mapped to this technique · CTID Mappings Explorer
None. No KEV entry in the public mapping names this technique. Given that 74.7% of KEV has no mapping at all, this says more about the mapping than about the technique.
Detection strategy · ATT&CK Enterprise v19.2
- DET0519 Detect Persistence via Office Template Macro Injection or Registry Hijack v1.0
AN1436 WindowsAdversaries 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.WinEventLog:Microsoft-Office-Alerts
Office application warning or alert on macro execution from template→ DC0064 Command ExecutionTunable:TemplatePathRegistryPathTimeWindowUserContextAN1437 Office SuiteMalicious 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.Tunable:TemplateSourceMacroSecurityLevel
Sigma rules · SigmaHQ da9bb07d64, tag attack.t1137.001
No Sigma rule carries this tag. MITRE publishes a detection strategy above, so the behaviour is specified; what is missing is public detection content.
Rules tagged at the parent level (attack.t1137) 9
These target the parent technique, not this sub-technique specifically. Listed for completeness, not counted as coverage.
Author: Max Altgelt (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
· 2022-06-02 (modified 2023-06-22) · logsource: product=windows category=file_event · 0e20c89d-2264-44ae-8238-aeeaba609ece
Detects creation of Microsoft Office files inside of one of the default startup folders in order to achieve persistence.
Author: Nasreddine Bencherchali (Nextron Systems)
· 2023-02-08 · logsource: product=windows category=file_event · 117d3d3a-755c-4a61-b23e-9171146d094c
Detects the creation of a macro file for Outlook.
Author: Nasreddine Bencherchali (Nextron Systems)
· 2021-04-05 (modified 2023-08-17) · logsource: product=windows category=registry_set · 396ae3eb-4174-4b9b-880e-dc0364d78a19
Detects the modification of Outlook setting "LoadMacroProviderOnBoot" which if enabled allows the automatic loading of any configured VBA project/module
Author: frack113
· 2022-01-22 (modified 2023-08-17) · logsource: product=windows category=registry_set · 45e112d0-7759-4c2a-aa36-9f8fb79d3393
Hides the file extension through modification of the registry
Author: frack113
· 2022-01-22 (modified 2023-08-17) · logsource: product=windows category=registry_set · 5df86130-4e95-4a54-90f7-26541b40aec2
Hides the file extension through modification of the registry
Author: @ScoubiMtl
· 2021-04-05 (modified 2023-02-08) · logsource: product=windows category=file_event · 8c31f563-f9a7-450c-bfa8-35f8f32f1f61
Detects the creation of a macro file for Outlook.
Author: frack113
· 2021-12-28 (modified 2026-01-09) · logsource: product=windows category=registry_set · c3cefdf4-6703-4e1c-bad8-bf422fc5015a
Detects changes to the registry values related to outlook security settings
Author: @ScoubiMtl
· 2021-04-05 (modified 2023-08-17) · logsource: product=windows category=registry_set · e3b50fa5-3c3f-444e-937b-0a99d33731cd
Detects the modification of Outlook security setting to allow unprompted execution of macros.
Author: Nasreddine Bencherchali (Nextron Systems)
· 2023-04-05 (modified 2023-08-17) · logsource: product=windows category=registry_set · fc06e655-d98c-412f-ac76-05c2698b1cb2
Detects changes to the registry values related to outlook that indicates that a reminder was triggered for a Note or Task item. This could be a sign of exploitation of CVE-2023-23397. Further investigation is required to determine the success of an exploitation.