Skip to content
LessIT

Defender for Office 365

Configure Safe Attachments & Safe Links

Deploy Safe Attachments and Safe Links policies in Microsoft Defender for Office 365 to protect users from malicious file detonation and URL-based attacks across email, Microsoft Teams, SharePoint Online, and OneDrive for Business.

Intermediate 90 min 10 steps

Where it fits: lab 1 of 4

Stop email threats with Defender for Office 365. Configure Safe Attachments, Safe Links and anti-phishing, run attack simulations and investigate a business email compromise.

  1. Configure Safe Attachments & Safe Links 90 min
  2. Attack Simulation Training & Security Awareness 90 min
  3. Configure Anti-Phishing & Zero-Hour Auto Purge 100 min
  4. Investigate a Business Email Compromise (BEC) 2.5 h

What this lab covers

In this hands-on lab you will configure a complete email and collaboration threat protection stack using Microsoft Defender for Office 365. Starting with a review of the MDO protection policies in the Microsoft Defender portal, you will create and deploy Safe Attachments policies with Dynamic Delivery to detonate suspicious files in a sandbox without delaying mail flow, configure Safe Links policies to rewrite and scan URLs at time of click, extend protection to SharePoint Online, OneDrive for Business, and Microsoft Teams, validate your configuration with EICAR test files and test URLs, and set up monitoring dashboards and alerts to track protection effectiveness. By the end of this lab you will have a production-grade MDO deployment actively defending against weaponized attachments and malicious URLs.

The enterprise scenario

Woodgrove Bank is a regional financial institution with 4,200 employees across 35 branch locations. Over the past quarter, Woodgrove Bank's SOC has observed a 340% increase in weaponized email attachments targeting their loan processing and treasury departments. Threat actors are using macro-enabled Excel attachments disguised as wire transfer confirmations and PDF files embedded with exploit kits. Additionally, the security team has identified a surge in credential-harvesting URLs embedded in emails that impersonate internal HR portals and benefits enrollment pages.

The CISO has mandated an immediate deployment of Safe Attachments with Dynamic Delivery to ensure zero-day attachment threats are detonated in a sandbox before reaching user mailboxes, while still delivering the email body promptly. Safe Links must be deployed with time-of-click URL scanning, click-through blocking, and full URL rewriting to prevent users from navigating to known and unknown phishing pages. Protection must also extend to SharePoint and OneDrive to prevent lateral spread of malicious documents shared internally. Success criteria: 100% of inbound attachments scanned, zero click-throughs to known malicious URLs, full visibility into threat metrics within 30 days, and zero disruption to legitimate business email flow.

What you will learn

  • Navigate the MDO threat protection stack and understand the email security pipeline
  • Create a Safe Attachments policy with Dynamic Delivery using the portal and PowerShell
  • Configure detonation settings and quarantine actions for detected malicious attachments
  • Create a Safe Links policy with time-of-click scanning and click-through blocking
  • Manage Safe Links URL exception lists and document trusted URL entries
  • Enable Safe Attachments protection for SharePoint Online, OneDrive, and Microsoft Teams
  • Compare and apply Standard vs. Strict preset security policies
  • Validate Safe Attachments using the EICAR test file and observe Dynamic Delivery behavior

Before you start

  • Microsoft 365 E5 or Defender for Office 365 Plan 1/Plan 2 license . Safe Attachments and Safe Links require at least MDO Plan 1; preset security policies and advanced reporting require Plan 2
  • Security Administrator role . Required to create and manage threat protection policies in the Microsoft Defender portal
  • Exchange Online PowerShell module . Install the Exchange Online Management module for PowerShell-based policy configuration
  • Test mailbox . A non-production mailbox for sending EICAR test files and validating Safe Links behavior without impacting business users
  • Access to the Microsoft Defender portal . Navigate to security.microsoft.com and verify you can access the Email & collaboration section
  • Basic understanding of email flow . Familiarity with MX records, mail transport rules, and Exchange Online concepts

The 10 steps

  1. Review MDO Threat Protection Policies
  2. Create a Safe Attachments Policy
  3. Configure Detonation and Quarantine Settings
  4. Create a Safe Links Policy
  5. Configure Safe Links Exceptions
  6. Enable Safe Attachments for SharePoint, OneDrive, and Teams
  7. Apply and Validate Preset Security Policies
  8. Test Safe Attachments with EICAR
  9. Test Safe Links Protection
  10. Monitor Protection Metrics and Create Alerts