<?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>Computer Ramblings</title>
	<atom:link href="http://www2.orourkes.us/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www2.orourkes.us:11080/blog</link>
	<description>Computer/Network tips, tricks and other stuff I always forget</description>
	<lastBuildDate>Sun, 27 Mar 2011 23:46:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Defaults Are Boring</title>
		<link>http://www2.orourkes.us:11080/blog/2010/12/03/defaults-are-boring/</link>
		<comments>http://www2.orourkes.us:11080/blog/2010/12/03/defaults-are-boring/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 14:39:48 +0000</pubDate>
		<dc:creator>keith</dc:creator>
				<category><![CDATA[General Security]]></category>

		<guid isPermaLink="false">http://www2.orourkes.us:11080/blog/2010/12/03/defaults-are-boring/</guid>
		<description><![CDATA[&#8220;Defaults are boring. They’re not sexy. But they work&#8221; I have been preaching this mantra for many years. I read this quote in an article that had nothing to do with technology but was reminded just how universal this thought can be. I have deployed many new technologies or devices with people who want to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www2.orourkes.us:11080/blog/wp-content/uploads/2010/12/boring_by_john_alan.jpg"><img class="size-thumbnail wp-image-200 alignleft" title="boring_by_john_alan" src="http://www2.orourkes.us:11080/blog/wp-content/uploads/2010/12/boring_by_john_alan-150x150.jpg" alt="Boring" width="150" height="150" /></a><br />
&#8220;Defaults are boring. They’re not sexy. But they work&#8221;</p>
<p>I have been preaching this mantra for many years. I read this quote in an article that had nothing to do with technology but was reminded just how universal this thought can be. I have deployed many new technologies or devices with people who want to start playing with all of the bells and whistles while they do not have the best knowledge of what they may be tweaking. I have always been a fan of choosing the defaults when deploying a new device and then slowly start tweaking options in a controlled fashion with deep research on the options. This sounds like a pretty basic process but I am always amazed how many people seem to forget about this process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www2.orourkes.us:11080/blog/2010/12/03/defaults-are-boring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WCCP Across a Firewall &#8211; Part 2</title>
		<link>http://www2.orourkes.us:11080/blog/2010/05/17/wccp-across-a-firewall-part-2/</link>
		<comments>http://www2.orourkes.us:11080/blog/2010/05/17/wccp-across-a-firewall-part-2/#comments</comments>
		<pubDate>Mon, 17 May 2010 22:47:21 +0000</pubDate>
		<dc:creator>keith</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Firewalls]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[WCCP]]></category>

		<guid isPermaLink="false">http://www2.orourkes.us:11080/blog/?p=180</guid>
		<description><![CDATA[I still hate WCCP. I recently had to revisit my WCCP implementation documented in a previous post because of an outage breaking the WCCP connection between my router and my Bluecoat. After we repaired the problem, I noticed that the WCCP connection was no longer working as it was previously to the problem. Since no [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I still hate WCCP. </strong> I recently had to revisit my WCCP implementation documented in a <a href="http://www2.orourkes.us:11080/blog/2008/12/03/wccp-across-a-firewall/">previous post</a> because of an outage breaking the WCCP connection between my router and my Bluecoat.  After we repaired the problem, I noticed that the WCCP connection was no longer working as it was previously to the problem.  Since no changes were made in in the recovery process, which was a reboot of a device, I could not figure out why WCCP was no longer working.  Long story short, I noticed that the source interface of the GRE tunnel changed and it was not being allowed through the firewall.  </p>
<p>We made some additional engineering changes to this router over time.  We added a new network interface to the router but WCCP was not affected with the changes.  When the WCCP connection was broken, the router negoiated the GRE tunnel using a new source for the tunnel.  After much searching on the Cisco site I found the white paper below spelling out what I believed to be the issue with the source of the GRE tunnel being redefined on the router.   I added a loopback interface on the router and removed and reapplied the WCCP configuration on the router.  As expected, the new source for the GRE tunnel was the loopback address.  Changes were made on the Bluecoats and the firewalls to allow traffic to traverse using the loopback address and full WCCP operation was restored.</p>
<p>From White Paper:</p>
<blockquote><p>When using GRE encapsulation for WCCP redirection, the router uses the router ID IP address as its source IP address. The router ID IP address is the highest loopback address on the router, or if the loopback interface is not configured, the router ID IP address is the highest address of the physical interfaces.</p></blockquote>
<p>Source:<br />
<a href='http://www2.orourkes.us:11080/blog/wp-content/uploads/2010/05/WAAS_WCCP_Deploy_v3.pdf'>Deploying WAAS Using WCCP Paper v3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www2.orourkes.us:11080/blog/2010/05/17/wccp-across-a-firewall-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Great Virtualization Quote</title>
		<link>http://www2.orourkes.us:11080/blog/2010/05/13/great-virtualization-quote/</link>
		<comments>http://www2.orourkes.us:11080/blog/2010/05/13/great-virtualization-quote/#comments</comments>
		<pubDate>Fri, 14 May 2010 04:43:57 +0000</pubDate>
		<dc:creator>keith</dc:creator>
				<category><![CDATA[General Security]]></category>

		<guid isPermaLink="false">http://www2.orourkes.us:11080/blog/?p=176</guid>
		<description><![CDATA[I read a great article on virtualization and redundancy. The quote below was taken from the posting and I thought it spoke volumes. Enjoy. The Probability of a server having an outage is part hardware failure but mostly administrator induced failure. Having a huge number of components, less automation, more variance in configurations, poor process [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www2.orourkes.us:11080/blog/wp-content/uploads/2010/05/Virtualization.jpg"><img class="alignleft size-thumbnail wp-image-204" title="Virtualization" src="http://www2.orourkes.us:11080/blog/wp-content/uploads/2010/05/Virtualization-150x150.jpg" alt="Virtualization" width="150" height="150" /></a></p>
<p>I read a great article on virtualization and redundancy. The quote below was taken from the posting and I thought it spoke volumes. Enjoy.</p>
<blockquote><p>The Probability of a server having an outage is part hardware failure but mostly administrator induced failure. Having a huge number of components, less automation, more variance in configurations, poor process and system controls: these are the things that will cause an outage to a server. The Mean Time Between Failure (MTBF) for high-end components are measured in years. The Mean Time Between Cock-up (MTBC) varies depending on how good your staff are at IT.</p>
<p>The Impact of a server having an outage is really simple to calculate and mitigate and you need to think of the 3Rs: Redundancy, Resilience and Recovery.</p>
<p>· Redundancy is duplicating components, including the application. Running multiple webservers that do the same job and spreading these across physical servers means that when one server dies, the others take up the load. Make sure you have redundant capacity for your workload (e.g. N+1) and the impact is not an outage, just a reduction in excess capacity.</p>
<p>· Resilience is how well you can absorb an outage by restarting servers and applications in the same site.</p>
<p>· Recovery is the more serious disaster end of the scale and involves recovering services at a remote site.</p></blockquote>
<p><a href="http://viewyonder.com/2010/03/28/dont-be-a-chicken-cram-your-eggs-into-vsphere-on-ucs/">http://viewyonder.com/2010/03/28/dont-be-a-chicken-cram-your-eggs-into-vsphere-on-ucs/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www2.orourkes.us:11080/blog/2010/05/13/great-virtualization-quote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Arm Load Balancing on the ACE</title>
		<link>http://www2.orourkes.us:11080/blog/2009/09/23/one-arm-load-balancing-on-the-ace/</link>
		<comments>http://www2.orourkes.us:11080/blog/2009/09/23/one-arm-load-balancing-on-the-ace/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 23:00:24 +0000</pubDate>
		<dc:creator>keith</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www2.orourkes.us:11080/blog/?p=147</guid>
		<description><![CDATA[Below is a sample configuration which will use the ACE module to provide load balancing of real servers through the network.  In this example, the ACE NAT&#8217;s all calls from a client to get traffic back to the ACE so that the ACE sees the whole flow of traffic.  A quick diagram is also attached. [...]]]></description>
			<content:encoded><![CDATA[<p>Below is a sample configuration which will use the ACE module to provide load balancing of real servers through the network.  In this example, the ACE NAT&#8217;s all calls from a client to get traffic back to the ACE so that the ACE sees the whole flow of traffic.  A quick diagram is also attached.</p>
<blockquote><p>ACE-1/onearm# sho run<br />
Generating configuration&#8230;.</p>
<p>access-list ALLOW line 8 extended permit ip any any<br />
access-list ALLOW line 16 extended permit icmp any any</p>
<p>rserver host one<br />
ip address 2.2.2.2<br />
inservice<br />
rserver host two<br />
ip address 2.2.2.3<br />
inservice</p>
<p>serverfarm host web<br />
rserver one<br />
inservice<br />
rserver two<br />
inservice</p>
<p>class-map match-all slb-vip<br />
2 match virtual-address 1.1.1.254 any</p>
<p>policy-map type management first-match remote-access<br />
class class-default<br />
permit</p>
<p>policy-map type loadbalance first-match slb<br />
class class-default<br />
serverfarm web</p>
<p>policy-map multi-match client-vips<br />
class slb-vip<br />
loadbalance vip inservice<br />
loadbalance policy slb<br />
nat dynamic 1 vlan 100</p>
<p>interface vlan 100<br />
description &#8220;Client-Server VLAN&#8221;<br />
ip address 1.1.1.2 255.255.255.0<br />
access-group input ALLOW<br />
service-policy input client-vips<br />
service-policy input remote-access<br />
nat-pool 1 1.1.1.20 1.1.1.21 netmask 255.255.255.0 pat<br />
no shutdown</p>
<p>ip route 0.0.0.0 0.0.0.0 1.1.1.1</p>
</blockquote>
<p><a href="http://www2.orourkes.us:11080/blog/wp-content/uploads/2009/09/One-Arm-Load-Balancing.png"><img class="alignnone size-full wp-image-148" title="One Arm Load Balancing" src="http://www2.orourkes.us:11080/blog/wp-content/uploads/2009/09/One-Arm-Load-Balancing.png" alt="One Arm Load Balancing" width="506" height="389" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www2.orourkes.us:11080/blog/2009/09/23/one-arm-load-balancing-on-the-ace/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>HTTPS Dissected</title>
		<link>http://www2.orourkes.us:11080/blog/2009/06/18/https-dissected/</link>
		<comments>http://www2.orourkes.us:11080/blog/2009/06/18/https-dissected/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 18:57:58 +0000</pubDate>
		<dc:creator>keith</dc:creator>
				<category><![CDATA[General Security]]></category>

		<guid isPermaLink="false">http://www2.orourkes.us:11080/blog/?p=134</guid>
		<description><![CDATA[This infomation was pulled from Jeff Moser&#8217;s Blog and copied here for future reference.  Great post by Jeff. Thanks for the information. The First Few Milliseconds of an HTTPS Connection Convinced from spending hours reading rave reviews, Bob eagerly clicked &#8220;Proceed to Checkout&#8221; for his gallon of Tuscan Whole Milk and&#8230; Whoa! What just happened? In [...]]]></description>
			<content:encoded><![CDATA[<p>This infomation was pulled from <a href="http://www.moserware.com/2009/06/first-few-milliseconds-of-https.html">Jeff Moser&#8217;s Blog</a> and copied here for future reference.  Great post by Jeff.</p>
<p>Thanks for the information.</p>
<blockquote>
<h3><a href="http://www.moserware.com/2009/06/first-few-milliseconds-of-https.html">The First Few Milliseconds of an HTTPS Connection</a></h3>
<div>
<p>Convinced from spending hours reading <a href="http://www.amazon.com/Tuscan-Whole-Milk-Gallon-128/product-reviews/B00032G1S0/ref=dp_top_cm_cr_acr_txt?ie=UTF8&amp;showViewpoints=1">rave reviews</a>, Bob eagerly clicked &#8220;Proceed to Checkout&#8221; for his gallon of <a href="http://www.amazon.com/gp/product/B00032G1S0?ie=UTF8&amp;tag=moserware-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00032G1S0">Tuscan Whole Milk</a> and&#8230;</p>
<p>Whoa! What just happened?</p>
<p><a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/ShgnOU1MihI/AAAAAAAABNI/BAF-YQdhkJU/s1600-h/securitysymbols.png"><img src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/ShgnOU1MihI/AAAAAAAABNI/BAF-YQdhkJU/s400/securitysymbols.png" alt="" /></a>In the 220 milliseconds that flew by, a lot of interesting stuff happened to make Firefox change the address bar color and put a lock in the lower right corner. With the help of <a href="http://www.wireshark.org/">Wireshark</a>, my favorite network tool, and a slightly modified debug build of Firefox, we can see <em>exactly</em> what&#8217;s going on.</p>
<p>By agreement of <a href="http://tools.ietf.org/html/rfc2818">RFC 2818</a>, Firefox knew that &#8220;https&#8221; meant it should connect to <a href="http://tools.ietf.org/html/rfc2818#section-2.3">port 443</a> at Amazon.com:</p>
<p><a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Si8K9mA5QcI/AAAAAAAABOI/1agNWSS6NBE/s1600-h/httpsport.png"><img src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Si8K9mA5QcI/AAAAAAAABOI/1agNWSS6NBE/s400/httpsport.png" alt="" /></a>Most people associate HTTPS with <a id="fyrr" title="SSL" href="http://en.wikipedia.org/wiki/Secure_Sockets_Layer">SSL</a> (Secure Sockets Layer) which was <a id="yq6y" title="created by Netscape" href="http://www.mozilla.org/projects/security/pki/nss/history.html">created by Netscape in the mid 90&#8242;s</a>. This is becoming less true over time. As Netscape lost market share, SSL&#8217;s maintenance moved to the Internet Engineering Task Force (<a href="http://en.wikipedia.org/wiki/IETF">IETF</a>). The first post-Netscape version was re-branded as Transport Layer Security (<a href="http://en.wikipedia.org/wiki/Secure_Sockets_Layer">TLS</a>) 1.0 which <a href="http://tools.ietf.org/html/rfc2246">was released</a> in January 1999. It&#8217;s rare to see true &#8220;SSL&#8221; traffic given that TLS has been around for 10 years.</p>
<h4>Client Hello</h4>
<p>TLS wraps all traffic in &#8220;records&#8221; of different types. We see that the first byte out of our browser is the hex byte 0&#215;16 = 22 which <a id="ihzy" title="means" href="http://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml">means</a> that this is a &#8220;handshake&#8221; record:</p>
<p><a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Si-df4pU51I/AAAAAAAABQg/A1flWimwg9M/s1600-h/clienthellowithannotations.png"><img src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Si-df4pU51I/AAAAAAAABQg/A1flWimwg9M/s400/clienthellowithannotations.png" alt="" /></a>The next two bytes are 0&#215;0301 which indicate that this is a version 3.1 record which shows that TLS 1.0 is essentially SSL 3.1.</p>
<p>The handshake record is broken out into several messages. The first is our &#8220;Client Hello&#8221; message (0&#215;01). There are a few important things here:</p>
<ul>
<li>Random:<a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Si8g9EXh8uI/AAAAAAAABOY/oBt1zr_n1XE/s1600-h/randomclientbytes.png"><img src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Si8g9EXh8uI/AAAAAAAABOY/oBt1zr_n1XE/s400/randomclientbytes.png" alt="" /></a><br />
There are four bytes representing the current Coordinated Universal Time (<a href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a>) in the Unix epoch format, which is the number of seconds since January 1, 1970. In this case, 0x4a2f07ca. It&#8217;s followed by 28 random bytes. This will be used later on.</li>
<li>Session ID:<a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Si8iGgIk_gI/AAAAAAAABOg/NsPg9pMMpCw/s1600-h/sessionid.png"><img src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Si8iGgIk_gI/AAAAAAAABOg/NsPg9pMMpCw/s400/sessionid.png" alt="" /></a><br />
Here it&#8217;s empty/null. If we had previously connected to Amazon.com a few seconds ago, we could potentially resume a session and avoid a full handshake.</li>
<li>Cipher Suites:<a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Si8i6DwZDiI/AAAAAAAABOo/_Pv_1d-PbgU/s1600-h/ciphersuites.png"><img src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Si8i6DwZDiI/AAAAAAAABOo/_Pv_1d-PbgU/s400/ciphersuites.png" alt="" /></a><br />
This is a list of all of the encryption algorithms that the browser is willing to support. Its top pick is a very strong choice of &#8220;<a href="http://en.wikipedia.org/wiki/Secure_Sockets_Layer">TLS</a>_<a href="http://en.wikipedia.org/wiki/Elliptic_Curve_Diffie-Hellman">ECDHE</a>_<a href="http://en.wikipedia.org/wiki/Elliptic_Curve_DSA">ECDSA</a>_WITH_<a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">AES</a>_256_<a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher-block_chaining_.28CBC.29">CBC</a>_<a href="http://en.wikipedia.org/wiki/SHA_hash_functions#SHA-0_and_SHA-1">SHA</a>&#8221; followed by 33 others that it&#8217;s willing to accept. Don&#8217;t worry if none of that makes sense. We&#8217;ll find out later that Amazon doesn&#8217;t pick our first choice anyway.</li>
<li><a id="z8g0" title="server_name extension" href="http://tools.ietf.org/html/rfc4366#section-3.1">server_name extension</a>:<a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Si8jtnutNFI/AAAAAAAABOw/Czowyq3F-6Y/s1600-h/server_name.png"><img src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Si8jtnutNFI/AAAAAAAABOw/Czowyq3F-6Y/s400/server_name.png" alt="" /></a><br />
This is a way to tell Amazon.com that our browser is trying to reach <a href="https://www.amazon.com/">https://www.amazon.com/</a>. This is really convenient because our TLS handshake occurs long before any HTTP traffic. HTTP has a <a id="v56x" href="http://tools.ietf.org/html/rfc2616#section-14.23">&#8220;Host&#8221; header</a> which allows a cost-cutting Internet hosting companies to pile hundreds of websites onto a single IP address. SSL has traditionally required a different IP for each site, but this extension allows the server to respond with the appropriate certificate that the browser is looking for. If nothing else, this extension should allow an extra week or so of IPv4 addresses.</li>
</ul>
<h4>Server Hello</h4>
<p>Amazon.com replies with a handshake record that&#8217;s a massive two packets in size (2,551 bytes). The record has version bytes of 0&#215;0301 meaning that Amazon agreed to our request to use TLS 1.0. This record has three sub-messages with some interesting data:</p>
<ol>
<li>&#8220;Server Hello&#8221; Message (2):<br />
<a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Si-euEnAA6I/AAAAAAAABQo/l4-KRrTyNWY/s1600-h/serverhello.png"><img src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Si-euEnAA6I/AAAAAAAABQo/l4-KRrTyNWY/s400/serverhello.png" alt="" /></a></li>
</ol>
</div>
<ul>
<li>We get the server&#8217;s four byte time Unix epoch time representation and its 28 random bytes that will be used later.</li>
<li>A 32 byte session ID in case we want to reconnect without a big handshake.</li>
<li>Of the 34 cipher suites we offered, Amazon picked &#8220;TLS_RSA_WITH_RC4_128_MD5&#8243; (0&#215;0004). This means that it will use the &#8220;<a href="http://en.wikipedia.org/wiki/RSA">RSA</a>&#8221; <a href="http://en.wikipedia.org/wiki/Public-key_cryptography">public key</a> algorithm to verify certificate signatures and exchange keys, the <a href="http://en.wikipedia.org/wiki/RC4">RC4</a> encryption algorithm to encrypt data, and the <a href="http://en.wikipedia.org/wiki/MD5">MD5</a> hash function to verify the contents of messages. We&#8217;ll cover these in depth later on. I personally think Amazon had selfish reasons for choosing this cipher suite. Of the ones on the list, it was the one that was least CPU intensive to use so that Amazon could crowd more connections onto each of their servers. A much less likely <span style="FONT-SIZE: 85%">possibility </span>is that they wanted to pay special tribute to <a href="http://en.wikipedia.org/wiki/Ronald_L._Rivest">Ron Rivest</a>, who created all three of these algorithms.</li>
</ul>
<li>Certificate Message (11):<a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Si8lTxR3m0I/AAAAAAAABPA/I-le95y0ldw/s1600-h/certificatemessage.png"><img src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Si8lTxR3m0I/AAAAAAAABPA/I-le95y0ldw/s400/certificatemessage.png" alt="" /></a>
<ul>
<li>This message takes a whopping 2,464 bytes and is the certificate that the client can use to validate Amazon&#8217;s. It isn&#8217;t anything fancy. You can view most of its contents in your browser:<a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Sirx5XZBa5I/AAAAAAAABNo/Z-R75rsjCL8/s1600-h/AmazonBasicCertInfo.png"><img src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Sirx5XZBa5I/AAAAAAAABNo/Z-R75rsjCL8/s400/AmazonBasicCertInfo.png" alt="" /></a></li>
</ul>
</li>
<li>&#8220;Server Hello Done&#8221; Message (14):<a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Si8l2fMvVlI/AAAAAAAABPI/QrxJ3S9ezOo/s1600-h/serverhellodone.png"><img src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Si8l2fMvVlI/AAAAAAAABPI/QrxJ3S9ezOo/s400/serverhellodone.png" alt="" /></a>
<ul>
<li>This is a zero byte message that tells the client that it&#8217;s done with the &#8220;Hello&#8221; process and indicate that the server won&#8217;t be asking the client for a certificate.</li>
</ul>
</li>
<h4>Checking out the Certificate</h4>
<p>The browser has to <a href="http://www.koders.com/c/fid340AB659241B7C717B5B3E0095BBA4245FCE34FD.aspx#L862">figure out</a> if it should trust Amazon.com. In this case, it&#8217;s using certificates. It looks at Amazon&#8217;s certificate and <a href="http://www.koders.com/c/fid9207CD3EB61F5F08E38858D14997264BEDB5B62C.aspx#L1091">sees</a> that the current time is between the &#8220;not before&#8221; time of August 26th, 2008 and before the &#8220;not after&#8221; time of August 27, 2009. It also <a href="http://www.koders.com/c/fid9207CD3EB61F5F08E38858D14997264BEDB5B62C.aspx?s=CERT_CheckCertValidTimes#L1211">checks</a> to make sure that the certificate&#8217;s public key is authorized for exchanging secret keys.</p>
<p>Why should we trust this certificate?</p>
<p>Attached to the certificate is a &#8220;signature&#8221; that is just a really long number in <a href="http://en.wikipedia.org/wiki/Endianness#Big-endian">big-endian</a> format:</p>
<p><a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SihpJBoNeDI/AAAAAAAABNg/DgLY221ncEo/s1600-h/AmazonCertSigned.png"><img src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SihpJBoNeDI/AAAAAAAABNg/DgLY221ncEo/s400/AmazonCertSigned.png" alt="" /></a>Anyone could have sent us these bytes. Why should we trust this signature? To answer that question, need to make a speedy detour into <a id="tlez" title="mathemagic land" href="http://en.wikipedia.org/wiki/Donald_in_Mathmagic_Land">mathemagic land</a>:</p>
<h4>Interlude: A Short, Not <em>Too</em> Scary, Guide to RSA</h4>
<p>People <a href="http://stackoverflow.com/questions/575561/do-programmers-have-to-be-good-in-mathematics-closed">sometimes wonder</a> if math has any relevance to programming. Certificates give a very practical example of applied math. Amazon&#8217;s certificate tells us that we should use the RSA algorithm to check the signature. <a id="e:y3" title="RSA" href="http://en.wikipedia.org/wiki/RSA">RSA</a> was created in the 1970&#8242;s by MIT professors <a id="g825" title="Ron Rivest" href="http://people.csail.mit.edu/rivest/">Ron *R*ivest</a>, <a id="h87n" title="Adi  Shamir" href="http://en.wikipedia.org/wiki/Adi_Shamir">Adi *S*hamir</a>, and <a id="m0.d" title="Len  Adleman" href="http://en.wikipedia.org/wiki/Leonard_Adleman">Len *A*dleman</a> who found a <a id="vw55" title="tied together" href="http://people.csail.mit.edu/rivest/Rsapaper.pdf">clever way</a> to combine ideas spanning <a id="w5fp" title="Greek mathematician from 300 BC" href="http://en.wikipedia.org/wiki/Extended_Euclidean_algorithm">2000</a> <a id="i-7k" title="a third century AD Chinese mathematician" href="http://en.wikipedia.org/wiki/Chinese_remainder_theorem">years</a> <a id="ks_n" title="a 17th century French judge" href="http://en.wikipedia.org/wiki/Fermat%27s_little_theorem">of</a> <a id="o:ge" title="18th century math wizard" href="http://en.wikipedia.org/wiki/Euler_totient_function">math</a> development to come up with a <a href="http://mathworld.wolfram.com/RSAEncryption.html">beautifully simple algorithm</a>:</p>
<p>You <a id="si95" title="pick" href="http://en.wikipedia.org/wiki/Primality_test">pick</a> two huge prime numbers &#8220;p&#8221; and &#8220;q.&#8221; Multiply them to get &#8220;n = p*q.&#8221; Next, you pick a small public <a href="http://en.wikipedia.org/wiki/Exponentiation">exponent</a> &#8220;e&#8221; which is the &#8220;encryption exponent&#8221; and <a id="p_jx" title="a specially crafted inverse" href="http://en.wikipedia.org/wiki/Modular_multiplicative_inverse">a specially crafted inverse</a> of &#8220;e&#8221; called &#8220;d&#8221; as the &#8220;decryption exponent.&#8221; You then <strong>make &#8220;n&#8221; and &#8220;e&#8221; public and keep &#8220;d&#8221; as secret as you possibly can</strong> and then throw away &#8220;p&#8221; and &#8220;q&#8221; (or keep them as secret as &#8220;d&#8221;). It&#8217;s really important to remember that &#8220;e&#8221; and &#8220;d&#8221; are inverses of each other.</p>
<p>Now, if you have some message, you just need to interpret its bytes as a number &#8220;M.&#8221; If you want to &#8220;encrypt&#8221; a message to create a &#8220;ciphertext&#8221;, you&#8217;d calculate:</p>
<p>C ? M<sup>e</sup> (mod n)</p>
<p>This means that you multiply &#8220;M&#8221; by itself &#8220;e&#8221; times. The &#8220;mod n&#8221; means that we only take the remainder (e.g. &#8220;<a href="http://en.wikipedia.org/wiki/Modular_arithmetic">modulus</a>&#8220;) when dividing by &#8220;n.&#8221; For example, 11 AM + 3 hours ? 2 (PM) (mod 12 hours). The other recipient knows &#8220;d&#8221; which allows them to invert the message to recover the original message:</p>
<p>C<sup>d</sup> ? (M<sup>e</sup>)<sup>d</sup> ? M<sup>e*d</sup> ? M<sup>1</sup> ? M (mod n)</p>
<p>Just as interesting is that the person with &#8220;d&#8221; can &#8220;sign&#8221; a document by raising a message &#8220;M&#8221; to the &#8220;d&#8221; exponent:</p>
<p>M<sup>d</sup> ? S (mod n)</p>
<p>This works because &#8220;signer&#8221; makes public &#8220;S&#8221;, &#8220;M&#8221;, &#8220;e&#8221;, and &#8220;n.&#8221; Anyone can verify the signature &#8220;S&#8221; with a simple calculation:</p>
<p>S<sup>e</sup> ? (M<sup>d</sup>)<sup>e</sup> ? M<sup>d*e</sup> ? M<sup>e*d</sup> ? M<sup>1</sup> ? M (mod n)</p>
<p>Public key cryptography algorithms like RSA are often called &#8220;asymmetric&#8221; algorithms because the encryption key (in our case, &#8220;e&#8221;) is not equal to (e.g. &#8220;symmetric&#8221; with) the decryption key &#8220;d&#8221;. Reducing everything &#8220;mod n&#8221; makes it impossible to use the easy techniques that we&#8217;re used to such as normal <a href="http://en.wikipedia.org/wiki/Logarithm">logarithms</a>. The magic of RSA works because you can calculate/encrypt C ? M<sup>e</sup> (mod n) <a href="http://en.wikipedia.org/wiki/Modular_exponentiation">very quickly</a>, but it is <em>really hard</em> to calculate/decrypt C<sup>d</sup> ? M (mod n) without knowing &#8220;d.&#8221; As we saw earlier, &#8220;d&#8221; is derived from <a href="http://en.wikipedia.org/wiki/Integer_factorization">factoring</a> &#8220;n&#8221; back to its &#8220;p&#8221; and &#8220;q&#8221;, which is a <a href="http://en.wikipedia.org/wiki/NP_%28complexity%29">tough problem</a>.</p>
<h4>Verifying Signatures</h4>
<p>The big thing to keep in mind with RSA in the real world is that all of the numbers involved have to be <em>big</em> to make things really hard to break using the <a href="http://en.wikipedia.org/wiki/General_number_field_sieve">best algorithms that we have</a>. How big? Amazon.com&#8217;s certificate was &#8220;signed&#8221; by &#8220;VeriSign Class 3 Secure Server CA.&#8221; From the certificate, we see that this VeriSign modulus &#8220;n&#8221; is 2048 bits long which has this 617 digit base-10 representation:</p>
<blockquote><p>1890572922 9464742433 9498401781 6528521078 8629616064 3051642608 4317020197 7241822595 6075980039 8371048211 4887504542 4200635317 0422636532 2091550579 0341204005 1169453804 7325464426 0479594122 4167270607 6731441028 3698615569 9947933786 3789783838 5829991518 1037601365 0218058341 7944190228 0926880299 3425241541 4300090021 1055372661 2125414429 9349272172 5333752665 6605550620 5558450610 3253786958 8361121949 2417723618 5199653627 5260212221 0847786057 9342235500 9443918198 9038906234 1550747726 8041766919 1500918876 1961879460 3091993360 6376719337 6644159792 1249204891 7079005527 7689341573 9395596650 5484628101 0469658502 1566385762 0175231997 6268718746 7514321</p></blockquote>
<p>(Good luck trying to find &#8220;p&#8221; and &#8220;q&#8221; from this &#8220;n&#8221; &#8211; if you could, you could generate real-looking VeriSign certificates.)</p>
<p>VeriSign&#8217;s &#8220;e&#8221; is 2^16 + 1 = 65537. Of course, they keep their &#8220;d&#8221; value secret, probably on a safe hardware device protected by retinal scanners and armed guards. Before signing, VeriSign checked the validity of the contents that Amazon.com claimed on its certificate using a real-world &#8220;handshake&#8221; that involved <a href="http://www.verisign.com/ssl/ssl-information-center/ssl-basics/index.html#a7">looking at several of their business documents</a>. Once VeriSign was satisfied with the documents, they used the <a href="http://en.wikipedia.org/wiki/SHA_hash_functions#SHA-0_and_SHA-1">SHA-1</a> hash algorithm to get a hash value of the certificate that had all the claims. In Wireshark, the full certificate shows up as the &#8220;signedCertificate&#8221; part:</p>
<p><a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Si8nWe2TGdI/AAAAAAAABPY/E9qxHxjy0xA/s1600-h/certsignature.png"><img src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Si8m5BF5D2I/AAAAAAAABPQ/Ljv8Jd0uBEE/s400/signedcertificate.png" alt="" /></a>It&#8217;s sort of a misnomer since it actually means that those are the bytes that the signer is <em>going to sign </em>and not the bytes that already include a signature.</p>
<p><img src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Si8nWe2TGdI/AAAAAAAABPY/E9qxHxjy0xA/s400/certsignature.png" alt="" />The actual signature, &#8220;S&#8221;, is simply called &#8220;encrypted&#8221; in Wireshark. If we raise &#8220;S&#8221; to VeriSign&#8217;s public &#8220;e&#8221; exponent of 65537 and then take the remainder when divided by the modulus &#8220;n&#8221;, we get this &#8220;decrypted&#8221; signature hex value:</p>
<blockquote><p>0001FFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF00302130 0906052B0E03021A 05000414C19F8786 871775C60EFE0542 E4C2167C830539DB</p></blockquote>
<p><a href="http://tools.ietf.org/html/rfc2313#page-9">Per the PKCS #1 v1.5 standard</a>, the first byte is &#8220;00&#8243; and it &#8220;ensures that the encryption block, [when] converted to an integer, is less than the modulus.&#8221; The second byte of &#8220;01&#8243; indicates that this is a private key operation (e.g. it&#8217;s a signature). This is followed by a lot of &#8220;FF&#8221; bytes that are used to pad the result to make sure that it&#8217;s big enough. The padding is terminated by a &#8220;00&#8243; byte. It&#8217;s followed by &#8220;30 21 30 09 06 05 2B 0E 03 02 1A 05 00 04 14&#8243; which is the <a id="at3m" title="PKCS #1 v2.1 way" href="http://tools.ietf.org/html/rfc3447#page-43">PKCS #1 v2.1 way</a> of specifying the <a href="http://en.wikipedia.org/wiki/SHA_hash_functions#SHA-0_and_SHA-1">SHA-1</a> hash algorithm. The last 20 bytes are SHA-1 hash digest of the bytes in &#8220;signedCertificate.&#8221;</p>
<p>Since the decrypted value <a href="http://www.matasano.com/log/558/public-key-signature-forgery-collected/">is properly formatted</a> and the last bytes are the same hash value that we can calculate independently, we can assume that whoever knew &#8220;VeriSign Class 3 Secure Server CA&#8221;&#8216;s private key &#8220;signed&#8221; it. We implicitly trust that only VeriSign knows the private key &#8220;d.&#8221;</p>
<p>We can repeat the process to verify that &#8220;VeriSign Class 3 Secure Server CA&#8221;&#8216;s certificate was signed by VeriSign&#8217;s &#8220;Class 3 Public Primary Certification Authority.&#8221;</p>
<p>But why should we trust <em>that</em>? There are no more levels on the trust chain.</p>
<p><a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Sihn_4zmOYI/AAAAAAAABNY/di1a-vsPbYA/s1600-h/BuiltInCertificateHierarchy.png"><img src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Sihn_4zmOYI/AAAAAAAABNY/di1a-vsPbYA/s400/BuiltInCertificateHierarchy.png" alt="" /></a>The top &#8220;VeriSign Class 3 Public Primary Certification Authority&#8221; was signed by <em>itself</em>. This certificate has been built into Mozilla products as an implicitly trusted good certificate since version <a href="http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/security/nss/lib/ckfw/builtins/certdata.txt&amp;rev=NSS_3_12_2_WITH_CKBI_1_73_RTM&amp;mark=1.51">1.4 of certdata.txt</a> in the Network Security Services (<a href="http://www.mozilla.org/projects/security/pki/nss/">NSS</a>) library. It was checked-in on September 6, 2000 by Netscape&#8217;s Robert Relyea with the following comment:</p>
<blockquote><p>&#8220;Make the framework compile with the rest of NSS. Include a &#8216;live&#8217; certdata.txt with those certs we have permission to push to open source (additional certs will be added as we get permission from the owners).&#8221;</p></blockquote>
<p>This decision has had a relatively long impact since the certificate has a validity range of January 28, 1996 &#8211; August 1, 2028.</p>
<p>As Ken Thompson explained so well in his &#8220;<a href="http://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thompson.pdf">Reflections on Trusting Trust</a>&#8220;, you ultimately have to implicitly trust somebody. There is no way around this problem. In this case, we&#8217;re implicitly trusting that Robert Relyea made a good choice. We also hope that <a href="http://www.mozilla.org/projects/security/certs/policy/">Mozilla&#8217;s built-in certificate policy</a> is reasonable for the other built-in certificates.</p>
<p>One thing to keep in mind here is that all these certificates and signatures were simply used to form a trust chain. On the public Internet, VeriSign&#8217;s root certificate is implicitly trusted by Firefox long before you go to any website. In a company, you can create your own root certificate authority (CA) that you can install on everyone&#8217;s machine.</p>
<p>Alternatively, you can get around having to pay companies like VeriSign and avoid certificate trust chains altogether. Certificates are used to establish trust by using a trusted third-party (in this case, VeriSign). If you have a secure means of sharing a secret &#8220;key&#8221;, such as whispering a long password into someone&#8217;s ear, then you can use that pre-shared key (PSK) to establish trust. There are extensions to TLS to allow this, such as <a href="http://tools.ietf.org/html/rfc4279">TLS-PSK</a>, and my personal favorite, <a href="http://tools.ietf.org/html/rfc5054">TLS with Secure Remote Password (SRP) extensions</a>. Unfortunately, these extensions aren&#8217;t nearly as widely deployed and supported, so they&#8217;re usually not practical. Additionally, these alternatives impose a burden that we have to have some other secure means of communicating the secret that&#8217;s more cumbersome than what we&#8217;re trying to establish with TLS (otherwise, why wouldn&#8217;t we use <em>that</em> for everything?).</p>
<p>One final check that we need to do is to verify that the host name on the certificate is what we expected. <a href="http://www.linkedin.com/in/nelsonbolyard">Nelson Bolyard</a>&#8216;s comment in the <a href="http://www.koders.com/c/fid1C807D78F4E4CA73466FEEAA78EA9F0B2D618199.aspx#L260">SSL_AuthCertificate function</a> explains why:</p>
<blockquote>
<pre><span style="COLOR: #008000">/* cert is OK. This is the client side of an SSL connection.
 * Now check the name field in the cert against the desired hostname.
 * NB: This is our only defense against Man-In-The-Middle (MITM) attacks! */</span></pre>
</blockquote>
<p>This check helps prevent against a <a href="http://en.wikipedia.org/wiki/Man-in-the-middle_attack">man-in-the-middle</a> attack because we are implicitly trusting that the people on the certificate trust chain wouldn&#8217;t do something bad, like sign a certificate claiming to be from Amazon.com unless it actually was Amazon.com. If an attacker is able to modify your DNS server by using a technique like <a href="http://en.wikipedia.org/wiki/DNS_cache_poisoning">DNS cache poisoning</a>, you might be fooled into thinking you&#8217;re at a trusted site (like Amazon.com) because the address bar will look normal. This last check implicitly trusts certificate authorities to stop these bad things from happening.</p>
<h4>Pre-Master Secret</h4>
<p>We&#8217;ve verified some claims about Amazon.com and know its public encryption exponent &#8220;e&#8221; and modulus &#8220;n.&#8221; Anyone listening in on the traffic can know this as well (as evidenced because we are using Wireshark captures). Now we need to create a random secret key that an eavesdropper/attacker can&#8217;t figure out. This isn&#8217;t as easy as it sounds. In 1996, researchers figured out that <a href="http://en.wikipedia.org/wiki/Netscape_Navigator">Netscape Navigator</a> 1.1 was <a id="cjg_" title="using only three sources" href="http://www.cs.berkeley.edu/~daw/papers/ddj-netscape.html">using only three sources</a> to seed their pseudo-random number generator (<a href="http://en.wikipedia.org/wiki/Pseudorandom_number_generator">PRNG</a>). The sources were: the time of day, the process id, and the parent process id. As the researchers showed, these &#8220;random&#8221; sources aren&#8217;t that random and were relatively easy to figure out.</p>
<p>Since everything else was derived from these three &#8220;random&#8221; sources, it was possible to &#8220;break&#8221; the SSL &#8220;security&#8221; in 25 seconds on a 1996 era machine. If you still don&#8217;t believe that finding randomness is hard, just <a id="dfhi" title="ask the Debian OpenSSL maintainers" href="http://www.schneier.com/blog/archives/2008/05/random_number_b.html">ask the Debian OpenSSL maintainers</a>. If you mess it up, all the security built on top of it is suspect.</p>
<p>On Windows, random numbers used for cryptographic purposes are generated by calling the <a id="f9ln" title="CryptGenRandom function" href="http://msdn.microsoft.com/en-us/library/aa379942%28VS.85%29.aspx">CryptGenRandom function</a> that hashes bits <a id="qai9" title="sampled from over 125 sources" href="http://blogs.msdn.com/michael_howard/archive/2005/01/14/353379.aspx#353493">sampled from over 125 sources</a>. Firefox uses this function along with some bits derived from <a id="a5vi" title="its own  function" href="http://www.koders.com/c/fidBC778BD3666AA64522D1FD4F4EC3331E44B4D204.aspx?s=RNG_GetNoise">its own function</a> to seed its <a id="k982" title="pseudo-random number generator" href="http://www.koders.com/c/fidD184CA9064625C0ADF48025F3FA0588FCD664057.aspx">pseudo-random number generator</a>.</p>
<p>The 48 byte &#8220;pre-master secret&#8221; random value that&#8217;s generated isn&#8217;t used directly, but it&#8217;s very important to keep it secret since a lot of things are derived from it. Not surprisingly, Firefox makes it hard to find out this value. I had to compile a debug version and set the <a id="is1y" title="SSLDEBUGFILE" href="http://www.koders.com/c/fidCFCD763A9E0B2BEF3FB9D4D6C17B4094CBF21548.aspx#L2092">SSLDEBUGFILE</a> and <a id="sstz" title="SSLTRACE" href="http://www.koders.com/c/fidCFCD763A9E0B2BEF3FB9D4D6C17B4094CBF21548.aspx#L2101">SSLTRACE</a> environment variables to see it.</p>
<p>In this particular session, the pre-master secret showed up in the SSLDEBUGFILE as:</p>
<blockquote><p>4456: SSL[131491792]: Pre-Master Secret [Len: 48]<br />
03 01 bb 7b 08 98 a7 49 de e8 e9 b8 91 52 ec 81 &#8230;{&#8230;I&#8230;..R..<br />
4c c2 39 7b f6 ba 1c 0a b1 95 50 29 be 02 ad e6 L.9{&#8230;&#8230;P)&#8230;.<br />
ad 6e 11 3f 20 c4 66 f0 64 22 57 7e e1 06 7a 3b .n.? .f.d&#8221;W~..z;</p></blockquote>
<p>Note that it&#8217;s not completely random. The first two bytes are, <a id="ai16" title="by convention" href="http://tools.ietf.org/html/rfc2246#page-44">by convention</a>, the TLS version (03 01).</p>
<h4>Trading Secrets</h4>
<p>We now need to get this secret value over to Amazon.com. By Amazon&#8217;s wishes of &#8220;TLS_RSA_WITH_RC4_128_MD5&#8243;, we will use RSA to do this. You <em>could</em> make your input message equal to just the 48 byte pre-master secret, but the Public Key Cryptography Standard (PKCS) #1, version 1.5 RFC <a id="fw3:" title="states" href="http://tools.ietf.org/html/rfc2313#page-8">tells us</a> that we should pad these bytes with <em>random</em> data to make the input equal to exactly the size of the modulus (1024 bits/128 bytes). This makes it harder for an attacker to determine our pre-master secret. It also gives us one last chance to protect ourselves in case we did something really bone-headed, like reusing the same secret. If we reused the key, the eavesdropper would likely see a different value placed on the network due to the random padding.</p>
<p>Again, Firefox makes it hard to see these random values. I had to insert debugging statements into <a id="gyq6" title="the padding function" href="http://www.koders.com/c/fid1EB31A222A560045DBF9EC54457A1E0339825D58.aspx#L190">the padding function</a> to see what was going on:</p>
<blockquote>
<pre>wrapperHandle = fopen(<span style="COLOR: #a31515">"plaintextpadding.txt"</span>, <span style="COLOR: #a31515">"a"</span>);
fprintf(wrapperHandle, <span style="COLOR: #a31515">"PLAINTEXT = "</span>);
<span style="COLOR: #0000ff">for</span>(i = 0; i &lt; modulusLen; i++)
{
    fprintf(wrapperHandle, <span style="COLOR: #a31515">"%02X "</span>, block[i]);
}
fprintf(wrapperHandle, <span style="COLOR: #a31515">"\r\n"</span>);
fclose(wrapperHandle);</pre>
</blockquote>
<p>In this session, the full padded value was:</p>
<blockquote><p>00 02 12 A3 EA B1 65 D6 81 6C 13 14 13 62 10 53 23 B3 96 85 FF 24 FA CC 46 11 21 24 A4 81 EA 30 63 95 D4 DC BF 9C CC D0 2E DD 5A A6 41 6A 4E 82 65 7D 70 7D 50 09 17 CD 10 55 97 B9 C1 A1 84 F2 A9 AB EA 7D F4 CC 54 E4 64 6E 3A E5 91 A0 06 00 03 01 BB 7B 08 98 A7 49 DE E8 E9 B8 91 52 EC 81 4C C2 39 7B F6 BA 1C 0A B1 95 50 29 BE 02 AD E6 AD 6E 11 3F 20 C4 66 F0 64 22 57 7E E1 06 7A 3B</p></blockquote>
<p>Firefox took this value and <a href="http://www.koders.com/c/fid1B0E0F62F1B3DB6D7272F0BD781A1609D76FE6FE.aspx#L312">calculated</a> &#8220;C ? M<sup>e</sup> (mod n)&#8221; to get the value we see in the &#8220;<a id="whfx" title="Client Key Exchange" href="http://tools.ietf.org/html/rfc2246#page-43">Client Key Exchange</a>&#8221; record:</p>
<p><a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Si8oafu_5aI/AAAAAAAABPg/r41rp34D1pw/s1600-h/clientkeyexchange.png"><img src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Si8oafu_5aI/AAAAAAAABPg/r41rp34D1pw/s400/clientkeyexchange.png" alt="" /></a></p>
<p>Finally, Firefox sent out one last unencrypted message, a &#8220;<a id="f_on" title="Change Cipher  Spec" href="http://tools.ietf.org/html/rfc2246#page-24">Change Cipher Spec</a>&#8221; record:</p>
<p><a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Si8o_0Qi0HI/AAAAAAAABPo/M1cyaQ6le5A/s1600-h/clientchangecipherspec.png"><img src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Si8o_0Qi0HI/AAAAAAAABPo/M1cyaQ6le5A/s400/clientchangecipherspec.png" alt="" /></a></p>
<p>This is Firefox&#8217;s way of telling Amazon that it&#8217;s going to start using the agreed upon secret to encrypt its next message.</p>
<h4>Deriving the Master Secret</h4>
<p>If we&#8217;ve done everything correctly, both sides (and only those sides) now know the 48 byte (256 bit) pre-master secret. There&#8217;s a slight trust issue here from Amazon&#8217;s perspective: the pre-master secret just has bits that were generated by the client, they don&#8217;t take anything into account from the server or anything we said earlier. We&#8217;ll fix that be computing the &#8220;master secret.&#8221; <a id="lf0j" title="Per the spec" href="http://tools.ietf.org/html/rfc2246#page-47">Per the spec</a>, this is done by calculating:</p>
<blockquote><p>master_secret = PRF(pre_master_secret, &#8220;master secret&#8221;, ClientHello.random + ServerHello.random)</p></blockquote>
<p>The &#8220;pre_master_secret&#8221; is the secret value we sent earlier. The &#8220;master secret&#8221; is simply a string whose <a href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> bytes (e.g. &#8220;6d 61 73 74 65 72 &#8230;&#8221;) are used. We then concatenate the random values that were sent in the ClientHello and ServerHello (from Amazon) messages that we saw at the beginning.</p>
<p>The PRF is the &#8220;Pseudo-Random Function&#8221; that&#8217;s also <a id="vku-" title="defined in the  spec" href="http://tools.ietf.org/html/rfc2246#page-11">defined in the spec</a> and is quite clever. It combines the secret, the ASCII label, and the seed data we give it by using the keyed-Hash Message Authentication Code (<a href="http://en.wikipedia.org/wiki/HMAC">HMAC</a>) versions of both <a id="remv" title="MD5" href="http://en.wikipedia.org/wiki/MD5">MD5</a> and <a id="syuh" title="SHA-1" href="http://en.wikipedia.org/wiki/SHA_hash_functions#SHA-0_and_SHA-1">SHA-1</a> hash functions. Half of the input is sent to each hash function. It&#8217;s clever because it is quite resistant to attack, even in the face of <a id="kir7" title="MD5" href="http://www.win.tue.nl/hashclash/rogue-ca/">weaknesses in MD5</a> <a id="x8dy" title="and SHA-1" href="http://www.schneier.com/blog/archives/2005/02/sha1_broken.html">and SHA-1</a>. This process can feedback on itself and iterate forever to generate as many bytes as we need.</p>
<p>Following this procedure, we obtain a 48 byte &#8220;master secret&#8221; of</p>
<blockquote><p>4C AF 20 30 8F 4C AA C5 66 4A 02 90 F2 AC 10 00 39 DB 1D E0 1F CB E0 E0 9D D7 E6 BE 62 A4 6C 18 06 AD 79 21 DB 82 1D 53 84 DB 35 A7 1F C1 01 19</p></blockquote>
<h4>Generating Lots of Keys</h4>
<p>Now that both sides have a &#8220;master secrets&#8221;, the spec <a id="qji3" title="shows us" href="http://tools.ietf.org/html/rfc2246#page-21">shows us</a> how we can derive all the needed session keys we need using the PRF to create a &#8220;key block&#8221; where we will pull data from:</p>
<blockquote><p>key_block = PRF(SecurityParameters.master_secret, &#8220;key expansion&#8221;, SecurityParameters.server_random + SecurityParameters.client_random);</p></blockquote>
<p>The bytes from &#8220;key_block&#8221; are used to populate the following:</p>
<blockquote><p>client_write_MAC_secret[SecurityParameters.hash_size]<br />
server_write_MAC_secret[SecurityParameters.hash_size]<br />
client_write_key[SecurityParameters.key_material_length]<br />
server_write_key[SecurityParameters.key_material_length]<br />
client_write_IV[SecurityParameters.IV_size]<br />
server_write_IV[SecurityParameters.IV_size]</p></blockquote>
<p>Since we&#8217;re using a <a id="fgt_" title="stream cipher" href="http://en.wikipedia.org/wiki/Stream_cipher">stream cipher</a> instead of a <a id="xz.d" title="block cipher" href="http://en.wikipedia.org/wiki/Block_cipher">block cipher</a> like the Advanced Encryption Standard (<a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">AES</a>), we don&#8217;t need the Initialization Vectors (<a id="aj5k" title="Initialization Vector" href="http://en.wikipedia.org/wiki/Initialization_vector">IV</a>s). Therefore, we just need two Message Authentication Code (<a id="eo8s" title="Message Authentication Code" href="http://en.wikipedia.org/wiki/Message_authentication_code">MAC</a>) keys for each side that are 16 bytes (128 bits) each since the specified MD5 hash digest size is 16 bytes. In addition, the RC4 cipher uses a 16 byte (128 bit) key that both sides will need as well. All told, we need 2*16 + 2*16 = 64 bytes from the key block.</p>
<p>Running the PRF, we get these values:</p>
<blockquote><p>client_write_MAC_secret = 80 B8 F6 09 51 74 EA DB 29 28 EF 6F 9A B8 81 B0<br />
server_write_MAC_secret = 67 7C 96 7B 70 C5 BC 62 9D 1D 1F 4A A6 79 81 61<br />
client_write_key = 32 13 2C DD 1B 39 36 40 84 4A DE E5 6C 52 46 72<br />
server_write_key = 58 36 C4 0D 8C 7C 74 DA 6D B7 34 0A 91 B6 8F A7</p></blockquote>
<h4>Prepare to be Encrypted!</h4>
<p>The last handshake message the client sends out is the &#8220;<a id="n8-5" title="Finished messages" href="http://tools.ietf.org/html/rfc2246#page-46">Finished message</a>.&#8221; This is a clever message that proves that no one tampered with the handshake and it proves that we know the key. The client takes all bytes from all handshake messages and puts them into a &#8220;handshake_messages&#8221; buffer. We then calculate 12 bytes of &#8220;verify_data&#8221; using the pseudo-random function (PRF) with our master key, the label &#8220;client finished&#8221;, and an MD5 and SHA-1 hash of &#8220;handshake_messages&#8221;:</p>
<blockquote><p>verify_data = PRF(master_secret, &#8220;client finished&#8221;, MD5(handshake_messages) + SHA-1(handshake_messages)) [12]</p></blockquote>
<p>We take the result and add a record header byte &#8220;0&#215;14&#8243; to indicate &#8220;finished&#8221; and length bytes &#8220;00 00 0c&#8221; to indicate that we&#8217;re sending 12 bytes of verify data. Then, like all future encrypted messages, we need to make sure the decrypted contents haven&#8217;t been tampered with. Since our cipher suite in use is TLS_RSA_WITH_RC4_128_MD5, this means we use the MD5 hash function.</p>
<p>Some people get paranoid when they hear MD5 because it has some weaknesses. I certainly don&#8217;t advocate using it as-is. However, TLS is smart in that it doesn&#8217;t use MD5 directly, but rather the <a href="http://en.wikipedia.org/wiki/HMAC">HMAC</a> version of it. This means that instead of using MD5(m) directly, we calculate:</p>
<blockquote><p>HMAC_MD5(Key, m) = MD5((Key ? opad) ++ MD5((Key ? ipad) ++ m)</p></blockquote>
<p>(The ? means <a href="http://en.wikipedia.org/wiki/Exclusive_or">XOR</a>, ++ means concatenate, &#8220;opad&#8221; is the bytes &#8220;5c 5c &#8230; 5c&#8221;, and &#8220;ipad&#8221; is the bytes &#8220;36 36 &#8230; 36&#8243;).</p>
<p>In particular, we calculate:</p>
<blockquote><p>HMAC_MD5(client_write_MAC_secret, seq_num + TLSCompressed.type + TLSCompressed.version + TLSCompressed.length + TLSCompressed.fragment));</p></blockquote>
<p>As you can see, we include a sequence number (&#8220;seq_num&#8221;) along with attributes of the plaintext message (here it&#8217;s called &#8220;TLSCompressed&#8221;). The sequence number foils attackers who might try to take a previously encrypted message and insert it midstream. If this occurred, the sequence numbers would definitely be different than what we expected. This also protects us from an attacker dropping a message.</p>
<p>All that&#8217;s left is to encrypt these bytes.</p>
<h4>RC4 Encryption</h4>
<p>Our negotiated cipher suite was TLS_RSA_WITH_RC4_128_MD5. This tells us that we need to use <a href="http://people.csail.mit.edu/rivest/faq.html"><span style="COLOR: #800080">Ron&#8217;s Code</span></a> #4 (<a id="guhl" title="RC4" href="http://en.wikipedia.org/wiki/RC4">RC4</a>) to encrypt the traffic. <a href="http://en.wikipedia.org/wiki/Ron_Rivest">Ron Rivest</a> developed the RC4 algorithm to generate random bytes based on a 256 byte key. The algorithm is so simple you can actually memorize it in a few minutes.</p>
<p>RC4 begins by creating a 256-byte &#8220;S&#8221; byte array and populating it with 0 to 255. You then iterate over the array by mixing in bytes from the key. You do this to create a state machine that is used to generate &#8220;random&#8221; bytes. To generate a random byte, we shuffle around the &#8220;S&#8221; array.</p>
<p>Put graphically, it looks like this:</p>
<p><a href="http://en.wikipedia.org/wiki/RC4"><img src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SihmoVyIg1I/AAAAAAAABNQ/Jl6kMd1z2hE/s320/RC4.png" alt="" /></a>To encrypt a byte, we <a href="http://en.wikipedia.org/wiki/Exclusive_or">xor</a> this pseudo-random byte with the byte we want to encrypt. Remember that xor&#8217;ing a bit with 1 causes it to flip. Since we&#8217;re generating random numbers, on average the xor will flip half of the bits. This random bit flipping is effectively how we encrypt data. As you can see, it&#8217;s not very complicated and thus it runs quickly. I think that&#8217;s why Amazon chose it.</p>
<p>Recall that we have a &#8220;client_write_key&#8221; and a &#8220;server_write_key.&#8221; The means we need to create two RC4 instances: one to encrypt what our browser sends and the other to decrypt what the server sent us.</p>
<p>The first few random bytes out of the &#8220;client_write&#8221; RC4 instance are &#8220;7E 20 7A 4D FE FB 78 A7 33 &#8230;&#8221; If we xor these bytes with the unencrypted header and verify message bytes of &#8220;14 00 00 0C 98 F0 AE CB C4 &#8230;&#8221;, we&#8217;ll get what appears in the encrypted portion that we can see in Wireshark:</p>
<p><a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Si8ryrIoGrI/AAAAAAAABP4/1bSIRcRkERw/s1600-h/clientencryptedkeyexchange.png"><img src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Si8ryrIoGrI/AAAAAAAABP4/1bSIRcRkERw/s400/clientencryptedkeyexchange.png" alt="" /></a>The server does almost the same thing. It sends out a &#8220;Change Cipher Spec&#8221; and then a &#8220;Finished Message&#8221; that includes all handshake messages, including the <em>decrypted</em> version of the client&#8217;s &#8220;Finished Message.&#8221; Consequently, this proves to the client that the server was able to successfully decrypt our message.</p>
<h4>Welcome to the Application Layer!</h4>
<p>Now, 220 milliseconds after we started, we&#8217;re finally ready for the application layer. We can now send normal HTTP traffic that&#8217;ll be encrypted by the TLS layer with the RC4 write instance and decrypt traffic with the server RC4 write instance. In addition, the TLS layer will check each record for tampering by computing the HMAC_MD5 hash of the contents.</p>
<p>At this point, the handshake is over. Our TLS record&#8217;s content type is now 23 (0&#215;17). Encrypted traffic begins with &#8220;17 03 01&#8243; which indicate the record type and TLS version. These bytes are followed by our encrypted size, which includes the HMAC hash.</p>
<p>Encrypting the plaintext of:</p>
<blockquote><p>GET /gp/cart/view.html/ref=pd_luc_mri HTTP/1.1<br />
Host: www.amazon.com<br />
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.10) Gecko/2009060911 Minefield/3.0.10 (.NET CLR 3.5.30729)<br />
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8<br />
Accept-Language: en-us,en;q=0.5<br />
Accept-Encoding: gzip,deflate<br />
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7<br />
Keep-Alive: 300<br />
Connection: keep-alive<br />
&#8230;</p></blockquote>
<p>will give us the bytes we see on the wire:</p>
<p><a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Si8s4nuKH8I/AAAAAAAABQA/feL3OBZV83s/s1600-h/firstclientappdataencrypted.png"><img src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Si8s4nuKH8I/AAAAAAAABQA/feL3OBZV83s/s400/firstclientappdataencrypted.png" alt="" /></a>The only other interesting fact is that the sequence number increases on each record, it&#8217;s now 1 (and the next record will be 2, etc).</p>
<p>The server does the same type of thing on its side using the server_write_key. We see its response, including the tell-tale application data header:</p>
<p><a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Si8tz1Y9BqI/AAAAAAAABQQ/B6_UN0lX7fM/s1600-h/firstserverappdata.png"><img src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Si8tz1Y9BqI/AAAAAAAABQQ/B6_UN0lX7fM/s400/firstserverappdata.png" alt="" /></a></p>
<p>Decrypting this gives us:</p>
<blockquote><p>HTTP/1.1 200 OK<br />
Date: Wed, 10 Jun 2009 01:09:30 GMT<br />
Server: Server<br />
&#8230;<br />
Cneonction: close<br />
Transfer-Encoding: chunked</p></blockquote>
<p>which is a normal HTTP reply that includes a non-descriptive &#8220;Server: Server&#8221; header and a misspelled &#8220;<a id="t7o1" title="Cneonction: close" href="http://www.nextthing.org/archives/2005/08/07/fun-with-http-headers">Cneonction: close</a>&#8221; header coming from Amazon&#8217;s load balancers.</p>
<p>TLS is just below the application layer. The HTTP server software can act as if it&#8217;s sending unencrypted traffic. The only change is that it writes to a library that does all the encryption. <a href="http://www.openssl.org/">OpenSSL</a> is a popular open-source library for TLS.</p>
<p>The connection will stay open while both sides send and receive encrypted data until either side sends out a &#8220;<a href="http://tools.ietf.org/html/rfc2246#page-25">closure alert</a>&#8221; message and then closes the connection. If we reconnect shortly after disconnecting, we can re-use the negotiated keys (if the server still has them cached) without using public key operations, otherwise we do a completely new full handshake.</p>
<p>It&#8217;s important to realize that application data records can be <em>anything</em>. The only reason &#8220;HTTPS&#8221; is special is because the web is so popular. There are lots of other TCP/IP based protocols that ride on top of TLS. For example, TLS is used by <a id="a7fg" title="SFTP" href="http://tools.ietf.org/html/rfc4217">FTPS</a> and <a id="y0ps" title="extensions to SMTP" href="http://tools.ietf.org/html/rfc3207">secure extensions to SMTP</a>. It&#8217;s certainly better to use TLS than inventing your own solution. Additionally, you&#8217;ll benefit from a protocol that has withstood careful <a href="http://tools.ietf.org/html/rfc5246#appendix-F">security analysis</a>.</p>
<h4>&#8230; And We&#8217;re Done!</h4>
<p>The very readable <a id="u9ya" title="TLS RFC" href="http://tools.ietf.org/html/rfc5246">TLS RFC</a> covers many more details that were missed here. We covered just one single path in our observation of the 220 millisecond dance between Firefox and Amazon&#8217;s server. Quite a bit of the process was affected by the TLS_RSA_WITH_RC4_128_MD5 Cipher Suite selection that Amazon made with its ServerHello message. It&#8217;s a reasonable choice that slightly favors speed over security.</p>
<p>As we saw, if someone could secretly factor Amazon&#8217;s &#8220;n&#8221; modulus into its respective &#8220;p&#8221; and &#8220;q&#8221;, they could effectively decrypt all &#8220;secure&#8221; traffic until Amazon changes their certificate. Amazon counter-balances this concern this with a short one year duration certificate:</p>
<p><a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Si8u2evehpI/AAAAAAAABQY/pFMUJ5-vmOU/s1600-h/amazoncertvalidity.png"><img src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Si8u2evehpI/AAAAAAAABQY/pFMUJ5-vmOU/s400/amazoncertvalidity.png" alt="" /></a>One of the cipher suites that was offered was &#8220;TLS_DHE_RSA_WITH_AES_256_CBC_SHA&#8221; which uses the <a id="y2_." title="Diffie-Hellman key exchange" href="http://en.wikipedia.org/wiki/Diffie-Hellman_key_exchange">Diffie-Hellman key exchange</a> that has a nice property of &#8220;<a id="jtxx" title="forward secrecy" href="http://en.wikipedia.org/wiki/Perfect_forward_secrecy">forward secrecy</a>.&#8221; This means that if someone cracked the mathematics of the key exchange, they&#8217;d be no better off to decrypt another session. One downside to this algorithm is that it requires more math with big numbers, and thus is a little more computationally taxing on a busy server. The &#8220;Advanced Encryption Standard&#8221; (<a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">AES</a>) algorithm was present in many of the suites that we offered. It&#8217;s different than RC4 in that it works on 16 byte &#8220;blocks&#8221; at a time rather than a single byte. Since its key can be up to 256 bits, many consider this to be more secure than RC4.</p>
<p>In just 220 milliseconds, two endpoints on the Internet came together, provided enough credentials to trust each other, set up encryption algorithms, and started to send encrypted traffic.</p>
<p>And to think, all of this just so Bob can buy milk.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www2.orourkes.us:11080/blog/2009/06/18/https-dissected/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Verizon Data Breach Report &#8211; 2009</title>
		<link>http://www2.orourkes.us:11080/blog/2009/04/15/verizon-data-breach-report-2009/</link>
		<comments>http://www2.orourkes.us:11080/blog/2009/04/15/verizon-data-breach-report-2009/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 14:09:43 +0000</pubDate>
		<dc:creator>keith</dc:creator>
				<category><![CDATA[General Security]]></category>

		<guid isPermaLink="false">http://www2.orourkes.us:11080/blog/?p=119</guid>
		<description><![CDATA[This years Verizon Breach report is out.  This seems to make a compelling argument that PCI can help as well as we are still not winning the battle on low hanging security fruit i.e. password management and patch management.  The security basics will not solve breaches but I believe it will go a long way [...]]]></description>
			<content:encoded><![CDATA[<p>This years Verizon Breach report is out.  This seems to make a compelling argument that PCI can help as well as we are still not winning the battle on low hanging security fruit i.e. password management and patch management.  The security basics will not solve breaches but I believe it will go a long way towards moving us out of the weeds.</p>
<p>What commonalities exist?</p>
<ul>
<li>69% were discovered by a third party (-6%).</li>
<li><strong>81% of victims were not Payment Card Industry (PCI) compliant.</strong></li>
<li><strong>83% of attacks were not highly difficult (&lt;&gt;).</strong></li>
<li><strong>87% were considered avoidable through simple or intermediate controls (&lt;&gt;).</strong></li>
<li>99.9% of records were compromised from servers and applications.</li>
</ul>
<p><a href="http://www.verizonbusiness.com/resources/security/reports/2009_databreach_rp.pdf">Verizon Site</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www2.orourkes.us:11080/blog/2009/04/15/verizon-data-breach-report-2009/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WCCP Across a Firewall</title>
		<link>http://www2.orourkes.us:11080/blog/2008/12/03/wccp-across-a-firewall/</link>
		<comments>http://www2.orourkes.us:11080/blog/2008/12/03/wccp-across-a-firewall/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 13:33:09 +0000</pubDate>
		<dc:creator>keith</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Firewalls]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www2.orourkes.us:11080/blog/?p=104</guid>
		<description><![CDATA[I hate WCCP.  There seems to be little good information and any docs I do find from Cisco or proxy vendors all seem to leave it at the magic phase of how things just seem to work.  I have been working with another guy on trying to get an IOS router to forward HTTP requests [...]]]></description>
			<content:encoded><![CDATA[<p>I hate WCCP.  There seems to be little good information and any docs I do find from Cisco or proxy vendors all seem to leave it at the magic phase of how things just seem to work.  I have been working with another guy on trying to get an IOS router to forward HTTP requests to a Bluecoat proxy across a stateful firewall.  We were attempting to get a transparent proxy working so users did not have to have a hard coded proxy but with the firewall between the users and the proxy, nothing seemed to work.  L2 forwarding was not an option because we would be bridging our firewall so we needed a GRE encapsulation to get the requests to the proxy.</p>
<p>After working with both vendors, we were able to determine that the router was forwarding the requests to the proxy with GRE encapsulation and the firewall was allowing the GRE traffic to traverse the firewall with ACL&#8217;s.  The proxy was spoofing the IP address of the remote server but did not GRE encapsulate the traffic.  The firewall denied that traffic because the packed is a SYN ACK and there was no corresponding SYN recorded.  The original SYN packet was in a GRE tunnel.</p>
<p>The fix that we came up with was to ignore the TCP state for the web traffic.  Using MPF, we were able to uniquely identify the traffic that we wanted to ignore state.  This service policy gets applied on the DMZ interface where the proxy lives which means my outside interface to the Internet is not a risk and still stateful.  Below is a rough outline of what we needed to do to get this to work.  It is not the final secured version, so tweak for your environment, but we did get WCCP to work across our firewall.  The last question that I have is should the Bluecoats encapsulated the response in a GRE tunnel?  If so, then we would not have to perform the extra steps and the magic would have just happened.</p>
<p><code><br />
access-list proxy-bypass extended permit ip any 10.0.0.0 255.0.0.0<br />
!<br />
class-map proxy-bypass<br />
match access-list proxy-bypass<br />
!<br />
policy-map proxy-bypass<br />
class proxy-bypass<br />
set connection advanced-options tcp-state-bypass<br />
!<br />
service-policy proxy-bypass interface DMZ<br />
!<br />
access-list DMZ-ACL extended permit ip any 10.0.0.0 255.0.0.0<br />
access-group in interface DMZ-ACL<br />
! need a ACE entry to allow the traffic into the firewall after ignoring state<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www2.orourkes.us:11080/blog/2008/12/03/wccp-across-a-firewall/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Off Topic Post &#8211; Mojito Recipe</title>
		<link>http://www2.orourkes.us:11080/blog/2008/08/10/off-topic-post-mojito-recipe/</link>
		<comments>http://www2.orourkes.us:11080/blog/2008/08/10/off-topic-post-mojito-recipe/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 04:26:25 +0000</pubDate>
		<dc:creator>keith</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www2.orourkes.us:11080/blog/?p=77</guid>
		<description><![CDATA[This is one of those off topic post just so I can archive a good mojito recipe.  Pulled from this blog.  Enjoy After several google searches, experiments, and many taste testing excursions at more than a few places (where I shamelessly stole ideas, compared my homemade version to theirs, etc.), I’ve perfected my mojito recipe. [...]]]></description>
			<content:encoded><![CDATA[<p>This is one of those off topic post just so I can archive a good mojito recipe.  Pulled from this <a href="http://www.mywhimislaw.com/?p=1388">blog</a>.  Enjoy</p>
<blockquote><p>After several google searches, experiments, and many taste testing excursions at more than a few places (where I shamelessly stole ideas, compared my homemade version to theirs, etc.), I’ve perfected my mojito recipe.</p>
<p>If you have a favorite mojito recipe, that’s great.  But I have four tips for you that’ll take it to the next level &#8211; I promise:</p>
<ol>
<li>Make your own mint simple syrup: 1 cup water, 1 cup sugar (use 1/3 brown sugar), heated until the sugar dissolves (you can use your microwave for this). Then let it steep with one cup of mint leaves for at least 30 minutes before you strain it &amp; store it in your refrigerator (thanks to <a href="http://www.portlandfoodanddrink.com/?p=572">Food Dude</a> for the inspiration here.  I must confess that I’ve even used dried mint when fresh wasn’t available; it still did the trick.)</li>
<li>Instead of club soda (or better yet, seltzer or sparkling water), use prosecco (italian sparkling wine &#8211; I stole the idea from local PDX restaurant Pazzo.) Or asti spumanti. Or even inexpensive champagne. Trust me on this one. Or, alternatively, try ginger beer.</li>
<li>Add a dash or two of Angostura bitters to your drink.</li>
<li>Consider using gold rum or dark rum instead of the light stuff (note: several mojito purists violently disagree with me on the rum switch &#8211; they insist it should be silver rum or nothing…)</li>
</ol>
<p>And if you don’t have a favorite recipe?  Try this one.  Note &#8211; I used to use my beloved <a href="http://www.mywhimislaw.com/?p=1317">Magic Bullet</a> to do a slushy version (I now have a Bella Cucina rocket blender instead), you’ll have to muddle by hand if you don’t yet have one. It’s important to go easy with the blender, though &#8211; it’s easy to over-muddle if you’re not careful.</p>
<ol>
<li>In a tall, sturdy glass (or shaker), pour in 1 ounce of your simple syrup, and a handful of fresh mint leaves (6-12 &#8211; yes, even if you’ve made the mint syrup, although if you can’t get fresh mint, you can go without. See why it’s wise to make the syrup when you can…?). Muddle this together gently with the blunt instrument of your choice, then add several ice cubes (or crushed ice if you have it), &amp; muddle it a bit more, especially if you’ve got cubes you need to break down a bit. (You’ll make crushed ice if you use your Bullet here, although you may need to add the rum as well to give it a bit more liquid to work with.)</li>
<li>Add 1 1/2 to 2 ounces of rum, 1 ounce of lime juice (or squeeze in a couple of lime wedges and add them in) and the bitters; stir vigorously (or cover and shake if you’re using the shaker, blend for two quick pulses if you’re using the Bullet.)</li>
<li>Pour it into a glass, top it off with a splash (or more) of sparkling wine or ginger beer (or club soda if you must), and garnish with a mint sprig or two.</li>
</ol>
<p>Enjoy!</p>
<p>And if you’ve gotten this far and want to perfect your mojito, don’t go back to Google &#8211; go <a href="http://www.jeffreymorgenthaler.com/2007/the-dos-and-donts-of-mojitos/">read</a> the Do’s and Don’ts of mojitos from bartender Jeffrey Morgenthaler instead!</p></blockquote>
<p>Aother useful link for mojito do&#8217;s and don&#8217;t's:<br />
<a href="http://www.jeffreymorgenthaler.com/2007/the-dos-and-donts-of-mojitos/">jeffreymorgenthaler.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www2.orourkes.us:11080/blog/2008/08/10/off-topic-post-mojito-recipe/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Best Security Poster Ever!</title>
		<link>http://www2.orourkes.us:11080/blog/2008/07/14/best-security-poster-ever/</link>
		<comments>http://www2.orourkes.us:11080/blog/2008/07/14/best-security-poster-ever/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 05:00:40 +0000</pubDate>
		<dc:creator>keith</dc:creator>
				<category><![CDATA[General Security]]></category>

		<guid isPermaLink="false">http://www2.orourkes.us:11080/blog/?p=58</guid>
		<description><![CDATA[Nothing says security more the Dirty Harry.  Do you feel 1337 Punk! Pulled from Network World]]></description>
			<content:encoded><![CDATA[<p>Nothing says security more the Dirty Harry.  Do you feel <a href="http://en.wikipedia.org/wiki/Leet">1337</a> Punk!</p>
<p><a href="http://www2.orourkes.us:11080/blog/wp-content/uploads/2008/07/dirty-harry-security-metaphors.jpg"><img class="alignnone size-medium wp-image-59" title="Dirty Harry - CISO" src="http://www2.orourkes.us:11080/blog/wp-content/uploads/2008/07/dirty-harry-security-metaphors-300x215.jpg" alt="Dirty Harry on Security" width="300" height="215" /></a></p>
<p>Pulled from <a href="http://www.networkworld.com/slideshows/2008/071408-security-metaphors.html?ts0hb=&#038;story=ts_12sec">Network World</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www2.orourkes.us:11080/blog/2008/07/14/best-security-poster-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ACL&#8217;s and Routing Protocols</title>
		<link>http://www2.orourkes.us:11080/blog/2008/07/12/acls-and-routing-protocols/</link>
		<comments>http://www2.orourkes.us:11080/blog/2008/07/12/acls-and-routing-protocols/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 16:04:06 +0000</pubDate>
		<dc:creator>keith</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www2.orourkes.us:11080/blog/?p=57</guid>
		<description><![CDATA[Here is a great list of protocols and what is need to use them with ACL&#8217;s.  This was shamelessly ripped from the Aaron’s Worthless Words Blog but I wanted to keep a local copy for archiving purposes.  Enjoy! BGP : Runs on TCP/179 between the neighbors access-list 101 permit tcp any host 192.168.0.1 eq 179 [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a great list of protocols and what is need to use them with ACL&#8217;s.  This was shamelessly ripped from the <a href="http://aconaway.com/2008/06/12/acls-and-hsrp-bgp-ospf-vrrp-glbp/">Aaron’s Worthless Words</a> Blog but I wanted to keep a local copy for archiving purposes.  Enjoy!</p>
<blockquote>
<ul>
<li>BGP : Runs on TCP/179 between the neighbors</li>
</ul>
<p><code>access-list 101 permit tcp any host 192.168.0.1 eq 179</code></p>
<ul>
<li>EIGRP : Runs on its own protocol number from the source interface IP to the multicast address of 224.0.0.10</li>
</ul>
<p><code>access-list 101 permit eigrp any host 224.0.0.10</code></p>
<ul>
<li>OSPF : Runs on its own protocol number from the source interface IP to the multicast address of 224.0.0.5; also talks to 224.0.0.6 for DR/BDR routers</li>
</ul>
<p><code>access-list 101 permit ospf any host 224.0.0.5<br />
access-list 101 permit ospf any host 224.0.0.6</code></p>
<ul>
<li>HSRP : Runs on UDP from the source interface IP to the multicast address of 224.0.0.2. I’ve seen in the past that it runs on UDP/1985, but I didn’t find any evidence of that in a quick Google for it. Can someone verify?</li>
</ul>
<p><code>access-list 101 permit udp any host 224.0.0.2</code></p>
<ul>
<li>RIP : Runs on UDP/520 from the source interface IP to the multicast address of 224.0.0.9</li>
</ul>
<p><code>access-list 101 permit udp any host 224.0.0.9 eq 520</code></p>
<ul>
<li>VRRP : Runs on its own protocol number from the source interface IP to the multicast address of 224.0.0.18</li>
</ul>
<p><code>access-list 101 permit 112 any host 224.0.0.18</code></p>
<ul>
<li>GLBP : Runs on UDP from the source interface IP to the multicast address of 224.0.0.102</li>
</ul>
<p><code>access-list 101 permit udp any host 224.0.0.102</code></p>
<ul>
<li>DHCPD (or bootps) : Runs on UDP/67 from 0.0.0.0 (since the client doesn’t have an address yet) to 255.255.255.255 (the broadcast).</li>
</ul>
<p><code>access-list 101 permit udp any host 255.255.255.255 eq 67</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www2.orourkes.us:11080/blog/2008/07/12/acls-and-routing-protocols/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
