Email security & phishing analysis
When it applies
Two authorized jobs (tradecraft-scope-roe): (a) defensive — dissect a reported phishing
email or BEC attempt, extract IOCs, and recommend tenant controls (defense-* context); (b)
offensive — assess whether an in-scope domain can be spoofed (SPF/DKIM/DMARC posture) as
findings for a report. Sending simulated phishing is a separate, pentest-only track — load
social-eng-methodology first and never run it against a bug-bounty target. Never re-deliver
malicious samples to real users, and never mass-test third-party domains.
Why it works
Spoofing succeeds when a domain's authentication records are missing, weak (~all, p=none), or
misaligned — the receiving server then has no cryptographic reason to reject a forged From. And
even with perfect auth, the display name and Reply-To are unauthenticated, which is what BEC
abuses. Reading full original headers exposes the truth the mail client hides.
Method
- Full original headers ("show original" / view source). Read the
Received chain
bottom-up — only the hops added by your infrastructure are trustworthy; early hops are
sender-supplied. Check From vs Return-Path vs Reply-To consistency and the
Authentication-Results header added by the receiving server.
- Auth records of the sender domain:
dig TXT example.com # SPF — note -all (hard fail) vs ~all (soft) vs missing;
# >10 DNS lookups voids the record entirely
dig TXT _dmarc.example.com # DMARC — p=none only monitors; also check sp= (subdomains)
# and rua (reporting); note relaxed vs strict alignment
dig TXT <selector>._domainkey.example.com # DKIM — selectors come from the DKIM-Signature header
- Content & URLs. Defang and detonate links in a sandbox (urlscan.io), not in a browser.
Compare link text vs href; check lookalike/punycode domains against the real brand.
- Attachments. Static analysis / sandbox only — never open on a live host; route through
defense-malware-triage.
- BEC pattern check. Display-name impersonation of an exec, urgency + payment/wire/gift-card
framing,
Reply-To redirected to a free-mail or lookalike domain, thread hijacking.
- Tenant control review (defensive engagements): anti-phishing policy, external-sender
tagging, MFA coverage, and OAuth app consent grants — consent phishing rides legitimate
identity providers, so audit authorized third-party apps (ties into
web-account-takeover).
- Weaponize the IOCs — sender addresses, reply-to, URLs/domains, attachment hashes feed
defense-detection-engineering / defense-threat-hunting so the finding becomes a detection.
Gotchas
p=none is not protection — it only reports; likewise ~all lets spoofed mail through as
"soft fail". Only -all + p=reject (or quarantine) actually blocks.
- Subdomains are separate — without
sp= in the DMARC record, mail.example.com may be
spoofable when example.com isn't.
- Display-name spoofing passes every check — auth validates the domain, not the human name.
The real signal is the
From address domain and Reply-To.
- Missing DKIM selector — you can't query DKIM without the selector; pull it from the
DKIM-Signature header's s= tag, or try common ones (google, selector1, default).
- Forwarded mailing lists break SPF legitimately — don't flag a false positive; alignment and
DKIM survival matter more there.
- Never click or detonate outside a sandbox, and never send test phishing to third parties
without explicit written authorization.
Verify success
A written verdict per domain (SPF policy, DKIM validity, DMARC enforcement + alignment, spoofable
yes/no with the exact gap), plus — for sample analysis — a complete IOC list and concrete tenant
recommendations, each traceable to a header line or DNS record.
References
RFC 7208 (SPF) / 6376 (DKIM) / 7489 (DMARC); urlscan.io; M365/Google anti-phishing policy docs.
Portions adapted from reverse-skill by zhaoxuya520, MIT License.
1---2name: network-email-security3description: >4 Email security review: dissect phishing samples (headers, URLs, attachments), assess a domain's5 spoofability via SPF/DKIM/DMARC alignment, recognize BEC patterns, and audit tenant anti-phishing6 controls incl. OAuth consent abuse. Load on phishing email analysis, .eml header review,7 "can this domain be spoofed", DMARC/SPF checks, or BEC investigation. Signals: Received chain,8 Authentication-Results, dmarc p=none, ~all vs -all, reply-to mismatch, lookalike domains.9domain: network10type: checklist11stability: learning12modes: [pentest, bugbounty, defense]13severity: high14mitre: [T1566, T1566.002, T1078]15cwe: [CWE-290]16tools: [dig, nslookup, urlscan]17schema_version: 118metadata:19 source: https://skillmd.com/skills/noorqureshi/network-email-security20---2122# Email security & phishing analysis2324## When it applies25Two authorized jobs (`tradecraft-scope-roe`): **(a) defensive** — dissect a reported phishing26email or BEC attempt, extract IOCs, and recommend tenant controls (`defense-*` context); **(b)27offensive** — assess whether an in-scope domain can be spoofed (SPF/DKIM/DMARC posture) as28findings for a report. Sending simulated phishing is a separate, **pentest-only** track — load29`social-eng-methodology` first and never run it against a bug-bounty target. Never re-deliver30malicious samples to real users, and never mass-test third-party domains.3132## Why it works33Spoofing succeeds when a domain's authentication records are missing, weak (`~all`, `p=none`), or34misaligned — the receiving server then has no cryptographic reason to reject a forged `From`. And35even with perfect auth, the *display name* and *Reply-To* are unauthenticated, which is what BEC36abuses. Reading full original headers exposes the truth the mail client hides.3738## Method391. **Full original headers** ("show original" / view source). Read the `Received` chain40 bottom-up — only the hops added by *your* infrastructure are trustworthy; early hops are41 sender-supplied. Check `From` vs `Return-Path` vs `Reply-To` consistency and the42 `Authentication-Results` header added by the receiving server.432. **Auth records of the sender domain:**44 ```45 dig TXT example.com # SPF — note -all (hard fail) vs ~all (soft) vs missing;46 # >10 DNS lookups voids the record entirely47 dig TXT _dmarc.example.com # DMARC — p=none only monitors; also check sp= (subdomains)48 # and rua (reporting); note relaxed vs strict alignment49 dig TXT <selector>._domainkey.example.com # DKIM — selectors come from the DKIM-Signature header50 ```513. **Content & URLs.** Defang and detonate links in a sandbox (urlscan.io), not in a browser.52 Compare link text vs href; check lookalike/punycode domains against the real brand.534. **Attachments.** Static analysis / sandbox only — never open on a live host; route through54 `defense-malware-triage`.555. **BEC pattern check.** Display-name impersonation of an exec, urgency + payment/wire/gift-card56 framing, `Reply-To` redirected to a free-mail or lookalike domain, thread hijacking.576. **Tenant control review** (defensive engagements): anti-phishing policy, external-sender58 tagging, MFA coverage, and OAuth app consent grants — consent phishing rides legitimate59 identity providers, so audit authorized third-party apps (ties into `web-account-takeover`).607. **Weaponize the IOCs** — sender addresses, reply-to, URLs/domains, attachment hashes feed61 `defense-detection-engineering` / `defense-threat-hunting` so the finding becomes a detection.6263## Gotchas64- **`p=none` is not protection** — it only reports; likewise `~all` lets spoofed mail through as65 "soft fail". Only `-all` + `p=reject` (or `quarantine`) actually blocks.66- **Subdomains are separate** — without `sp=` in the DMARC record, `mail.example.com` may be67 spoofable when `example.com` isn't.68- **Display-name spoofing passes every check** — auth validates the domain, not the human name.69 The real signal is the `From` address domain and `Reply-To`.70- **Missing DKIM selector** — you can't query DKIM without the selector; pull it from the71 `DKIM-Signature` header's `s=` tag, or try common ones (`google`, `selector1`, `default`).72- **Forwarded mailing lists break SPF legitimately** — don't flag a false positive; alignment and73 DKIM survival matter more there.74- **Never click or detonate outside a sandbox**, and never send test phishing to third parties75 without explicit written authorization.7677## Verify success78A written verdict per domain (SPF policy, DKIM validity, DMARC enforcement + alignment, spoofable79yes/no with the exact gap), plus — for sample analysis — a complete IOC list and concrete tenant80recommendations, each traceable to a header line or DNS record.8182## References83RFC 7208 (SPF) / 6376 (DKIM) / 7489 (DMARC); urlscan.io; M365/Google anti-phishing policy docs.8485---86_Portions adapted from [reverse-skill](https://github.com/zhaoxuya520/reverse-skill) by zhaoxuya520, MIT License._