Ipj19 3 PDF
Ipj19 3 PDF
Thank You............................. 42 We are pleased to welcome two new members of our Editorial
Advisory Board. David Conrad is the Chief Technical Officer at the
Supporters and Sponsors....... 43 Internet Corporation for Assigned Names and Numbers (ICANN),
and Cullen Jennings is a Cisco Fellow at Cisco Systems, Inc. We are
grateful to Fred Baker, who has left Cisco Systems and our Editorial
Advisory Board, and we wish him every success in the future.
ISSN 1944-1134
Comprehensive Internet E-Mail Security
by William Stallings, Independent Consultant
F
or both organizations and individuals, e-mail is pervasive and
vulnerable to a wide range of security threats. In general terms,
e-mail security threats can be classified as follows:
• Authenticity-related threats: Could result in unauthorized access
to an enterprise’s e-mail system. Another threat in this category is
deception, in which the purported author isn’t the actual author.
• Integrity-related threats: Could result in unauthorized modifica-
tion of e-mail content.
• Confidentiality-related threats: Could result in unauthorized dis-
closure of sensitive information.
• Availability-related threats: Could prevent end users from being
able to send or receive e-mail messages.
Message Message
User Agent Store
(MUA) (MS)
Message
Recipient
1. Client software creates a pair of keys, one public and one private.
The client prepares an unsigned certificate that includes a user ID
and the user’s public key. The client then sends the unsigned certifi-
cate to a CA in a secure manner.
2. A CA creates a signature by calculating the hash code of the
unsigned certificate and encrypting the hash code with the CA’s pri-
vate key; the encrypted hash code is the signature. The CA attaches
the signature to the unsigned certificate and returns the now-signed
certificate to the client.
3. The client may send its signed certificate to any other user. That
user may verify that the certificate is valid by calculating the hash
code of the certificate (not including the signature), decrypting the
signature using the CA’s public key, and comparing the hash code
to the decrypted signature.
If all users subscribe to the same CA, then there is a common trust of
that CA. All user certificates can be placed in the directory for access
by all users. In addition, users can transmit their certificate directly to
other users. In either case, when B is in possession of A’s certificate,
B has confidence that messages it encrypts with A’s public key will be
secure from eavesdropping and that messages signed with A’s private
key are unforgeable.
Trustworthy E-Mail
The following protocols and standards are described in and recom-
mended by SP 800-177:
• STARTTLS: An SMTP security extension that enables an SMTP
client and server to negotiate the use of Transport Layer Security
(TLS) to provide private, authenticated communication across the
Internet.
• Secure Multipurpose Internet Mail Extensions (S/MIME): Provides
authentication, integrity, nonrepudiation (via digital signatures)
and confidentiality (via encryption) of the message body carried in
SMTP messages.
• DNS-Based Authentication of Named Entities (DANE): Designed
to overcome problems in the Certificate Authority (CA) system by
providing an alternative channel for authenticating public keys
based on DNSSEC, with the result that the same trust relationships
used to certify IP addresses are used to certify servers operating on
those addresses.
• Sender Policy Framework (SPF): Enables a domain owner to spec-
ify the IP addresses of MTAs that are authorized to send mail on its
behalf. SPF uses the DNS to allow domain owners to create records
that associate the domain name with a specific IP address range of
authorized MTAs. It is a simple matter for receivers to check the
SPF text record (TXT) in the DNS to confirm that the purported
sender of a message is permitted to use that source address and
reject mail that does not come from an authorized IP address.
STARTTLS
A significant security-related extension for SMTP is STARTTLS,
defined in RFC 3207[5]. STARTTLS enables the addition of confi-
dentiality and authentication in the exchange between SMTP agents.
This addition enables SMTP agents to protect some or all of their
communications from eavesdroppers and attackers by invoking a
Transport Layer Security (TLS) session within the SMTP connection.
STARTTLS has been widely deployed, and is supported by Amazon,
Facebook, Google, Microsoft, Yahoo, and others[6]. A 2014 study
by Facebook, which sends several billions of e-mails daily, found
that 76% of host names that receive Facebook e-mails support
STARTTLS[7].
If the client does initiate the connection over a TLS-enabled port, the
server may prompt with a message indicating that the STARTTLS
option is available.
DNSSEC Secured
Sender
DNS DKIM TXT RR Provides Sending
MTA’s Public Key to
DM Receiving MTA
Th AR
at C T
Se X
nd T T
s er ell
fie s Us s R
p ec dres DKIM es ec
S d DK eiv
T XT IP A Signature IM ing
F ’s an M
SP der d S TA
e n PF
S
msg
msg Sending Receiving
MTA sig MTA
sig
ies
e cif te
Sp ca
A RR rtifi msg
S Ce
Sender E TL TLS
N P
MUA MTA’s DKIM DA MT sig
S
Signing Key
Receiver
DNS Receiver
MUA
DNSSEC Secured
Receiver MUA
msg Verifies S/MIME
Sender’s S/MIME
Signature
Signing Key
(Private Key)
The client can then issue the STARTTLS command in the SMTP com-
mand stream, and the two parties proceed to establish a secure TLS
connection. Many e-mail providers and servers now have STARTTLS
enabled[9, 10], including Amazon, Comcast, Dropbox, Facebook,
Google, Microsoft, and Yahoo.
The initiating client sees no TLS upgrade request and proceeds with
an unsecured connection. However, SP 800-177 takes the position
that some security is better than no security and that until TLS is
available everywhere and automatically invoked, TLS-capable serv-
ers must prompt clients to invoke the STARTTLS command. TLS
clients should attempt to either use STARTTLS initially or issue the
command when requested.
S/MIME
Secure/Multipurpose Internet Mail Extension (S/MIME) is a secu-
rity enhancement to the MIME Internet e-mail format standard[11].
S/MIME is a complex capability that is defined in many documents.
The most important documents relevant to S/MIME include the
following [12−19]:
• RFC 5750, S/MIME Version 3.2 Certificate Handling: Specifies
conventions for X.509 certificate usage by S/MIME v3.2.
• RFC 5751, S/MIME Version 3.2 Message Specification: The
principal defining document for S/MIME message creation and
processing.
• RFC 4134, Examples of S/MIME Messages: Gives examples of
message bodies formatted using S/MIME.
• RFC 2634, Enhanced Security Services for S/MIME: Describes
four optional security service extensions for S/MIME.
• RFC 5652, Cryptographic Message Syntax (CMS): Describes CMS.
This syntax is used to digitally sign, digest, authenticate, or encrypt
arbitrary message content.
• RFC 3370, CMS Algorithms: Describes the conventions for using
several cryptographic algorithms with the CMS.
• RFC 5752, Multiple Signatures in CMS: Describes the use of mul-
tiple, parallel signatures for a message.
• RFC 1847, Security Multiparts for MIME—Multipart/Signed and
Multipart/Encrypted: Defines a framework within which security
services may be applied to MIME body parts. The use of a digital
signature is relevant to S/MIME, as explained subsequently.
Receiver’s
Public Key
One-Time
Secret Key
Encrypt
(e.g., RSA)
Sender’s
Private Key
Sign
Msg (e.g., RSA/ Msg Encrypt Msg
SHA-256) (e.g., AES-128/
CBC)
Sig Sig
Receiver’s
Private Key
Sig Sig
OpenPGP
Pretty Good Privacy (PGP) was developed by Phil Zimmermann as
a publicly-available freeware package to enable individuals to
exchange secure e-mails without the need to rely on any institution.
Efforts began early on to develop Internet standards for PGP[21],
culminating in OpenPGP. OpenPGP[22, 23] is a proposed Internet
Standard for providing authentication and confidentiality for e-mail
messages. Although it is similar in purpose and functionality to
S/MIME, OpenPGP uses different message and key formats and a
different approach to establishing and using certificates. SP 800-177
cites many difficulties with OpenPGP, including lack of usability,
scalability issues related to key distribution, and lack of authentica-
tion of key owners. Further discussion can be found in [24] and [25].
Accordingly, SP 800-177 recommends the use of only S/MIME and
deprecates the use of OpenPGP.
DANE
DNS-Based Authentication of Named Entities (DANE)[27, 28] is a pro-
tocol that provides mechanisms for domains to specify which X.509
certificates, which are commonly used for Transport Layer Security
(TLS), should be trusted for the domain. DANE enables certificates
to be bound to DNS names using DNSSEC. It is proposed in RFC
6698[29] as a way to authenticate TLS client and server entities with-
out a Certificate Authority (CA).
DANE defines a new DNS record type, TLSA, which can be used for
a secure method of authenticating Secure Sockets Layer/Transport
Layer Security (SSL/TLS) certificates. The TLSA provides for:
• Specifying constraints on which CA can vouch for a certificate, or
which specific PKI end-entity certificate is valid.
• Specifying that a service certificate or a CA can be directly authen-
ticated in the DNS itself.
Figure 4: TSLA RR
Transmission Format
Bit: 0 8 16 24 31
Certificate Usage Selector Matching Type
The first two usage models are designed to coexist with and strengthen
the public CA system. The final two usage models operate without
the use of public CAs.
The Selector field indicates whether the full certificate or just the
value of the public key will be matched. The match is made between
the certificate presented in TLS negotiation and the certificate in
the TLSA RR. The Matching Type field indicates how the match of
the certificate is made. The options are exact match, SHA-256 hash
match, or SHA-512 hash match. The Certificate Association Data is
the raw certificate data in hex format.
DANE can address both these vulnerabilities. A domain can use the
presence of the TLSA RR as an indicator that encryption must be
performed, thus preventing malicious downgrade. A domain can
authenticate the certificate used in the TLS connection setup using a
DNSSEC-signed TLSA RR.
In essence, the SMIMEA RR will have the same format and content
as the TLSA RR, with the same functionality. The difference is that
it is geared to the needs of MUAs in dealing with domain names as
specified in e-mail addresses in the message body, rather than domain
names specified in the outer SMTP envelope.
A sending domain needs to identify all the senders for a given domain
and add that information into the DNS as a separate resource record.
Next, the sending domain encodes the appropriate policy for each
sender using the SPF syntax. The encoding is done in a TXT DNS
resource record as a list of mechanisms and modifiers. Mechanisms
are used to define an IP address or range of addresses to be matched,
and modifiers indicate the policy for a given match. The SPF syntax is
fairly complex and can express complex relationships between send-
ers. For more details, see RFC 7208.
If SPF is implemented at a receiver, the SPF entity uses the SMTP enve-
lope MAIL FROM: address domain and the IP address of the sender
to query an SPF TXT RR. The SPF checks can be started before the
body of the e-mail message is received, possibly resulting in blocking
the transmission of the e-mail content. Alternatively, the entire mes-
sage can be absorbed and buffered until all the checks are finished. In
either case, checks must be completed before the mail message is sent
to the end user’s inbox.
With respect to SPF alone, to say in step 1, preceding, that the default
behavior is to accept the message is correct. However, it should be
noted that SPF is usually working within a mixture of anti-abuse
tools and the aggregate filtering engine typically does not accept a
message based on the results of only one of its tools, such as SPF.
Inbox
Internet +
Quarantine
Sender Authorization Further Policy
SPF Record Pass/Fail Checks ?
Lookup
Block/Delete
DNS
DKIM
DomainKeys Identified Mail (DKIM) permits a person, role, or orga-
nization that owns the signing domain to claim some responsibility
for a message by associating the domain with the message[33]. The
domain can be an author’s organization, an operational relay, or
one of their agents. DKIM separates the question of the identity of
the signer of the message from the purported author of the message.
Assertion of responsibility is validated through a cryptographic sig-
nature and by querying the signer’s domain directly to retrieve the
appropriate public key.
It is with these external AUs that the trust relationships required for
authenticated message submission may not exist and do not scale
adequately to be practical. Conversely, within these AUs, there are
other mechanisms (such as authenticated message submission) that
are easier to deploy and more likely to be used than DKIM. External
bad actors are usually attempting to exploit the “any-to-any” nature
of e-mail that motivates most recipient MTAs to accept messages
from anywhere for delivery to their local domain. They may generate
messages without signatures, with incorrect signatures, or with cor-
rect signatures from domains with little traceability. They may also
pose as mailing lists, greeting cards, or other agents that legitimately
send or resend messages on behalf of others.
SMTP SMTP
DNS Public
Signer Key Query/Response
MSA DNS MDA
Verifier
MUA MUA
Verifying the signature uses public information from the Key Store.
If the signature passes, reputation information is used to assess the
signer and that information is passed to the message filtering system.
Public Remote
Relaying
Relaying or
or Delivering
Delivering ADMD:
ADMD Sender
Key
Message Signed?
signed? Practices
Store
Yes No
Verify
Signature
Pass Fail
Assessments
Check
Signing
Practices
DMARC
Domain-Based Message Authentication, Reporting, and Conformance
(DMARC), defined in RFC 7489[38], allows e-mail senders to specify
policy on how their mail should be handled, the types of reports that
receivers can send back, and the frequency of those reports.
DMARC works with SPF and DKIM. SPF enables senders to advise
receivers, via DNS, whether mail purporting to come from the sender
is valid, and whether it should be delivered, flagged, or discarded.
However, neither SPF nor DKIM includes a mechanism to tell receiv-
ers if SPF or DKIM is in use, nor do they have a feedback mechanism
to inform senders of the effectiveness of the anti-spam techniques.
For example, if a message arrives at a receiver without a DKIM
signature, DKIM provides no mechanism to allow the receiver to
learn if the message is authentic but was sent from a sender that
did not implement DKIM, or if the message is a spoof. In essence,
DMARC addresses these issues by indicating whether SPF and/or
DKIM will be used, what a receiver should do when they aren’t, and
how receivers should report aggregate results for the domain.
DMARC requires that the From address match (be aligned with) an
Authenticated Identifier from DKIM or SPF. In the case of DKIM,
the match is made between the DKIM signing domain and the From
domain. In the case of SPF, the match is between the SPF-authenticated
domain and the From domain.
A mail sender that uses DMARC must also use SPF or DKIM, or
both. The sender posts a DMARC policy in the DNS that advises
receivers on how to treat messages that purport to originate from the
sender’s domain. The policy is in the form of a DNS TXT resource
record associated with the sender’s domain name. The sender also
needs to establish e-mail addresses to receive aggregate and forensic
reports. Because these e-mail addresses are published unencrypted in
the DNS TXT RR, they are easily discovered, leaving the poster sub-
ject to unsolicited bulk e-mail. Thus, the poster of the DNS TXT RR
needs to employ some kind of abuse countermeasures.
A message generated on the sender side may pass through other relays
but eventually arrives at a receiver’s transport service. The typical
processing order for DMARC on the receiving side follows:
1. The receiver performs standard validation tests, such as check-
ing against IP blocklists and domain reputation lists, as well as
enforcing rate limits from a particular source.
2. The receiver extracts the RFC 5322 From address from the mes-
sage. This address must be a single, valid address or else the mail
is refused as an error.
3. The receiver queries for the DMARC DNS record based on
the sending domain. If none exists, DMARC processing is
terminated.
4. The receiver performs DKIM signature checks. If more than one
DKIM signature exists in the message, one must verify.
Pass
Retrieve verified
DKIM
DKIM domains
DKIM
SPF Apply
SPF DMARC
Sending Mail Policy
Retrieve
Server Attaches “Envelope
DKIM Signature From” Via SPF
Fail
Update Periodic
Aggregate Report
To Be Sent
To Sender Standard Validation
Tests at Receiver
Failure (Including IP
Report Blocklists, Block Quarantine
Reputation,
Rate Limits, Etc)
Summary
The IETF has developed a suite of protocols that provide compre-
hensive Internet e-mail security. Many of these protocols have been
widely deployed, and the entire suite is recommended by NIST.
Acknowledgment
The author would like to express his gratitude to the reviewer for the
many detailed and helpful comments.
References
[1] National Institute of Standards and Technology, “Trustworthy
Email,” NIST Special Publication 800-177, September 2016.
[5] Paul Hoffman, “SMTP Service Extension for Secure SMTP over
Transport Layer Security,” RFC 3207, February 2002.
[10]
David Cohen, “Facebook: 95% of Notification Emails
Encrypted Thanks to Providers’ STARTTLS Deployment,”
AdWeek, August 19, 2014.
[17]
Russ Housley, “Cryptographic Message Syntax (CMS)
Algorithms,” RFC 3370, August 2002.
[19] Sandy Murphy, Jim Galvin, Steve Crocker, and Ned Freed,
“Security Multiparts for MIME: Multipart/Signed and
Multipart/Encrypted,” RFC 1847, October 1995.
[23] Dave Del Torto, Michael Elkins, Raph Levien, and Thomas
Roessler, “MIME Security with OpenPGP,” RFC 3156, August
2001.
[28]
Richard Barnes, “Let the Names Speak for Themselves:
Improving Domain Name Authentication with DNSSEC and
DANE,” The Internet Protocol Journal, Volume 15, No. 1,
March 2012.
[29]
Jakob Schlyter and Paul Hoffman, “The DNS-Based
Authentication of Named Entities (DANE) Transport Layer
Security (TLS) Protocol: TLSA,” RFC 6698, August 2012.
[31]
Scott Kitterman, “Sender Policy Framework (SPF) for
Authorizing Use of Domains in Email, Version 1,” RFC 7208,
April 2014.
[34] Murray Kucherawy, Dave Crocker, and Tony Hansen,
“DomainKeys Identified Mail (DKIM) Signatures,” RFC 6376,
September 2011.
[37] Tony Hansen, Dave Crocker, and Phillip Hallam-Baker,
“DomainKeys Identified Mail (DKIM) Service Overview,”
RFC 5585, July 2009.
S
oftware-Defined Networks (SDN) are promoted as a way to
eliminate the complexity of distributed control planes, increase
network responsiveness to specific applications and business
requirements, and reduce operational and equipment cost. If this
description sounds like the classic “too good to be true” situation,
that’s because it might just be. Just like you can’t build a database
that has ideal consistency, accessibility, and partionability, you can’t
build a cheap network with optimal routing and minimal control-
plane state. It’s just a reality of the complexity built into the physical
shape of the universe that everything has a tradeoff—cheap, fast, and
high quality, choose two.
When we reach the top of the SDN hype cycle, what will our options
be? Perhaps the best place to start in answering this question is by
considering why the “big promise” of SDN hasn’t been really suc-
cessful in the real world.
Further, while it’s always possible for the network to change state in
the middle of a flow being transmitted, reactive control planes suffer
from a wider set of causes for these changes. This situation is always
true, of course, but while proactive control planes treat a discon-
nect between apparent and actual states as an error condition to be
resolved, reactive control planes treat such a disconnect as a normal
state of affairs. In a larger sense, disconnects between the actual and
perceived states of the network are seen by attached devices as net-
work instability; the stronger the disconnect, the more unstable the
network appears to be. This condition can have an adverse effect on
applications and host behavior. Local cache timeouts, cache failures,
and other problems need to be included in the more general topol-
ogy changes and problems common to distributed control planes for
path failures.
Flow-Based Forwarding
Standard IP headers contain at least five fields of interest to network
devices:
• Source IP address
• Source port number
• Destination IP address
• Destination port number
• Protocol number (or identifier)
There has long been a desire to forward traffic based on much more
than the destination address, so that individual applications can be
independently routed through the network, and information other
than the destination address can be used to deny access to specific
network resources. These requirements have led to a string of work
in the area of accounting for the IP source, at the least, when making
forwarding decisions.[2]
C E
G
B D
Third, the use cases for such flow-based forwarding, in the real
world, tend to be rather narrow. Replacing the control plane that
manages millions of flows through a large-scale data center fabric to
support custom routing for a few thousand flows at any given time
doesn’t appear to be a good tradeoff in terms of complexity and net-
work manageability.
Dynamic Provisioning
If there’s one point virtually every network engineer agrees on, it’s
that large-scale networks are difficult to provision, monitor, and
troubleshoot. It would certainly be a boon to network operations,
particularly in large networks, if there were a single, unified interface
into every vendor’s platform, and every control-plane implemen-
tation deployed across the network, to facilitate provisioning and
management. While the idea of a single interface is noble, the reality
of the market is probably going to intercede—as it has many times
in the past—because vendors must be able to differentiate themselves
somehow in order to actually sell hardware, software, and services.
This reality isn’t an indictment of vendor business models, it’s just
reality as it exists. There are two ways to express this problem.
The most likely result of these two factors is that SDN interfaces
tend to be restricted in their scope and scale to the “lowest common
denominator” of available features. Some level of configuration and
trace information might be available through vendor-specific exten-
sions, but not on the “common model.” Models such as OpenFlow
tend to start with clean implementations, and then tend to fragment
over time as vendors rush to build product. There is little incentive
to consider additions to the base work, along with the rework such
additions would require on a per-vendor basis, over time.
Application Interaction
Combining dynamic provisioning and dynamic policy results in what
can be called an Application Programming Interface (API) for the
network itself. Treating the network as a programmable entity allows
applications to directly interact with the network as a system. The
general idea can look something like this:
• An application needs a certain amount of bandwidth with specific
quality-of-service parameters at a particular time.
• The application uses an interface into a controller to reserve this
bandwidth, providing the controller with the impacted endpoints,
etc.
• The controller uses some means to build the right network condi-
tions to accommodate the needs of the application.
The same objections that can be raised for dynamic provisioning can
be raised for direct interaction between applications and the network,
such as brittleness. To such interactions can be added the potential
for feedback loops between various applications and network condi-
tions (the main reason live measurement of network conditions was
removed from the Enhanced Interior Gateway Protocol [EIGRP],
soon after its first deployments, and replaced with relatively static
metrics).
RUSS WHITE has more than 20 years of experience in designing, deploying, break-
ing, and troubleshooting large-scale networks. Across that time, he has co-authored
more than 40 software patents, has spoken at venues throughout the world, has
participated in the development of several Internet standards, has helped develop the
Cisco Certified Design Expert (CCDE) and Cisco Certified Architect Certification
(CCAR) certifications, and has worked in Internet governance with the Internet
Society (ISOC). Russ is currently a member of the Architecture Team at LinkedIn,
where he works on next-generation data center designs, complexity, and security. His
most recent books are The Art of Network Architecture and Navigating Network
Complexity. Russ holds an MSIT from Capella University; an MACM from
Shepherds Theological Seminary; CCIE #2635, CCDE 2007:001, and CCAR certi-
fications, and is currently working on a PhD at Southeastern Theological Seminary.
You can find Russ at http://ntwrk.guru/ and linkedin.com/in/riw777
The Internet Protocol Journal is published under the “CC BY-NC-ND” Creative Commons
Licence. Quotation with attribution encouraged.
This publication is distributed on an “as-is” basis, without warranty of any kind either
express or implied, including but not limited to the implied warranties of merchantability,
fitness for a particular purpose, or non-infringement. This publication could contain technical
inaccuracies or typographical errors. Later issues may modify or update information provided
in this issue. Neither the publisher nor any contributor shall have any liability to any person
for any loss or damage caused directly or indirectly by the information contained herein.
Emerald Sponsors
Corporate Subscriptions