Q1 2011 WP Bestpractice PDF
Q1 2011 WP Bestpractice PDF
Applications of TLS/SSL
By Larry Seltzer
Security Analyst and Writer
Best Practices and Applications of TLS/SSL
The most well-known example of the use of public key infrastructure has proven flexible
enough to assist in authentication, encryption and data integrity in numerous applications
throughout the enterprise.
Executive Summary
Table of contents
Transport Layer Security or TLS, widely known also as Secure Executive summary 1
Sockets Layer or SSL, is the most popular application of public Introduction 2
key cryptography in the world. It is most famous for securing What is TLS/SSL? 2
web browser sessions, but it has widespread application to - Digital Certificates 2
other tasks. - Authentication and Verification 2
Key Security 3
TLS/SSL can be used to provide strong authentication of both - Encryption 3
parties in a communication session, strong encryption of data - Where TLS Works In the Stack 3
TLS vs. SSL 4
in transit between them, and verification of the integrity of that
Networks Are Insecure By Default 4
data in transit.
- Authentication 4
- Privacy and Integrity 4
TLS/SSL can be used to secure a broad range of critical
- Solutions 4
business functions such as web browsing, secure server-to-
Trusted Certificate Authorities 5
server communications, e-mail client-to-server communications, - Trusted Roots 5
software updating, database access, virtual private networking - Self-Signed Certificates 5
and others. - Authentication Does Not Prove Trust 5
Extended Validation (EV) SSL 5
However, when used improperly, TLS can give the illusion of Not Just For Web Browsers 6
security where the communications have been compromised. Client Security with TLS/SSL 6
It is important to keep certificates up to date and check rigorously - Wireless 7
for error conditions. - SSL VPN 7
Server-to-Server Security with TLS 8
Web and Intranet Servers 8
In many, but not all applications of TLS, the integrity of the
- Common TLS Mistakes 9
process is enhanced by using a certificate issued by an outside
Hosted Service Security with TLS 9
trusted certificate authority.
Certificate Expiration 9
Certificate Revocation 9
This paper will explore how TLS works, best practices for its
Self-Signed Certificates 10
use, and the various applications in which it can secure business Certificate Management 10
computing. Conclusions 11
Additional Reading 11
1
Best Practices and Applications of TLS/SSL
The OpenSSL Project - http://openssl.org/. Microsoft’s crypto tools (http://msdn.microsoft.com/en-us/library/aa380259(VS.85).aspx) are included in the Windows
2
1
SDK (http://msdn.microsoft.com/en-us/windowsserver/bb980924.aspx)
Best Practices and Applications of TLS/SSL
3
Best Practices and Applications of TLS/SSL
TLS vs. SSL passwords controlled by rules which don’t follow best prac-
tices. It’s no surprise that things are this way; following best
TLS is the successor technology to SSL, which was developed
practices for passwords is difficult and unpleasant: you have to
by Netscape in 1994.2 The first public release was SSL version
use passwords that are long and difficult to remember and you
2, and was quickly followed by version 3. The TLS specifica-
need to change them frequently.
tion was released in 1999 in RFC 22463, and is only a minor
modification of SSL 3.
Even server-to-server connections are often authenticated
with passwords which are hard-coded into programs or
Changes have come at a much slower pace since then, with
configuration files.
TLS 1.14 and 1.25 largely concerned with security improve-
ments. TLS is still widely called SSL, especially in product
names, even if the term is strictly inaccurate. Don’t be sur-
prised to see the terms used interchangeably. TLS versions
are designed to interact with and roll back to earlier protocols
such as SSL 3. In fact, in the protocol handshake, TLS 1.0, 1.1
and 1.2 use the version numbers 3.1, 3.2 and 3.3.
One of the main differences you’ll see between SSL and TLS
versions are the cryptographic features, including the ciphers,
hash algorithms and key exchange mechanisms they support.
As time and versions advance, support for weaker features
is dropped from the protocol and stronger ones added.
Administrators on either end of the communication can set
policies requiring or prohibiting particular protocols. It’s
reasonable to claim that the flexibility of TLS with respect to
new developments in ciphers and other cryptographic features
- Privacy and Integrity
is one of the main reasons for its success.
When communications are not secured properly you can’t
be certain that the data has not been monitored or tampered
Networks Are Insecure By Default
with in-transit. Attacks known as “man in the middle” (MITM)
All of our important networking protocols were designed attacks, where the attacker sits on the network monitoring
before security issues were properly appreciated. A great communications between one party and another, are not un-
deal of research has gone into making communications common. Such attacks can, for example, steal usernames and
secure, but in most cases it has to be added on. By default, other unsecured data on the connection.
our networks are insecure.
2
Mozilla.org SSL 0.2 PROTOCOL SPECIFICATION - http://www.mozilla.org/projects/security/pki/nss/ssl/draft02.html. This version was widely known as “version 2.”
3
RFC2246 - The TLS Protocol Version 1.0 - http://tools.ietf.org/html/rfc2246 4
4
RFC4346 - The Transport Layer Security (TLS) Protocol Version 1.1 - http://tools.ietf.org/html/rfc4346
5
RFC5246 - The Transport Layer Security (TLS) Protocol Version 1.2 - http://tools.ietf.org/html/rfc5246
Best Practices and Applications of TLS/SSL
Networks Are Insecure By Default (cont’d) Application software may use the operating system trusted root
list or include their own. Some web browsers on Windows use
recent years. But at the level of network communications and the Windows list, but Firefox uses its own list.
authentication, security is still the responsibility of the network
administrator. One more characteristic of certificate trust is that root certifi-
cate authorities often have affiliate programs. This allows other
In many of these cases TLS can help. It can provide authen- companies to sell certificates on behalf of the trusted root CAs.
tication where none exists by default. TLS can provide strong In fact the affiliates can have their own affiliates. The “parent”
encryption where data would normally flow in clear text. And it CA signs the affiliate CA’s certificate so software can prove
can ensure that data was not modified in-transit. that they are a valid affiliate. The TLS client software “walks”
up this hierarchy of CAs, checking the validity of the signatures
Trusted Certificate Authorities at each step, until they reach one which is a trusted root. This
If you are using TLS purely for communication over your own establishes the trust of the whole hierarchy.
networks it may be adequate to use an internal certificate
authority and set your systems to trust it. However, the hassle - Self-Signed Certificates
and cost of setting up an internal CA often drives businesses to Digital certificates need not be signed by a trusted CA. Such
do otherwise. Also, if data is sent over the Internet, where you certificates, when generated by tools separately, are called
don’t control all points of transit, the only way all parties can self-signed certificates. Such certificates can be used to pro-
trust the certificate is if it was issued by a trusted third party vide encryption of data, but no authentication. See the section
certificate authority. on self-signed certificates for more on this subject.
5
Best Practices and Applications of TLS/SSL
The end result of these standards is that it would be extremely There are standards-based systems for administering TLS in
difficult, and likely expensive, to obtain a false EV SSL certifi- this role. Active Directory in Windows manages them8 and uses
cate. As a result of all the work needed to meet the standards, certificates stored either in the client or using smart cards or
EV SSL certificates are much more expensive than conven- other strong authentication devices.9 OpenLDAP is an open
tional TLS certificates. source directory service which accomplishes much the same.10
Not Just For Web Browsers In spite of the greatly improved security from using strong
TLS and SSL are best-known for securing web browser authentication mechanisms like TLS certificates, it has not been
communications, but they are by no means limited to HTTP. a typical configuration. In exchange for the security you get a
Many other applications and protocols use TLS for security, fair amount of complexity and administrative work, plus clients
generally as an option. Some examples follow: can only log in when they have their client certificate. But recent
versions of Windows Server have made it much easier to have
• FTPS – A secure version of the ubiquitous file transfer pro- certificate and other credential data independent of the user
tocol secured with TLS. Conventional FTP transmissions profile, allowing users to move to different computers and still
are in clear text. FTPS has been an official RFC since authenticate. Still, this is a higher-cost setup than the use of
20057 and an unofficial one for 10 years before that. It has passwords and most organizations would consider it only for
6
CA/Browser Forum EV SSL Certificate Guidelines - http://www.cabforum.org/documents.html
7
8
RFC 4217 - http://tools.ietf.org/html/rfc4217
Active Directory Certificate Services - http://technet.microsoft.com/en-us/windowsserver/dd448615.aspx
6
9
Smart card and other certificate authentication - http://technet.microsoft.com/en-us/library/cc758410(WS.10).aspx
10
OpenLDAP, Using TLS - http://www.openldap.org/doc/admin24/tls.html
Best Practices and Applications of TLS/SSL
The main difficulty with EAP-TLS is that clients need to have in-
Applications which use UDP do so for performance reasons, but
dividual certificates, and they need careful management. In this
need to expect some level of packet loss, if only because UDP
sense it is the same as client certificates on the LAN: a straight
doesn’t guarantee delivery. The most important UDP application
trade-off of security for ease of administration.
is probably VOIP, and some implementations tolerate encap-
sulation fairly well. Other real-time UDP applications, such as
Several other EAP methods use TLS in different ways, gener-
streaming video and some multi-player games don’t fare as well.
ally in order to avoid the need for client-side certificates and the
Some VPN/firewall products support both TLS and IPSec for
administrative burden. They necessarily trade off security for
users who need both.16
this ease of administration, as credentials can be lost relatively
easily and their loss may be difficult to detect.
Microsoft Knowledge Base, How to enable LDAP over SSL with a third-party certification authority - http://support.microsoft.com/kb/321051
7
11
12
RFC 2830, Lightweight Directory Access Protocol (v3): Extension for Transport Layer Security - http://tools.ietf.org/html/rfc2830
13
Wikipedia, Extensible Application Protocol - http://en.wikipedia.org/wiki/Extensible_Authentication_Protocol
14
The EAP-TLS Authentication Protocol - http://tools.ietf.org/html/rfc5216
15
An Illustrated Guide to IPsec - http://www.unixwiz.net/techtips/iguide-ipsec.html
16
Thanks to Gary Tomlinson and John Gmuender of Sonicwall (www.sonicwall.com) for their help in understanding the problem of UDP on SSL VPNs.
Best Practices and Applications of TLS/SSL
So why not just use IPSec for all VPNs? Because they are com- Beyond that, there are good reasons in such cases for using EV
paratively difficult to administer and use. When you’re setting up SSL certificates. Research has shown that weaknesses in the
individual users or small groups remotely, an SSL VPN will be certificate authority validation procedures for many conventional
much easier to support, especially if the application needs are SSL certificates leave them vulnerable to man-in-the-middle
simple. Site-to-site VPNs, where whole networks are connected attacks.18
over the Internet, need the power and flexibility of IPSec.
Briefly, the problem comes with the very inexpensive domain-
Many application-focused remote access methods are validated certificates. These certificates validate a domain name,
TLS-based, and some are SSL VPNs repackaged as remote not an organization, and the domain name is the only identifying
access for the product. The Citrix Secure Gateway is such data in the certificate.
a product. 17
When interacting across the Internet, certificates from a If performance were not a consideration it would be worth u
trusted certificate authority are highly recommended. Each sing TLS on all internal web connections, but the performance
party should make as few assumptions about the security impact can be an issue.
17
http://www.citrix.com/English/ps2/products/product.asp?contentID=15005
18
Spoofing Server-Server Communication: How You Can Prevent It - http://www.verisign.com/ssl/ssl-information-center/ssl-resources/whitepaper-ev-prevent-spoofing.pdf 8
Best Practices and Applications of TLS/SSL
9
Best Practices and Applications of TLS/SSL
CRLs are simple, but there’s a problem with them: over time
they can get big, especially for a large CA. They can be cached,
but then the CRL check may be out of date. So a protocol
named OCSP (online certificate status protocol) was developed
to let programs check certificates one at a time. OCSP is the
preferred method now. The vendors of all the major web browsers know that self-
signed certificates are trouble and they issue dire-looking
Not all CAs support OCSP. As with CRL, the certificate will warnings when one is encountered.
contain a field with the address of the OCSP server if the CA
supports OCSP. Certificate Management
Managing large numbers of certificates in different roles can be
Self-Signed Certificates a difficult task, and if it’s not done in an organized fashion it’s an
It’s not uncommon to find self-signed certificates both on the invitation to trouble.
Internet and internally in corporations. These are certificates
which have not been issued by a certificate authority, either Without a system for certificate management you are likely to
internal or external, but generated statically by any of a number find individuals tracking certificates on their own using a spread-
of available free tools. sheet or text file. This is how companies get surprised by expir-
ing certificates, and if the employee managing the certificates
Anyone can make them and their expiration date may be set leaves, the records could end up lost.
decades in the future, so they may seem like a good deal. But,
as with most things, you get what you pay for with digital Good certificate authorities have online management tools for
certificates. Self-signed certificates don’t prove a lot about the their certificates, such as VeriSign Managed PKI for SSL.
site they’re protecting. There are also third party management packages which track
both externally-granted certificates and those from internal CAs.
A self-signed certificate will allow software to encrypt data and
10
Best Practices and Applications of TLS/SSL
Copyright © 2011 Symantec Corporation. All rights reserved. Symantec, the Symantec Logo and the Checkmark Logo are trademarks or registered trademarks of
Symantec Corporation or its affiliates in the U.S. and other countries. VeriSign and other related marks are the trademarks or registered trademarks of VeriSign, Inc.
or its affiliates or subsidiaries in the U.S. and other countries and licensed to Symantec Corporation. Other names may be trademarks of their respective owners. 11