T1137.003
Outlook Forms
Adversaries abuse Microsoft Outlook custom forms to achieve persistence. Custom forms are stored in the user's mailbox and are loaded when Outlook starts. A malicious form containing VBScript or JScript executes when an adversary sends a specially crafted email to the victim. The Ruler tool automates this technique. Forms are stored in the mailbox itself, making them invisible to standard endpoint file monitoring and surviving OS reinstalls.
Microsoft Sentinel / Defender
kusto
// T1137.003 — Outlook Forms persistence detection
// Forms are stored in the mailbox, but execution leaves process traces
// Part 1: Detect Outlook spawning unexpected child processes (form execution)
let OutlookChildren = DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName =~ "outlook.exe"
| where FileName in~ ("cmd.exe", "powershell.exe", "wscript.exe", "cscript.exe",
"mshta.exe", "rundll32.exe", "regsvr32.exe", "certutil.exe",
"msiexec.exe", "wmic.exe", "explorer.exe")
| extend DetectionType = "Outlook Child Process"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionType;
// Part 2: Detect Ruler tool usage (automates Outlook forms attack)
let RulerActivity = DeviceProcessEvents
| where Timestamp > ago(24h)
| where ProcessCommandLine has_any ("ruler", "--forms", "--homepage", "--target", "--ruler")
or FileName =~ "ruler.exe"
| extend DetectionType = "Ruler Tool Execution"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionType;
// Part 3: Detect network connections from Outlook to Exchange/MAPI after form trigger
let OutlookPostExec = DeviceNetworkEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName =~ "outlook.exe"
| where RemotePort in (80, 443, 445, 4444, 8080, 8443)
| where RemoteIPType == "Public"
| extend DetectionType = "Outlook External Network Connection"
| project Timestamp, DeviceName, AccountName, RemoteIP, RemotePort, RemoteUrl,
InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionType;
union OutlookChildren, RulerActivity, OutlookPostExec
| sort by Timestamp desc high severity
medium confidence
Data Sources
Process: Process Creation Network Traffic: Network Connection Creation Microsoft Defender for Endpoint
Required Tables
DeviceProcessEvents DeviceNetworkEvents
False Positives
- Legitimate Outlook add-ins or plugins that spawn helper processes (e.g., CRM integrations, document management systems)
- IT helpdesk tools that connect to Exchange via Outlook for automation purposes
- Security awareness training platforms that send test phishing emails (should not cause child processes in normal operation)
- Outlook integration with Teams, Slack, or other collaboration tools spawning child processes for notifications
Last updated: 2026-04-18 Research depth: deep
References (6)
- https://attack.mitre.org/techniques/T1137/003/
- https://sensepost.com/blog/2017/outlook-forms-and-shells/
- https://github.com/sensepost/ruler
- https://github.com/sensepost/notruler
- https://docs.microsoft.com/en-us/office365/securitycompliance/detect-and-remediate-outlook-rules-forms-attack
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1137.003/T1137.003.md
Unlock Pro Content
Get the full detection package for T1137.003 including response playbook, investigation guide, and atomic red team tests.
Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance