Microsoft Office 365 Security Best Practices and Recommendations

Office360 Icons

Microsoft continues to up its game, and it’s critical for you to review, configure and tune the appropriate settings within Microsoft 365’s various services to ensure that you’re meeting proper risk tolerance levels. 

Microsoft leverages a defense-in-depth approach in an effort to adhere to operational best practices to provide physical, logical, and data layer protections. These layers help to protect all 365 users, but every organization must ensure that their implementation and configuration of their tenant are configured securely. 

HBS highly recommends that you review the following guide and implement its ideas as needed. Remember: These defaults impact new mailboxes. Audit settings should be reviewed for any accounts created prior to January 2019. 

The Missing Piece in Your O365 Strategy 

Every Office 365 cybersecurity strategy should include extended detection and response (XDR) tools. These next-generation systems combine machine learning and rules created by analysts to monitor suspicious activity across your entire system, including Office 365 elements such as inboxes and software delivered through the cloud. 

Enable and Enforce Multi-Factor Authentication  

HBS highly recommends the use of multi-factor authentication. User accounts are compromised daily resulting in the increased risk to losing control of key data and information. Business email compromise and credential harvesting attacks are a constant threat to an organization. One of the best security defenses to thwart this loss is requiring users to use multi-factor authentication (MFA) to access key systems, such as email and file sharing. MFA can significantly decrease the success of an attacker tactics even when they compromise the user’s password, as they would also need to compromise the additional factor. These additional factors can be in many forms, such as a hard token or an application on a smart device. There exist multiple methods and solutions for multi-factor authentication for Microsoft 365, and the configuration options will vary depending on licensing. Azure, Intune, and Enterprise Mobile Device Management plans offer additional capabilities when deploying or enforcing this security feature. 

Reference:Enabling Azure Multi-factor Authentication, Requiring MFA for Intune Enrollment 

Conditional Access Policies 

Administrators can review and enforce additional restrictions or relax certain policies such as multi-factor authentication requirements when users are accessing resources from a trusted location or compliant device. These scenarios increase the likelihood the user accessing the resource is trusted and therefore decrease the security requirements needed to authorize the user. This feature works very well to find the right balance between security and convenience. Furthermore, restricting access from locations and devices that employees should never be logging in from can also be enforced and alerted against. An Azure AD Premium license is required for use of conditional access policies. 

Reference: Configuring Conditional Access Policies, Azure AD License Comparison 

Business E-mail Compromise 

Phishing causes a considerable share of all breaches and cyber incidents within organizations, especially those with Microsoft 365. Forensic analysis typically reveals the culprit is an e-mail that posed as a shared document hosted in a domain that looks remarkably like OneDrive. When the user clicks the link, they arrive at a sign-in page that mirrors Microsoft’s 365 login page. Unfortunately, the credentials entered within this fake screen go straight to the attacker, who may then have complete access to the user’s e-mails and files. That’s what makes multifactor authentication (MFA) one of the most successful ways of preventing an attacker from gaining access even after they have compromised a password. 

It’s also critical that you recognize when a password has been compromised. It becomes even more important if the attacker successfully authenticates to the victim's data. This information is key to investigating what activity was performed or determining whether it triggers breach notification requirements. 

To ensure you have sufficient data to detect these threats or perform a proper investigation, you must ensure your Microsoft 365 tenant is auditing all the crucial areas. In January 2019, Microsoft recognized the need for this information and enabled it with respect to mailbox auditing. 

Reference: Manage Mailbox Auditing 

Verify mailbox auditing is on by default 

Get-OrganizationConfig | Format-List AuditDisabled

Enable Audit Logging 

Event data containing critical information; such as user and system activity, changes, authentication details, etc.; is extremely important to have captured log data to detect threats, especially when performing an investigation. An administrator must manually enable the “Office 365 audit log search.” This feature may record user and admin activity for 90 days; however, it is best to validate which retention settings are configured based on licensing/configuration. This data can typically and should be piped to a security information and event management (SIEM)/XDR Solution for additional monitoring and correlation. Note that only mailbox audit events for E5 users are available in the audit log searches within the Security & Compliance Center or through the Office 365 Management Activity API. 

Reference: Enabling Audit Logging 

Use the Security & Compliance Center to turn on audit log search 

  • In the Security & Compliance Center, go to Search & investigation > Audit log search. 
  • Click Start recording user and admin activities. 

Enabling auditing via Powershell 

Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $true 

Validate whether auditing is enabled/disabled via Powershell 

Get-AdminAuditLogConfig | FL UnifiedAuditLogIngestionEnabled 

Enable Mailbox Auditing 

In Office 365, administrators should enable mailbox audit logging to record mailbox access activity. By default, mailbox auditing is disabled. If a security incident occurs, there may be very little data if any regarding an attacker’s activity. However, once audit logging is enabled, the audit log can be searched for mailbox activity. Additionally, when mailbox audit logging is turned on, some actions performed by administrators, delegates, and owners are logged by default. It is recommended to enable at a minimum the default logs as well as the referenced commands below; however, each organization should determine what logging level is needed. 

We highly recommend enabling the ‘UpdateInboxRules’ setting for all types of users. Attackers commonly set up a forwarding rule that forwards a copy of the user's inbox to a second address such as a Gmail account. This provides them persistent access to the user’s e-mail even after they update their password! We recommend auditing and reviewing these rules. Be prepared to add logic to filter out legitimate, employee-created forwarding rules. We recommend using logic that looks for forwarding rules that are redirecting e-mail outside of the organization or tenant domain. Even if an employee is attempting to forward e-mail to their personal mailbox, this is a bad practice, as the data is no longer controlled or protected by company policies. 

Reference:Enabling Mailbox Auditing, Mailbox Auditing Actions 

Enabling auditing via Powershell for all user mailboxes in your organization 

Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq "UserMailbox"} | Set-Mailbox -AuditEnabled $true  

Increasing audit levels via Powershell for all user mailboxes in your organization 

Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq "UserMailbox"} | Set-Mailbox -AuditOwner @{Add="MailboxLogin","HardDelete","SoftDelete","MoveToDeletedItems"} 

Validate whether auditing is enabled/disabled via Powershell 

A value of True for the AuditEnabled property verifies that mailbox audit logging is enabled. 

Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq "UserMailbox"} | FL Name,Audit* 

Mobile Device Management 

Mobile device management (MDM) should be reviewed and understood by each organization. Ensuring the proper policies are defined and agreements are in place for employees of the business. Exchange Administration can be configured to define policies on which devices/users can communicate with the email servers. Policies to enforce compliance to company policies such as device encryption should be enabled as well as which devices can connect. For additional features and control, plans can be purchased for Microsoft Intune and/or Enterprise Mobility Security. 

Reference: MDM for Office 365 versus Microsoft Intune 

Exchange Administration 

Configuring Exchange Email Encryption Rule 

Users that are communicating via email, and have a E3 or higher license, can leverage Office 365’s Message Encryption feature. An administrator can also define a mail flow rule to encrypt email messages that contain a keyword in the subject. Encryption with Rights Protection can be leveraged to reduce the ability for users that receive encrypted messages to forward them to unintended recipients, print, or access them within certain time restrictions. 

Reference: Define a Mail Flow Rule to Encrypt Email 

Define Spoofing Filter Rule 

A rule can be created via Exchange Admin Center to set the spam confidence level (SCL) to ‘9’ if the messages sender’s address domain belongs to any of the organizations valid domains and the message is received from ‘Outside the organization.’ A spoofing filter rule definition will help limit the amount of phishing emails that are delivered. 

Spoofing Filter Rule Example 

Protecting High Trust Accounts from Spoofing 

A very popular vector for malicious actors is spoofing a company’s executives or high trust individuals. The actor will spoof accounts such as the CEO, HR or IT leader asking staff to perform actions that can lead to a breach or loss. Examples of this are as simple as asking to purchase gift cards, login to a web site to approve something or providing private company information. For organizations that have Microsoft 365 Defender you can easily remedy this vector. Microsoft 365 Defender has additional Anti-phishing capabilities that can protect organizations from impersonation. Microsoft 365 Defender also protects your domains from spoofing in a much better way that the old method of transport rules. 

Licensing requirements: Microsoft 365 Defender prerequisites 

Configure DMARC and SPF Records to Validate Email 

Implementing DMARC (Domain-based Message Authentication, Reporting and Conformance) with SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail) is recommended for all organizations. These features provide an additional layer of protection against spoofing and phishing emails. They can also help to reduce the risk of business email compromise attacks. DMARC settings will tell the Exchange servers what to do with messages that were transmitted with the organization’s domain that fail SPF or DKIM validation checks. 

A DMARC TXT Record also helps to prevent spoofing and phishing attacks by verifying the IP address of an email's author against the alleged owner of the sending domain. The DMARC TXT record identifies authorized outbound email servers. The destination email server can validate the message that originated from the authorized outbound email servers. 

An SPF record is used to define IP’s that are authorized to transmit email for a given domain. This way, if an attacker spoofs the organizations domain from an IP address not on the list it can fail delivery to the recipient automatically. 

DKIM should be configured once the SPF and DMARC records have bene created. DKIM adds a digital signature to each email message’s header information. It is highly recommended the DMARC settings are reviewed and deployed with careful consideration such not to disrupt intended mail flow. 

Reference: Define DMARC to Validate Email 

Define DMARC Failure Rule 

After DMARC is configured for an organization a rule should be created in the Exchange Admin Center to direct where mail that fails the DMARC validation is directed. A definition can be created such as ‘Deliver the message to the hosted quarantine’ if ‘authentication-results’ header contains “dmarc=fail” and sender’s address domain portion belongs to any of the organizations valid domains and the message is received from ‘Outside the organization.’ Under Additional properties the Sender address matches should be set to Header. 

Define Data Exfiltration Rule Restrictions 

Business email compromise can result in attackers configuring mailbox forwarding rules to send a copy of email outside of the organization to a 3rd party email domain. Employees may also desire to send copies of emails to personal email accounts. These forwards reduce the overall security of the organization. A rule can be created in the Exchange Admin Center to reject any messages and include an explanation that client forwarding rules to external domains are not permitted. This rule can be defined if a message is sent ‘outside the organization’ and the message type is ‘auto-forward’ and the email is received from ‘inside the organization.’ It may also be beneficial to configure alert definitions based on these conditions to ensure an account was not compromised. An alert definition can be defined while creating the rule to email a notification to the defined contact upon triggering. 

Configure Connection Filters 

Enabling the safe list of IP addresses that are permitted for each respective domain can help to reduce trusted senders from getting blocked. 

Reference: Connection Filters 

Configure Alert Policies 

Configuring alert policies can help track user and administrator activities, malware threats, and data loss incidents within each organization. Alerts should be defined for malware incidents, email forwarding/redirect rules, anomaly detection, and suspicious activity at a minimum. It is highly recommended event data is also transmitted to a SIEM solution for correlation and long-term event storage. If a traditional SIEM is not being leveraged, consider Microsoft's Cloud Native SIEM, Sentinel. They allow for free logging of many Microsoft 365 events for 30 and even 90 days in certain scenarios. Additional fees may apply and typically include data storage within log analytics or any custom event sources. Consider a managed service provider such as Pratum to assist with a fully managed environment. 

Manage Office 365 Secure Score 

Microsoft Secure Score will help analyze each organizations Office 365 security based on administrative activities as well as audit security settings and make recommendations. A score is then provided based on the settings and is re-evaluated in an on-going basis. Secure score is a fantastic tool that will help you understand and evaluate how you are offsetting risk by leveraging the various security features across 365. It is highly recommended all of the results are evaluated and considered for your organization. *Note: Settings should be carefully reviewed and exceptions may need to be made to not disrupt mail flow for legitimate emails which are being spoofed intentionally. The Secure Score feature is being heavily supported and being rolled out across multiple areas of the Microsoft 365 cloud. This scoring feature should be reviewed on a reoccurring basis as it provides a valuable amount of data and is becoming more sophisticated with each release. 

Reference: Secure Score Overview 

Security & Compliance Features 

There exists a multitude of features highlighted below within Microsoft 365 that should be reviewed and configured with appropriate settings. These features should each be used in accordance to the business’s IT Security requirements, the following should also be considered/configured within the Security and Compliance section. 

Data Loss Prevention – Policy protection to assist with identifying and protecting sensitive data. 

Data Governance – Assists with classifying content, defining retention rules and data destruction. 

Classifications – Labels can be applied to email or documents to enforce policies such as retention settings or sensitivity. 

Data Privacy – GDPR requirements and access to their personal data. 

Threat Management – Threat tracking and attack simulators can be performed to assess risk. 

Customer Lockbox 

Customer lockbox requests allow organizations to control how a Microsoft support engineer accesses company data when necessary to do so. It is available through the E5 plan or with the advanced compliance license. This feature should be enabled if available. 

Reference: Enable Customer Lockbox 

The Microsoft Platform 

Opening the aperture from looking just at email, Microsoft offers an expansive set of tools to protect organizations. Having a well-integrated security program will create efficiencies and help keep the organization up to date with today’s modern threats. Organizations should evaluate their current licensing with Microsoft and make sure they are leveraging everything they have. They should also look at the benefits of adjusting it by either stepping up or adding individual licenses to improve their security posture. Implementing tools like Microsoft Defender for Office 365 has features like safe links that can protect emails from malicious links by rewriting them and using AI to test them prior to the end user receiving the message. Microsoft has the tools available to give administrators insights into malicious emails and office attachments. 

Reference: Microsoft 365 Defender 

Reference: Microsoft Defender for Office 365 

Reference: Microsoft Defender for Cloud 

Reference: Microsoft Sentinel 

Summary 

Microsoft has millions of users leveraging Microsoft Office 365 with expectations of over two thirds of its business customers being in the cloud by 2019. Microsoft leverages a defense-in-depth approach in effort to adhere to operational best practices to provide physical, logical, and data layer protections. These layers help to protect all individuals that leverage 365, however, it is the responsibility of each organization that uses 365 ensure their implementation and configuration of their tenant is also configured securely. Each business has the responsibility to review, configure and tune the appropriate settings within the various areas of Microsoft 365’s services to ensure proper risk tolerance levels are met. 

For assistance with evaluating your organizations risk or cyber security needs, please contact HBS.