{"id":4345,"date":"2014-10-18T23:43:07","date_gmt":"2014-10-18T15:43:07","guid":{"rendered":"https:\/\/www.icocean.com\/blog\/?p=4345"},"modified":"2014-10-18T23:44:14","modified_gmt":"2014-10-18T15:44:14","slug":"disabling-sslv3-for-poodle","status":"publish","type":"post","link":"https:\/\/www.icocean.com\/blog\/?p=4345","title":{"rendered":"Disable SSLv3 for POODLE(Apache,Nginx,Postfix,Dovecot)"},"content":{"rendered":"<p>Padding Oracle On Downgraded Legacy Encryption (POODLE) was released with the CVE identifier of <a href=\"http:\/\/web.nvd.nist.gov\/view\/vuln\/detail?vulnId=CVE-2014-3566\">CVE-2014-3566<\/a>. The vulnerability was found in SSL protocol 3.0, unlike <a href=\"https:\/\/linode.com\/docs\/security\/security-patches\/patching-openssl-for-the-heartbleed-vulnerability\">Heartbleed<\/a> which was found in OpenSSL.<\/p>\n<p>SSL protocol 3.0 makes use of CBC-mode ciphers that allow for man-in-the-middle attacks using padding-oracle stacks. These attacks <strong>target the CBC ciphers to retrieve plain-text output from otherwise encrypted information.<\/strong><\/p>\n<p>There is some good news. Most connections are using TLS and not SSL. However, sometimes there are problems negotiating a TLS session, and then the web servers, browsers, and other applications must downgrade to SSL.<\/p>\n<p>In order to resolve this issue, we must disable SSLv3 for applications. <!--more--><\/p>\n<p>Unfortunately, there is no way to do this for an entire server at once. You will need to edit each individual configuration separately.<\/p>\n<h1 id=\"the-impact-of-disabling-sslv3\">The Impact of Disabling SSLv3<\/h1>\n<p>There\u2019s little impact for most people in disabling SSLv3 because they are not relying on SSLv3 to make connections via SSL\/TLS. The large majority relies on TLS.<\/p>\n<p>In the future, browsers such as Google Chrome and FireFox will have SSLv3 disabled at release. It is also advisable to disable SSLv3 on home browsers, not only server applications.<\/p>\n<h1 id=\"testing-for-sslv3\">Testing for SSLv3<\/h1>\n<p>There are several ways to determine if a service running over SSL will allow SSLv3. An easy method is to use the OpenSSL command line client. Run the command:<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>openssl s_client -connect example.com:443 -ssl3\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Remember to replace <code>example.com<\/code> with your domain or IP address, and <code>443<\/code> with any alternate port you may be using for your SSL connection. Check the output for the text:<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>routines:SSL3_READ_BYTES:sslv3 alert handshake failure\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>If you see this, the service you have tested does not support SSLv3. It is safe from the vulnerability.<\/p>\n<h1 id=\"disabling-sslv3\">Disabling SSLv3<\/h1>\n<p>Unfortunately, there is no simple way to go about this. There\u2019s no patch to install, and the only way to resolve this is to disable SSLv3 in any application that may use it.<\/p>\n<p>While we do not know the configuration of your Linode, we would be happy to assist you via support ticket if you have any questions about disabling SSLv3 on a specific application that is not provided below.<\/p>\n<p>The POODLE vulnerability only works if the browser of the client and the server\u2019s connection are both supporting SSLv3. Therefore, by disabling SSLv3 on your system, you are also protecting your client(s) from the vulnerability.<\/p>\n<h2 id=\"apache\">Apache<\/h2>\n<p>If you\u2019re running an Apache web server that currently allows SSLv3, you will need to edit the Apache configuration. On Debian and Ubuntu systems the file is <code>\/etc\/apache2\/mods-available\/ssl.conf<\/code>. On CentOS and Fedora the file is <code>\/etc\/httpd\/conf.d\/ssl.conf<\/code>. You will need to add the following line to your Apache configuration with other SSL directives.<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>SSLProtocol All -SSLv2 -SSLv3\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>This will allow all protocols except SSLv2 and SSLv3. You can test your configuration change with the command:<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>apachectl configtest\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>You will then need to restart your Apache instance. On Ubuntu and Debian:<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>sudo service apache2 restart\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>On CentOS and Fedora:<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>systemctl restart httpd\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>For more information about configuring Apache to disallow SSLv2 and SSLv3, please see their <a href=\"https:\/\/httpd.apache.org\/docs\/2.2\/mod\/mod_ssl.html#sslprotocol\">Mod_SSL Documentation<\/a><\/p>\n<h2 id=\"nginx\">NGINX<\/h2>\n<p>If you\u2019re running an NGINX web server that currently uses SSLv3, you need to edit the NGINX configuration (<code>nginx.conf<\/code>). You will need to add the following line to your <code>server<\/code> directive:<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>ssl_protocols TLSv1 TLSv1.1 TLSv1.2;\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>This will deactivate SSLv3 from being used on NGINX. If you\u2019re unable to find the server directive in <code>nginx.conf<\/code>, you may need to locate your VirtualHost configuration file.<\/p>\n<p>You will also need to restart your NGINX server:<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>sudo service nginx restart\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>For more information about NGINX\u2019s SSL protocol setting, please see their <a href=\"http:\/\/nginx.org\/en\/docs\/http\/ngx_http_ssl_module.html#ssl_protocols\">NGX HTTP SSL Module Documentation<\/a>.<\/p>\n<h2 id=\"hiawatha\">Hiawatha<\/h2>\n<p>If you\u2019re using the security-focused <a href=\"https:\/\/www.hiawatha-webserver.org\/\">Hiawatha web server<\/a>, it\u2019s likely that SSLv3 is already disabled by default. But if for some reason you\u2019re running an older version that does allow SSLv3, you can use the <code>MinSSLversion<\/code> setting in <code>hiawatha.conf<\/code>:<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1\r\n2<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>MinSSLversion = TLS1.0\r\n# or TLS1.1 or TLS1.2\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Then restart Hiawatha. For example, in Debian or Ubuntu:<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>sudo service hiawatha restart\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>For more information on Hiawatha\u2019s configuration settings, see the <a href=\"https:\/\/www.hiawatha-webserver.org\/manpages\">manual page<\/a>.<\/p>\n<h2 id=\"postfix-smtp\">Postfix SMTP<\/h2>\n<p>If your Postfix installation is set up for <code>opportunistic SSL<\/code>, which means that encryption is not enforced and plain text is accepted, you do not need to change anything. However, if you are running Postfix in <code>mandatory SSL<\/code> mode, you will need to adjust your configuration to reflect the following change:<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>smtpd_tls_mandatory_protocols=!SSLv2,!SSLv3\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>You\u2019ll want to look in the <code># TLS parameters<\/code> section of <code>\/etc\/postfix\/main.cf<\/code>. This will force Postfix SMTP to not use SSLv3 or SSLv2. You will also need to restart Postfix:<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>sudo service postfix restart\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>For more information about Postfix\u2019s <code>smtpd_tls_mandatory_protocols<\/code> setting, please see their <a href=\"http:\/\/www.postfix.org\/postconf.5.html#smtpd_tls_mandatory_protocols\">Postfix Configuration Parameters<\/a> documentation.<\/p>\n<blockquote class=\"note\"><p>The Postfix documentation has not yet been adjusted to disallow SSLv3.<\/p><\/blockquote>\n<h2 id=\"dovecot\">Dovecot<\/h2>\n<p>This will only work in Dovecot versions 2.1 and above. Add the following line to <code>\/etc\/dovecot\/local.conf<\/code> or a new file in <code>\/etc\/dovecot\/conf.d\/10-ssl.conf<\/code>:<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>ssl_protocols = !SSLv2 !SSLv3\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Then restart Dovecot:<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>sudo service dovecot restart\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>If you are running a version of Dovecot before 2.1, you will need to edit the source code of Dovecot.<\/p>\n<h2 id=\"haproxy\">HAProxy<\/h2>\n<p>In order to disable SSLv3 in HAProxy, you must be using HAProxy 1.5+, as SSL is not supported in earlier versions of HAProxy. Edit the <code>\/etc\/haproxy.cfg<\/code> file and find the line that starts with <code>bind<\/code> and refers to port 443 (SSL). Append that line with <code>no-sslv3<\/code>.<\/p>\n<p>An example of this line would be:<\/p>\n<div class=\"highlight plaintext\">\n<table>\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre class=\"lineno\">1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>bind :443 ssl crt &lt;crt&gt; ciphers &lt;ciphers&gt; no-sslv3\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>You can learn more about HAProxy\u2019s <code>no-sslv3<\/code> cipher in their <a href=\"https:\/\/cbonte.github.io\/haproxy-dconv\/configuration-1.5.html#5.1-no-sslv3\">HAProxy Configuration Manual<\/a>.<\/p>\n<h2 id=\"openvpn\">OpenVPN<\/h2>\n<p>According to a forum posted on <a href=\"https:\/\/forums.openvpn.net\/topic17268.html\">OpenVPN<\/a>, OpenVPN has announced that, because they use TLSv1.0, their platform is not vulnerable to POODLE.<\/p>\n<p class=\"doc-license\">This guide is published under a <a href=\"http:\/\/creativecommons.org\/licenses\/by-nd\/3.0\/us\/\">CC BY-ND 3.0<\/a> license.<\/p>\n<p>Updated Wednesday, October 15th, 2014 by Dave Russell<br \/>\nhttps:\/\/linode.com\/docs\/security\/security-patches\/disabling-sslv3-for-poodle<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Padding Oracle On Downgraded Legacy Encryption (POODLE) <a href='https:\/\/www.icocean.com\/blog\/?p=4345' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[2993,4041,4026,4040],"class_list":["post-4345","post","type-post","status-publish","format-standard","hentry","category-4","tag-attack","tag-cbc-cipher","tag-mimt","tag-sslv3","category-4-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4345"}],"version-history":[{"count":2,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4345\/revisions"}],"predecessor-version":[{"id":4347,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4345\/revisions\/4347"}],"wp:attachment":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}