Adversaries may use email rules to hide inbound emails in a compromised user's mailbox. Many email clients allow users to create inbox rules for various email functions, including moving emails to other folders, marking emails as read, or deleting emails. Rules may be created or modified within email clients or through external features such as the <code>New-InboxRule</code> or <code>Set-InboxRule</code> [PowerShell](https://attack.mitre.org/techniques/T1059/001) cmdlets on Windows systems.(Citation: Microsoft Inbox Rules)(Citation: MacOS Email Rules)(Citation: Microsoft New-InboxRule)(Citation: Microsoft Set-InboxRule)

Adversaries may utilize email rules within a compromised user's mailbox to delete and/or move emails to less noticeable folders. Adversaries may do this to hide security alerts, C2 communication, or responses to [Internal Spearphishing](https://attack.mitre.org/techniques/T1534) emails sent from the compromised account.

Any user or administrator within the organization (or adversary with valid credentials) may be able to create rules to automatically move or delete emails. These rules can be abused to impair/delay detection had the email content been immediately seen by a user or defender. Malicious rules commonly filter out emails based on key words (such as <code>malware</code>, <code>suspicious</code>, <code>phish</code>, and <code>hack</code>) found in message bodies and subject lines. (Citation: Microsoft Cloud App Security)

In some environments, administrators may be able to enable email rules that operate organization-wide rather than on individual inboxes. For example, Microsoft Exchange supports transport rules that evaluate all mail an organization receives against user-specified conditions, then performs a user-specified action on mail that adheres to those conditions.(Citation: Microsoft Mail Flow Rules 2023) Adversaries that abuse such features may be able to automatically modify or delete all emails related to specific topics (such as internal security incident notifications).
Email Hiding Rules
source_name: mitre-attack  url: https://attack.mitre.org/techniques/T1564/008  external_id: T1564.008     source_name: MacOS Email Rules  description: Apple. (n.d.). Use rules to manage emails you receive in Mail on Mac. Retrieved June 14, 2021.  url: https://support.apple.com/guide/mail/use-rules-to-manage-emails-you-receive-mlhlp1017/mac     source_name: Microsoft BEC Campaign  description: Carr, N., Sellmer, S. (2021, June 14). Behind the scenes of business email compromise: Using cross-domain threat data to disrupt a large BEC campaign. Retrieved June 15, 2021.  url: https://www.microsoft.com/security/blog/2021/06/14/behind-the-scenes-of-business-email-compromise-using-cross-domain-threat-data-to-disrupt-a-large-bec-infrastructure/     source_name: Microsoft Mail Flow Rules 2023  description: Microsoft. (2023, February 22). Mail flow rules (transport rules) in Exchange Online. Retrieved March 13, 2023.  url: https://learn.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/mail-flow-rules     source_name: Microsoft Inbox Rules  description: Microsoft. (n.d.). Manage email messages by using rules. Retrieved June 11, 2021.  url: https://support.microsoft.com/en-us/office/manage-email-messages-by-using-rules-c24f5dea-9465-4df4-ad17-a50704d66c59     source_name: Microsoft New-InboxRule  description: Microsoft. (n.d.). New-InboxRule. Retrieved June 7, 2021.  url: https://docs.microsoft.com/en-us/powershell/module/exchange/new-inboxrule?view=exchange-ps     source_name: Microsoft Set-InboxRule  description: Microsoft. (n.d.). Set-InboxRule. Retrieved June 7, 2021.  url: https://docs.microsoft.com/en-us/powershell/module/exchange/set-inboxrule?view=exchange-ps     source_name: Microsoft Cloud App Security  description: Niv Goldenberg. (2018, December 12). Rule your inbox with Microsoft Cloud App Security. Retrieved June 7, 2021.  url: https://techcommunity.microsoft.com/t5/security-compliance-and-identity/rule-your-inbox-with-microsoft-cloud-app-security/ba-p/299154     