T1137.001 Office Template Macros
Persistenceon attack.mitre.org
ATT&CK Enterprise 20.0 · 20.1 released, update in review
How MITRE detects it
DET0519 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.
| MITRE log source | In Microsoft Sentinel |
|---|---|
WinEventLog:SysmonEventCode=11 |
Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent. |
WinEventLog:SysmonEventCode=15 |
Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent. |
WinEventLog:SysmonEventCode=1 |
Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent. |
WinEventLog:SysmonEventCode=13, 14 |
Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent. |
WinEventLog:Microsoft-Office-AlertsOffice application warning or alert on macro execution from template | interpreted
Office writes its alerts to the 'OAlerts' event log. |
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.
| MITRE log source | In Microsoft Sentinel |
|---|---|
m365:unifiedSet-Mailbox, Set-MailboxPolicy, Set-TrustedLocation | interpreted
The Office 365 connector brings the Exchange, SharePoint and Teams workloads of the unified audit log; Entra sign-ins in it are in SigninLogs; CloudAppEvents carries Microsoft 365 app activity. |
Content Hub rules tagged with it (0)
No Content Hub rule is tagged with this technique.
In Sigma rules
Mitigations
MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.