Prevent Data Leakage using Exchange Online Transport Rules and Raise the Office365 Secure Score

Over the last month, two clients contacted me requesting immediate support to mitigate and stop the data leakage caused by compromised credentials of specific users in Office365 and Exchange Online. The use of Multi-Factor Authentication has become a best practice and could have prevented this situation. However, there are other security controls that we recommend putting in place to prevent data leakage from Office365.

The bad actors’ “modus operandi” it is usually the same. After compromising the account, hackers access the compromised mailbox using OWA or perhaps Outlook, and setup multiple mailboxes rules. Some of these rules are to exfiltrate data of the organization such as auto-forwarding or send phishing emails to saved contacts and expand their malicious activity. Usually, the last mailbox rules we have identified is to automatically delete their activity from the “Sent Items” folder so it will be unnoticeable by the user.

One of the ways we can help stop data exfiltration from client created rules is using Exchange Transport Rules. Implementing a Transport Rule based around the following can stop emails that are set to be Auto-Forwarded to an external address.

In summary you create a rule based on the following logic.

  • IF The Sender is located ‘Inside the organization’
  • AND IF The Recipient is located ‘Outside the organization’
  • AND IF The message type is ‘Auto-Forward’
  • THEN Reject the message with the explanation ‘External Email Forwarding via Client Rules is not permitted’.

Transport Rule

This will stop delivery of the Auto-Forward message and issue an NDR message to the sender. Exceptions can be also created if needed.

Similarly, this will help you to increase your Office365 Secure Score which now has a new security control called ‘Client Rules Forwarding Blocks’ that implements a Transport Rule to help mitigate client created rules that Auto-Forward to external addresses.

Microsoft Cloud Centralize Identity Management (Best Practice 1/10)

I always recommend that you integrate your on-premises and cloud directories. Integration enables your IT team to manage accounts from one location, regardless of where an account is created. Integration also helps your users be more productive by providing a common identity for accessing both cloud and on-premises resources.

Organizations that don’t integrate their on-premises identity with their cloud identity can have more overhead in managing accounts. This overhead increases the likelihood of mistakes and security breaches.

  1. Best Practice: Establish a single Azure AD instance. Consistency and a single authoritative source will increase clarity and reduce security risks from human errors and configuration complexity. Designate a single Azure AD directory as the authoritative source for corporate and organizational accounts.
  2. Best practice: Integrate your on-premises directories with Azure AD. Use Azure AD Connect to synchronize your on-premises directory with your cloud directory. Ensure Azure AD Connect has enough capacity to keep underperforming systems from impeding security and productivity.
  3. Best practice: Don’t synchronize accounts to Azure AD that have high privileges in your existing Active Directory instance. Also, don’t change the default Azure AD Connect configuration that filters out these accounts. This configuration mitigates the risk of adversaries pivoting from cloud to on-premises assets (which could create a major incident).
  4. Best practice: Turn on password hash synchronization. Password hash synchronization is a feature used to synch user password hashes from an on-premises Active Directory instance to a cloud-based Azure AD instance. This sync helps to protect against leaked credentials being replayed from previous attacks. Even if you decide to use federation with Active Directory Federation Services (AD FS) or other identity providers, you can optionally set up password hash synchronization as a backup in case your on-premises servers fail or become temporarily unavailable. This sync enables users to sign in to the service by using the same password that they use to sign in to their on-premises Active Directory instance. It also allows Identity Protection to detect compromised credentials by comparing synchronized password hashes with passwords known to be compromised, if a user has used the same email address and password on other services that aren’t connected to Azure AD. (Other Microsoft services such as MCAS will be required for this option)
  5. Best practice: For new application development, use Azure AD for authentication. Use the correct capabilities to support authentication:
    • Azure AD for employees
    • Azure AD B2B for guest users and external partners
    • Azure AD B2C to control how customers sign up, sign in, and manage their profiles when they use your applications

Tune Exchange Online (O365) Performance

To improve the speed of migration and reduce your organization’s bandwidth constraints for Exchange Online, consider the following:

  • Reduce mailbox sizes and always use cached mode
    • Smaller mailbox size improves migration speed. Cached Exchange Mode enables a better experience when you use an Exchange account. In this mode, a copy of your mailbox is saved on your computer. This copy provides quick access to your data, and it is frequently updated with the server that runs Microsoft Exchange.
  • Use the mailbox move capabilities with an Exchange hybrid deployment:
    • With an Exchange hybrid deployment, offline mail (in the form of .OST files) does not require re-download when migrating to Exchange Online. This significantly reduces your download bandwidth requirements. A hybrid deployment provides the seamless look and feel of a single Exchange organization between an on-premises Exchange organization and Exchange Online in Microsoft Office 365. In addition, a hybrid deployment can serve as an intermediate step to moving completely to an Exchange Online organization.
  • Schedule mailbox moves to occur during periods of low Internet traffic and low on-premises Exchange use:
    • When scheduling moves, migration requests are submitted to the mailbox replication proxy and may not take place immediately.