SY0-701Chapter 163 of 212Objective 4.4

Email Security — DMARC, Advanced Threats

This chapter covers email security mechanisms critical for the SY0-701 exam, focusing on DMARC, SPF, DKIM, and advanced threats like business email compromise (BEC) and phishing. It maps to Domain 4.4 (Security Operations) — specifically, implementing and configuring email security controls. Understanding these protocols is essential for defending against one of the most common attack vectors: email-based social engineering.

25 min read
Intermediate
Updated May 31, 2026

The Certified Mail Envelope System

Imagine you run a busy office and receive thousands of letters daily. You want to ensure only legitimate letters from your partners reach your desk. You implement a three-layer verification system. First, you publish a list of authorized return addresses (SPF) — only letters from those addresses are accepted. But a forger can still spoof the return address, so you add a second check: each letter must include a unique, tamper-evident seal that only the real sender can create (DKIM). The seal is a cryptographic signature; if the letter is altered in transit, the seal breaks. Finally, you tell your mailroom what to do when a letter fails both checks: throw it away, quarantine it, or let it through with a warning (DMARC policy). This is exactly how email authentication works. SPF checks the envelope sender (Return-Path) against a DNS list. DKIM checks a digital signature in the email header against a public key in DNS. DMARC tells the receiving mail server what to do if SPF or DKIM fails, based on the domain owner's policy. Without DMARC, forged emails can still be delivered even if SPF fails — the receiving server might just deliver it to spam. DMARC closes that gap by enforcing a clear action.

How It Actually Works

What is Email Security and Why Does It Matter?

Email remains the primary vector for cyberattacks. According to the 2023 Verizon Data Breach Investigations Report, over 50% of breaches involve phishing or pretexting. The SY0-701 exam covers three core email authentication protocols — SPF, DKIM, and DMARC — that work together to verify the legitimacy of email senders and prevent spoofing. Additionally, you must understand advanced threats like business email compromise (BEC), spear phishing, and email account compromise, as well as technical defenses like mail gateways, sandboxing, and user training.

Sender Policy Framework (SPF) — RFC 7208

SPF allows a domain owner to publish a list of IP addresses authorized to send email on behalf of that domain. This list is stored as a TXT record in DNS. When a receiving mail server gets an email, it checks the envelope sender domain (the Return-Path header) against the SPF record. If the sending IP is not in the list, SPF fails.

How SPF works mechanically: 1. Domain owner (example.com) publishes an SPF record: v=spf1 ip4:192.0.2.0/24 include:_spf.google.com ~all 2. Sender sends email from IP 203.0.113.5 claiming to be from user@example.com. 3. Receiver's MTA queries DNS for example.com's SPF record. 4. The record says only IPs in 192.0.2.0/24 or Google's SPF servers can send. 203.0.113.5 is not authorized. 5. SPF check fails (result: fail).

Key SPF mechanisms: - ip4: / ip6: — specific IP ranges - include: — include another domain's SPF record - a: — the domain's A record - mx: — the domain's MX servers - all — catch-all: -all (fail), ~all (softfail), ?all (neutral)

Limitations: SPF checks only the envelope sender, not the header From address. Attackers can spoof the header From while using a legitimate envelope sender, bypassing SPF. Also, SPF breaks when emails are forwarded (e.g., to a Gmail address) because the forwarding server's IP is not authorized.

DomainKeys Identified Mail (DKIM) — RFC 6376

DKIM provides a digital signature for each email, allowing the receiver to verify that the email was not tampered with and indeed came from the claimed domain. The signature is stored in the email headers and verified using a public key published in DNS.

How DKIM works mechanically: 1. Domain owner generates a public/private key pair. The public key is published as a TXT record in DNS (e.g., selector1._domainkey.example.com). The private key is stored on the outgoing mail server. 2. When an email is sent, the MTA signs the email headers (From, Subject, Date, etc.) and the body using the private key. The signature is added as a DKIM-Signature header. 3. The receiving MTA extracts the selector and domain from the DKIM-Signature header (e.g., s=selector1; d=example.com), retrieves the public key from DNS, and verifies the signature. 4. If verification succeeds, DKIM passes. If the email was modified in transit, the signature fails.

DKIM signature header example:

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com;
 s=selector1; h=from:to:subject:date; bh=...; b=...

v=1 — version

a=rsa-sha256 — signing algorithm (RSA with SHA-256)

c=relaxed/relaxed — canonicalization (how headers/body are normalized)

d=example.com — signing domain

s=selector1 — selector to locate the public key

bh= — body hash

b= — signature

Selectors: Multiple selectors allow key rotation without breaking verification. Old keys can be kept for a grace period.

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

DMARC builds on SPF and DKIM by allowing domain owners to specify a policy for how receivers should handle emails that fail authentication. It also provides reporting so domain owners can see who is sending email on their behalf.

How DMARC works mechanically: 1. Domain owner publishes a DMARC record as a TXT record at _dmarc.example.com. Example: v=DMARC1; p=reject; rua=mailto:dmarc-reports@example.com 2. Receiver checks SPF and DKIM for the email. DMARC alignment requires that the domain in the From header matches the domain used in SPF (or DKIM). 3. If both SPF and DKIM fail, or if alignment fails, the receiver applies the DMARC policy: none (monitor only), quarantine (send to spam), or reject (block delivery). 4. If rua (aggregate reports) is specified, the receiver sends daily XML reports to that address.

DMARC alignment: - SPF alignment: The domain in the From header must match the domain in the envelope sender (Return-Path). If not, SPF is not aligned even if the SPF check passes. - DKIM alignment: The domain in the From header must match the d= domain in the DKIM signature. - DMARC requires at least one of these to be aligned AND pass its respective check.

DMARC policies: - p=none — Take no action; monitor only. Used for testing. - p=quarantine — Treat as suspicious; often move to spam folder. - p=reject — Reject the email (bounce).

Reporting: - rua — Aggregate reports (XML) about all authentication results. - ruf — Forensic reports (individual failure details).

Advanced Email Threats

Business Email Compromise (BEC): A sophisticated phishing attack targeting executives or employees with access to financial accounts. The attacker spoofs or compromises a legitimate email account (e.g., CEO) and requests wire transfers or sensitive data. BEC does not use malware; it relies on social engineering. Defenses include DMARC, user training, and verification procedures (e.g., out-of-band confirmation).

Spear Phishing: Targeted phishing emails crafted for a specific individual or organization. Often uses personal information from OSINT to appear legitimate. Defenses include email filtering, sandboxing, and user awareness.

Whaling: Spear phishing targeting senior executives (the "big fish").

Email Account Compromise (EAC): The attacker gains access to a legitimate email account (via phishing, credential theft, or brute force) and uses it to send malicious emails from within the organization. DMARC does not protect against EAC; multifactor authentication (MFA) and monitoring are key.

Phishing Kits: Pre-packaged tools that create convincing phishing pages. Often hosted on compromised websites.

Defenses

Email Security Gateway (ESG): A device or cloud service that filters incoming and outgoing email for spam, malware, and phishing. It can perform SPF/DKIM/DMARC verification, sandbox attachments, and enforce policies.

Sandboxing: Suspicious attachments or links are executed in an isolated environment to detect malicious behavior. Example: Cisco AMP, FireEye.

User Training: Simulated phishing campaigns teach users to identify suspicious emails. Metrics like click rate are tracked.

MFA: Protects against credential theft for email accounts.

Real Command/Tool Examples

Check SPF record (dig):

dig TXT example.com | grep -i spf

Check DKIM record:

dig TXT selector1._domainkey.example.com

Check DMARC record:

dig TXT _dmarc.example.com

View email headers in Outlook: Open message > File > Properties > Internet headers.

View headers in Gmail: Open message > Click three dots > Show original.

Sample DMARC aggregate report (XML snippet):

<feedback>
  <report_metadata>
    <org_name>google.com</org_name>
    <email>noreply-dmarc-support@google.com</email>
  </report_metadata>
  <record>
    <row>
      <source_ip>203.0.113.5</source_ip>
      <count>10</count>
      <policy_evaluated>
        <disposition>none</disposition>
        <dkim>fail</dkim>
        <spf>fail</spf>
      </policy_evaluated>
    </row>
  </record>
</feedback>

Walk-Through

1

Phishing Attack Kill Chain

1. Reconnaissance: Attacker gathers target information via OSINT (LinkedIn, company website). Identifies key employees (CEO, finance). 2. Weaponization: Attacker crafts a convincing email — spoofed sender domain (e.g., ceo@company.com), urgent request for wire transfer. 3. Delivery: Email is sent from a compromised server or free email service. If the target has DMARC with p=reject, spoofed emails are blocked. 4. Exploitation: Recipient reads email and believes it's legitimate. Social engineering tricks them into acting. 5. Action: Recipient transfers funds or shares credentials. 6. Exfiltration: Money is moved to attacker's account. Logs show sender IP, email headers, and DMARC disposition.

2

Implementing DMARC from Scratch

1. Assess current email sources: Identify all legitimate senders (internal servers, third-party services like Mailchimp). 2. Publish SPF record: Include all authorized IPs and services. Start with ~all (softfail) to avoid blocking legitimate email. 3. Implement DKIM: Generate key pair, publish public key in DNS, configure MTA to sign outgoing email. Test with a tool like DKIMvalidator. 4. Publish DMARC record: Start with p=none and rua to receive reports. Monitor for weeks. 5. Analyze reports: Identify unauthorized senders and legitimate sources that fail. Update SPF/DKIM as needed. 6. Move to p=quarantine, then p=reject once confident. Tools: dmarcian, DMARC Analyzer.

3

Investigating a BEC Incident

1. Receive report: Employee reports receiving an unusual email from CEO requesting wire transfer. 2. Collect evidence: Save email headers, full email content, and logs from email gateway. 3. Analyze headers: Check SPF, DKIM, DMARC results. If DMARC passed, the email may be from a compromised account (EAC). 4. Check sender IP: Compare with known legitimate IPs. If IP is unusual but DMARC passed, account compromise is likely. 5. Check for signs of compromise: Login anomalies (geolocation, time), forwarding rules set. 6. Contain: Disable compromised account, reset credentials, enable MFA. 7. Eradicate: Remove any malicious rules. 8. Recover: Notify affected parties, review controls. Tools: SIEM (Splunk), email gateway logs, Active Directory audit logs.

4

Configuring Email Gateway Rules

1. Define policy: Decide what to do with emails that fail DMARC (reject, quarantine). 2. Create rule: In email gateway (e.g., Mimecast, Proofpoint), create a rule: If DMARC check fails AND domain is internal, reject. 3. Set exceptions: Allow certain senders (e.g., newsletters) even if they fail DMARC. 4. Enable reporting: Configure gateway to send DMARC aggregate reports to domain owner. 5. Test: Send test spoofed emails from external domain to verify rule works. 6. Monitor: Review logs for false positives. Adjust rules as needed. Tools: PowerShell for Exchange Online, GUI for cloud gateways.

5

Responding to Spoofed Domain Attack

1. Detection: User reports phishing email from yourdomain.com. DMARC reports show increasing volume from unauthorized IPs. 2. Triage: Confirm DMARC policy is p=reject. If not, update immediately. 3. Investigate: Check if attacker is using a lookalike domain (e.g., yourdoma1n.com). If so, register that domain and set up DMARC with p=reject. 4. Block: Add unauthorized IPs to blocklist on email gateway. 5. Communicate: Alert users about the spoofing campaign. 6. Post-incident: Review DMARC reports weekly to identify new unauthorized senders. Tools: WHOIS lookup, DMARC report parser.

What This Looks Like on the Job

SOC Scenario 1: DMARC Reject Saves the Day

A SOC analyst at a financial firm notices a spike in DMARC failure reports from their DMARC analyzer. The reports show thousands of emails from an unknown IP in Russia claiming to be from the company's domain. The company's DMARC policy is p=reject, so the emails were never delivered. The analyst confirms no users reported phishing. Without DMARC, those emails would have reached inboxes, likely resulting in credential theft. The analyst creates a block rule for the IP and notifies the threat intel team. The correct response is to do nothing more — DMARC already blocked them. A common mistake is to change the DMARC policy to p=none to "investigate," which would allow future attacks through.

SOC Scenario 2: BEC via Compromised Account

An engineer at a manufacturing company receives an email from the CFO asking for an urgent wire transfer to a vendor. The engineer notices the email is from the correct domain and DMARC passed. Suspicious, the engineer calls the CFO, who confirms they did not send the email. The incident response team investigates and finds the CFO's account was compromised via a phishing link. The attacker set up a mailbox forwarding rule to copy all emails. The team disables the account, removes the rule, and resets credentials. The mistake would be to assume DMARC would have blocked it — DMARC only protects against spoofing, not account compromise. MFA would have prevented the initial compromise.

Scenario 3: Misconfigured SPF Causes Email Delivery Issues

A company's marketing emails using Mailchimp are being blocked by recipients. The IT team checks DMARC reports and sees SPF failures. They realize the SPF record does not include Mailchimp's IPs. They update the SPF record to include include:servers.mcsv.net. They also add a DKIM signature for Mailchimp. Within 24 hours, delivery improves. The common mistake is to blame the email gateway or set DMARC to p=none, which would allow spoofing. Proper troubleshooting involves checking SPF and DKIM alignment first.

How SY0-701 Actually Tests This

SY0-701 Objective 4.4: Implement and Configure Email Security Controls

The exam expects you to understand SPF, DKIM, and DMARC — what each does, how they interact, and their limitations. You must know the DNS record types (TXT), the DMARC policies (none, quarantine, reject), and the purpose of alignment. Common scenario questions: "Which protocol prevents spoofing of the envelope sender?" (SPF). "Which protocol uses a digital signature?" (DKIM). "Which protocol tells the receiver what to do if authentication fails?" (DMARC).

Most Common Wrong Answers

1.

Choosing SPF when the question describes a digital signature: Candidates confuse SPF (IP-based) with DKIM (signature-based). Remember: SPF checks IPs; DKIM checks signatures.

2.

Choosing DKIM when the question asks about policy (reject/quarantine): DKIM only verifies integrity; DMARC defines policy.

3.

Thinking DMARC replaces SPF and DKIM: DMARC requires both to be configured; it does not work alone.

4.

Confusing alignment with authentication: An email can pass SPF but fail DMARC if the domain in the From header does not match the SPF domain.

Specific Terms on the Exam

SPF: v=spf1, -all, ~all, include, ip4, mx

DKIM: selector, d=, s=, a=rsa-sha256, public key in DNS

DMARC: v=DMARC1, p=, rua, ruf, alignment, pct= (percentage)

BEC: Social engineering, wire transfer, executive impersonation

Email gateway: Also called email security gateway, secure email gateway

Trick Questions

Question that describes SPF but uses the word "signature": The correct answer is still SPF if the description matches IP authorization. Read carefully.

Question that says "which protocol prevents domain spoofing?" All three help, but DMARC is the policy that enforces action. The best answer is DMARC because it combines SPF and DKIM with a policy.

Scenario where an email is forwarded: SPF fails because the forwarding server's IP is not authorized. DKIM may still pass if the signature is intact. DMARC may pass if DKIM is aligned.

Decision Rule for Scenario Questions

1.

Identify the problem: spoofing? tampering? policy enforcement? account compromise?

2.

For spoofing of sender domain: DMARC is the overarching answer, but SPF/DKIM are components.

3.

For tampering (content modified): DKIM.

4.

For policy (what to do with failing email): DMARC.

5.

For account compromise: MFA, not email authentication.

6.

Eliminate answers that don't match the technical mechanism described.

Key Takeaways

SPF uses TXT records in DNS to authorize sending IPs; syntax: v=spf1 ip4:... -all

DKIM uses a private key to sign emails and a public key in DNS for verification; selectors allow key rotation.

DMARC policy (p=none, quarantine, reject) tells receivers what to do with unauthenticated email; requires SPF or DKIM alignment.

DMARC alignment means the domain in the From header must match the SPF or DKIM domain.

BEC is a social engineering attack that does not rely on technical spoofing; DMARC does not prevent it.

Email gateway (ESG) can enforce DMARC, sandbox attachments, and filter spam.

Common exam terms: rua (aggregate reports), ruf (forensic reports), pct (percentage of emails to apply policy).

Always check email headers (SPF, DKIM, DMARC results) when investigating phishing.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

SPF (Sender Policy Framework)

Checks IP address of sending server against DNS list

Uses TXT record in DNS

Fails when email is forwarded

Does not protect against header From spoofing

Mechanism: IP authorization

DKIM (DomainKeys Identified Mail)

Checks digital signature in email headers

Uses public key in DNS via selector

Survives forwarding if signature is intact

Protects against tampering

Mechanism: asymmetric cryptography (RSA, ECDSA)

Watch Out for These

Mistake

DMARC alone prevents email spoofing.

Correct

DMARC requires SPF or DKIM to be configured and aligned. Without them, DMARC has nothing to evaluate and defaults to failure.

Mistake

SPF checks the From header in the email.

Correct

SPF checks the envelope sender (Return-Path), not the header From. This is why SPF can be bypassed by spoofing the header From.

Mistake

DKIM encryption ensures email confidentiality.

Correct

DKIM provides a digital signature for integrity and authentication, not encryption. The email body is not encrypted.

Mistake

DMARC with p=reject blocks all spoofed emails.

Correct

DMARC only blocks emails that fail authentication. If an attacker compromises a legitimate account (EAC), DMARC passes because the email is authenticated.

Mistake

Setting DMARC to p=none means no protection.

Correct

p=none still allows monitoring via reports. It is a valid first step to understand email flows before enforcing a policy.

Frequently Asked Questions

What is the difference between SPF, DKIM, and DMARC?

SPF authorizes which IPs can send email for a domain. DKIM provides a digital signature to verify email integrity and sender. DMARC tells the receiving server what to do if SPF or DKIM fails (none, quarantine, reject) and requires alignment. On the exam, remember: SPF = IP check, DKIM = signature, DMARC = policy.

Why does SPF break when email is forwarded?

When an email is forwarded, the forwarding server's IP becomes the new source. That IP is not in the original domain's SPF record, so SPF fails. DKIM can survive forwarding if the signature is intact, but some forwarders modify headers, breaking DKIM. DMARC can still pass if DKIM is aligned and passes. Exam tip: This is why DMARC is needed — to handle forwarding scenarios.

Can DMARC prevent business email compromise (BEC)?

DMARC prevents spoofing of the domain in the From header, but BEC often uses compromised accounts (EAC). In EAC, the email is legitimate from the domain's perspective (SPF/DKIM pass), so DMARC does not block it. To prevent BEC, use MFA, user training, and out-of-band verification for financial requests. Exam tip: DMARC is not a silver bullet for all email threats.

What is a DMARC aggregate report (rua)?

An aggregate report is an XML file sent by email receivers to the domain owner daily. It contains statistics on how many emails passed/failed SPF and DKIM, the source IPs, and the action taken (none, quarantine, reject). Domain owners use these reports to identify unauthorized senders and misconfigurations. Exam tip: rua is for aggregate reports; ruf is for forensic (individual failure) reports.

How do I check if a domain has DMARC configured?

Use a DNS lookup tool (e.g., dig, nslookup) to query the TXT record at _dmarc.domain.com. Example: `dig TXT _dmarc.example.com`. If a record exists, it will show the DMARC version and policy. On the exam, you may be given a DNS output and asked to interpret the policy.

What is DMARC alignment?

Alignment ensures that the domain in the From header matches the domain used in SPF (the envelope sender domain) or DKIM (the d= domain). For SPF alignment, the From domain must match the domain in the Return-Path. For DKIM alignment, the From domain must match the d= tag in the DKIM-Signature header. Without alignment, even if SPF or DKIM passes, DMARC fails. Exam tip: Alignment is a key concept — remember it as 'matching the From domain.'

What does p=reject do?

p=reject tells the receiving mail server to reject (bounce) any email that fails DMARC authentication. This is the strictest policy and provides the best protection against spoofing. However, it can cause legitimate emails to be rejected if misconfigured. Exam tip: p=reject is the goal for domains that do not send bulk email.

Terms Worth Knowing

Ready to put this to the test?

You've just covered Email Security — DMARC, Advanced Threats — now see how well it sticks with free SY0-701 practice questions. Full explanations included, no account needed.

Done with this chapter?