ProtoStackv0.1

Interactive Protocol Visualizer

Security & AuthProfessional trackIntermediateOSI: Application LayerDefault Port: 25 (SMTP) / 53 (DNS TXT)Standard: RFC 7208

SPF

— Sender Policy Framework

SPF lets a domain owner publish the mail servers that are allowed to send mail for that domain. The receiving mail server checks the SMTP envelope sender against the published policy and uses the result to reject, flag, or accept the message.

Read first: SMTP, DNSContent reviewed 2026-11-18

Interactive Session: How SPF Works

Step through the packet exchange sequence between nodes.

Interactive Execution Sandbox

Interact with a live or clearly-labelled simulated instance of SPF.

Threat Model & Attack Simulation

How this protocol is attacked in practice, what defenders can see, and which control stops it.

Threat model & attack simulation

Simulated

Defensive education. Every step runs in this page; no traffic is generated or sent.

Attack library

SPF misconfiguration abuse

Spoofing

A neutral all-qualifier or missing record lets anyone send mail claiming to be the domain.

Attackersimulated
SPFtarget
Attack step 1 of 3
Check the policy

The attacker reads the domain SPF record and finds ~all or no record.

What a defender can see

Domains without an enforcing SPF policy.

Impact if unmitigated

Phishing with the organisation domain.

Defences that matter
  • End SPF with -all
  • Align SPF with DMARC
  • Monitor authentication results

This is a conceptual model for defenders, not an exploit toolkit. It contains no payloads, tooling or instructions for attacking systems you do not own.

Protocol Specification & Architecture

Key characteristics, real-world deployment patterns, and trade-offs.

Core Technical Features

  • Policy published as a single DNS TXT record beginning with v=spf1
  • Mechanisms such as ip4, ip6, a, mx, include, and exists
  • Qualifiers +, -, ~, and ? that set pass, fail, softfail, and neutral results
  • Evaluation limited to 10 DNS lookups to bound resolver work

Real-World Use Cases

  • Reducing forged sender addresses in inbound mail filtering
  • Aligning authorized sending services such as newsletters and CRMs
  • Combining with DKIM and DMARC for domain-level mail policy

Advantages & Strengths

  • Simple to publish and cheap to evaluate at the receiving gateway
  • Directly blocks many spoofed envelope senders before content filtering

Limitations & Vulnerabilities

  • Breaks when mail is forwarded, because the envelope sender no longer matches the sending host
  • Does not protect the visible From header and is ineffective without DMARC alignment