{"id":3646,"date":"2014-10-19T09:05:07","date_gmt":"2014-10-19T01:05:07","guid":{"rendered":"http:\/\/rmohan.com\/?p=3646"},"modified":"2014-10-19T10:10:32","modified_gmt":"2014-10-19T02:10:32","slug":"poodle-padding-oracle-on-downgraded-legacy-encryption","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=3646","title":{"rendered":"POODLE = Padding Oracle On Downgraded Legacy Encryption"},"content":{"rendered":"<p><strong>POODLE = Padding Oracle On Downgraded Legacy Encryption<\/strong><\/p>\n<p><strong>B.E.A.S.T (Browser Exploit Against SSL TLS)<\/strong><br \/>\nAffected systems:<br \/>\nNetscape 3.0 ssl tls Netscape affected system: tls Netscape 1.2 Netscape 1.1 tls tls Netscape 1.0<br \/>\nDescription: CVE (CAN) ID: CVE-2014-3566<\/p>\n<p>SSL3.0 is obsolete and no security protocol, has been TLS 1.0, TLS 1.1, TLS 1.2 substitution, for compatibility reasons, most of the TLS implementation is still compatible SSL3.0.<\/p>\n<p>Order generic considerations, the current versions of most browsers support SSL3.0, handshake phase contains a version of the TLS protocol negotiation procedure, in general, the client and the latest version of the protocol server will be used. When the handshake phase of its server version of consultations carried out, first offer its latest version of the support agreement, if the handshake fails, then try to negotiate an older version of the protocol. An attacker able to implement the-middle attack by the affected versions of the browser and the server side using the newer protocol negotiated connection fails, you can successfully downgrade attack, allowing the client and server communicate using insecure SSL3.0, At this time, due to the use of SSL 3.0 CBC block encryption implementations exist vulnerability, an attacker can successfully break the encryption SSL connection information, such as access to the user cookie data. This attack is called POODL attack (Padding Oracle On downgraded Legacy Encryption).<\/p>\n<p>This vulnerability affects the majority of SSL server and client, extensive sphere of influence. If you want to use, but the attacker is successful, need to be able to control data (Executive middle attack) between the client and the server.<br \/>\nOn October 14th, 2014, a vulnerability in version 3 of the SSL encryption protocol was disclosed. This vulnerability, dubbed POODLE (Padding Oracle On Downgraded Legacy Encryption), allows an attacker to read information encrypted with this version of the protocol in plain text using a man-in-the-middle attack.<\/p>\n<p>Although SSLv3 is an older version of the protocol which is mainly obsolete, many pieces of software still fall back on SSLv3 if better encryption options are not available. More importantly, it is possible for an attacker to force SSLv3 connections if it is an available alternative for both participants attempting a connection.<\/p>\n<p>The POODLE vulnerability affects any services or clients that make it possible to communicate using SSLv3. Because this is a flaw with the protocol design, and not an implementation issue, every piece of software that uses SSLv3 is vulnerable.<\/p>\n<p>To find out more information about the vulnerability, consult the CVE information found at CVE-2014-3566.<\/p>\n<p><strong>What is the POODLE Vulnerability?<\/strong><br \/>\nThe POODLE vulnerability is a weakness in version 3 of the SSL protocol that allows an attacker in a man-in-the-middle context to decipher the plain text content of an SSLv3 encrypted message.<\/p>\n<p><strong>Who is Affected by this Vulnerability?<\/strong><br \/>\nThis vulnerability affects every piece of software that can be coerced into communicating with SSLv3. This means that any software that implements a fallback mechanism that includes SSLv3 support is vulnerable and can be exploited.<\/p>\n<p>Some common pieces of software that may be affected are web browsers, web servers, VPN servers, mail servers, etc.<\/p>\n<p><strong>How Does It Work?<\/strong><br \/>\nIn short, the POODLE vulnerability exists because the SSLv3 protocol does not adequately check the padding bytes that are sent with encrypted messages.<\/p>\n<p>Since these cannot be verified by the receiving party, an attacker can replace these and pass them on to the intended destination. When done in a specific way, the modified payload will potentially be accepted by the recipient without complaint.<\/p>\n<p>An average of once out of every 256 requests will accepted at the destination, allowing the attacker to decrypt a single byte. This can be repeated easily in order to progressively decrypt additional bytes. Any attacker able to repeatedly force a participant to resend data using this protocol can break the encryption in a very short amount of time.<\/p>\n<p><strong>How Can I Protect Myself?<\/strong><br \/>\nActions should be taken to ensure that you are not vulnerable in your roles as both a client and a server. Since encryption is usually negotiated between clients and servers, it is an issue that involves both parties.<\/p>\n<p>Servers and clients should should take steps to disable SSLv3 support completely. Many applications use better encryption by default, but implement SSLv3 support as a fallback option. This should be disabled, as a malicious user can force SSLv3 communication if both participants allow it as an acceptable method.<\/p>\n<p><strong>How To Protect Common Applications<\/strong><br \/>\nBelow, we&#8217;ll cover how to disable SSLv3 on some common server applications. Take care to evaluate your servers to protect any additional services that may rely on SSL\/TCP encryption.<\/p>\n<p>Because the POODLE vulnerability does not represent an implementation problem and is an inherent issue with the entire protocol, there is no workaround and the only reliable solution is to not use it.<\/p>\n<p><strong>Apache<\/strong><br \/>\nUse the following command in the mod_ssl configuration file to disable SSLv2 and SSLv3:<br \/>\nSSLProtocol all -SSLv2 -SSLv3 +TLSv1 +TLSv1.1 +TLSv1.2<br \/>\nrestart Apache<\/p>\n<p><strong>IBM IHS<\/strong><br \/>\nSSLProtocolDisable SSLv2 SSLv3<br \/>\nrestart ibm ihs<\/p>\n<p><strong>How to test the sslv3 enabled\u00a0<\/strong><\/p>\n<p><strong>openssls_client -connect &lt;webserver&gt;:443 -ssl3<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Nginx<\/strong><\/p>\n<p>ssl_protocols TLSv1 TLSv1.1 TLSv1.2;<br \/>\nrestart Nginx<br \/>\n<strong>IIS<\/strong><\/p>\n<p><strong>IIS:<\/strong><br \/>\nFind the following registry key:<br \/>\nHKey_Local_Machine\\System\\CurrentControlSet\\Control\\SecurityProviders \\SCHANNEL\\Protocols<br \/>\nof the registry entry usually contains the following subkey:<br \/>\n* PCT 1.0<br \/>\n* SSL 2.0<br \/>\n* SSL 3.0<br \/>\n* TLS 1.0<br \/>\nare reserved for each registry entry The agreement applies to the relevant information. You can disable any of these agreements on the server. To do this,<br \/>\ncreate a new DWORD value in the protocol SSL Server 3.0&#8217;s child. Set the DWORD value to &#8220;00 million.&#8221;<\/p>\n<p>Browser Prohibited Method:<\/p>\n<p>IE:<br \/>\n&#8220;Tools&#8221; -&gt;&#8221;Internet Options&#8221; -&gt; &#8220;Advanced&#8221;, uncheck &#8220;Use SSL 3.0&#8221; check box.<\/p>\n<p>Chrome:<\/p>\n<p>Copy a shortcut usually open Chrome browser on the new shortcut, right-click, enter the property,<br \/>\nat the end of the &#8220;target&#8221; in the field of space after entering the following command &#8211;ssl-version-min = tls1<\/p>\n<p>FireFox:<\/p>\n<p>In the address bar, enter &#8220;about: config&#8221;, then security.tls.version.min adjusted to 1.<\/p>\n<p><strong>MySQL<\/strong><\/p>\n<p>openssl ciphers -v &#8216;DEFAULT&#8217; | awk &#8216;\/SSLv3 Kx=(RSA|DH|DH(512))\/ { print $1 }&#8217;<br \/>\nDHE-RSA-AES256-SHA<br \/>\nDHE-DSS-AES256-SHA<br \/>\nDHE-RSA-CAMELLIA256-SHA<br \/>\nDHE-DSS-CAMELLIA256-SHA<br \/>\nAES256-SHA<br \/>\nCAMELLIA256-SHA<br \/>\nEDH-RSA-DES-CBC3-SHA<br \/>\nEDH-DSS-DES-CBC3-SHA<br \/>\nDES-CBC3-SHA<br \/>\nDHE-RSA-AES128-SHA<br \/>\nDHE-DSS-AES128-SHA<br \/>\nDHE-RSA-SEED-SHA<br \/>\nDHE-DSS-SEED-SHA<br \/>\nDHE-RSA-CAMELLIA128-SHA<br \/>\nDHE-DSS-CAMELLIA128-SHA<br \/>\nAES128-SHA<br \/>\nSEED-SHA<br \/>\nCAMELLIA128-SHA<br \/>\nRC4-SHA<br \/>\nRC4-MD5<br \/>\nEDH-RSA-DES-CBC-SHA<br \/>\nEDH-DSS-DES-CBC-SHA<br \/>\nDES-CBC-SHA<br \/>\nEXP-EDH-RSA-DES-CBC-SHA<br \/>\nEXP-EDH-DSS-DES-CBC-SHA<br \/>\nEXP-DES-CBC-SHA<br \/>\nEXP-RC2-CBC-MD5<br \/>\nEXP-RC4-MD5<\/p>\n<p>mysql -se \u201cSHOW STATUS LIKE \u2018Ssl_cipher_list&#8217;\u201d | sed \u2018s\/:\/n\/g\u2019 | sed \u2018s\/Ssl_cipher_listss\/\/g\u2019 |<br \/>\nwhile read sspec;<br \/>\ndo SPEC=openssl ciphers -v \u201c$sspec\u201d 2&gt;\/dev\/null | grep -v SSLv3 | awk \u2018{print $1}&#8217;;<br \/>\n[[ &#8220;$sspec&#8221; == &#8220;$SPEC&#8221; ]] &amp;&amp; mysql \u2013ssl-cipher=$sspec -e QUIT 2&gt;\/dev\/null &amp;&amp; echo \u201c$sspec OK\u201d;<br \/>\ndone<br \/>\n<strong>HAPROXY<\/strong><\/p>\n<p>To disable SSLv3 in an HAProxy load balancer, you will need to open the haproxy.cfg file.<\/p>\n<p>This is located at \/etc\/haproxy\/haproxy.cfg:<\/p>\n<p>nano \/etc\/haproxy\/haproxy.cfg<br \/>\nIn your front end configuration, if you have SSL enabled, your bind directive will specify the public IP address and port. If you are using SSL, you will want to add no-sslv3 to the end of this line:<\/p>\n<p>frontend name<br \/>\nbind public_ip:443 ssl crt \/path\/to\/certs no-sslv3<br \/>\nSave and close the file.<\/p>\n<p>You will need to restart the service to implement the changes:<\/p>\n<p>service haproxy restart<br \/>\n<strong>OpenVPN VPN Server<\/strong><br \/>\nRecent versions of OpenVPN actually do not allow SSLv3. The service is not vulnerable to this specific problem, so you will not need to adjust your configuration.<\/p>\n<p>See this post on the OpenVPN forums for more information.<\/p>\n<p><strong>Postfix SMTP Server<\/strong><br \/>\nIf your Postfix configuration is set up to require encryption, it will use a directive called smtpd_tls_mandatory_protocols.<\/p>\n<p>You can find this in the main Postfix configuration file:<\/p>\n<p>nano \/etc\/postfix\/main.cf<br \/>\nFor a Postfix server set up to use encryption at all times, you can ensure that SSLv3 and SSLv2 are not accepted by setting this parameter. If you do not force encryption, you do not have to do anything:<\/p>\n<p>smtpd_tls_mandatory_protocols=!SSLv2, !SSLv3<br \/>\nSave your configuration. Restart the service to implement your changes:<\/p>\n<p>service postfix restart<br \/>\nDovecot IMAP and POP3 Server<br \/>\nIn order to disable SSLv3 on a Dovecot server, you will need to adjust a directive called ssl_protocols. Depending on your distributions packaging methods, SSL configurations may be kept in an alternate configuration file.<\/p>\n<p>For most distros, you can adjust this directive by opening this file:<\/p>\n<p>nano \/etc\/dovecot\/conf.d\/10-ssl.conf<br \/>\nInside, if you are using Dovecot 2.1 or higher, set the ssl_protocols directive to disable SSLv2 and SSLv3:<\/p>\n<p>ssl_protocols = !SSLv3 !SSLv2<br \/>\nIf you are using a version of Dovecot lower than 2.1, you can set the ssl_cipher_list to disallow SSLv3 like this:<\/p>\n<p>ssl_cipher_list = ALL:!LOW:!SSLv2:!EXP:!aNULL:!SSLv3<br \/>\nSave and close the file.<\/p>\n<p>Restart the service in order to implement your changes:<\/p>\n<p>service dovecot restart<\/p>\n","protected":false},"excerpt":{"rendered":"<p>POODLE = Padding Oracle On Downgraded Legacy Encryption<\/p>\n<p>B.E.A.S.T (Browser Exploit Against SSL TLS) Affected systems: Netscape 3.0 ssl tls Netscape affected system: tls Netscape 1.2 Netscape 1.1 tls tls Netscape 1.0 Description: CVE (CAN) ID: CVE-2014-3566<\/p>\n<p>SSL3.0 is obsolete and no security protocol, has been TLS 1.0, TLS 1.1, TLS 1.2 substitution, for compatibility [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48,12,5,35,4],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3646"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3646"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3646\/revisions"}],"predecessor-version":[{"id":3647,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3646\/revisions\/3647"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3646"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}