<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Explore Security &#187; SSLv3</title>
	<atom:link href="http://www.exploresecurity.com/tag/sslv3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.exploresecurity.com</link>
	<description>IT security tools, techniques and commentary</description>
	<lastBuildDate>Wed, 15 Jun 2022 09:21:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6.1</generator>
		<item>
		<title>Thoughts on Testing for POODLE</title>
		<link>http://www.exploresecurity.com/thoughts-on-testing-for-poodle/</link>
		<comments>http://www.exploresecurity.com/thoughts-on-testing-for-poodle/#comments</comments>
		<pubDate>Sat, 01 Nov 2014 00:09:21 +0000</pubDate>
		<dc:creator>Jerome</dc:creator>
				<category><![CDATA[Penetration Testing]]></category>
		<category><![CDATA[SSL/TLS]]></category>
		<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[penetration testing]]></category>
		<category><![CDATA[pentesting]]></category>
		<category><![CDATA[POODLE]]></category>
		<category><![CDATA[SSLv3]]></category>

		<guid isPermaLink="false">http://www.exploresecurity.com/?p=311</guid>
		<description><![CDATA[I recently did an internal presentation on POODLE &#8211; what the flaw is and how to test for it &#8211; and a version of the slides can be found here. Obviously much has been written about the vulnerability, its mitigations and what the future holds. What follows expands on the testing aspect of the presentation, [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I recently did an internal presentation on POODLE &#8211; what the flaw is and how to test for it &#8211; and a version of the slides can be found <a href='http://www.slideshare.net/exploresecurity/ss-lv3-and-poodle'>here</a>. Obviously much <a href='https://www.imperialviolet.org/2014/10/14/poodle.html'>has<a> <a href='http://blog.cryptographyengineering.com/2014/10/attack-of-week-poodle.html'>been</a> <a href='http://blogs.opera.com/security/2014/10/security-changes-opera-25-poodle-attacks/'>written</a> about the vulnerability, its mitigations and what the future holds. What follows expands on the testing aspect of the presentation, with a few pointers on manual checks if you feel you need to verify or clarify &#8211; and possibly even add to &#8211; what the tools are telling you.<span id="more-311"></span></p>
<h3>SSLv3 support with block ciphers (in CBC mode) supported</h3>
<p>All SSL/TLS tools check for SSLv3 support. You can do this manually with:</p>
<p><code>openssl s_client -ssl3 –connect &lt;host&gt;:443</code></p>
<p>This confirms SSLv3 support but obviously it only reports 1 cipher suite. This is where the tools come in. However, remember that POODLE only affects block ciphers in cipher block chaining (CBC) mode (which I&#8217;ll just abbreviate to &#8220;block ciphers&#8221; now, as I believe all the block ciphers that can run under SSLv3 operate in CBC mode). So review the list of supported cipher suites: if the server only supports RC4 ciphers then don&#8217;t report POODLE as an issue (instead report SSLv3, which is still old and creaky, and RC4!).</p>
<h3>Server preference</h3>
<p>Even if the server supports block ciphers, it may <em>prefer</em> RC4-based ciphers so the likelihood of exploitation is going to be negligible. I recently wrote up <a href='http://www.exploresecurity.com/testing-for-cipher-suite-preference/'>what to do</a> if you find that your tools disagree over which cipher suite is preferered.</p>
<h3>TLS_FALLBACK_SCSV</h3>
<p>I also recently <a href='http://www.exploresecurity.com/poodle-and-the-tls_fallback_scsv-remedy/'>posted</a> in detail about how the TLS_FALLBACK_SCSV remediation worked. In short it&#8217;s a signal to the server from the client that it is connecting with a lower protocol version than it supports. If the server supports something better, then that should have been negotiated during the earlier connection attempts, so the server can abort the connection as being suspicious.</p>
<p>With the release of OpenSSL v1.0.1j it&#8217;s easy to test for TLS_FALLBACK_SCSV support:</p>
<p><code>openssl s_client -ssl3 -fallback_scsv -connect &lt;host&gt;:443</code></p>
<p>This is telling the server than I&#8217;d like to connect using SSLv3 &#8211; but grudgingly. I&#8217;m using <code>-ssl3</code> in the context of POODLE but TLS_FALLBACK_SCSV offers wider protection than this (checking support for it will continue to be worthwhile long after we&#8217;ve forgotten about POODLE.) Below you can see the fake cipher suite value advertising the fallback (which Wireshark couldn&#8217;t decode into something meaningful as it didn&#8217;t recognise the new cipher suite value 0&#215;5600 at the time):</p>
<p><a href="http://www.exploresecurity.com/wp-content/uploads/2014/10/tls_fallback_scsv.png"><img src="http://www.exploresecurity.com/wp-content/uploads/2014/10/tls_fallback_scsv.png" alt="tls_fallback_scsv" width="712" height="98" class="aligncenter size-full wp-image-313" /></a></p>
<p>If the OpenSSL connection succeeds as usual (as shown below &#8211; a cipher suite has been chosen) then the server doesn&#8217;t support TLS_FALLBACK_SCSV.</p>
<p><a href="http://www.exploresecurity.com/wp-content/uploads/2014/10/openssl_connects.png"><img src="http://www.exploresecurity.com/wp-content/uploads/2014/10/openssl_connects.png" alt="openssl_connects" width="590" height="99" class="aligncenter size-full wp-image-314" /></a></p>
<p>If the connection fails with the new <code>inappropriate_fallback</code> alert then the server does support TLS_FALLBACK_SCSV:</p>
<p><a href="http://www.exploresecurity.com/wp-content/uploads/2014/10/tls_fallback_alert.png"><img src="http://www.exploresecurity.com/wp-content/uploads/2014/10/tls_fallback_alert.png" alt="tls_fallback_alert" width="1182" height="78" class="aligncenter size-full wp-image-315" /></a></p>
<p>Enabling TLS_FALLBACK_SCSV is all very well but it does depend on client support too &#8211; so if the server has SSLv3 enabled with block ciphers supported (and preferred) then it&#8217;s not out of the woods. A few browsers do already support it &#8211; Chrome 33 (Feb 2014), Firefox 35 (Jan 2015), Opera 25 (Oct 2014) &#8211; so it&#8217;s better than nothing, and of course support for it among browsers will only improve. Acknowledging TLS_FALLBACK_SCSV support is therefore worthwhile &#8211; both today and in the future. A client may even feel aggrieved if they&#8217;ve gone to the trouble of enabling TLS_FALLBACK_SCSV but get no credit for it in their pentest report!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exploresecurity.com/thoughts-on-testing-for-poodle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>POODLE and the TLS_FALLBACK_SCSV Remedy</title>
		<link>http://www.exploresecurity.com/poodle-and-the-tls_fallback_scsv-remedy/</link>
		<comments>http://www.exploresecurity.com/poodle-and-the-tls_fallback_scsv-remedy/#comments</comments>
		<pubDate>Wed, 15 Oct 2014 16:01:00 +0000</pubDate>
		<dc:creator>Jerome</dc:creator>
				<category><![CDATA[SSL/TLS]]></category>
		<category><![CDATA[POODLE]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[SSLv3]]></category>
		<category><![CDATA[TLS]]></category>

		<guid isPermaLink="false">http://www.exploresecurity.com/?p=277</guid>
		<description><![CDATA[The POODLE attack announced very recently depends largely on a protocol downgrade attack (which I covered in my SSL/TLS presentation at BSides). I don&#8217;t think this aspect of TLS security was widely appreciated &#8211; but it is now! It&#8217;s a fair bet that any technical article about POODLE includes the phrase &#8220;TLS_FALLBACK_SCSV&#8221; as a remedy. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The <a href="https://www.openssl.org/~bodo/ssl-poodle.pdf">POODLE</a> attack announced very recently depends largely on a protocol downgrade attack (which I covered in my <a title="SSL/TLS Checklist for Pentesters" href="http://www.exploresecurity.com/ssltls-checklist-for-pentesters/">SSL/TLS presentation</a> at BSides). I don&#8217;t think this aspect of TLS security was widely appreciated &#8211; but it is now! It&#8217;s a fair bet that any technical article about POODLE includes the phrase &#8220;TLS_FALLBACK_SCSV&#8221; as a remedy. This article discusses the mechanism proposed to protect us from attackers forcing TLS downgrades. <span style="color: red;">NEW (16/10/14):</span> while I was writing this I thought of a small but potential compatibility problem, which in fact could do us all a favour. I checked with the authors of the RFC and Adam Langley was kind enough to reply back so I&#8217;ve added added a <a href='#new'>new section below</a>.<span id="more-277"></span></p>
<p>TLS_FALLBACK_SCSV is a fake cipher suite advertised in the Client Hello, which starts the SSL/TLS handshake. SCSV stands for &#8220;Signaling Cipher Suite Value&#8221;. The idea of using a cipher suite as a signal is not new: TLS_EMPTY_RENEGOTIATION_INFO_SCSV is a way clients can advertise that they support secure renegotiation (addressing CVE-2009-3555):</p>
<p><a href="http://www.exploresecurity.com/wp-content/uploads/2014/10/secure_reneg_SCSV.png"><img class="aligncenter size-full wp-image-278" alt="secure_reneg_SCSV" src="http://www.exploresecurity.com/wp-content/uploads/2014/10/secure_reneg_SCSV.png" width="510" height="86" /></a></p>
<p>The <a href="https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00">RFC</a> for the TLS_FALLBACK_SCSV mechanism is still a draft but <a href="https://www.imperialviolet.org/2014/10/14/poodle.html">apparently</a> Chrome (and Google from the server-side) has been using it since February 2014. This is no surprise as the RFC was written by two Google heavyweights. (Perhaps this was written with POODLE in mind as the RFC and the attack share an author &#8211; but that&#8217;s pure speculation!)</p>
<p>The whole business of successively downgrading the protocol version was put in place because browsers wanted to ensure they could connect to servers that were buggy. The TLS_FALLBACK_SCSV mechanism ensures that this downgrade only happens with the client&#8217;s blessing.</p>
<h3>How does the protection work?</h3>
<p>TLS_FALLBACK_SCSV is recommended for a client to indicate that it is knowingly repeating a SSL/TLS connection attempt over a lower protocol version than it supports (because the last one failed for some reason). When the server sees a TLS_FALLBACK_SCSV signal it compares the highest protocol version it supports to the version indicated in the Client Hello. If the client&#8217;s version is lower, then the server responds with a new Alert defined by the RFC called <code>inappropriate_fallback</code>. The idea being that the server knows the client supports something better so the connection should have negotiated that. The <code>inappropriate_fallback</code> Alert is a &#8220;fatal&#8221; error, i.e. the SSL/TLS connection is aborted.</p>
<h3>Why does this help against POODLE?</h3>
<p>Let&#8217;s say both the client and server support TLSv1.2. The client starts off, hoping to make a TLSv1.2 connection but an active man-in-the-middle attacker interferes with the handshake in the hope of forcing a downgrade. By repeatedly doing this, the attacker can force the use of SSLv3 and try some shenanigans like POODLE. Remember, the attacker can&#8217;t remove the TLS_FALLBACK_SCSV from the Client Hello because the handshake is cryptographically protected (unlike in SSLv2).</p>
<p>After the first round of interference, the client should try TLSv1.1. With the TLS_FALLBACK_SCSV signal in place, the server will pick up on the fact that the client is only requesting a TLVs.1.1 connection because of some difficulty earlier on. The server now knows that there is no good reason why a connection with a higher procotol version should have failed &#8211; and duly aborts the current connection.</p>
<p>The attacker could, of course, drop the TLSv1.1 and the following TLSv1.0 Client Hello. If the lack of response causes the browser to downgrade again then eventually the browser will try a SSLv3 connection, which the attacker will let through. Again, the TLS_FALLBACK_SCSV signal indicates to the server that the client supports something better and will terminate the connection attempt.</p>
<p>Okay, what if the client <em>doesn&#8217;t</em> support the server&#8217;s best protocol (TLS v1.2 in this example)? Just to be clear, let&#8217;s consider that case. The client would begin with, say, a TLSv1.0 connection. The attacker interferes with the handshake and so the client tries a SSLv3 connection with TLS_FALLBACK_SCSV. Again, the server knows that the client is only doing this because an earlier attempt with a higher protocol failed so it returns the Alert and the downgrade is aborted. If the client tries again, unhindered by the attacker, the client&#8217;s opening TLSv1.0 request is accepted because it lacks the TLS_FALLBACK_SCSV signal.</p>
<h3>It&#8217;s more than just a POODLE buster&#8230;</h3>
<p>The TLS_FALLBACK_SCSV mechanism doesn&#8217;t just protect us from attacks to downgrade connections to SSLv3: it protects us from forced downgrades completely. So when we want to connect using TLSv1.2, we can be sure that a meddling attacker can&#8217;t drop us down to TLSv1.0, which doesn&#8217;t support the best available cipher suites. As ever, we do need the server to play along.</p>
<h3>&#8230;but it&#8217;s not quite a silver bullet</h3>
<p>Of course, TLS_FALLBACK_SCSV doesn&#8217;t help if the best protocol version is SSLv3 at the client and SSLv3 is supported by the server &#8211; or vice versa. In this case SSLv3 will be agreed so no downgrade attack is required but the attacker still needs to make the browser perform multiple requests to the target domain, as the <a href="https://www.openssl.org/~bodo/ssl-poodle.pdf">whitepaper</a> explains. Remember that the attack only works with block ciphers operating in CBC mode so if the preferred cipher suite over SSLv3 is RC4 then the attack is likely to fail. Not that I&#8217;m advocating SSLv3 with RC4 as a solution though!</p>
<p>If SSLv3 is disabled either on the server or the client, POODLE has lost its bite. The only practical reason to support SSLv3 for servers is to humour IE6 users (because IE6 doesn&#8217;t enable TLSv1.0 by default). But if that&#8217;s a must then TLS_FALLBACK_SCSV &#8211; when supported by both client and server &#8211; will protect the vast majority of connections when SSLv3 isn&#8217;t necessary.</p>
<p><span style="color: red;">UPDATE:</span> <a href='https://www.openssl.org/news/secadv_20141015.txt'>OpenSSL 1.0.1j</a> supports TLS_FALLBACK_SCSV.</p>
<h3 id="new"><span style="color: red;">NEW: Assumptions and side effects</span></h3>
<p>While writing up these scenarios I thought of a potential compatibility issue when TLS_FALLBACK_SCSV was in place. The draft RFC states that the connection MUST be refused by the server if the <em>maximum</em> protocol version the server supports is higher than the one advertised in the Client Hello with the TLS_FALLBACK_SCSV signal. This assumes that the server supports all protocol versions in between the client&#8217;s stated version and the server&#8217;s maximum. What can the server infer about the client? It&#8217;s clear the client supports at least a protocol version <em>one higher</em> than that in the Client Hello. But that&#8217;s all the server knows. So what if one of those intermediate versions <em>isn&#8217;t</em> supported by the server and happens to be the highest version the client supports?</p>
<p>In previous pentests I have seen servers that don&#8217;t support TLSv1.1 but do support TLSv1.0 and TLSv1.2. Imagine a client that supports TLSv1.1 at best and so it starts off a TLSv1.1 connection. TLS allows for the server to respond saying effectively &#8220;sorry, can&#8217;t do that, I can do TLSv1.0&#8243;. But supposing it&#8217;s one of those buggy servers that the downgrade fallback was intended for&#8230;In this case the connection fails in an unexpected way and the browser attempts the connection again, this time using TLSv1.0 with the TLS_FALLBACK_SCSV signal. The server then refuses the connection as its maximum TLS version is 1.2 and it assumes the client can do better. But, in fact, the client doesn&#8217;t understand 1.2 and the server doesn&#8217;t want to talk 1.1. The two will never talk to each other.</p>
<p>I put this to the RFC authors and I was delighted that <a href="https://www.imperialviolet.org">Adam Langley</a> replied (on what must have been a particularly busy day!): &#8220;I think you&#8217;re correct that the server will break in that situation&#8221;. He also proposed another, simpler compatibility scenario: &#8220;a server believes that it implements TLS 1.2 but is buggy and doesn&#8217;t handle, say, the <code>signature_algorithms</code> extension correctly. It works currently because clients downgrade to TLS 1.1. If the server implements TLS_FALLBACK_SCSV then it breaks&#8221;.</p>
<p>But is this a problem? I guess it&#8217;s unlikely. I don&#8217;t know how many of these buggy servers are out there. It&#8217;s also a fair assumption that any server that has the awareness to support TLS_FALLBACK_SCSV has also got the TLS version negotiation working. What about from the client viewpoint? In the example above, according to <a href="http://en.wikipedia.org/wiki/Transport_Layer_Security#Web_browsers">Wikipedia</a> older versions of Chrome and Opera supported TLSv1.1 at best but of course users of these browsers are now very likely to have been auto-updated to later versions. However, we want the TLS_FALLBACK_SCSV mechanism to be future-proof.</p>
<p>At the same, ultimately this is all the fault of buggy servers. Many browsers will look to disable SSLv3 in the light of POODLE, knowing that this will cause issues for a small number of sites but that&#8217;s a reasonable price to pay to protect the majority. Enabling TLS_FALLBACK_SCSV for the long-term good could be viewed in the same way. Adam Langley seemed to agree: &#8220;TLS_FALLBACK_SCSV is a way for good servers to lift themselves out of the swamp that buggy servers have created. If you have a buggy server and enable TLS_FALLBACK_SCSV then it could certainly break your server. Hopefully that&#8217;s noticed in testing and then the real bug can be fixed <img src='http://www.exploresecurity.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> &#8221;. That&#8217;s why, when he acknowledged the potential for compatibility issues, he added &#8220;but I&#8217;m ok with that&#8221;.</p>
<p>Implementing TLS_FALLBACK_SCSV could expose the buggy servers that fallback was designed for &#8211; and perhaps that&#8217;s just what we need.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exploresecurity.com/poodle-and-the-tls_fallback_scsv-remedy/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
