SSL/TLS Audit and Best Practices Guide
SSL/TLS Audit and Best Practices Guide
2 State of art 14
2.1 Introduction .............. 14
2.2 Protocols SSL/TLS14
2.2.1 Definition 14
2.2.2 History SSL/TLS15
[Link] History of the SSL protocol ...
[Link] History of the TLS protocol . . . . . . . . . . . 15
2.2.3 SSL/TLS Handshake16
2.3 Configuration HTTPS under Apache 2.................. 19
2.4 Conclusion 19
3 Audit SSL/TLS 20
3.1 Introduction 20
3.2 Audit SSL/TLS20
3.3 Study similar tools . . . . . . . . . . . . . . . . . . . . . . 21
3.3.1 Study client scan tools 21
3.3.2 Study server scan tools . . . . . . . . . . . . . . . . 22
3.3.3 Study client/server scan tools 23
3.4 Choice of the solution 24
3.5 Conclusion...
1
4 Solution proposed 25
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.2 Presentation of the proposed solution 25
4.2.1 Scan server side 25
[Link] SSLyze 26
[Link] Improvement of the SSLyze Project26
4.2.2 Scan client side28
[Link] Configuration of the SSLhaf module. . . . . . . . . 28
[Link] The default log content29
4.3 Solution Complete AliveSSL29
4.3.1 AliveSSL scan Client 30
4.3.2 AliveSSL scan Server 31
4.3.3 Choice of the server type 31
[Link] Server web31
[Link] Server FTP32
[Link] Server SMTP32
[Link] Server POP332
[Link] Server LDAP33
[Link] Choice the type of the scan 33
[Link] Result the scan. . . . . . . . . . . . . . . . . . 35
4.4 Conclusion35
5 Good Onespractices 36
5.1 Introduction 36
5.2 Recommendations36
5.2.1 Utilization 2048-bit private keys 36
5.2.2 Protection private keys37
5.2.3 Assurance of sufficient coverage of the host name . . 37
5.2.4 Obtaining certificates from a certification authority
reliable38
5.2.5 Utilization solid certificate signature algorithms 39
5.3 Configuration 39
5.3.1 Utilization complete certificate chains 39
5.3.2 Utilization secure protocols 39
5.3.3 Utilization secure encryption suites . . . . . . 40
5.3.4 Selection of the best encryption suites . . . . . . . 42
5.3.5 Confidentiality persistent42
5.3.6 Utilization exchange of strong keys. . . . . . . . . 42
5.3.7 Attenuation known issues 43
5.4 Performance.
5.4.1 Avoidance too much security43
5.4.2 Resumption of usage session 43
5.4.3 Utilization optimizationWAAnd HTTP/2 44
5.4.4 Cache public content44
5.4.5 Utilization OCSP urban community 44
5.4.6 Utilization fast cryptographic primitives ... 44
2
5.5 Protocol HTTP and application security 45
5.5.1 Chiffrement of everything 45
5.5.2 Elimination mixed content 45
5.5.3 Confidence third parties 45
5.5.4 Security cookies 46
5.5.5 Compression secure HTTP ... 46
5.5.6 Deployment HTTP Strict Transport Security . . . . . 46
5.5.7 Deployment from the content security policy . . . . 47
5.5.8 Putting in cache of sensitive content 47
5.5.9 Consideration other threats47
5.6 Validation 48
5.7 Conclusion48
3
Table of figures
4
Acknowledgments
It is because we have greatly appreciated all those who have listened to us.
teas, advised, criticized, and supervised that we want to share with them all our
gratitude and we want to thank them through these lines.
We first express our sincerest thanks to Mr.
Nizar Ben Neji our educational supervisor, for the encouragements, for the
the time he devoted to us and for his valuable advice.
Our thanks also go to Mr. Hamdi Mohamed for us
having welcomed within the incubation center of the El Ghazala Pole as well as for
his support and advice which have always been a valuable help.
We would like to wholeheartedly thank our parents who have always supported us.
and to encourage us in this adventure and throughout our academic journey.
I extend my sincere thanks to all the professors of our department.
computer science and all the people who contributed directly or indirectly
through their words, their writings, their advice and their criticisms throughout the
Finally, we would like to express our gratitude to Mr. Mohamed.
Oueld El Hassan, our coordinator for his frequent visits to the organization
the internship and for his invaluable support.
A big thank you also to all our friends for their sincere friendship and trust.
Finally, thank you to the office colleagues for the constructive discussions
that we had and for their good humor.
5
6
Acronyms and abbreviations
Our project falls within the framework of obtaining the graduation diploma.
from the applied license in Computer Networks, specialty Technologies of the In-
training and Telecommunications within the Faculty of Sciences of
Bizerte (FSB). In search of a topic, Mr. Nizar Ben Neji approached us.
proposed the idea of creating a tool for auditing and evaluating SSL/TLS servers
Web, Messaging, and LDAP Directory. The tool will allow auditors to
security of evaluating Client and Server SSL/TLS solutions for development
a detailed report on the encryption schemes used and the vulnerabilities
of each supported protocol.
This project allowed us to apply our theoretical and practical knowledge.
critiques in a professional project framework. It was also an opportunity for
discover the professional world, its requirements and its needs in terms of communication
skills.
8
General introduction
9
SSL/TLS is a protocol that operates at the interface of TCP sockets. Consequently-
sequence, all the application layer protocols such as HTTP, FTP, TEL-
NET, LDAP, SMTP and others can be protected by a transmission channel.
secured. In the case of HTTP or the Web, the number of secured websites
The use of SSL/TLS has increased in recent years. Recent data
coming from Google shows that more than 10% of web traffic is now encrypted by
SSL/TLS and 50% of encrypted traffic is generated by Google services (Figure
1). In Tunisia, most sites are either not secured by SSL/TLS or
representing configuration problems.
As part of our project, we will create a tool to scan the
servers and TLS clients. It allows for the development of a detailed report on the pro-
supported protocols, the encryption suites used, any vulnerabilities
as well as the security shortcomings related to SSL/TLS.
In this manuscript, chapter 1 presents the context of the project, the problem-
tique, the host organization as well as the detailed specification. In the chapter
2, we will present the SSL and TLS protocols and their versions. Chapter 3
Detail and explain the SSL/TLS audit operation as well as the currently available tools.
used. In chapter 4, the technological choice as well as the solution is presented.
proposed action. Finally, Chapter 5 includes a list of recommendations and
best practices that will help site administrators and security experts
to better configure their servers.
Operation of HTTP
10
Chapter 1
Project Context
1.1 Introduction
In this chapter, we outline the general context of the project. We present
firstly the host organization, the issue, the required work and the
adopted methodology.
11
1.3 Problematic
Nowadays, companies offer their customers the opportunity to make
financial and economic operations remotely without having to appear in person
in person. If experience has shown that this was beneficial and even very
attractive, it also presents a hyper real danger when security is not
at the meeting. To ensure the security of online services, a set
Audit tools can be used to identify potential vulnerabilities.
Most existing tools are application vulnerability scanners.
who do not perform the inspection of server-side configurations and more specifically
the SSL/TLS configuration. Even existing tools do not perform all the tests
necessary to address the issues related to this protocol. They focus solely on
comment on the server side ignoring vulnerabilities related to the part
customer and they only deal with the case of the Web and neglect other applications
SSL/TLS applications such as messaging, LDAP directories, data transfer
file and the other services.
1.4.2 Acteurs
Auditors, security administrators, and web users
will be the actors of the SSL/TLS audit service.
12
1.4.3 Functional requirements
The functional requirements of the solution are:
Scan the SSL/TLS configurations of SMTP, FTP, POP servers,
IMAP, LDAP and the others
— Scan the SSL/TLS client solutions such as browsers (IE, Chrome,
Firefox, Opera, ...), messaging clients (MS Outlook, Mozilla
Thunderbird, ...), LDAP clients and others
Develop a report on potential vulnerabilities and insufficiencies.
security
Present a set of recommendations and best practices concerning
enhancing security through the SSL/TLS protocol
1.4.5 Constraints
The solution must be low-cost and developed with open-source solutions.
The final product must be delivered to the company no later than May 31, 2017.
13
Chapter 2
2.1 Introduction
Nowadays, security plays a very important role in the field.
networks and telecommunications. E-commerce customers
do not have enough confidence to pay by credit card. To secure
for this payment, it is necessary to use authentication and encryption protocols
comme SSL/[Link] ces protocoles, les données personnelles des clients (nu-
credit card number, password, etc.) will be protected and no one can
to intercept them.
In this chapter, we will present in detail the SSL/TLS protocol, its dif-
different versions, the flaws and vulnerabilities recognized for each version
as well as the implementation of the latter on the server side.
14
It is used to secure authentication and electronic transactions.
The two protocols SSL and TLS operate between the transport layer (TCP)
or UDP) and the application layer to natively secure protocols little
Sure. It is the most widely used security protocol today on the Internet.
allows securing multiple applications and network services such as transfer
file transfers via FTP, VPN connections, instant messaging, and voice
on IP.
The SSL/TLS protocol consists of two components: the TLS Record and
the TLS Handshake. The TLS Record aims to encrypt connections with
a symmetric algorithm and the TLS Handshake aims to authenticate both
communicating parties, to allow them to negotiate the algorithms as well
the protocol. The protocol includes the verification of electronic certificates of
client and server to ensure the identities of the communicating entities.
15
The major weakness is the BEAST attack, which is based on Ja-
JavaScript allows an attacker on the same network to intercept
and to decrypt SSL cookies through an attack on encrypted packets.
This version is also unable to use encryption suites.
modern ones that offer greater security and efficiency. Following these
weaknesses, this version has been replaced by a newer, safer one.
TLS 1.1 was developed in 2006, it is the second most recent version.
TLS is a transitional version that consolidates certain RFCs.
intermediaries and includes a modification of the initialization of CBC blocks
(following a report made in 2011). However, the environment of
modern security has pushed towards TLS 1.2.
TLS 1.2 is the latest version of TLS. This version allows access
to advanced encryption suites that support crypto-
elliptic curve graph (efficiency for information exchange)
on an unsecured channel). It brings a significant evolution that
present in authenticated block encryption modes AEAD.
16
negotiated encryption suite.
Elaboration and exchange of a session key between the client and the server: In
first, the communicating parties agree on the algorithm
of symmetric encryption that will be used and secondly, the client
SSL/TLS generates the symmetric session key based on the choice
carried out.
This protocol aims to allow the server and the client to authenticate.
tie each other and then negotiate an encryption algorithm and a key
cryptographic before the application transmits.
As shown in the Figure2.2a first ClientHello message is sent by
the client to the server to initiate communication. In this message, the client
propose a set of cryptographic suites that it is capable of implementing
work (See Figure2.3).Each of these cryptographic suites describes the
cryptographic mechanisms that will be used for the following functions:
the exchange of keys
server authentication.
the protection of application data, in confidentiality and integrity.
This message contains other parameters that need to be negotiated: the ver-
version of the standard used (SSLv2, SSLv3, TLS 1.0, TLS 1.1 or TLS 1.2) and
the compression mechanism that will possibly be applied to the data
applicatives. In response, the server will refuse the negotiation if none of the proposals...
the client's situations are deemed acceptable. The server then ends the connection.
Otherwise, the server chooses an encryption suite from those
proposed by the client and sends the ServerHello message that states its choice
in which he presents his electronic certificate and sends a message Serve-
HelloDone to indicate that it is now waiting for a response from the client.
Figure 2.2 – Simplified sequence of the SSL/TLS handshake between the client and the
server
17
At the end of the negotiation, once the chosen encryption suite and the cert-
Received certificate, the client verifies the certification chain and the status of the certificate.
server. If the certificate is not validated, the client issues an alert that ends
the connection (See Figure2.4).Otherwise, he continues and sends a message, Client-
KeyExchange, containing the encrypted pre-master secret. From there, the client and
the servers both have a shared secret key and several elements
random public keys exchanged during ClientHello and ServerHello messages.
These shared elements will be useful for providing the symmetric keys that will be
used to protect all sessions: to ensure confidentiality and
the integrity of exchanges. ChangeCipherSpec messages are exchanged to
indicate the activation of the negotiated parameters (algorithms and keys). The mes-
Finished sages are therefore the first to be protected cryptographically, and
contain a hash of all the messages exchanged during the negotiation
in order to guarantee retrospectively the integrity of the negotiation.
Figure 2.3 - Capture with the Wireshark tool of the Client Hello message sent
by Firefox presenting the 20 cryptographic suites presented by the browser
Figure 2.4 – Example of an alert that an SSL/TLS client may return in case of
problem in the negotiation.
18
2.3 HTTPS Configuration under Apache 2
In this section, we will talk about the configuration of the HTTPS protocol with
Apache 2 on Ubuntu 14.04.
1. Installation of the Apache SSL module so that the SSL protocol can
work with the Apache 2 server:
sudo apt-get install mod_ssl
2. Activation of the SSL module for Apache 2:
sudo a2enmod ssl
3. After activating the SSL, the web server needs to be restarted for it to take effect.
modification should be taken into account:
sudo service apache2 restart
4. Creation of the electronic certificate using the Op toolenSSL[[Link]
At this stage, we need to specify the domain name of the site that will
appear at the certificate level. The location of the SSL certificate and
The server's private key will be placed in the /etc/apache2/ssl directory.
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout
/etc/apache2/ssl/[Link] -out /etc/apache2/ssl/[Link]
5. Configuration of VirtualHost at the Apache level:
2.4 Conclusion
In this chapter, we presented the SSL and TLS protocols as well as their
history and known vulnerabilities. We also set the SSL/TLS configuration
under Apache. The SSL/TLS configuration alone is not sufficient. It is
Why it is necessary to equip oneself with a tool for evaluating the configuration that has been made.
In the following section, we will explain and present the SSL/TLS audit.
19
Chapter 3
Audit SSL/TLS
3.1 Introduction
Cybersecurity is related to the Internet, often involving the security of
web browser and also network security. The SSL/TLS protocol intervenes
to ensure that communications between two systems do not fall into
in bad hands and that they cannot be read or manipulated.
In this chapter, we emphasize the importance of the follow-up SSL/TLS audit.
by a study on existing similar tools. And finally, we conclude this chapter.
by a justification of the choice of our solution.
20
SSL certificates are issued and signed by a trusted third party (authority
of certification) to ensure the connection between two communicating entities. For
a website, it is necessary to adopt an SSL certificate for the security of visitors
website (for example, in the case of an e-commerce site). The configuration of this type of
the certificate was not always acceptable, that's why it is necessary to use
tools that allow it.
21
DCsec is a tool created by a group of researchers that allows for evaluation.
the browser while providing the sequences of encodings and the proto-
supported schools. This tool does not provide the security level of each
suite of encoding.
22
Figure 3.3 – Test Wormly
23
Figure3.5 – Test SSLabs Client
3.5 Conclusion
In this chapter, we conducted a study on the different tools similar to
our proposed solution. Although these tools include different services,
finding a comprehensive solution is still a major objective. Indeed
we briefly presented the choice of our proposed solution which will be
described in detail in the next chapter.
24
Chapter 4
Proposed solution
4.1 Introduction
A bad configuration of the SSL/TLS protocol can make it insecure.
and even vulnerable to attacks and since there are many parameters of
available configurations, it is difficult to know in advance what impact certain
Changes will occur, these changes may be made accidentally.
So in this case, you need to use a comprehensive SSL/TLS assessment tool to
the verification of the configuration and to know if the system is vulnerable. We
We will present in this chapter our proposed solution in a detailed manner.
25
[Link] SSLyze
SSLyze is an open source Python project that analyzes SSL/TLS configuration.
of a server. It is designed to be fast and comprehensive, and should help organizations
organizations and testers to identify the bad configurations affecting their
SSL servers. To scan a server, we run this command:
26
The added lists are:
— Google CA store
— Adobe CA store
Microsoft CA store
Java CA store
The addition of the attack test The SSL/TLS protocol indeed includes a
certain number of vulnerabilities that a malicious user can exploit
to provoke a denial of service or introduce malicious code or even
intercept the traffic between the two communicating parties.
There are several vulnerabilities in the versions of the SSL/TLS protocol.
such as the DROWN attack. However, we have added a test for this attack.
Test of the Drown attack on SSLv2: this vulnerability allows a hacker to rec-
to retrieve information from a server and to compromise a communication
using the SSLv2 protocol:
27
4.2.2 Client-side scan
The client-side scan involves analyzing the supported protocols and
the suites of differently configured on a browser. At the beginning of the commu-
In SSL/TLS communication, the client sends a ClientHello packet to the server that contains
all the browser information.
D’où nous avons trouvé le module SSLhaf qui permet de capturer le paquet
ClientHello and record this data in a log file.
In this section, we will present the steps for configuring the module
Installing SSL on Ubuntu 14.04:
Copy files from GitHub:
git clone [Link]
Compilation of the module
sudo apxs -cia mod_sslhaf.c
This script adds the LoadModule in the Apache configuration files.
– Manually adding the module in the [Link] file
This file is located in /etc/apache2/sites-enabled/; we add the lines to it.
following:
LoadModule sslhaf_module /usr/lib/apache2/modules/mod_sslhaf.so
CustomLog logs/[Link] "%t %{X-Forwarded-For}i "%{SSL-
HAF_HANDSHAKE}
%{SSLHAF_PROTOCOL}e %{SSLHAF_SUITES}e
%{SSLHAF_COMPRESSION}e
%{SSLHAF_EXTENSIONS_LEN}e %{SSL-
HAF_EXTENSIONS}e" "%{User-Agent}i"
env=SSLHAF_LOG
Opening the local server
Https://[Link]:443
Content of the [Link] file
The file [Link] located in /etc/apache2/logs/[Link] contains
now the SSL configuration of the browser visiting [Link]
.
28
[Link] The default log content
The content of the log file is incomprehensible:
The first field contains the version of the SSL protocol used: 2 and 3
for SSLv2 and SSLv3+ for example Google bot uses SSLv2 handshake
so he is ready to use SSLv2 or better.
The second field contains the best version used, for example
SSLv3 is "3.0", TLSv1.0 is "3.1", TLSv1.1 corresponds to "3.2" and TLSv1.2
corresponds to '3.3'.
The third field contains the list of differently supported sequences.
by the client.
Each sequence is associated with a hexadecimal code. For example:
0x04 represents the SSL_RSA_WITH_RC4_128_MD5 suite,
0x010080 represents SSL_CK_RC4_128_WITH_MD5
and 0x05 represents the suite SSL_RSA_WITH_RC4_128_SHA.
The fourth field contains the list of compression methods of-
provided by the client (00 = NULL, 01 = DEFLATE).
From where, we were forced to convert this content using PHP so that we could
show users a comprehensible result.
29
4.3.1 AliveSSL scan Client
This part of our web application uses the log file generated by the mo-
dual sslhaf by changing the content to make it understandable for the audience
We extract the content of the log field by field and the third field will be
compared with a database to determine the number sequences differently
related to each hexadecimal code.
Then we can determine the protocols supported by the browser using the
first field of the log file.
30
4.3.2 AliveSSL scan Server
This part of the web application allows testing the server configuration.
thanks to SSLyze where we will analyze its content and display it to the auditor.
sslyze can perform scans on multiple types of servers such as LDAP,
FTP, SMTP, POP3. From where our web application will be able to perform scanning.
on these types of servers.
Our application provides auditors with an interface where they can choose
the type of server to analyze which can be a web server, SMTP, LDAP,
FTP and POP3.
31
[Link] FTP Server
FTP server (File Transfer Protocol) allows the exchange of files on In-
Internet. Any authorized user can download or upload files on
a remote computer running such a server. The default port is
commonly used is port 21.
32
Figure 4.10 – Operation of POP3
33
Figure 4.12 - Regular scan
In the case of the regular scan, our application provides auditors with
information on the protocols supported by the server, the cipher suites
of each protocol and information about the electronic certificate(s) of the
server. Thus, if the server is vulnerable to some attacks as follows:
screen
In this case, the auditor must choose a specific scan or also on which point.
perform the scan, either on a specific protocol or on a well-defined attack
or even on the electronic certificate only.
34
[Link] Scan result
After selecting the type of scan, AliveSSL displays the result according to the type of
chosen scan by presenting a report on the specific points that the auditor has
choose.
4.4 Conclusion
In this chapter, we have highlighted our proposed solution that we have
detailed its different steps and the improvements we have added. Following
In this phase, we take into account the misconfiguration that can generate ...
critical attacks due to a poor understanding of the SSL/TLS configuration.
That's why we provided a section dedicated to best practices in the
chapter 5.
35
Chapter 5
Best practices
5.1 Introduction
SSL/TLS is a deceptively simple technology, easy to deploy, but
His main problem is that encryption is often not easy to deploy.
correctly. To ensure that TLS provides the necessary security, the admins-
system betrayers and developers must make extra effort
to the configuration of their servers and the development of applications.
In this chapter, we will present recommendations and best practices.
5.2 Recommendations
In TLS, security begins with the cryptographic identity of the server.
a strong private key is needed to prevent attackers from carrying out
identity theft attacks. It is also important to have a valid certificate
and, solid that gives the private key the right to represent a host name
particular. Without these two fundamental elements, nothing else can be.
secured.
36
and to deploy RSA and ECDSA keys simultaneously if the overhead of the
managing such a configuration does not bother you.
37
the sharing of certificates creates a link that can be abused to transfer
vulnerabilities of a website or server to all other sites and servers
who use the same certificate (even when the underlying private keys are
different things.
38
being valid for their OCSP responders. Over time, try to extend
this period of "warming" lasts 1 to 3 months. Likewise, do not wait until
that your certificates are about to expire to replace them. By leaving
several additional months, this would also help people whose
clocks are incorrect
5.3 Configuration
With the correct configuration of the TLS protocol on a server, you ensure
that your identification information is properly presented to visitors
of the site, that only secure cryptographic primitives are used
and that all known weaknesses are mitigated.
39
SSL v2 is not secure and should not be used. This version of
the protocol is so serious that it can be used to attack keys
RSA and sites with the same name even if they are on different servers
entirely different (the DROWN attack).
— SSL v3 is not very secure when used with HTTP (the POODLE attack
DLE) and low when used with other protocols. It is also
Element obsolete and should not be used.
TLS v1.0 is also an inherited protocol that should not be used
read, but it is still necessary in practice. Its major weakness
(BEAST) has been mitigated in modern browsers, but others
problems persist.
TLS v1.1 and v1.2 are both without known security issues, but
only TLS v1.2 provides modern cryptographic algorithms.
TLS v1.2 should be your main protocol as it is the only version
who offers modern authenticated encryption (also called AEAD). If
you do not support TLS v1.2 today, you have a lack of
security. In order to take care of the old clients, you will need to
not to support TLS v1.0 and TLS v1.1 for now. However-
However, you should remove TLS v1.0 in the near future. For example,
the PCI DSS standard will require all sites that accept payments by
credit card to eliminate support for TLS v1.0 by June 2018.
Work is currently underway to design TLS v1.3, the aim of which is
to eliminate all obsolete and insecure features and to provide
improvements that will secure our communication during the
following decades.
40
also be used against a server that prefers stronger suites
(the FREAK attack)
The sequences with low numbers (typically 40 and 56 bits) use
an encryption that can easily be broken.
RC4 is not secure.
3DES is slow and weak.
Use the following list configuration, designed for RSA and ECDSA keys,
as a starting point:
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
TLS_DHE_RSA_WITH_AES_128_CBC_SHA
TLS_DHE_RSA_WITH_AES_256_CBC_SHA
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Attention: We recommend that you first test your configuration.
TLS in a staging environment, transfer the changes into
the production environment only when you are certain that everything
works as expected. Please note that the above is a list
generic and that not all systems (especially the older ones) are not
compatible with all these suites. That is why it is important to test
First. The above configuration uses standard TLS suite names.
Some platforms use non-standard names, please refer to the
documentation of your platform for more details. For example, the names
the following suites would be used with OpenSSL:
ECDHE-ECDSA-AES128-GCM-SHA256
ECDHE-ECDSA-AES256-GCM-SHA384
ECDHE-ECDSA-AES128-SHA
ECDHE-ECDSA-AES256-SHA
ECDHE-ECDSA-AES128-SHA256
ECDHE-ECDSA-AES256-SHA384
ECDHE-RSA-AES128-GCM-SHA256
ECDHE-RSA-AES256-GCM-SHA384
41
ECDHE-RSA-AES128-SHA
ECDHE-RSA-AES256-SHA
ECDHE-RSA-AES128-SHA256
ECDHE-RSA-AES256-SHA384
DHE-RSA-AES128-GCM-SHA256
DHE-RSA-AES256-GCM-SHA384
DHE-RSA-AES128-SHA
DHE-RSA-AES256-SHA
DHE-RSA-AES128-SHA256
DHE-RSA-AES256-SHA256
42
1024-bit DHE groups known can be broken by state agencies.
To be sure, if you deploy DHE, configure it with at least 2048 bits of
security. Some older clients (for example, Java 6) may not
support this level of strength. For performance reasons, most of
servers prefer ECDHE, which is both stronger and faster. The secp256r1
(also called P-256) is a good choice in this case.
5.4 Performance
Safety is our main goal in this chapter, but we must
also pay attention to performance
A secure service that does not meet performance criteria will be without
no doubt abandoned. With a correct configuration, TLS can be quite
fast. With modern protocols, for example HTTP/2, it could even
to be faster than clear communication.
43
5.4.3 Use of WAN Optimization and HTTP/2
These days, TLS overheads do not come from crypto operations.
graphics starved by the CPU, but due to network latency. the establishment
of a TLS connection, which can only start after the establishment is completed
TCP liaison requires a new exchange of packets and will be more costly if
you are far from the server. The best way to minimize latency is to avoid
to create new connections, that is to say to maintain existing connections
open for a long time (keep-alives). Other techniques that provide
Good results include support for modern protocols such as HTTP/2
and the use of WAN optimization (generally via distribution networks
distribution of content.
44
5.5 HTTP protocol and the security of applications
tions
The HTTP protocol and the surrounding platform for content delivery
web applications continued to evolve rapidly after the birth of SSL. To
as a result of this evolution, the platform now contains features
teas that can be used to defeat encryption. In this section, we
we will present these features, as well as how to use them safely
security.
45
your third-party links will be encrypted and thus protected against MITM attacks. This-
however, you should go further: learn about the services you use and
remove them, replace them with safer solutions or accept the risk of
their use. A new technology called sub-resource integrity (SRI):
Subresource integrity could be used to reduce potential exposure.
via third-party resources.
46
with HSTS in mind and the old sites converted to support them as much as
possible and as soon as possible. For better security, consider using the
HSTS preload, which integrates your HSTS configuration into browsers
modern, which makes the first connection to your site secure.
The following configuration example enables HSTS on the primary hostname.
pal and all its subdomains for a period of one year, while allowing
also the preload:
Strict-Transport-Security: max-age=31536000; includeSubDomains; pre-
load
47
5.6 Validation
With many configuration parameters available for adjustments
It is difficult to know in advance what impact certain changes
will have. Furthermore, changes are sometimes made accidentally.
Software updates can introduce silent changes.
For this reason, we advise you to first use an evaluation tool.
Complete SSL / TLS evaluation to verify your configuration to ensure
that you start safely, then periodically to ensure that
stay safe. For public websites, we recommend testing the
free SSL Labs server.
5.7 Conclusion
The recommendations and best practices section is offered to auditors in order to
to help them for a better SSL/TLS configuration of a server.
48
Conclusion and Perspectives
49
Bibliography
50