0Pricing
Cyber Security Academy · Lesson

How Email Spoofing Works

Why email is easy to forge.

How Email Spoofing Works is a free Cyber Security Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cyber Security Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Email Was Built on Trust

The core email protocol, SMTP, was designed in the early 1980s for a small, trusted network of researchers. It has no built-in authentication of the sender.

That original trust assumption is why email spoofing is so easy today. Anyone who can talk SMTP to a mail server can claim to be anyone they like, unless additional protections (SPF, DKIM, DMARC) are layered on top.

Envelope vs Header Addresses

A crucial concept: an email actually has two sets of addresses, and they need not match.

  • Envelope (MAIL FROM) — used by mail servers to route and bounce the message; the user never sees it
  • Header From — the 'From:' line displayed in the email client

Spoofing exploits the gap: the visible Header From can say anything, regardless of who really sent the message.

Faking the From Address

Because SMTP does not verify identity, an attacker can simply set the From header to a trusted address. A raw SMTP conversation looks like this:

MAIL FROM:<attacker@evil.example>
RCPT TO:<victim@company.com>
DATA
From: "IT Support" <support@company.com>
Subject: Password reset required

Click here to reset your password...
.

Why Spoofing Is Dangerous

Spoofed email is the backbone of major attack categories:

  • Phishing — tricking users into entering credentials
  • Business Email Compromise (BEC) — impersonating an executive to authorize fraudulent payments
  • Malware delivery — attachments that look like they came from a colleague

A message that appears to come from your CEO or your bank is far more likely to be trusted and acted upon.

Exact-Domain Spoofing

Exact-domain spoofing forges the From header to use your real domain, for example ceo@yourcompany.com.

This is the most dangerous form because the address is genuinely correct, there is no typo to notice. Without email authentication, a receiving server has no way to know the message did not originate from your real infrastructure.

SPF, DKIM, and DMARC exist primarily to stop exact-domain spoofing.

Lookalike and Cousin Domains

When authentication blocks exact-domain spoofing, attackers fall back to lookalike domains they actually own and control:

Legitimate:   paypal.com
Lookalikes:   paypa1.com      (number 1 for letter l)
              paypal-secure.com
              paypal.com.evil.example
              paypaI.com      (capital I for lowercase l)

Display Name Deception

Even with all protections in place, attackers abuse the display name, the friendly text shown before the address.

Many email clients, especially on mobile, show only the display name and hide the actual address. So an email from:

"Acme CEO" <random123@gmail.com>

may appear simply as Acme CEO. The address is legitimate for Gmail, so authentication passes, yet the user is deceived. This is a human problem authentication cannot solve.

Reading Email Headers

To investigate a suspicious message, examine the full headers. They record the path the message traveled and the authentication results.

Return-Path: <bounce@mailer.example>
Received: from mail.evil.example (203.0.113.9)
Received: from relay.company.com (198.51.100.4)
From: "IT Support" <support@company.com>
Authentication-Results: mx.company.com;
  spf=fail smtp.mailfrom=evil.example;
  dkim=none;
  dmarc=fail

What the Received Chain Tells You

The Received headers form a chain, read bottom to top, showing each server the message passed through.

Red flags include:

  • An originating server that does not belong to the claimed sender
  • A mismatch between the Return-Path and the From domain
  • Suspicious or unexpected IP geolocations

Combined with the Authentication-Results line, the header chain often exposes a forgery quickly.

The Three Pillars of Defense

Three complementary standards work together to make email trustworthy. Each addresses a different gap:

  • SPF — authorizes which servers may send mail for your domain (the envelope sender)
  • DKIM — cryptographically signs messages so tampering and forgery are detectable
  • DMARC — ties SPF and DKIM to the visible From header and tells receivers what to do on failure

You will study each in the next three lessons.

Authentication Is Not a Silver Bullet

SPF, DKIM, and DMARC stop exact-domain spoofing of domains you control. They do not stop:

  • Lookalike domains the attacker owns and authenticates correctly
  • Display-name deception
  • Compromised legitimate accounts sending real, authenticated mail

Email authentication is essential, but it must be paired with user awareness training and inbound filtering. Defense in depth applies here too.

Quick Check

Test your understanding of email spoofing.

Recap

You learned why email is easy to forge:

  • SMTP has no built-in sender authentication
  • The envelope sender and the visible Header From need not match
  • Spoofing powers phishing, BEC, and malware delivery via exact-domain, lookalike, and display-name tricks
  • Email headers and the Authentication-Results line help investigate forgeries
  • SPF, DKIM, and DMARC together defend against exact-domain spoofing but are not a complete solution

Next, you will learn how SPF authorizes legitimate sending servers.

Frequently asked questions

Is the “How Email Spoofing Works” lesson free?

Yes — the full text of “How Email Spoofing Works” is free to read here on the web, and the Cyber Security Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cyber Security Academy course, upgrade to CoddyKit PRO.

What will I learn in “How Email Spoofing Works”?

Why email is easy to forge. You practise Cyber Security Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cyber Security Academy?

No prior experience is required. Cyber Security Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “How Email Spoofing Works” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cyber Security Academy lesson?

Yes. Every Cyber Security Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. How Email Spoofing Works
  2. SPF Records
  3. DKIM Signing
  4. DMARC Policy and Reporting
← Back to Cyber Security Academy