Join our Newsletter — 33% off our NHI Course
Home› Guides› MITRE ATT&CK T1137 Office Application Startup: Detecting and…
Guide Endpoint Security

MITRE ATT&CK T1137 Office Application Startup: Detecting and Removing Persistence

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 11 November 2026 12 min read
On this page

Office and Outlook load templates, registry hooks, rules, forms and folder views every time they start, and each of those can be turned into a persistence point that survives reboots, password resets and even a new laptop. MITRE ATT&CK records this as T1137 Office Application Startup in the Persistence tactic (ATT&CK v20, platforms Windows and Office Suite), with six sub-techniques. Add-ins (T1137.006) already have their own page, the Malicious Office Add-ins Guide, so this guide concentrates on the other five: template macros, the Office Test registry key, Outlook forms, Outlook Home Page and Outlook rules. It covers how each one persists, where it lives, the v20 detection analytics, the settings that close it and how to remove it cleanly. It is for endpoint engineers, Microsoft 365 administrators and incident responders, and contains no attack procedures.

Key takeaways

  • Mailbox persistence follows the user, not the device. Microsoft notes that reinstalling Outlook or replacing the computer does not remove malicious rules or forms, because they sync back from the mailbox.
  • Macro blocking does not cover the Outlook methods. ATT&CK states the Visual Basic engine behind Outlook rules, forms and Home Page is separate from the macro engine, so patches and client settings are the control.
  • Office Test is a registry-only DLL hook. The key is not created by default, so any value under Office test\Special\Perf deserves investigation.
  • Two child-process ASR rules cover most of the payoff. Blocking Office and Outlook from creating child processes stops the most common follow-on step for every sub-technique.
  • Clean-up is a mailbox and endpoint job together. Remove the artefact, reset credentials, revoke sessions and confirm on every device the user signs in from.

The six sub-techniques at a glance

Sub-techniqueWhere it livesTriggerPrimary control
T1137.001 Office Template MacrosBase templates such as Normal.dotm and PERSONAL.XLSB in the user profile, or a template path redirected through the GlobalDotName registry valueWord or Excel startsMacro policy, trusted locations, template integrity monitoring
T1137.002 Office TestHKCU or HKLM\Software\Microsoft\Office test\Special\Perf pointing at a DLLAny Office application startsPre-create the key with restrictive permissions; registry monitoring
T1137.003 Outlook FormsCustom form stored in the mailbox (message class IPM.Note.<name>)A crafted email using the same form arrivesOutlook security updates; form inventory
T1137.004 Outlook Home PageFolder property pointing to an internal or external URLThe configured folder is openedOutlook security updates that remove the legacy feature
T1137.005 Outlook RulesMailbox rule with a "start application" actionA crafted email matching the rule arrivesOutlook security updates; EnableUnsafeClientMailRules absent or 0
T1137.006 Add-insOffice and VSTO add-ins, WLL and XLL filesApplication startSee the Malicious Office Add-ins Guide

ATT&CK v20 links Gamaredon Group and APT32 to the parent technique, MuddyWater to template macros, APT28 to Office Test and OilRig to Outlook Home Page. See the Gamaredon Group Threat Actor Profile Guide. The Outlook methods usually start with stolen credentials: the adversary signs in to the mailbox, plants the rule, form or Home Page, and then needs only to send an email to regain execution.

Template macros and the Office Test key

Template macros (T1137.001)

ATT&CK describes VBA macros inserted into the base template that loads each time Word or Excel starts. Word creates Normal.dotm in %APPDATA%\Microsoft\Templates by default; Excel has no default template, but a PERSONAL.XLSB placed in the XLSTART folder loads automatically. Adversaries may also redirect the template through the GlobalDotName registry value or search order hijacking, and may need the template to sit in a trusted location before its macros run without a prompt.

  • Macro policy: Microsoft's "VBA Macro Notification Settings" policy (named "Macro Notification Settings" for Excel) with "Disable all except digitally signed macros" and "Require macros to be signed by a trusted publisher" is the Microsoft 365 Apps security baseline recommendation where macros cannot be disabled outright. A template written locally on the device does not normally carry Mark of the Web, so internet macro blocking alone is not enough for this sub-technique.
  • Trusted locations: Microsoft advises against network trusted locations and warns that anyone who can write to a trusted location can add macros. Keep trusted locations few, local and writable only by administrators. See the Office Macro Blocking Guide.
  • Trusted publishers: deploy signing certificates centrally and stop users adding publishers themselves; Microsoft notes trusted publishers apply across Windows.

Office Test (T1137.002)

The Office Test key lets a DLL load whenever an Office application starts. ATT&CK notes the key is not created during installation and maps M1054 Software Configuration: create the key yourself and set its permissions to Read Control so it cannot be changed without administrator rights. Because the DLL loads without any macro prompt, DET0315 flags this as a route that sidesteps macro defences.

Outlook rules, forms and Home Page

All three Outlook methods store their payload in the mailbox and execute through Outlook's own scripting, which is why ATT&CK says blocking macros may be ineffective. Microsoft states that current Outlook clients block both the rules and forms mechanisms by default.

MethodFix shipped by Microsoft (per ATT&CK M1051 and Microsoft Learn)What to verify
Outlook rules (T1137.005)Patched builds disable the "Start Application" rule action (Outlook 2016 16.0.4534.1001 and Outlook 2013 15.0.4937.1000 or later)EnableUnsafeClientMailRules under HKCU\Software\Microsoft\Office\16.0\Outlook\Security: value 1 overrides the patch; absent or 0 is protected
Outlook forms (T1137.003)KB4011091 disables custom forms by default; KB3191938 blocks Outlook Visual Basic and shows a malicious code warningUpdates present on every Outlook build in use; no local policy re-enabling custom form scripts
Outlook Home Page (T1137.004)KB4011162 removes the legacy Home Page featureUpdates present; no folders with a Home Page URL in mailbox folder properties

Attackers who can run code on the client can set EnableUnsafeClientMailRules back to 1, so Microsoft recommends using Group Policy to monitor and enforce the value. For on-premises Exchange, Microsoft suggests blocking unpatched Outlook versions with Outlook client blocking. Rules that forward or hide mail rather than execute code are a different technique; see the MITRE ATT&CK T1564.008 Hide Artifacts and the T1114 Email Collection Defensive Guide.

Prevention controls, setting by setting

ControlSetting or identifierSub-techniques covered
ASR: Block all Office applications from creating child processesGUID d4f940ab-401b-4efc-aadc-ad5f3c50688a.001, .002, .006 follow-on execution
ASR: Block Office communication application from creating child processesGUID 26190899-1602-49e8-8b27-eb1d0a1ce869 (Outlook).003, .004, .005
ASR: Block Win32 API calls from Office macrosGUID 92e97fa1-2edf-4476-bdd6-9dd0b4dddc7b.001
ASR: Block Office applications from injecting code into other processesGUID 75668c1f-73b5-4cf0-bb93-3ecf5cb7cc84 (no Warn mode).001, .002
Macro notification policy"Disable all except digitally signed macros" with trusted publisher requirement.001
Office Test key lockdown (M1054)Pre-created key with Read Control permissions.002
Outlook updates (M1051)KB3191938, KB4011091, KB4011162 or later builds.003, .004, .005
Registry enforcementEnableUnsafeClientMailRules absent or 0 via Group Policy.005

Microsoft notes that the child-process ASR rules are enforced only when Office is installed in %ProgramFiles% or %ProgramFiles(x86)%, so check installation paths before relying on them.

Choosing controls by organisation size

  • Small organisations on Microsoft 365: keep Outlook on a supported update channel, turn on the two child-process ASR rules in audit mode and then block, and review inbox rules monthly with the read-only investigation script Microsoft provides.
  • Large or regulated estates: add Office Test key lockdown, template integrity monitoring for Normal.dotm and XLSTART, Group Policy enforcement of the Outlook security values, and SIEM detections on both endpoint and mailbox audit data.
  • Estates with legacy macros: sign the business-critical macros, deploy the certificate as a trusted publisher and move to "Disable all except digitally signed macros" rather than leaving notification prompts that users click through.

Detection

Sub-techniqueATT&CK v20 detection strategyTelemetry named in the analytics
Parent techniqueDET0398 Detect Office Startup-Based Persistence via Macros, Forms, and Registry HooksSysmon 1, 11, 13 and 14; Outlook application events; Microsoft 365 unified audit (Set-Mailbox, Set-InboxRule, Set-MailboxFolderPermission)
.001 Template macrosDET0519Sysmon 11 and 15 on template paths, 13 and 14 on GlobalDotName; Office alert log
.002 Office TestDET0315Sysmon 13 and 14 on Office test\Special\Perf; Sysmon 7 image load of a non-standard DLL into Office
.003 Outlook formsDET0029Child processes of outlook.exe; non-default form loads; inbound message trace
.004 Outlook Home PageDET0177Child processes after folder access; folder configuration changes in audit data
.005 Outlook rulesDET0095Inbox rule creation outside normal behaviour; outlook.exe spawning script hosts

High-value detection logic

  • Outlook or Word spawning interpreters: outlook.exe, winword.exe or excel.exe as parent of powershell.exe, mshta.exe, wscript.exe or rundll32.exe. ASR audit telemetry gives the same signal through advanced hunting action types such as AsrOfficeCommAppChildProcessAudited and AsrOfficeChildProcessAudited.
  • Any write to the Office Test key: the key does not exist by default, so any creation is high fidelity.
  • Template modification outside Office: Normal.dotm or files in XLSTART written by a process other than the Office application, or a change to GlobalDotName.
  • Rule changes after a risky sign-in: Microsoft Purview mailbox auditing records rule additions, removals and changes as UpdateInboxRules for owner, delegate and admin sign-ins by default. Correlate with sign-ins from new locations. See the Microsoft 365 Unified Audit Log Guide for Detection.
  • Audit still on: confirm Get-OrganizationConfig shows AuditDisabled as False; adversaries and well-meaning admins can both turn it off.

Metrics

  • Percentage of Windows endpoints with both child-process ASR rules in block mode.
  • Number of Outlook builds in use below the patched versions, target zero.
  • Endpoints where EnableUnsafeClientMailRules is 1, target zero.
  • Number of custom forms and rules with application actions found per tenant sweep, and time to remove them.
  • Percentage of endpoints where the Office Test key is pre-created and locked.

Rolling out the controls

  1. Baseline: run Microsoft's read-only Get-AllTenantRulesAndForms.ps1 (after updating its connection method, as Microsoft notes) to list rules with ActionType ID_ACTION_CUSTOM and every custom form. Inventory Outlook builds and the registry values above.
  2. Audit mode: deploy the four Office ASR rules in audit for two to four weeks and review audited events by application and user.
  3. Exclude narrowly: add per-rule exclusions for named, signed binaries only; avoid folder-wide exclusions.
  4. Block in rings: move IT first, then general staff, then specialist groups that rely on automation, checking help desk volume at each ring.
  5. Lock registry values: enforce the Office Test key permissions and the Outlook security value through Group Policy or Intune, with monitoring for drift.
  6. Roll back: each ASR rule can be returned to audit individually; keep the change record so a single rule can be relaxed without disabling the rest.

Removal and response

  1. Scope the mailbox: list rules with Get-InboxRule, inspect suspects with Format-List, and disable with Disable-InboxRule while you investigate; remove with Remove-InboxRule. Inspect custom forms in the Inbox and Personal Forms Library.
  2. Clean every device: Microsoft advises identifying every device where the user ran Outlook and keeping the user signed out until each is clean, and reimaging where malware is possible.
  3. Clean the endpoint artefacts: restore a known-good Normal.dotm, remove unexpected XLSTART files, delete the Office Test value and quarantine the DLL it pointed to.
  4. Reset the identity: reset the password, revoke sessions, review MFA methods and remove offline mailbox copies, as Microsoft recommends. See the Microsoft 365 Tenant Compromise Playbook.
  5. Hunt wider: search all mailboxes for the same rule name, trigger subject or form class and all endpoints for the same DLL hash.

Where identity fits

The Outlook sub-techniques are identity persistence as much as endpoint persistence: they need only a mailbox sign-in to plant and survive device rebuilds. Shared and service mailboxes that nobody reads are attractive targets, because rule changes go unnoticed. Give every shared mailbox an owner, block interactive sign-in where it is not needed, and include rule and form review in access reviews.

Framework mapping

FrameworkReferenceRelevance
MITRE ATT&CK v20M1040 Behavior Prevention on Endpoint; M1042 Disable or Remove Feature or Program; M1051 Update Software; M1054 Software ConfigurationMapped mitigations for T1137
NIST SP 800-53 Rev. 5CM-6 Configuration Settings; CM-7 Least FunctionalityMacro, ASR and registry settings
NIST SP 800-53 Rev. 5SI-2 Flaw Remediation; SI-3 Malicious Code Protection; SI-4 System MonitoringOutlook updates, endpoint protection, detection
NIST CSF 2.0PR.PS-01; PR.PS-02; DE.CM-09Configuration management, software maintenance, endpoint monitoring

Common failure patterns

  • Rebuilding the laptop and stopping there: rules and forms return from the mailbox on the next sign-in.
  • Assuming macro blocking covers Outlook: the Outlook methods use a separate engine and need their own updates and settings.
  • ASR rules left in audit: the pilot never moves to block, so detections fire but nothing is stopped.
  • Office installed outside Program Files: the child-process ASR rules are not enforced for those installations.
  • Writable trusted locations: a network share marked trusted lets any writer add template macros that run without a prompt.

Practitioner checklist

  • Inventory Outlook builds and bring every client to a version that blocks the rules, forms and Home Page methods.
  • Enforce EnableUnsafeClientMailRules absent or 0 and alert on change.
  • Pre-create the Office Test key with Read Control permissions and monitor it.
  • Deploy the Office and Outlook child-process ASR rules, then block after audit.
  • Set macro policy to signed-only or disabled and keep trusted locations local and admin-writable.
  • Monitor Normal.dotm, XLSTART and GlobalDotName for changes.
  • Sweep the tenant for custom forms and rules with application actions on a schedule.
  • Include mailbox artefact removal and every-device clean-up in the account compromise runbook.

Standards and references

Related NHI Mgmt Group resources: Malicious Office Add-ins Guide · Office Macro Blocking Guide · Persistence Techniques Guide · MITRE ATT&CK T1564.008 Hide Artifacts · Microsoft 365 Tenant Compromise Playbook

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 11 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org