Email Domain Security — Spoofability Verdict & SPF Supply-Chain Analysis
Companion skills: offensive-osint §16.14 (raw record-fetch recipes — dig/PowerShell one-liners for SPF/DMARC/DKIM/BIMI/MTA-STS/TLS-RPT/DNSSEC/CAA, the MX→IdP inference table, the DMARC reporting-vendor table). osint-methodology (confidence levels, output format, severity rubric this skill inherits). Fetch the records with §16.14 first; bring the raw TXT text here for the verdict. This skill does not re-list what a record is — it reasons about what a domain's combination of records actually lets an attacker do.
0. When to Use / When NOT
Use this skill when:
- Asked to audit spoof feasibility, produce an email-spoofability verdict, or explain "is domain X spoofable."
- You already have raw SPF/DMARC TXT text (via
offensive-osint §16.14 or your own dig) and need the verdict, not just the record dump.
- Investigating an SPF PermError, a long or unusual include chain, or a dead
include: target.
- Writing a client-facing finding that has to survive the pushback "we have SPF
-all, why is this flagged?"
- Reasoning about DMARC subdomain policy inheritance,
pct= partial enforcement, or duplicate-record handling.
Do NOT use this skill when:
- You haven't fetched the raw records yet. Run
offensive-osint §16.14's dig/PowerShell recipes first, then bring the text here.
- You want to actually send a spoofed test message or run an SMTP
RCPT TO liveness check. That is active engagement work requiring explicit authorization and is out of scope for this passive-DNS skill — see §14.
- You're auditing TLS/cert posture rather than email auth — that's
offensive-osint §16.15 / TLS deep audit territory.
- You need AXFR / zone-transfer analysis.
dns_deep-class modules run that check alongside the email-auth sweep, but it's a distinct DNS finding (open zone transfer, unrelated to spoofability) — see the note in §9.
1. Scope & Authorization Posture
Same posture as the companion skills: assets you own or have written authorization to assess. Everything in this skill is passive — reading published, public DNS TXT records that any resolver on the internet can already see — so it carries essentially zero detectability risk on its own.
But the verdict this skill produces is the input to a decision someone downstream might act on (an authorized phishing-simulation send, a client remediation ticket, a bug bounty report). Flag the boundary explicitly: a passive verdict of "spoofable" is a strong, defensible claim about DNS-published policy — it is not itself proof that a spoofed message was delivered. See §14.
2. Confidence Levels
Inherits osint-methodology §2's three-tier scale, mapped onto email-auth assertions specifically:
| Level |
Meaning here |
| TENTATIVE |
A mechanism in the SPF chain could not be resolved (timeout / SERVFAIL / no nameservers) — the verdict for that mechanism is inconclusive. See §8's transient-vs-dead discipline; never silently upgrade this to FIRM. |
| FIRM |
Record(s) present, parsed under RFC 7208 (SPF) / RFC 7489 (DMARC) grammar, verdict computed purely from directly observed TXT text. This is the ceiling for everything this skill produces on its own. |
| CONFIRMED |
The verdict was cross-checked against actual mail-flow behavior (an authorized send-and-verify test). Outside this skill's passive scope — only ever assigned after an active test someone else ran. |
Default posture: everything this skill outputs is at most FIRM. Never claim CONFIRMED spoofability from DNS reading alone, no matter how conclusive the record combination looks.
3. Output Format
Same finding schema as the companion skills, with the fields this domain actually populates in practice:
Finding:
module: email_spoof # or dns_deep / email-domain-security, depending on your pipeline
asset_key: domain:<target>
category: DNS_MISCONFIG # the real implementation groups ALL email-auth findings under
# this one category — these are DNS record misconfigurations,
# not mail-server misconfigurations. Don't invent a separate
# EMAIL_SECURITY category unless your own schema needs one.
severity: <high|medium|low|info> # see §7 / §8 for exact per-condition mapping
confidence: <tentative|firm|confirmed> # see §2 — almost always FIRM
title: "Email spoofable — <vector>" # or the specific SPF supply-chain title
description: <cite the exact reasons — see the "reasons" convention below>
evidence:
spf: <raw SPF TXT, or "(none)">
dmarc: <raw DMARC TXT, or "(none)">
vector: <e.g. "header-From spoof (exact domain, SPF +all bypasses DMARC)">
effective_subdomain_policy: <sp= value or the inherited p= value>
reasons: [<ordered list of full-sentence reasons — see below>]
dedup_key: "emailspoof:<target>" # or "spfsupply:<target>:<kind>", "spfmulti:<target>",
# "dmarcmulti:<target>" — stable across re-scans so the
# same finding doesn't duplicate on the next audit
remediation: <the specific DMARC/SPF ratchet needed to close the exact vector found>
The reasons convention: the verdict logic (§7) doesn't just return a label — it builds an ordered list of full, client-report-ready sentences explaining why the domain is spoofable by that vector. Quote them directly in a deliverable rather than re-writing the explanation from scratch; they're already written in the right register (e.g. "SPF terminates in +all (or bare all), returning an SPF pass for any sender IP. An attacker aligns the envelope sender to the target domain, so DMARC passes on the SPF leg and the spoofed message is delivered even if DMARC is set to reject.").
4. Source Hygiene & Citations
For every record pulled: FQDN queried + record type + UTC timestamp + resolver used + raw text verbatim.
- Query against public resolvers (1.1.1.1 / 8.8.8.8 / 9.9.9.9), not local/system DNS — an operator's local resolver may be split-horizon or stale, masking what the internet actually sees. This matters more here than almost anywhere else in the arsenal: the whole verdict depends on seeing exactly what a real mail receiver's resolver sees.
- Capture the raw TXT text verbatim, not a paraphrase — SPF/DMARC grammar is unforgiving (a missing
;, a pct= typo, a duplicate record) and the raw text is the only thing that lets someone else verify your parse.
- If you walked an SPF include chain, log every hop (host → TXT-or-NXDOMAIN-or-transient) — the walk itself is evidence, not just the final lookup count.
5. Do NOT
- Do NOT treat SPF
-all/~all as spoof-proof by itself. This is the single misconception this skill exists to correct — see §6. SPF governs the invisible envelope return-path; the visible header From: is governed only by DMARC.
- Do NOT assert CONFIRMED spoofability from DNS reading alone. Passive analysis caps at FIRM (§2). CONFIRMED requires an authorized send-and-verify test — out of this skill's scope (§14).
- Do NOT send actual spoofed test mail, or run an SMTP
RCPT TO/MAIL FROM probe, as "confirmation." That's active engagement work requiring explicit authorization; this skill is DNS-reads-only.
- Do NOT flag a transient DNS failure (SERVFAIL / timeout / no-nameservers) on an SPF include as "dead" or a takeover lead. Only an explicit NXDOMAIN qualifies — see §8's transient-vs-dead discipline. A dead-include false-positive is the kind of finding that gets a report laughed out of a client review.
- Do NOT count a macro-expanded SPF target (
%{d}, %{i}, %{s}, …) as a resolvable takeover candidate. The mechanism still costs a DNS lookup toward the RFC 7208 budget, but you cannot passively resolve the literal macro string — doing so will NXDOMAIN and produce a false takeover claim.
- Do NOT ignore a
redirect= modifier that sits after a terminal all mechanism — per RFC 7208 §6.1 it is never reached (SPF evaluation stops at all), so don't count it toward the lookup budget or walk it.
- Do NOT assert an SPF-include-takeover finding from NXDOMAIN alone. NXDOMAIN is necessary but not sufficient — you still have to check whether the registrable domain is actually available for an attacker to register (WHOIS/RDAP). NXDOMAIN + confirmed-available = takeover lead; NXDOMAIN + still-registered-to-someone = just a dead reference.
📎 Detailed content (full examples / references / data tables) has been split into reference.md in the same directory; use Read to load the relevant section on demand.
1---2name: email-domain-security3description: "Defensible email spoofing assessment using DNS only: SPF/DMARC/DKIM adjudication, 10-query limit PermError, SPF include takeover supply-chain risk, passive. Signals: email security, SPF."4zh-signals: "仅凭 DNS 做可辩护的邮件伪造判定:SPF/DMARC/DKIM 组合裁决、10次查询上限 PermError、SPF include 接管供应链风险分析,纯被动。信号:邮件安全,spf。"5when-to-use: >-6 Rigorous, defensible email-spoofability verdict and SPF supply-chain risk analysis computed from published DNS alone. Deepens the record-level SPF/DMARC/DKIM/BIMI/MTA-STS/DNSSEC fetch recipes in the7version: 1.08sources: asm_reference_impl, rfc_7208, public_research9triggers:10 - email spoofability11 - email spoofing verdict12 - is this domain spoofable13 - spoof feasibility14 - header from spoofing15 - envelope from vs header from16 - BEC feasibility17 - business email compromise feasibility18 - SPF DMARC verdict19 - DMARC enforcement20 - DMARC alignment21 - SPF supply chain22 - SPF PermError23 - SPF lookup limit24 - 10 DNS lookup limit25 - SPF void lookup26 - SPF include takeover27 - dead SPF include28 - SPF +all29 - DMARC p=none30 - DMARC p=reject31 - DMARC subdomain policy32 - duplicate DMARC record33 - email domain security34 - email authentication audit35 - phishing feasibility domain36 - spoof proof domain37metadata:38 source: https://skillmd.com/skills/dangeroussong/email-domain-security39---4041# Email Domain Security — Spoofability Verdict & SPF Supply-Chain Analysis4243> Companion skills: **`offensive-osint` §16.14** (raw record-fetch recipes — dig/PowerShell one-liners for SPF/DMARC/DKIM/BIMI/MTA-STS/TLS-RPT/DNSSEC/CAA, the MX→IdP inference table, the DMARC reporting-vendor table). **`osint-methodology`** (confidence levels, output format, severity rubric this skill inherits). Fetch the records with §16.14 first; bring the raw TXT text here for the verdict. This skill does not re-list what a record *is* — it reasons about what a domain's *combination* of records actually lets an attacker do.4445## 0. When to Use / When NOT4647**Use this skill when:**4849- Asked to audit spoof feasibility, produce an email-spoofability verdict, or explain "is domain X spoofable."50- You already have raw SPF/DMARC TXT text (via `offensive-osint` §16.14 or your own `dig`) and need the *verdict*, not just the record dump.51- Investigating an SPF PermError, a long or unusual include chain, or a dead `include:` target.52- Writing a client-facing finding that has to survive the pushback "we have SPF `-all`, why is this flagged?"53- Reasoning about DMARC subdomain policy inheritance, `pct=` partial enforcement, or duplicate-record handling.5455**Do NOT use this skill when:**5657- You haven't fetched the raw records yet. Run `offensive-osint` §16.14's dig/PowerShell recipes first, then bring the text here.58- You want to actually *send* a spoofed test message or run an SMTP `RCPT TO` liveness check. That is active engagement work requiring explicit authorization and is out of scope for this passive-DNS skill — see §14.59- You're auditing TLS/cert posture rather than email auth — that's `offensive-osint` §16.15 / TLS deep audit territory.60- You need AXFR / zone-transfer analysis. `dns_deep`-class modules run that check alongside the email-auth sweep, but it's a distinct DNS finding (open zone transfer, unrelated to spoofability) — see the note in §9.6162---6364## 1. Scope & Authorization Posture6566Same posture as the companion skills: assets you own or have written authorization to assess. Everything in this skill is **passive** — reading published, public DNS TXT records that any resolver on the internet can already see — so it carries essentially zero detectability risk on its own.6768But the *verdict* this skill produces is the input to a decision someone downstream might act on (an authorized phishing-simulation send, a client remediation ticket, a bug bounty report). Flag the boundary explicitly: a passive verdict of "spoofable" is a strong, defensible claim about DNS-published policy — it is not itself proof that a spoofed message was delivered. See §14.6970---7172## 2. Confidence Levels7374Inherits `osint-methodology` §2's three-tier scale, mapped onto email-auth assertions specifically:7576| Level | Meaning here |77|---|---|78| **TENTATIVE** | A mechanism in the SPF chain could not be resolved (timeout / SERVFAIL / no nameservers) — the verdict for *that mechanism* is inconclusive. See §8's transient-vs-dead discipline; never silently upgrade this to FIRM. |79| **FIRM** | Record(s) present, parsed under RFC 7208 (SPF) / RFC 7489 (DMARC) grammar, verdict computed purely from directly observed TXT text. This is the ceiling for everything this skill produces on its own. |80| **CONFIRMED** | The verdict was cross-checked against actual mail-flow behavior (an authorized send-and-verify test). Outside this skill's passive scope — only ever assigned after an active test someone else ran. |8182**Default posture:** everything this skill outputs is at most FIRM. Never claim CONFIRMED spoofability from DNS reading alone, no matter how conclusive the record combination looks.8384---8586## 3. Output Format8788Same finding schema as the companion skills, with the fields this domain actually populates in practice:8990```91Finding:92 module: email_spoof # or dns_deep / email-domain-security, depending on your pipeline93 asset_key: domain:<target>94 category: DNS_MISCONFIG # the real implementation groups ALL email-auth findings under95 # this one category — these are DNS record misconfigurations,96 # not mail-server misconfigurations. Don't invent a separate97 # EMAIL_SECURITY category unless your own schema needs one.98 severity: <high|medium|low|info> # see §7 / §8 for exact per-condition mapping99 confidence: <tentative|firm|confirmed> # see §2 — almost always FIRM100 title: "Email spoofable — <vector>" # or the specific SPF supply-chain title101 description: <cite the exact reasons — see the "reasons" convention below>102 evidence:103 spf: <raw SPF TXT, or "(none)">104 dmarc: <raw DMARC TXT, or "(none)">105 vector: <e.g. "header-From spoof (exact domain, SPF +all bypasses DMARC)">106 effective_subdomain_policy: <sp= value or the inherited p= value>107 reasons: [<ordered list of full-sentence reasons — see below>]108 dedup_key: "emailspoof:<target>" # or "spfsupply:<target>:<kind>", "spfmulti:<target>",109 # "dmarcmulti:<target>" — stable across re-scans so the110 # same finding doesn't duplicate on the next audit111 remediation: <the specific DMARC/SPF ratchet needed to close the exact vector found>112```113114**The `reasons` convention:** the verdict logic (§7) doesn't just return a label — it builds an ordered list of full, client-report-ready sentences explaining *why* the domain is spoofable by that vector. Quote them directly in a deliverable rather than re-writing the explanation from scratch; they're already written in the right register (e.g. *"SPF terminates in `+all` (or bare `all`), returning an SPF pass for any sender IP. An attacker aligns the envelope sender to the target domain, so DMARC passes on the SPF leg and the spoofed message is delivered even if DMARC is set to reject."*).115116---117118## 4. Source Hygiene & Citations119120For every record pulled: **FQDN queried + record type + UTC timestamp + resolver used + raw text verbatim**.121122- Query against public resolvers (1.1.1.1 / 8.8.8.8 / 9.9.9.9), not local/system DNS — an operator's local resolver may be split-horizon or stale, masking what the internet actually sees. This matters more here than almost anywhere else in the arsenal: the whole verdict depends on seeing exactly what a real mail receiver's resolver sees.123- Capture the raw TXT text verbatim, not a paraphrase — SPF/DMARC grammar is unforgiving (a missing `;`, a `pct=` typo, a duplicate record) and the raw text is the only thing that lets someone else verify your parse.124- If you walked an SPF include chain, log every hop (host → TXT-or-NXDOMAIN-or-transient) — the walk itself is evidence, not just the final lookup count.125126---127128## 5. Do NOT129130- **Do NOT treat SPF `-all`/`~all` as spoof-proof by itself.** This is the single misconception this skill exists to correct — see §6. SPF governs the invisible envelope return-path; the visible header From: is governed only by DMARC.131- **Do NOT assert CONFIRMED spoofability from DNS reading alone.** Passive analysis caps at FIRM (§2). CONFIRMED requires an authorized send-and-verify test — out of this skill's scope (§14).132- **Do NOT send actual spoofed test mail, or run an SMTP `RCPT TO`/`MAIL FROM` probe, as "confirmation."** That's active engagement work requiring explicit authorization; this skill is DNS-reads-only.133- **Do NOT flag a transient DNS failure (SERVFAIL / timeout / no-nameservers) on an SPF include as "dead" or a takeover lead.** Only an explicit NXDOMAIN qualifies — see §8's transient-vs-dead discipline. A dead-include false-positive is the kind of finding that gets a report laughed out of a client review.134- **Do NOT count a macro-expanded SPF target (`%{d}`, `%{i}`, `%{s}`, …) as a resolvable takeover candidate.** The mechanism still costs a DNS lookup toward the RFC 7208 budget, but you cannot passively resolve the literal macro string — doing so will NXDOMAIN and produce a false takeover claim.135- **Do NOT ignore a `redirect=` modifier that sits after a terminal `all` mechanism** — per RFC 7208 §6.1 it is never reached (SPF evaluation stops at `all`), so don't count it toward the lookup budget or walk it.136- **Do NOT assert an SPF-include-takeover finding from NXDOMAIN alone.** NXDOMAIN is necessary but not sufficient — you still have to check whether the registrable domain is actually available for an attacker to register (WHOIS/RDAP). NXDOMAIN + confirmed-available = takeover lead; NXDOMAIN + still-registered-to-someone = just a dead reference.137138---139140> 📎 Detailed content (full examples / references / data tables) has been split into `reference.md` in the same directory; use Read to load the relevant section on demand.