Detect Email Forwarding Rule in IBM QRadar
Adversaries may set up email forwarding rules to covertly collect and monitor victim email communications. By creating inbox rules, mailbox-level SMTP forwarding configurations, or Exchange transport rules, adversaries can silently redirect all or targeted messages to attacker-controlled accounts — internal or external — without the victim's awareness. This technique provides persistent intelligence access even after compromised credentials are reset, because forwarding rules survive password changes. Adversaries may also use the Microsoft Messaging API (MAPI) to create hidden inbox rules not visible through Outlook, OWA, or standard Exchange administration tools, enabling long-term covert collection. Threat groups including LAPSUS$, Scattered Spider, Kimsuky, Star Blizzard, and Silent Librarian have actively abused this technique. LAPSUS$ notably created tenant-level Exchange transport rules to forward all organizational email to newly created attacker-controlled accounts, achieving org-wide collection with a single rule.
MITRE ATT&CK
- Tactic
- Collection
- Technique
- T1114 Email Collection
- Sub-technique
- T1114.003 Email Forwarding Rule
- Canonical reference
- https://attack.mitre.org/techniques/T1114/003/
QRadar Detection Query
SELECT
DATEFORMAT(devicetime, 'yyyy-MM-dd HH:mm:ss') AS event_time,
username AS user_id,
sourceip AS client_ip,
QIDNAME(qid) AS operation,
"UTF8"(payload) AS raw_payload,
CASE
WHEN LOWER("UTF8"(payload)) LIKE '%transportrule%' THEN 3
ELSE 1
END +
CASE
WHEN "UTF8"(payload) LIKE '%@%'
AND LOWER("UTF8"(payload)) NOT LIKE '%onmicrosoft.com%' THEN 2
ELSE 0
END +
CASE
WHEN LOWER("UTF8"(payload)) LIKE '%hiderule%'
OR LOWER("UTF8"(payload)) LIKE '%hidden%' THEN 3
ELSE 0
END AS severity_score
FROM events
WHERE
LOGSOURCETYPENAME(devicetype) ILIKE '%Microsoft Office 365%'
AND (
QIDNAME(qid) ILIKE '%New-InboxRule%' OR
QIDNAME(qid) ILIKE '%Set-InboxRule%' OR
QIDNAME(qid) ILIKE '%Enable-InboxRule%' OR
QIDNAME(qid) ILIKE '%New-TransportRule%' OR
QIDNAME(qid) ILIKE '%Set-TransportRule%' OR
QIDNAME(qid) ILIKE '%Enable-TransportRule%' OR
QIDNAME(qid) ILIKE '%Set-Mailbox%'
)
AND (
"UTF8"(payload) ILIKE '%ForwardTo%' OR
"UTF8"(payload) ILIKE '%ForwardAsAttachmentTo%' OR
"UTF8"(payload) ILIKE '%RedirectTo%' OR
"UTF8"(payload) ILIKE '%ForwardingSmtpAddress%' OR
"UTF8"(payload) ILIKE '%ForwardingAddress%' OR
"UTF8"(payload) ILIKE '%DeliverToMailboxAndForward%' OR
"UTF8"(payload) ILIKE '%RedirectMessageTo%' OR
"UTF8"(payload) ILIKE '%BlindCopyTo%'
)
AND LAST 24 HOURS
ORDER BY severity_score DESC, event_time DESC AQL query for IBM QRadar detecting email forwarding rule creation and modification in Microsoft 365 Exchange. Parses O365 audit log events for forwarding-related cmdlets and parameters, with inline severity scoring based on external targets, transport rules, and hidden rule indicators.
Data Sources
Required Tables
False Positives & Tuning
- Help desk or IT operations staff running Exchange PowerShell scripts to bulk-configure forwarding for departing employees as part of offboarding procedures
- Email migration projects where transport rules are created to route mail during cutover between Exchange environments or tenants
- Third-party email security products (e.g., Mimecast, Proofpoint) that configure transport rules programmatically for journaling or compliance archiving
Other platforms for T1114.003
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Create Inbox Forwarding Rule via Exchange Online PowerShell
Expected signal: OfficeActivity (Sentinel) and o365:management:activity (Splunk): Operation=New-InboxRule, [email protected], [email protected], Parameters array contains {Name:ForwardTo, Value:[email protected]}. Event appears in Unified Audit Log within 15-60 minutes. Azure AD Sign-In Logs will record the Exchange Online session from the admin account.
- Test 2Set Mailbox-Level SMTP Forwarding via Set-Mailbox
Expected signal: OfficeActivity: Operation=Set-Mailbox, Parameters array contains {Name:ForwardingSmtpAddress, Value:[email protected]} and {Name:DeliverToMailboxAndForward, Value:True}. This forwarding is NOT visible via Get-InboxRule — only via Get-Mailbox -Identity victim | fl ForwardingSmtpAddress, ForwardingAddress, DeliverToMailboxAndForward.
- Test 3Create Org-Wide Transport Rule to Blind-Copy All Mail (LAPSUS$ Pattern)
Expected signal: OfficeActivity: Operation=New-TransportRule, [email protected], Parameters contains {Name:BlindCopyTo, Value:[email protected]} and {Name:FromScope, Value:InOrganization}. This is NOT logged to individual mailbox audit logs — only appears in Exchange Admin Audit Log and the Unified Audit Log at the tenant level. Transport rule changes take effect within minutes.
- Test 4Bulk Enumerate All Mailbox Forwarding Configurations (Reconnaissance Phase)
Expected signal: OfficeActivity: Multiple Operation=Get-InboxRule events from admin account accessing many mailboxes in rapid succession. High-volume Exchange admin read operations within a short time window generate multiple OfficeActivity records. Azure AD Sign-In Logs record the session. This pattern can be detected with anomaly-based analytics on Exchange admin read volume.
References (10)
- https://attack.mitre.org/techniques/T1114/003/
- https://blog.compass-security.com/2018/09/hidden-inbox-rules-in-microsoft-exchange/
- https://blogs.technet.microsoft.com/timmcmic/2015/06/08/exchange-and-office-365-mail-forwarding-2/
- https://learn.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/mail-flow-rules
- https://www.us-cert.gov/ncas/alerts/TA18-086A
- https://www.microsoft.com/en-us/security/blog/2022/03/22/dev-0537-criminal-actor-targeting-organizations-for-data-exfiltration-and-destruction/
- https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/external-email-forwarding
- https://github.com/sensepost/ruler
- https://learn.microsoft.com/en-us/powershell/module/exchange/new-inboxrule
- https://learn.microsoft.com/en-us/powershell/module/exchange/new-transportrule
Unlock Pro Content
Get the full detection package for T1114.003 including response playbook, investigation guide, and atomic red team tests.