{"type":"attack-pattern","spec_version":"2.1","id":"attack-pattern--79a47ad0-fc3b-4821-9f01-a026b1ddba21","created":"2019-11-07T20:29:17.788Z","created_by_ref":"identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5","revoked":false,"external_references":[{"source_name":"mitre-attack","url":"https://attack.mitre.org/techniques/T1137/001","external_id":"T1137.001"},{"source_name":"MSDN VBA in Office","description":"Austin, J. (2017, June 6). Getting Started with VBA in Office. Retrieved July 3, 2017.","url":"https://msdn.microsoft.com/en-us/vba/office-shared-vba/articles/getting-started-with-vba-in-office"},{"source_name":"Hexacorn Office Template Macros","description":"Hexacorn. (2017, April 17). Beyond good ol’ Run key, Part 62. Retrieved July 3, 2017.","url":"http://www.hexacorn.com/blog/2017/04/19/beyond-good-ol-run-key-part-62/"},{"source_name":"Microsoft Change Normal Template","description":"Microsoft. (n.d.). Change the Normal template (Normal.dotm). Retrieved July 3, 2017.","url":"https://support.office.com/article/Change-the-Normal-template-Normal-dotm-06de294b-d216-47f6-ab77-ccb5166f98ea"},{"source_name":"enigma0x3 normal.dotm","description":"Nelson, M. (2014, January 23). Maintaining Access with normal.dotm. Retrieved July 3, 2017.","url":"https://enigma0x3.net/2014/01/23/maintaining-access-with-normal-dotm/comment-page-1/"},{"source_name":"CrowdStrike Outlook Forms","description":"Parisi, T., et al. (2017, July). Using Outlook Forms for Lateral Movement and Persistence. Retrieved February 5, 2019.","url":"https://malware.news/t/using-outlook-forms-for-lateral-movement-and-persistence/13746"},{"source_name":"GlobalDotName Jun 2019","description":"Shukrun, S. (2019, June 2). Office Templates and GlobalDotName - A Stealthy Office Persistence Technique. Retrieved August 26, 2019.","url":"https://www.221bluestreet.com/post/office-templates-and-globaldotname-a-stealthy-office-persistence-technique"},{"source_name":"Outlook Today Home Page","description":"Soutcast. (2018, September 14). Outlook Today Homepage Persistence. Retrieved February 5, 2019.","url":"https://medium.com/@bwtech789/outlook-today-homepage-persistence-33ea9b505943"}],"object_marking_refs":["marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168"],"modified":"2025-10-24T17:48:59.432Z","name":"Office Template Macros","description":"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. (Citation: Microsoft Change Normal Template)\n\nOffice Visual Basic for Applications (VBA) macros (Citation: MSDN VBA in Office) 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.(Citation: enigma0x3 normal.dotm)(Citation: Hexacorn Office Template Macros) Shared templates may also be stored and pulled from remote locations.(Citation: GlobalDotName Jun 2019) \n\nWord Normal.dotm location:
\nC:\\Users\\<username>\\AppData\\Roaming\\Microsoft\\Templates\\Normal.dotm\n\nExcel Personal.xlsb location:
\nC:\\Users\\<username>\\AppData\\Roaming\\Microsoft\\Excel\\XLSTART\\PERSONAL.XLSB\n\nAdversaries 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.(Citation: GlobalDotName Jun 2019) \n\nAn adversary may need to enable macros to execute unrestricted depending on the system or enterprise security policy on use of macros.","kill_chain_phases":[{"kill_chain_name":"mitre-attack","phase_name":"persistence"}],"x_mitre_attack_spec_version":"3.2.0","x_mitre_deprecated":false,"x_mitre_detection":"","x_mitre_domains":["enterprise-attack"],"x_mitre_is_subtechnique":true,"x_mitre_modified_by_ref":"identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5","x_mitre_platforms":["Windows","Office Suite"],"x_mitre_version":"1.2"}