© Men & Mice http://menandmice,com
SPF, DKIM and DMARC
Mail-Reputation and DNS
Wednesday 26 October 16
© Men & Mice http://menandmice,com
Sender Policy Framework
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF
•Sender Policy Framework (SPF) defines the addresses
mails can be originated for a given domain
•this information is stored in it’s own SPF-Format inside a
TXT-Record
• there has been a dedicated SPF record type, that has been
deprecated because it was ignored by Mail- and DNS-admins
•Website: http://www.openspf.org
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF-Example
•the Google SPF-Record
google.com. 3600 IN TXT "v=spf1
include:_spf.google.com ~all"
Mail-Sender
Domain
SPF-Format
Version
Include SPF-
Information from
subdomain
Soft-Fail SPF-
Checks
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF-Example
•the Google SPF-Record
_spf.google.com. 299 INTXT "v=spf1
include:_netblocks.google.com
include:_netblocks2.google.com
include:_netblocks3.google.com ~all"
Includes of Google
Network Blocks
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF-Example
•the Google SPF-Record
_spf.google.com. 299 INTXT "v=spf1
include:_netblocks.google.com
include:_netblocks2.google.com
include:_netblocks3.google.com ~all"
Includes of Google
Network Blocks
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF-Example
•the Google SPF-Record
_netblocks.google.com. 3600 IN TXT "v=spf1
ip4:64.18.0.0/20 ip4:64.233.160.0/19
ip4:66.102.0.0/20 ip4:66.249.80.0/20
ip4:72.14.192.0/18 ip4:74.125.0.0/16
ip4:108.177.8.0/21 ip4:173.194.0.0/16
ip4:207.126.144.0/20 ip4:209.85.128.0/17
ip4:216.58.192.0/19 ip4:216.239.32.0/19
~all"
Google Mail-Sending
addresses
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF-Operation
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
sending mail
on port 25
from 192.0.2.123
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF-Operation
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
sending mail
on port 25
from 192.0.2.123
looking up SPF-Record
for “example.com”
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF-Operation
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
sending mail
on port 25
from 192.0.2.123
example.com IN TXT “v=spf1 ipv4:192.0.2.0/24 -all”
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF-Operation
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
sending mail
on port 25
from 192.0.2.123
check if sending
address is within SPF-
Data
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF-Operation
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
mail has been
received
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF issues
•SPF is problematic with some mail functions where
mail is send indirectly
•mail-forwarding
•mailing lists
•webforms -
http://bsdly.blogspot.nl/2016/10/is-spf-simply-too-hard-for-application.html
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF problem with forwarding
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
mailing-list
server
sending mail from
user@example.com
on port 25
from 192.0.2.123
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF problem with forwarding
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
mailing-list
server
sending mail from
user@example.com
on port 25
from 203.0.113.23
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF problem with forwarding
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
mailing-list
server
sending mail from
user@example.com
on port 25
from 203.0.113.23
looking up SPF-Record
for “example.com”
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF problem with forwarding
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
mailing-list
server
sending mail from
user@example.com
on port 25
from 203.0.113.23
example.com IN TXT “v=spf1 ipv4:192.0.2.0/24 -all”
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF problem with forwarding
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
mailing-list
server
sending mail from
user@example.com
on port 25
from 203.0.113.23
check if sending
address is within SPF-
Data
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF problem with forwarding
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
mailing-list
server
sending mail from
user@example.com
on port 25
from 203.0.113.23
mail rejected, as the
sender IP does not
appear in the SPF data
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF problem with forwarding
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
mailing-list
server
sending mail from
user@example.com
on port 25
from 203.0.113.23
mail rejected, as the
sender IP does not
appear in the SPF data
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DKIM
DomainKeys Identified Mail
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DKIM
• DKIM cryptographically signs selected mail headers and the mail
content
• DKIM is used to validate the mail message content but not to secure
the transport path
• No upgrade to User Client (Client E-Mail program) needed
• But E-Mail Clients can offer per-User signing, as an option
• DKIM Management can be “outsourced” (ISP, E-Mail Hosting Provider)
• No PKI Infrastructure needed, only depends on DNS
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DKIM
• DKIM Website
• http://dkim.org/
• Documents
• RFC 5585 - DomainKeys Identified Mail (DKIM) Service Overview
https://tools.ietf.org/html/rfc5585
• RFC 6376 - DomainKeys Identified Mail (DKIM) Signatures
https://tools.ietf.org/html/rfc6376
• RFC 5863 - DomainKeys Identified Mail (DKIM) Development, Deployment, and Operations
https://tools.ietf.org/html/rfc5863
• RFC 5617 - DomainKeys Identified Mail (DKIM) Author Domain Signing Practices (ADSP)
https://tools.ietf.org/html/rfc5617
• RFC 6377 - DomainKeys Identified Mail (DKIM) and Mailing Lists
https://tools.ietf.org/html/rfc6377
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DKIM Signature in the Mail Header
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=;
b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...]
DKIM
Version
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DKIM Signature in the Mail Header
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=;
b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...]
DKIM
Signing
Algorithm
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DKIM Signature in the Mail Header
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=;
b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...]
canonicalization algorithm: "relaxed"
algorithm that tolerates common
modifications such as whitespace replacement
and header field line rewrapping
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DKIM Signature in the Mail Header
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=;
b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...]
Domain of the sending party,
this is where the public key to
verify the signature is located
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DKIM Signature in the Mail Header
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=;
b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...]
Subdomain selector: will pre
prepended to the domain to
fetch the DKIM public key
Wednesday 26 October 16
© Men & Mice http://menandmice,com
Fetching the DKIM key
•The DKIM public key can be found inside a TXT record at a
domain name build from
• selector
• subdomain “_domainkey”
• base mail domain (d: field)
$ dig selector1-menandmice-com._domainkey.mennogmys.onmicrosoft.com TXT +short
"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDenG16IONFpDPACAhDnCd/
N98W277rSbwSoatar767pSYtT+CClFqhmEePynSVGdS0RxIjFZscmVN5RZjnfD
+HE1HL4XvUtxnnb1j0PeNfhrDHy7BHFGux6exfL7/splByKu7qhLBP10+SyAjiE4Qc6xWfCQ3MzmECZGW/
CzzmOQIDAQAB; n=1024,1450909615,1"
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DKIM Signature in the Mail Header
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=;
b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...]
Header-Fields signed by
the sending party
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DKIM Signature in the Mail Header
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=;
b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...]
Body-Hash: Hash of the
message body
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DKIM Signature in the Mail Header
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=;
b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...]
Signature over header
fields and Body-Hash
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DKIM operation
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
mail
forwarder
mail get signed with
“example.com” private
DKIM key
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DKIM operation
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
mail
forwarder
sending mail from
user@example.com
on port 25
from 192.0.2.123
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF problem with forwarding
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
sending mail from
user@example.com
on port 25
from 203.0.113.23
mail
forwarder
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF problem with forwarding
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
sending mail from
user@example.com
on port 25
from 203.0.113.23
looking up DKIM public key
for “example.com”
mail
forwarder
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF problem with forwarding
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
sending mail from
user@example.com
on port 25
from 203.0.113.23
_domainkeys.example.com IN TXT “v=DKIM1; k=rsa; p=MIG[...]”
mail
forwarder
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF problem with forwarding
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
sending mail from
user@example.com
on port 25
from 203.0.113.23
validating DKIM
signed headers and
body
mail
forwarder
Wednesday 26 October 16
© Men & Mice http://menandmice,com
SPF problem with forwarding
example.com
authoritative
DNS
example.com
outgoing
mail
receiving
mail server
mailing-list
server
mail has been
received
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DMARC
Domain-based Message Authentication,
Reporting & Conformance
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DMARC
•DMARC builds on top of SPF and DKIM
•it allows the owner of an email domain to publish a policy
about SPF and DKIM failures
•DMARC can be used to publish a feedback channel to let
the domain owner know of spoofed mail from his domain
•the DMARC policy is stored in DNS
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DMARC
•example DMARC record
"v=DMARC1;p=reject;pct=100;rua=mailto:postmaster@example.com"
Protocol Version
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DMARC
•example DMARC record
"v=DMARC1;p=reject;pct=100;rua=mailto:postmaster@example.com"
Policy for organizational
domain
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DMARC
•example DMARC record
"v=DMARC1;p=reject;pct=100;rua=mailto:postmaster@example.com"
Percentage of messages
subjected to filtering
Wednesday 26 October 16
© Men & Mice http://menandmice,com
DMARC
•example DMARC record
"v=DMARC1;p=reject;pct=100;rua=mailto:postmaster@example.com"
Where to send the
aggregated mis-use reports
Wednesday 26 October 16

More Related Content

PDF
More mastering the art of indexing
PDF
Partitions Performance with MySQL 5.1 and 5.5
PPTX
Understanding and tuning WiredTiger, the new high performance database engine...
DOCX
Linux crontab
PDF
sqlmap - Under the Hood
PDF
Galera Cluster - Node Recovery - Webinar slides
PDF
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
PDF
DNS exfiltration using sqlmap
More mastering the art of indexing
Partitions Performance with MySQL 5.1 and 5.5
Understanding and tuning WiredTiger, the new high performance database engine...
Linux crontab
sqlmap - Under the Hood
Galera Cluster - Node Recovery - Webinar slides
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
DNS exfiltration using sqlmap

What's hot (20)

PDF
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
PPT
IBM Lotus Domino Domain Monitoring (DDM)
PPTX
Enable Domino Data Access Services (DAS)
PPT
Backup And Recovery
PPTX
Catch Me If You Can: PowerShell Red vs Blue
PDF
MySQL Administrator 2021 - 네오클로바
PDF
가상머신 환경에서 리눅스 및 큐브리드 설치 가이드 20150714
PPTX
SolarWinds Scalability for the Enterprise
PDF
Pwning in c++ (basic)
PDF
Building ClickHouse and Making Your First Contribution: A Tutorial_06.10.2021
PDF
State transfer With Galera
PDF
Security Monitoring with eBPF
PDF
Non-regression testing in web app development
PDF
Course 102: Lecture 4: Using Wild Cards
PDF
Zabbix: Uma ferramenta para Gerenciamento de ambientes de T.I
PDF
How Prometheus Store the Data
PDF
HTTP - The Other Face Of Domino
PDF
IBM Notes Traveler Best Practices
PDF
Monitoramento de serviços com Zabbix + Grafana + Python - Marcelo Santoto - D...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
IBM Lotus Domino Domain Monitoring (DDM)
Enable Domino Data Access Services (DAS)
Backup And Recovery
Catch Me If You Can: PowerShell Red vs Blue
MySQL Administrator 2021 - 네오클로바
가상머신 환경에서 리눅스 및 큐브리드 설치 가이드 20150714
SolarWinds Scalability for the Enterprise
Pwning in c++ (basic)
Building ClickHouse and Making Your First Contribution: A Tutorial_06.10.2021
State transfer With Galera
Security Monitoring with eBPF
Non-regression testing in web app development
Course 102: Lecture 4: Using Wild Cards
Zabbix: Uma ferramenta para Gerenciamento de ambientes de T.I
How Prometheus Store the Data
HTTP - The Other Face Of Domino
IBM Notes Traveler Best Practices
Monitoramento de serviços com Zabbix + Grafana + Python - Marcelo Santoto - D...
Ad

Viewers also liked (20)

PDF
What is new in BIND 9.11?
PDF
TLS, SPF, DKIM, DMARC, authenticated email
PDF
DNS High-Availability Tools - Open-Source Load Balancing Solutions
PDF
BIND 9 logging best practices
PPTX
Using DMARC to Improve Your Email Reputation
PDF
DNSSEC best practices Webinar
PDF
SPF, DKIM en DMARC
PDF
Keeping DNS server up-and-running with “runit
PDF
Yeti DNS - Experimenting at the root
PDF
Community tools to fight against DDoS, SANOG 27
PDF
Community tools to fight against DDoS
PDF
Windows 2012 and DNSSEC
PPT
Dns protocol design attacks and security
PPS
Linux15 dynamic dns-2
PPS
Linux14 Dynamic DNS
PDF
DNSSEC and DANE – E-Mail security reloaded
PDF
DNSTap Webinar
PDF
DDoS Attacks : Preparation Detection Mitigation
PPTX
Fighting Email Abuse with DMARC
PDF
CNIT 40: 2: DNS Protocol and Architecture
What is new in BIND 9.11?
TLS, SPF, DKIM, DMARC, authenticated email
DNS High-Availability Tools - Open-Source Load Balancing Solutions
BIND 9 logging best practices
Using DMARC to Improve Your Email Reputation
DNSSEC best practices Webinar
SPF, DKIM en DMARC
Keeping DNS server up-and-running with “runit
Yeti DNS - Experimenting at the root
Community tools to fight against DDoS, SANOG 27
Community tools to fight against DDoS
Windows 2012 and DNSSEC
Dns protocol design attacks and security
Linux15 dynamic dns-2
Linux14 Dynamic DNS
DNSSEC and DANE – E-Mail security reloaded
DNSTap Webinar
DDoS Attacks : Preparation Detection Mitigation
Fighting Email Abuse with DMARC
CNIT 40: 2: DNS Protocol and Architecture
Ad

Similar to Fighting Abuse with DNS (20)

PDF
The not so simple mail transport protocol @dpcon 2018
PDF
Join the fight against email spam! - SweetlakePHP
PDF
Join the fight against email spam! - EmmenPHP
PDF
An Introduction To The DMARC SMTP Validation Requirements
PDF
Electronic_Mail_Attacks-1-35.pdf by xploit
PPTX
secure-email-domain-name-system-design.pptx
PPTX
Network and Internet Security.pptx
PDF
An Introduction To The DMARC SMTP Validation Requirements
PPTX
What You Need to Know About Email Authentication
PDF
How to use Domino as a Mail Server in a Modern World
PDF
Massive emailing with Linux, Postfix and Ruby on Rails
PPTX
Let's go Phishing with Email!
PPTX
DomainKeys Identified Mail (DKIM).pptx
PPTX
Sender Policy Framework (SPF): An Email Authentication Technique
PDF
DMARC360 Guide
PPTX
SMTP over IPv6 at LinkedIn
PDF
Async os dkim-dmarc-guide
PPT
Authentication & Reputation, Adding Business Value In The Real World
PPT
how email works
PDF
Rspamd freebsd FOSDEM
The not so simple mail transport protocol @dpcon 2018
Join the fight against email spam! - SweetlakePHP
Join the fight against email spam! - EmmenPHP
An Introduction To The DMARC SMTP Validation Requirements
Electronic_Mail_Attacks-1-35.pdf by xploit
secure-email-domain-name-system-design.pptx
Network and Internet Security.pptx
An Introduction To The DMARC SMTP Validation Requirements
What You Need to Know About Email Authentication
How to use Domino as a Mail Server in a Modern World
Massive emailing with Linux, Postfix and Ruby on Rails
Let's go Phishing with Email!
DomainKeys Identified Mail (DKIM).pptx
Sender Policy Framework (SPF): An Email Authentication Technique
DMARC360 Guide
SMTP over IPv6 at LinkedIn
Async os dkim-dmarc-guide
Authentication & Reputation, Adding Business Value In The Real World
how email works
Rspamd freebsd FOSDEM

More from Men and Mice (20)

PPTX
Cisco Live 2019: New Best Practices for Hybrid and Multicloud Network Strategies
PDF
Part 3 - Local Name Resolution in Linux, FreeBSD and macOS/iOS
PDF
Part 2 - Local Name Resolution in Windows Networks
PDF
Namespaces for Local Networks
PDF
How to send DNS over anything encrypted
PDF
The DNSSEC KSK of the root rolls
PDF
The CAA-Record for increased encryption security
PDF
SMTP STS (Strict Transport Security) vs. SMTP with DANE
PDF
DNSSEC signing Tutorial
PDF
Windows Server 2016 Webinar
PDF
Kea DHCP – the new open source DHCP server from ISC
PDF
RIPE 71 and IETF 94 reports webinar
PDF
PowerDNS Webinar - Part 2
PDF
PowerDNS Webinar
PDF
IETF 93 Review Webinar
PDF
RIPE 70 Report Webinar
PDF
IETF 92 Webinar
PDF
The KNOT DNS Server
PDF
RIPE 69 & IETF 91 Webinar - DNS-Privacy, IPv6, DANE and DHCP(v6)
PDF
IETF 90 Report – DNS, DHCP, IPv6 and DANE
Cisco Live 2019: New Best Practices for Hybrid and Multicloud Network Strategies
Part 3 - Local Name Resolution in Linux, FreeBSD and macOS/iOS
Part 2 - Local Name Resolution in Windows Networks
Namespaces for Local Networks
How to send DNS over anything encrypted
The DNSSEC KSK of the root rolls
The CAA-Record for increased encryption security
SMTP STS (Strict Transport Security) vs. SMTP with DANE
DNSSEC signing Tutorial
Windows Server 2016 Webinar
Kea DHCP – the new open source DHCP server from ISC
RIPE 71 and IETF 94 reports webinar
PowerDNS Webinar - Part 2
PowerDNS Webinar
IETF 93 Review Webinar
RIPE 70 Report Webinar
IETF 92 Webinar
The KNOT DNS Server
RIPE 69 & IETF 91 Webinar - DNS-Privacy, IPv6, DANE and DHCP(v6)
IETF 90 Report – DNS, DHCP, IPv6 and DANE

Recently uploaded (20)

PPTX
Chapter 5: Probability Theory and Statistics
PDF
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
PDF
Architecture types and enterprise applications.pdf
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
Five Habits of High-Impact Board Members
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
sustainability-14-14877-v2.pddhzftheheeeee
DOCX
search engine optimization ppt fir known well about this
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
Configure Apache Mutual Authentication
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PPTX
2018-HIPAA-Renewal-Training for executives
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
Flame analysis and combustion estimation using large language and vision assi...
PPT
Geologic Time for studying geology for geologist
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Chapter 5: Probability Theory and Statistics
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
Architecture types and enterprise applications.pdf
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
Microsoft Excel 365/2024 Beginner's training
A review of recent deep learning applications in wood surface defect identifi...
Comparative analysis of machine learning models for fake news detection in so...
Five Habits of High-Impact Board Members
Custom Battery Pack Design Considerations for Performance and Safety
sustainability-14-14877-v2.pddhzftheheeeee
search engine optimization ppt fir known well about this
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Configure Apache Mutual Authentication
NewMind AI Weekly Chronicles – August ’25 Week III
2018-HIPAA-Renewal-Training for executives
Zenith AI: Advanced Artificial Intelligence
Enhancing plagiarism detection using data pre-processing and machine learning...
Flame analysis and combustion estimation using large language and vision assi...
Geologic Time for studying geology for geologist
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx

Fighting Abuse with DNS

  • 1. © Men & Mice http://menandmice,com SPF, DKIM and DMARC Mail-Reputation and DNS Wednesday 26 October 16
  • 2. © Men & Mice http://menandmice,com Sender Policy Framework Wednesday 26 October 16
  • 3. © Men & Mice http://menandmice,com SPF •Sender Policy Framework (SPF) defines the addresses mails can be originated for a given domain •this information is stored in it’s own SPF-Format inside a TXT-Record • there has been a dedicated SPF record type, that has been deprecated because it was ignored by Mail- and DNS-admins •Website: http://www.openspf.org Wednesday 26 October 16
  • 4. © Men & Mice http://menandmice,com SPF-Example •the Google SPF-Record google.com. 3600 IN TXT "v=spf1 include:_spf.google.com ~all" Mail-Sender Domain SPF-Format Version Include SPF- Information from subdomain Soft-Fail SPF- Checks Wednesday 26 October 16
  • 5. © Men & Mice http://menandmice,com SPF-Example •the Google SPF-Record _spf.google.com. 299 INTXT "v=spf1 include:_netblocks.google.com include:_netblocks2.google.com include:_netblocks3.google.com ~all" Includes of Google Network Blocks Wednesday 26 October 16
  • 6. © Men & Mice http://menandmice,com SPF-Example •the Google SPF-Record _spf.google.com. 299 INTXT "v=spf1 include:_netblocks.google.com include:_netblocks2.google.com include:_netblocks3.google.com ~all" Includes of Google Network Blocks Wednesday 26 October 16
  • 7. © Men & Mice http://menandmice,com SPF-Example •the Google SPF-Record _netblocks.google.com. 3600 IN TXT "v=spf1 ip4:64.18.0.0/20 ip4:64.233.160.0/19 ip4:66.102.0.0/20 ip4:66.249.80.0/20 ip4:72.14.192.0/18 ip4:74.125.0.0/16 ip4:108.177.8.0/21 ip4:173.194.0.0/16 ip4:207.126.144.0/20 ip4:209.85.128.0/17 ip4:216.58.192.0/19 ip4:216.239.32.0/19 ~all" Google Mail-Sending addresses Wednesday 26 October 16
  • 8. © Men & Mice http://menandmice,com SPF-Operation example.com authoritative DNS example.com outgoing mail receiving mail server sending mail on port 25 from 192.0.2.123 Wednesday 26 October 16
  • 9. © Men & Mice http://menandmice,com SPF-Operation example.com authoritative DNS example.com outgoing mail receiving mail server sending mail on port 25 from 192.0.2.123 looking up SPF-Record for “example.com” Wednesday 26 October 16
  • 10. © Men & Mice http://menandmice,com SPF-Operation example.com authoritative DNS example.com outgoing mail receiving mail server sending mail on port 25 from 192.0.2.123 example.com IN TXT “v=spf1 ipv4:192.0.2.0/24 -all” Wednesday 26 October 16
  • 11. © Men & Mice http://menandmice,com SPF-Operation example.com authoritative DNS example.com outgoing mail receiving mail server sending mail on port 25 from 192.0.2.123 check if sending address is within SPF- Data Wednesday 26 October 16
  • 12. © Men & Mice http://menandmice,com SPF-Operation example.com authoritative DNS example.com outgoing mail receiving mail server mail has been received Wednesday 26 October 16
  • 13. © Men & Mice http://menandmice,com SPF issues •SPF is problematic with some mail functions where mail is send indirectly •mail-forwarding •mailing lists •webforms - http://bsdly.blogspot.nl/2016/10/is-spf-simply-too-hard-for-application.html Wednesday 26 October 16
  • 14. © Men & Mice http://menandmice,com SPF problem with forwarding example.com authoritative DNS example.com outgoing mail receiving mail server mailing-list server sending mail from user@example.com on port 25 from 192.0.2.123 Wednesday 26 October 16
  • 15. © Men & Mice http://menandmice,com SPF problem with forwarding example.com authoritative DNS example.com outgoing mail receiving mail server mailing-list server sending mail from user@example.com on port 25 from 203.0.113.23 Wednesday 26 October 16
  • 16. © Men & Mice http://menandmice,com SPF problem with forwarding example.com authoritative DNS example.com outgoing mail receiving mail server mailing-list server sending mail from user@example.com on port 25 from 203.0.113.23 looking up SPF-Record for “example.com” Wednesday 26 October 16
  • 17. © Men & Mice http://menandmice,com SPF problem with forwarding example.com authoritative DNS example.com outgoing mail receiving mail server mailing-list server sending mail from user@example.com on port 25 from 203.0.113.23 example.com IN TXT “v=spf1 ipv4:192.0.2.0/24 -all” Wednesday 26 October 16
  • 18. © Men & Mice http://menandmice,com SPF problem with forwarding example.com authoritative DNS example.com outgoing mail receiving mail server mailing-list server sending mail from user@example.com on port 25 from 203.0.113.23 check if sending address is within SPF- Data Wednesday 26 October 16
  • 19. © Men & Mice http://menandmice,com SPF problem with forwarding example.com authoritative DNS example.com outgoing mail receiving mail server mailing-list server sending mail from user@example.com on port 25 from 203.0.113.23 mail rejected, as the sender IP does not appear in the SPF data Wednesday 26 October 16
  • 20. © Men & Mice http://menandmice,com SPF problem with forwarding example.com authoritative DNS example.com outgoing mail receiving mail server mailing-list server sending mail from user@example.com on port 25 from 203.0.113.23 mail rejected, as the sender IP does not appear in the SPF data Wednesday 26 October 16
  • 21. © Men & Mice http://menandmice,com DKIM DomainKeys Identified Mail Wednesday 26 October 16
  • 22. © Men & Mice http://menandmice,com DKIM • DKIM cryptographically signs selected mail headers and the mail content • DKIM is used to validate the mail message content but not to secure the transport path • No upgrade to User Client (Client E-Mail program) needed • But E-Mail Clients can offer per-User signing, as an option • DKIM Management can be “outsourced” (ISP, E-Mail Hosting Provider) • No PKI Infrastructure needed, only depends on DNS Wednesday 26 October 16
  • 23. © Men & Mice http://menandmice,com DKIM • DKIM Website • http://dkim.org/ • Documents • RFC 5585 - DomainKeys Identified Mail (DKIM) Service Overview https://tools.ietf.org/html/rfc5585 • RFC 6376 - DomainKeys Identified Mail (DKIM) Signatures https://tools.ietf.org/html/rfc6376 • RFC 5863 - DomainKeys Identified Mail (DKIM) Development, Deployment, and Operations https://tools.ietf.org/html/rfc5863 • RFC 5617 - DomainKeys Identified Mail (DKIM) Author Domain Signing Practices (ADSP) https://tools.ietf.org/html/rfc5617 • RFC 6377 - DomainKeys Identified Mail (DKIM) and Mailing Lists https://tools.ietf.org/html/rfc6377 Wednesday 26 October 16
  • 24. © Men & Mice http://menandmice,com DKIM Signature in the Mail Header DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=; b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...] DKIM Version Wednesday 26 October 16
  • 25. © Men & Mice http://menandmice,com DKIM Signature in the Mail Header DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=; b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...] DKIM Signing Algorithm Wednesday 26 October 16
  • 26. © Men & Mice http://menandmice,com DKIM Signature in the Mail Header DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=; b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...] canonicalization algorithm: "relaxed" algorithm that tolerates common modifications such as whitespace replacement and header field line rewrapping Wednesday 26 October 16
  • 27. © Men & Mice http://menandmice,com DKIM Signature in the Mail Header DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=; b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...] Domain of the sending party, this is where the public key to verify the signature is located Wednesday 26 October 16
  • 28. © Men & Mice http://menandmice,com DKIM Signature in the Mail Header DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=; b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...] Subdomain selector: will pre prepended to the domain to fetch the DKIM public key Wednesday 26 October 16
  • 29. © Men & Mice http://menandmice,com Fetching the DKIM key •The DKIM public key can be found inside a TXT record at a domain name build from • selector • subdomain “_domainkey” • base mail domain (d: field) $ dig selector1-menandmice-com._domainkey.mennogmys.onmicrosoft.com TXT +short "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDenG16IONFpDPACAhDnCd/ N98W277rSbwSoatar767pSYtT+CClFqhmEePynSVGdS0RxIjFZscmVN5RZjnfD +HE1HL4XvUtxnnb1j0PeNfhrDHy7BHFGux6exfL7/splByKu7qhLBP10+SyAjiE4Qc6xWfCQ3MzmECZGW/ CzzmOQIDAQAB; n=1024,1450909615,1" Wednesday 26 October 16
  • 30. © Men & Mice http://menandmice,com DKIM Signature in the Mail Header DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=; b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...] Header-Fields signed by the sending party Wednesday 26 October 16
  • 31. © Men & Mice http://menandmice,com DKIM Signature in the Mail Header DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=; b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...] Body-Hash: Hash of the message body Wednesday 26 October 16
  • 32. © Men & Mice http://menandmice,com DKIM Signature in the Mail Header DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mennogmys.onmicrosoft.com; s=selector1-menandmice-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Rk04UQbu8aZGogweVSHLqo55rIPXR0OajjGVpZOcEic=; b=cVQyry/E2yMiV9qUZbth0Y51r5OoWoHPr0qYklZYGvc6/[...] Signature over header fields and Body-Hash Wednesday 26 October 16
  • 33. © Men & Mice http://menandmice,com DKIM operation example.com authoritative DNS example.com outgoing mail receiving mail server mail forwarder mail get signed with “example.com” private DKIM key Wednesday 26 October 16
  • 34. © Men & Mice http://menandmice,com DKIM operation example.com authoritative DNS example.com outgoing mail receiving mail server mail forwarder sending mail from user@example.com on port 25 from 192.0.2.123 Wednesday 26 October 16
  • 35. © Men & Mice http://menandmice,com SPF problem with forwarding example.com authoritative DNS example.com outgoing mail receiving mail server sending mail from user@example.com on port 25 from 203.0.113.23 mail forwarder Wednesday 26 October 16
  • 36. © Men & Mice http://menandmice,com SPF problem with forwarding example.com authoritative DNS example.com outgoing mail receiving mail server sending mail from user@example.com on port 25 from 203.0.113.23 looking up DKIM public key for “example.com” mail forwarder Wednesday 26 October 16
  • 37. © Men & Mice http://menandmice,com SPF problem with forwarding example.com authoritative DNS example.com outgoing mail receiving mail server sending mail from user@example.com on port 25 from 203.0.113.23 _domainkeys.example.com IN TXT “v=DKIM1; k=rsa; p=MIG[...]” mail forwarder Wednesday 26 October 16
  • 38. © Men & Mice http://menandmice,com SPF problem with forwarding example.com authoritative DNS example.com outgoing mail receiving mail server sending mail from user@example.com on port 25 from 203.0.113.23 validating DKIM signed headers and body mail forwarder Wednesday 26 October 16
  • 39. © Men & Mice http://menandmice,com SPF problem with forwarding example.com authoritative DNS example.com outgoing mail receiving mail server mailing-list server mail has been received Wednesday 26 October 16
  • 40. © Men & Mice http://menandmice,com DMARC Domain-based Message Authentication, Reporting & Conformance Wednesday 26 October 16
  • 41. © Men & Mice http://menandmice,com DMARC •DMARC builds on top of SPF and DKIM •it allows the owner of an email domain to publish a policy about SPF and DKIM failures •DMARC can be used to publish a feedback channel to let the domain owner know of spoofed mail from his domain •the DMARC policy is stored in DNS Wednesday 26 October 16
  • 42. © Men & Mice http://menandmice,com DMARC •example DMARC record "v=DMARC1;p=reject;pct=100;rua=mailto:postmaster@example.com" Protocol Version Wednesday 26 October 16
  • 43. © Men & Mice http://menandmice,com DMARC •example DMARC record "v=DMARC1;p=reject;pct=100;rua=mailto:postmaster@example.com" Policy for organizational domain Wednesday 26 October 16
  • 44. © Men & Mice http://menandmice,com DMARC •example DMARC record "v=DMARC1;p=reject;pct=100;rua=mailto:postmaster@example.com" Percentage of messages subjected to filtering Wednesday 26 October 16
  • 45. © Men & Mice http://menandmice,com DMARC •example DMARC record "v=DMARC1;p=reject;pct=100;rua=mailto:postmaster@example.com" Where to send the aggregated mis-use reports Wednesday 26 October 16