<?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>Softcore software development &#187; security</title>
	<atom:link href="http://tea.cesaroliveira.net/archives/tag/security/feed" rel="self" type="application/rss+xml" />
	<link>http://tea.cesaroliveira.net</link>
	<description>It&#039;s all about the cycles</description>
	<lastBuildDate>Tue, 24 Jan 2012 04:31:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Allowing mixing insecure and secure content</title>
		<link>http://tea.cesaroliveira.net/archives/92</link>
		<comments>http://tea.cesaroliveira.net/archives/92#comments</comments>
		<pubDate>Mon, 31 Aug 2009 02:38:12 +0000</pubDate>
		<dc:creator>Cesar</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[crazy]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://tea.cesaroliveira.net/?p=92</guid>
		<description><![CDATA[This is something that&#8217;s been floating in my head. Not sure how much this is worth advancing, or whether it is deeply flawed. Or whether it was considered at some point but not indexed by Google good enough. Many sites do mix HTTP and HTTPS content. Sites that do this are no-longer considered secure (Larry [...]]]></description>
			<content:encoded><![CDATA[<p>This is something that&#8217;s been floating in my head. Not sure how much this is worth advancing, or whether it is deeply flawed. Or whether it was considered at some point but not indexed by Google good enough.</p>
<p>Many sites do mix HTTP and HTTPS content. Sites that do this are no-longer considered secure (Larry goes away, the lock has a warning symbol over it) for good reason, the insecure content cannot be trusted. It may have been tampered with. If the content was a javascript file for instance, it could be very bad news.</p>
<p>But if we know that data from a secure source can&#8217;t be tampered with, could it vouch for content that isn&#8217;t secure? Let&#8217;s take an example of a fictitious webpage :</p>
<p><code><br />
&lt;script type="text/javascript" src="http://media.cesaroliveira.net/badass-javascript.js"&gt;&lt;/script&gt;<br />
&lt;img src="http://media.cesaroliveira.net/panda.jpg" alt="look out!" /&gt;<br />
Credit card number : &lt;input type="text" ...<br />
</code></p>
<p>Even though the site is served securely, some important information is sent insecurely. I am proposing that the secure content is able to pass along a hash (sha1, not md5) of the content that it expects. If the content in the insecure channel meets the has the same hash value, then we can be reasonably assured that the data has not been tampered with during transport. Let&#8217;s see the code again :</p>
<p><code><br />
&lt;script type="text/javascript" src="http://media.cesaroliveira.net/badass-javascript.js" data-hash="sha1:12b36be3076d357b2d390b2df3f9b65cd55b93e1" &gt;&lt;/script&gt;<br />
&lt;img src="http://media.cesaroliveira.net/panda.jpg" alt="look out!" data-hash="sha1:bcf31e777fa69753f8ecf9701fc9b6f1518b51b3" /&gt;<br />
Credit card number : &lt;input type="text" ...<br />
</code></p>
<p>Starts with data- because I doubt something like this would be implemented outside of my head. But it seems to solve the problem of tampering with the data. If the hashes don&#8217;t match, the website is still broken. If they do match then we should be able to breathe easily.</p>
<p>Of course, in time people will figure out vulnerabilities. Hash collisions is a problem. But this is <a href="http://www.win.tue.nl/hashclash/rogue-ca/" onclick="pageTracker._trackPageview('/outgoing/www.win.tue.nl/hashclash/rogue-ca/?referer=');">something that web had to deal with before</a>. Maybe a nice edition would be allowing multiple hash values, like :</p>
<p>&lt;img src=&#8221;http://media.cesaroliveira.net/panda.jpg&#8221; alt=&#8221;look out!&#8221; data-hash=&#8221;sha1:bcf31e777fa69753f8ecf9701fc9b6f1518b51b3;md5:953c78ac57ca68bfe532eb50120c8aa1&#8243; /&gt;</p>
<p>Yeah. I know I said no md5 <img src='http://tea.cesaroliveira.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://tea.cesaroliveira.net/archives/92/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A (Use) Case for self-signed certs</title>
		<link>http://tea.cesaroliveira.net/archives/43</link>
		<comments>http://tea.cesaroliveira.net/archives/43#comments</comments>
		<pubDate>Fri, 14 Nov 2008 08:21:02 +0000</pubDate>
		<dc:creator>Cesar</dc:creator>
				<category><![CDATA[hugs]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.cesaroliveira.net/?p=43</guid>
		<description><![CDATA[There was a bunch of GPG tinkering trying to get GPG to generate a ssh-compatible (ie. one you get from id_rsa.pub) key using my private key. While it turned into a epic fail costing me a good chunk of the day. I dived a bit into the security stuff that everyone hates. While going about [...]]]></description>
			<content:encoded><![CDATA[<p>There was a bunch of <acronym title="GNU Privacy Guard"><a href="http://www.gnupg.org/" onclick="pageTracker._trackPageview('/outgoing/www.gnupg.org/?referer=');">GPG</a></acronym> tinkering trying to get GPG to generate a ssh-compatible (ie. one you get from id_rsa.pub) key using my private key. While it turned into a epic fail costing me a good chunk of the day. I dived a bit into the security stuff that everyone hates.</p>
<p>While going about my day, I wondering if self-signed certs can be used in a way that wouldn&#8217;t get you ostracized from a security conscious community. Johnathon has <a href="http://blog.johnath.com/2008/08/05/ssl-question-corner/" onclick="pageTracker._trackPageview('/outgoing/blog.johnath.com/2008/08/05/ssl-question-corner/?referer=');">warned the blogosphere</a> at large why self-signed certs are bad and why Firefox makes you jump through hoops to allow a self-signed cert to get through. But I thought of a good use case for why you may want to use it :</p>
<ol>
<li>Self-signed certs provide little value for your users (fe. blog comments are public anyways)</li>
<li> You may not have the means (eg. credit card, unique ip if your with Dreamhost) to buy one</li>
<li> You only <em>really</em> need them for some basic stuff that users shouldn&#8217;t interact with at all. Like logging in to wordpress.</li>
</ol>
<p>In which case, you can generate a self-signed cert and configure a web server to serve you it on some uncommon port such as port 43034. The benefit is that its transparent to users. It will not interfere with their browsing. And you get the benefit of encryption and authorization, and knowing for certain that the certificate is yours (you have access to the certificate&#8217;s fingerprints).</p>
<p>I tried this on <a href="http://www.dreamhost.com/" onclick="pageTracker._trackPageview('/outgoing/www.dreamhost.com/?referer=');">Dreamhost</a> and I failed. Or, rather, Apache doesn&#8217;t you set up a &lt;VirtualHost&gt; in a <a href="http://httpd.apache.org/docs/2.0/howto/htaccess.html" onclick="pageTracker._trackPageview('/outgoing/httpd.apache.org/docs/2.0/howto/htaccess.html?referer=');">.htaccess</a> file. Dreamhost didn&#8217;t have anything in their web panel that would fix this. You can enable SSL for a site, but they force you into port 443 and don&#8217;t let you have both HTTP and HTTPS.</p>
<p>Another excellent educational learning opportunity <strong>ruined</strong> by over-zealous security zealots.</p>
]]></content:encoded>
			<wfw:commentRss>http://tea.cesaroliveira.net/archives/43/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

