Cybersecurity Knowledge Base

Email Security

SPF (Sender Policy Framework)

How it works: SPF allows domain owners to specify which mail servers are permitted to send email on behalf of their domain. Receiving mail servers verify the SPF record to check if the email comes from an authorized server.

Setup: Add a TXT record to your DNS with the SPF policy. Example:

v=spf1 include:_spf.example.com ~all

Mechanisms:

DKIM (DomainKeys Identified Mail)

How it works: DKIM adds a digital signature to email headers using public-key cryptography. The sending server signs the email with a private key, and receiving servers verify it using the public key published in DNS.

Setup:

  1. Generate a public/private key pair
  2. Publish the public key as a DNS TXT record
  3. Configure your mail server to sign outgoing messages with the private key

Example DKIM record:

v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC...

DMARC (Domain-based Message Authentication, Reporting & Conformance)

How it works: DMARC builds on SPF and DKIM, allowing domain owners to publish policies on how receivers should handle emails that fail authentication, and request reports about authentication results.

Setup: Add a DMARC TXT record to your DNS. Example:

v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com; ruf=mailto:dmarc-forensics@example.com; pct=100

Policy options:

Tools & Utilities

Core Protection Policies

Anti-Spam

Filters unsolicited bulk email using machine learning and reputation analysis.

Configuration: Set spam filtering policies in Security & Compliance Center → Threat management → Policy → Anti-spam

Actions: Move to Junk, Quarantine, Delete, etc.

Anti-Malware

Scans attachments and links for known malware using multiple engines.

Features:

Anti-Phishing

Detects impersonation attempts and suspicious links.

Techniques:

Safe Links & Attachments

Safe Links: Rewrites URLs to check them in real-time when clicked.

Safe Attachments: Opens attachments in a sandbox before delivery.

Advanced Features

Advanced Rules (Mail Flow Rules)

Create custom rules in Exchange Admin Center → Mail flow → Rules

Examples:

Allow/Block Lists

Manage in Security & Compliance Center → Threat management → Policy → Anti-spam

Types:

Phishing Training & Simulation

Available in Defender for Office 365 Plan 2

Features:

Investigation Workflow

  1. Identification: Detect suspicious email via reports or alerts
  2. Containment: Quarantine message, block sender/URLs
  3. Analysis: Examine headers, content, attachments
  4. Eradication: Remove threat from all mailboxes
  5. Recovery: Restore any affected systems
  6. Lessons Learned: Update policies and user training

Key Investigation Tools

Message Trace

Track email path through Exchange Online (Exchange Admin Center → Mail flow → Message trace)

Data: Sender/recipient, status, timestamp, message size

Threat Explorer

Real-time and historical threat detection (Microsoft 365 Defender → Email & collaboration → Explorer)

Capabilities:

Email Headers Analysis

Key headers to examine:

Remediation Actions

Action Tool Description
Delete emails Threat Explorer Remove malicious emails from all mailboxes
Block sender/domain Tenant Allow/Block List Add to block list in Anti-spam policies
Block URLs Tenant Allow/Block List Block malicious links
Block attachments Mail Flow Rules Create rule to block file types

Mailflow Fundamentals

Components:

Common Mailflow Issues

Issue Possible Causes Troubleshooting Steps
Emails not received DNS issues, filtering, blacklisting Check message trace, test connectivity
Delays in delivery Queue backups, throttling Check queues, review connector settings
Recipient not found Invalid address, directory sync issues Validate recipient, check directory sync

Domain Reputation Management

Key Factors:

Blacklisting

Common RBLs (Real-time Blackhole Lists):

Delisting Process:

  1. Identify listing using tools like MXToolBox
  2. Resolve underlying issue (spam source, open relay)
  3. Submit delisting request with evidence
  4. Monitor for relisting

Deliverability Best Practices

Microsoft Purview

Overview

Azure Information Protection (AIP) is a cloud-based solution that helps organizations classify and protect documents and emails by applying labels.

Key Components

Implementation Steps

  1. Activate AIP in Azure portal
  2. Configure labels in Microsoft Purview compliance portal
  3. Deploy AIP client or enable unified labeling
  4. Train users on classification

Common Use Cases

Overview

DLP helps prevent sensitive information from being inappropriately shared by detecting, monitoring, and protecting data across Microsoft 365.

Key Capabilities

Policy Creation

  1. Identify sensitive data to protect
  2. Define conditions for detection
  3. Set actions when detected
  4. Choose locations to monitor (Exchange, SharePoint, Teams, etc.)
  5. Test in audit mode before enforcement

Best Practices

Data Lifecycle Management

Manage content through its lifecycle with retention policies and labels.

Retention Policies

Retention Labels

eDiscovery

Identify, preserve, and export electronic information for legal cases.

Content Searches

eDiscovery Cases

Advanced eDiscovery

Additional capabilities for complex investigations: