<?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>technomasochism</title>
	<atom:link href="http://twobit.us/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://twobit.us/blog</link>
	<description>and two-wheeled vehicles</description>
	<lastBuildDate>Thu, 19 Jan 2012 00:38:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Troubles with Ovi Store after upgrading N8 to Anna</title>
		<link>http://twobit.us/blog/2012/01/troubles-with-ovi-store-after-upgrading-n8-to-anna/</link>
		<comments>http://twobit.us/blog/2012/01/troubles-with-ovi-store-after-upgrading-n8-to-anna/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 00:38:34 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Hobby]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[N8]]></category>
		<category><![CDATA[Nokia]]></category>

		<guid isPermaLink="false">http://twobit.us/blog/?p=1408</guid>
		<description><![CDATA[I took some time yesterday to upgrade my beloved Nokia N8 to the new(ish) Symbian^3 Anna build and it wasn&#8217;t a smooth upgrade. Upgrading through the Ovi Suite went well enough but applications like the Ovi Store just wouldn&#8217;t work after the upgrade. The Ovi Store application would install and start but would sit on [...]]]></description>
			<content:encoded><![CDATA[<p>I took some time yesterday to upgrade my beloved Nokia N8 to the new(ish) Symbian^3 Anna build and it wasn&#8217;t a smooth upgrade.  Upgrading through the Ovi Suite went well enough but applications like the Ovi Store just wouldn&#8217;t work after the upgrade.  The Ovi Store application would install and start but would sit on the splash screen showing the &#8220;Loading &#8230;&#8221; message.  At this point I did a <a href="http://mynokiablog.com/2010/10/12/how-to-hard-reset-your-nokia-n8/">hard reset</a> that did nothing.</p>
<p>After combing through a hand full of forum posts I ran across <a href="http://discussions.europe.nokia.com/t5/Software-Updates/Ovi-Store-Hangs-on-loading-after-recent-Update/m-p/1088529#M92621">this one</a> in the Nokia Europe discussion boards.  Initially I had no idea what this guy was talking about.  I guess I&#8217;m used to my phone being an appliance so downgrading packages seemed pretty crazy, especially since I had no idea where to obtain the packages (sis files) described in the post.  A few web searches later and I ran across the &#8220;<a href="http://fixqt.com/">Fix Symbian</a>&#8221; site.  Pretty encouraging name all things considered.  Anyways all I did was download the sis files from the post titled &#8220;S^3 QT 4.7.3 MOBILITY 1.1.3&#8243; which downgrades a number of components in the &#8221; Notifications Support Package Symbian3 v1.1.11120&#8243; package.  Once quick reboot and Ovi Store was back up and running.</p>
<p>So I guess the Anna upgrade that Nokia is shipping is broken?  Pretty strange really but not something that can&#8217;t be worked around thanks to some contributions from the interwebs.  Unfortunately the upgrade to Anna didn&#8217;t fix the problems I&#8217;ve had with my N8 and my wireless access point.  I&#8217;ll debug this sooner or later, likely when I upgrade my home network with the ALIX boards I got in the mail last week.</p>
]]></content:encoded>
			<wfw:commentRss>http://twobit.us/blog/2012/01/troubles-with-ovi-store-after-upgrading-n8-to-anna/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ALIX3D2 Arrives</title>
		<link>http://twobit.us/blog/2012/01/alix3d2-arrives/</link>
		<comments>http://twobit.us/blog/2012/01/alix3d2-arrives/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 20:21:47 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[ALIX]]></category>

		<guid isPermaLink="false">http://twobit.us/blog/?p=1394</guid>
		<description><![CDATA[I&#8217;ve been hoping to upgrade my older ALIX2D3 router / firewall / wireless access point for a while now. While taking a few hours off from work over the holiday I surfed over to PCEngines and bought myself a Christmas present: a matching pair of ALIX3D2 boards and a Compex WLM200N5-23 MiniPCI card (802.11an) plus [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been hoping to upgrade my older ALIX2D3 router / firewall / wireless access point for a while now.  While taking a few hours off from work over the holiday I surfed over to <a href="http://pcengines.ch/">PCEngines</a> and bought myself a Christmas present: a matching pair of ALIX3D2 boards and a Compex WLM200N5-23 MiniPCI card (802.11an) plus the necessary wires / cables / 5GHz antenna and enclosures etc.</p>
<p>Everything showed up in the mail today:<br />
<a href="/files/2012/01/ALIX3D2_web.jpg"><img src="/files/2012/01/ALIX3D2_web-300x168.jpg" alt="" title="ALIX3D2" width="300" height="168" class="size-medium wp-image-1395" /></a><br />
Unfortunately<br />
one board arrived with minor damage to the CF socket.  Bent pins suck:<br />
<a href="/files/2012/01/BentATA_web.jpg"><img src="/files/2012/01/BentATA_web-239x300.jpg" alt="" title="BentCF" width="239" height="300" class="size-medium wp-image-1396" /></a><br />
I&#8217;m waiting to hear back from the folks over at PCEngines to see how they want to handle a repair / return.  I really want to just bend it back and hope it works but I&#8217;m worried if I break it off they won&#8217;t accept a return.  Glad I bought two so I still have one to play with in the meantime.</p>
<p>My next post should be about me finally complete Masters project, but likely it&#8217;ll be about building OE for this device <img src='http://twobit.us/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><b>Update:</b><br />
PC Engines support was super quick to respond.  They gave me permission to try to bend the pin back myself and ensured me that if my attempted repair failed they&#8217;d still replace the board.  The pin bent back into place easily enough.  I&#8217;m hoping to do an install tomorrow to be sure the CF slot is functional.</p>
]]></content:encoded>
			<wfw:commentRss>http://twobit.us/blog/2012/01/alix3d2-arrives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Atom Based Home NFS</title>
		<link>http://twobit.us/blog/2011/12/atom-based-home-nfs/</link>
		<comments>http://twobit.us/blog/2011/12/atom-based-home-nfs/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 04:59:39 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[SysAdmin]]></category>

		<guid isPermaLink="false">http://twobit.us/blog/?p=1387</guid>
		<description><![CDATA[It&#8217;s been a while since I&#8217;ve posted any new content but that&#8217;s not because I haven&#8217;t been doing anything worthy of mention. During the few breaks I&#8217;ve had from my day job I took the time to replace my QNAP 419p NAS with a custom system to host NFS shares. Here&#8217;s just a quick laundry [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since I&#8217;ve posted any new content but that&#8217;s not because I haven&#8217;t been doing anything worthy of mention.  During the few breaks I&#8217;ve had from my day job I took the time to replace my QNAP 419p NAS with a custom system to host NFS shares.  Here&#8217;s just a quick laundry list of the parts I settled on after quite a bit of shopping.</p>
<p>My requirements for this system were really basic.  All it does is host NFS shares and run rTorrent from time to time.  There was no need to use a full desktop grade processor but I still wanted something x86 compatible with a good bit of ram and a PCI-E port so I could use a real hardware RAID card.  </p>
<h3>Motherboard</h3>
<p>The <a href="http://www.supermicro.com/products/motherboard/ATOM/ICH9/X7SPE-HF-D525.cfm">Super Micro MBD-X7SPE-HF-D525</a> was a good fit.  It has a sweet little <a href="http://ark.intel.com/products/49490">Atom D525</a> soldered on to the board and it&#8217;s surprisingly quick (1.8GHz) though it&#8217;s no work horse.  There&#8217;s only one 16x PCI-E port but that&#8217;s all I need.  It supports up to 4G of ram though it&#8217;s pretty low end laptop memory.  It also has two NICs so you can bond them for more throughput if you want to get fancy.</p>
<p><a href="/files/2011/12/SuperMicro_web.jpg"><img src="/files/2011/12/SuperMicro_web-300x225.jpg" alt="" title="SuperMicro" width="300" height="225" class="alignnone size-medium wp-image-1388" /></a></p>
<p>If you check out the Super Micro site you&#8217;ll see they advertise this board as having RAID on board.  It&#8217;s still not hardware RAID though and since the RAID is done in firmware / driver the Atom processor on this board would have a very hard time keeping up with parity calculations under heavy usage.  There&#8217;s plenty of literature out there about &#8220;<a href="http://en.wikipedia.org/wiki/RAID#Firmware.2Fdriver-based_RAID">fake RAID</a>&#8221; so don&#8217;t be fooled.</p>
<h3>RAID Card</h3>
<p>I&#8217;ve had excellent luck with 3ware in the past so when they were bought out by LSI I was skeptical.  Some of their older cards are still branded 3ware and I tracked down a <a href="http://www.lsi.com/products/storagecomponents/Pages/3ware9650SE-8LPML.aspx">3ware 9650SE 8LPML</a> on ebay for under 300 &#8230; since I couldn&#8217;t afford it new at close to $500 when I was looking 3 months back.</p>
<p>The Linux drivers for this card and the management software are still great.  Setting up RAID 6 was easy though the card requires 5 drives to do this RAID level where theoretically it should only need 4.</p>
<h3>RAM</h3>
<p>The memory for the Super Micro board is practically free.  I tracked down two 2G SODIMMs of Kingston ValueRAM for like $30.  Not the fastest ram in the world but it works.</p>
<h3>Disks</h3>
<p>Buying 5 hard disks is not cheep.  This is especially true if you want to get big drives and ones that will be fast enough to last.  I went with 5 Western Digital AV-GP WD20EURS 2TB 3.0Gb/s drives.  They&#8217;re nice and big, pretty fast and quiet.  User reviews on sites like Newegg are a good way to check up on products before you buy.  This one had particularly good reviews and so far they&#8217;ve been great.  None were DOA as drives have a tendency to do.  They&#8217;re also very quiet and run relatively cool.</p>
<h3>Drive Enclosure</h3>
<p>With this many drives it&#8217;s worth investing in an enclosure to hold them.  You won&#8217;t have to rig fans on the drives to keep air moving over them and you&#8217;ll have the luxury of easy swapping if it something goes wrong and you need to swap out drives.  There isn&#8217;t much available in this space so your choices are limited.  I went with 2x <a href="http://www.icydock.com/goods.php?id=47">ICY DOCK MB453SPF-B 3 in 2</a> enclosures.</p>
<p>I was a bit pissed when one of the enclosures showed up DOA but Newegg was pretty good about doing a quick exchange.  It cost me a few extra bucks in shipping but it could have been worse &#8230; ::shrug::</p>
<h3>Case</h3>
<p>I had an old case from <a href="http://www.lian-li.com/v2/index.html">Lian Li</a> and a small power supply that have been sitting in my basement unused for several years.  Luckily the case it had the 4 5.25 bays that I need to hold these enclosures.  Fitting enclosures into cases never goes as planned though.</p>
<p><a href="/files/2011/12/LianLi_web.jpg"><img src="/files/2011/12/LianLi_web-300x225.jpg" alt="" title="LianLi" width="300" height="225" class="alignnone size-medium wp-image-1389" /></a></p>
<p>The case is super nice but it had these little tabs that stuck out into the drive bays.  These were intended to support individual 5.25 drives but they just got in the way of these enclosures.  They were easy enough to remove with a saw and a file.</p>
<p>That&#8217;s about all there is to it.  Setting up the RAID so I could boot Linux from the 3ware card was a bit of a pain and I wish I had documented the process.  Setting it up through the firmware interface took some experimentation but it is possible.  Then just install Debian and an NFS server and you&#8217;re done.</p>
]]></content:encoded>
			<wfw:commentRss>http://twobit.us/blog/2011/12/atom-based-home-nfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spanish Thruxton</title>
		<link>http://twobit.us/blog/2011/10/spanish-thruxton/</link>
		<comments>http://twobit.us/blog/2011/10/spanish-thruxton/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 13:06:33 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[Hobby]]></category>
		<category><![CDATA[Motorcycle]]></category>
		<category><![CDATA[Thruxton]]></category>

		<guid isPermaLink="false">http://twobit.us/blog/?p=1379</guid>
		<description><![CDATA[I travel a bunch but I&#8217;ve only traveled internationally twice now. Interestingly enough in my short trips to both the UK and Spain I&#8217;ve ran into my Thruxton&#8217;s foreign relatives. Naturally, the Spanish Thruxton I came across this week in Barcelona is red.]]></description>
			<content:encoded><![CDATA[<p>I travel a bunch but I&#8217;ve only traveled internationally twice now.  Interestingly enough in my short trips to both the UK and Spain I&#8217;ve ran into my Thruxton&#8217;s foreign relatives.  Naturally, the Spanish Thruxton I came across this week in Barcelona is red.</p>
<p><a href="/files/2011/10/spanish-thruxton.jpg"><img src="/files/2011/10/spanish-thruxton-300x168.jpg" alt="" title="spanish-thruxton" width="300" height="168" class="alignnone size-medium wp-image-1380" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://twobit.us/blog/2011/10/spanish-thruxton/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>You do not have sufficient permissions to access this page</title>
		<link>http://twobit.us/blog/2011/09/you-do-not-have-sufficient-permissions-to-access-this-page/</link>
		<comments>http://twobit.us/blog/2011/09/you-do-not-have-sufficient-permissions-to-access-this-page/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 03:14:50 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[SysAdmin]]></category>

		<guid isPermaLink="false">http://twobit.us/blog/?p=1370</guid>
		<description><![CDATA[I&#8217;ve been working on a set of scripts to backup the wordpress instances on my server. While structuring these scripts I realized that I hadn&#8217;t structured my WP installs consistently. I had played around with using table prefixes and hosting multiple WP instances in a single database but eventually I just broke them out into [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a set of scripts to backup the wordpress instances on my server.  While structuring these scripts I realized that I hadn&#8217;t structured my WP installs consistently.  I had played around with using table prefixes and hosting multiple WP instances in a single database but eventually I just broke them out into unique databases for simplicity.</p>
<p>The table prefixes persisted however and while I was poking around I decided to rename the tables dropping the prefixes.  What I didn&#8217;t count on is that some values in the  <code>usermeta</code> and <code>options</code> tables are prepended with the table prefix from the <code>wp-config.php</code>.  Without fixing up these values in the databse your site will function normally, but the admin interface will only show an error message:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">You do not have sufficient permissions to access this page.</pre></div></div>

<p>The database values that need to be fixed up are some entries in the <code>meta_key</code> column of the <code>usermeta</code> table and the <code>option_name</code> column of the <code>options</code> table.  Let&#8217;s assume that your prefix is <code>pre_</code>, that you&#8217;ve already removed the prefix from your database and that you now want to fix up these values.  The following SQL commands will remove your old prefix from these tables:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">UPDATE usermeta SET meta_key = REPLACE(meta_key,'pre_','');
UPDATE options SET option_name = REPLACE(option_name,'pre_','');</pre></div></div>

<h2>References</h2>
<p><a href="http://www.tech-evangelist.com/2010/02/06/wordpress-error-sufficient-permissions/" target="_blank">http://www.tech-evangelist.com/2010/02/06/wordpress-error-sufficient-permissions/</a><br />
<a href="http://wordpress.org/support/topic/changed-table-prefix-got-insufficient-permissions-error" target="_blank">http://wordpress.org/support/topic/changed-table-prefix-got-insufficient-permissions-error</a></p>
]]></content:encoded>
			<wfw:commentRss>http://twobit.us/blog/2011/09/you-do-not-have-sufficient-permissions-to-access-this-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Farewell to summer 2011</title>
		<link>http://twobit.us/blog/2011/09/farewell-to-summer-2011/</link>
		<comments>http://twobit.us/blog/2011/09/farewell-to-summer-2011/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 00:35:18 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://twobit.us/blog/?p=1358</guid>
		<description><![CDATA[It&#8217;s been getting progressively colder and I can feel another Syracuse winter bearing down fast. Last Friday I got the feeling that I may not get the chance to do it again so I rode my motorcycle over to Shifty&#8217;s for lunch. It&#8217;s funny what we crave when faced with the end of the summer [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been getting progressively colder and I can feel another Syracuse winter bearing down fast.  Last Friday I got the feeling that I may not get the chance to do it again so I rode my motorcycle over to Shifty&#8217;s for lunch.  It&#8217;s funny what we crave when faced with the end of the summer and the inevitability of winter.  Hot dogs and PBR hit the spot for sure.  Farewell summer, you will be missed.</p>
<p><a href="/files/2011/09/2011_endofsummer_web.jpg"><img src="/files/2011/09/2011_endofsummer_web-300x225.jpg" alt="" title="2011_endofsummer_web" width="300" height="225" class="alignnone size-medium wp-image-1359" /></a> </p>
]]></content:encoded>
			<wfw:commentRss>http://twobit.us/blog/2011/09/farewell-to-summer-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programmers&#8217; Day</title>
		<link>http://twobit.us/blog/2011/09/programmers-day/</link>
		<comments>http://twobit.us/blog/2011/09/programmers-day/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 14:37:38 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[Computer]]></category>

		<guid isPermaLink="false">http://twobit.us/blog/?p=1350</guid>
		<description><![CDATA[Happy Programmers&#8217; Day everyone!]]></description>
			<content:encoded><![CDATA[<p>Happy <a href="http://en.wikipedia.org/wiki/Programmers'_Day">Programmers&#8217; Day</a> everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://twobit.us/blog/2011/09/programmers-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Financial Site Password Policies</title>
		<link>http://twobit.us/blog/2011/09/financial-site-password-policie/</link>
		<comments>http://twobit.us/blog/2011/09/financial-site-password-policie/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 22:03:58 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://twobit.us/blog/?p=1347</guid>
		<description><![CDATA[One of the many things I&#8217;ve had to do as part of transitioning to my new job is move my retirement savings (401k) over to a new provider. In this case I&#8217;ve been moving over to the Fidelity site. The security of financial web sites never fails to disappoint. No I didn&#8217;t try some crazy [...]]]></description>
			<content:encoded><![CDATA[<p>One of the many things I&#8217;ve had to do as part of transitioning to my new job is move my retirement savings (401k) over to a new provider.  In this case I&#8217;ve been moving over to the Fidelity site.  The security of financial web sites never fails to disappoint.</p>
<p>No I didn&#8217;t try some crazy SQL injection, CSS, or XSRF attack on the site (that would be illegal!).  I just read their password policy:</p>
<ul>
<li>Use 6 to 12 letters and/or numbers</li>
<li>Do not use one entire piece of personally identifiable information such as your Social Security number, telephone number, or date of birth. Instead, alter or disguise it (e.g., Jane212Smith)</li>
<li>Do not use more than 5 instances of a single number or letter, or easily recognized sequences (e.g., 12345 or 11111)</li>
<li>Do not use symbols, punctuation marks, or spaces (e.g., #,@, /, *, -.)</li>
</ul>
<p>::Sigh::  12 character max and only letters and numbers?  Come on seriously?  According to Microsoft [<a href="#mspass">1</a>] 14 characters is the recommended minimum for a password.  But length isn&#8217;t the only factor.  By excluding all special characters they effectively cut the character space in half.</p>
<p>Let&#8217;s think about this technically for a second though.  Why would they need to place these restrictions on their customers security?  Let&#8217;s assume the password is just another field in the Fidelity database because that&#8217;s exactly what it is.  Typically there are two reasons to limit field length and content in a database:</p>
<ul>
<li>efficiency: variable string length fields are very expensive</li>
<li>special characters can be a bit dangerous in that a scripting language or the SQL engine fronting the database might interpret the characters as commands</li>
</ul>
<p>If however, Fidelity follows best practices for storing passwords in their database neither of these concerns apply because YOU SHOULD NEVER STORE THE PASSWORD DIRECTLY IN THE DATABASE!  A hash of the password is what should be stored and the process of hashing addresses both of these concerns because it:</p>
<ul>
<li>normalizes the password length</li>
<li>sanitizes any special characters</li>
</ul>
<p>This last point can also be mitigated by using the proper and safe SQL commands available in any modern database engine.</p>
<p>So what these restrictions make me think is that the Fidelity site may actually be storing my password in plain text.  That, or they&#8217;re just placing restrictions on my password strength arbitrarily which makes little sense.</p>
<p>Unfortunately this Fidelity site isn&#8217;t the worst offender that I&#8217;ve seen, and I don&#8217;t even analyze website security for a living.  My experiences are limited only to the sites I&#8217;ve had to use over the years.  Some time back around 2005 I had an account with a bank once that didn&#8217;t even let me change my password for their website if I wanted to.  They set my password for their website when I established my pin for my ATM card!  That&#8217;s right, my password for their website was a four digit number.  I wrote them a letter pointing out the weakness in their password policy and I got back a form letter basically telling me to go away &#8230; so I did, and I took my money (totaling a whopping $2500) with me.</p>
<p> These are the people we trust with our life savings &#8230; Most of the web forums I have an account on fixed these problems back around 2007.  Fixing something like this isn&#8217;t rocket science, just best practice.</p>
<p><b>UPDATE</b><br />
After dialing into the phone system for Fidelity it became apparent that special characters are prohibited in passwords because their phone system authenticates users against the same database.  It&#8217;s convenient, but touch-tone key pads just haven&#8217;t kept pace with keyboards <img src='http://twobit.us/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   This also means that their passwords are probably case-insensitive too which nearly cuts the character space in half yet again.  ::sigh::  balancing backward compatibility against security is an age old problem.  You can look to Microsoft for a few of the biggest examples: the bazillion Windows users still surfing on IE6, the upcoming EOL for Windows XP etc.  The Fidelity password strength issue isn&#8217;t anywhere near the scale of these examples but the principle holds.</p>
<p>[<a name="mspass">1</a>]: <a href="http://www.microsoft.com/security/online-privacy/passwords-create.aspx">http://www.microsoft.com/security/online-privacy/passwords-create.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://twobit.us/blog/2011/09/financial-site-password-policie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sVirt Simulation Demo</title>
		<link>http://twobit.us/blog/2011/09/svirt-simulation-demo/</link>
		<comments>http://twobit.us/blog/2011/09/svirt-simulation-demo/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 16:55:24 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[MastersProject]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SELinux]]></category>

		<guid isPermaLink="false">http://twobit.us/blog/?p=1339</guid>
		<description><![CDATA[In my last post on this topic I gave a quick description of a simulation of the sVirt architecture. Talking about it is only half the work. In this post I&#8217;ll show it in action and interpret the output as it relates to the separation goals. Building and Installing After you clone the git repo [...]]]></description>
			<content:encoded><![CDATA[<p>In my last post on this topic I gave a quick description of a simulation of the sVirt architecture.  Talking about it is only half the work.  In this post I&#8217;ll show it in action and interpret the output as it relates to the separation goals.</p>
<h2>Building and Installing</h2>
<p>After you clone the git repo from my last post you&#8217;ll have all of the source code and policy for the simulation.  Typing <code>make</code> in the root of the tree should build both the policy and the simulation code.  Install it with <code>make install</code>. </p>
<p>There are differences between different Linux distros and how they do their SELinux stuff.  This was developed and tested on Debian Squeeze.</p>
<h2>Interface</h2>
<p>The simulation is a bit sparse so the interface is just a textual one.  Run it on the console by running it as root:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">svirt-sim</pre></div></div>

<p>The simulation is run as root because we&#8217;re simulating a virtualization management stack like <code>libvirt</code> or <code>xend</code> and makes and manages mock VHDs in <code>/var/lib/svirt-sim/images</code>.</p>
<p>The initial output you&#8217;ll see just a prompt of two hashes <code>##</code> and a message indicating you can get a list of commands by pressing <code>?</code>.  With these commands you can interactively perform actions typical for a virtualization stack: create, delete, start, stop and show information about virtual machines:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">press ? for a list of commands
##:?
c : create a VM
d : delete a VM
h : start a VM
k : stop a VM
s : show objects and labels
q : quit</pre></div></div>

<h2>Creating VMs</h2>
<p>First things first, we need to create two VMs.  When we create a VM the <code>svirt-sim</code> process creates a VHD for it and allocates an MCS category for the mock QEMU instance (that we call <code>not-qemu</code>) that will be started when the VM is started.  The first one we&#8217;ll create will do what we expect it to do: access it&#8217;s VHD file simulating disk access.  We&#8217;ll call this VM &#8216;good-one&#8217; since it&#8217;s well behaved.  The second VM we&#8217;ll create will be the &#8216;bad-one&#8217; and it will attempt to violate confinement and access VHDs belonging to the other VM.  Here&#8217;s the output we&#8217;ll see:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">##:c
what's the name of the VM?: good-one
what's the vm's disposition [good|bad]?: good
creating: /var/lib/svirt-sim/images/good-one.vhd
##:c
what's the name of the VM?: bad-one
what's the vm's disposition [good|bad]?: bad
creating: /var/lib/svirt-sim/images/bad-one.vhd</pre></div></div>

<p>Now that we&#8217;ve created our VMs we can examine the internal state of the management stack by pressing &#8216;s&#8217;:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">##:s
======================
VMs:
VM Name:        bad-one
  VHD Name:     /var/lib/svirt-sim/images/bad-one.vhd
  Disposition:  bad
  VM qemu PID   0
  VM Status:    Stopped
  mcs category:     s0:c850
  prev vhd context: (null)
VM Name:        good-one
  VHD Name:     /var/lib/svirt-sim/images/good-one.vhd
  Disposition:  good
  VM qemu PID   0
  VM Status:    Stopped
  mcs category:     s0:c440
  prev vhd context: (null)
======================
=============================
dumping security context list
  mcs: s0:c850
  mcs: s0:c440
=============================</pre></div></div>

<p>We can also see the mock VHDs created by the management stack and examine their security context:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">-rw-r-----. <span style="color: #000000;">1</span> root root unconfined_u:object_r:svirt_sim_image_t:s0:c0 <span style="color: #000000;">0</span> Sep  <span style="color: #000000;">3</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">27</span> bad-one.vhd
-rw-r-----. <span style="color: #000000;">1</span> root root unconfined_u:object_r:svirt_sim_image_t:s0:c0 <span style="color: #000000;">0</span> Sep  <span style="color: #000000;">3</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">27</span> good-one.vhd</pre></div></div>

<p>We use the first category (c0) as the context for VMs that aren&#8217;t running.  No VM should ever be run with this category so the VHD of a running VM should never be accessible to a <code>not-qemu</code> instance.</p>
<h2>Running VMs</h2>
<p>The VMs created above can be run by pressing &#8216;h&#8217;.  Once they&#8217;re running press &#8216;s&#8217; again to see the change in the internal state of the management stack.  We&#8217;ll now see pid of the mock QEMU process started.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">##:h
what's the name of the VM?: good-one
starting vm: good-one
security_start for vm with mcs: s0:c440
started child with pid 1298
##:h
what's the name of the VM?: bad-one
starting vm: bad-one
security_start for vm with mcs: s0:c850
started child with pid 1300
##:s
======================
VMs:
VM Name:        bad-one
  VHD Name:     /var/lib/svirt-sim/images/bad-one.vhd
  Disposition:  bad
  VM qemu PID   1300
  VM Status:    Running
  mcs category:     s0:c850
  prev vhd context: unconfined_u:object_r:svirt_sim_image_t:s0:c0
VM Name:        good-one
  VHD Name:     /var/lib/svirt-sim/images/good-one.vhd
  Disposition:  good
  VM qemu PID   1298
  VM Status:    Running
  mcs category:     s0:c440
  prev vhd context: unconfined_u:object_r:svirt_sim_image_t:s0:c0
======================
=============================
dumping security context list
  mcs: s0:c850
  mcs: s0:c440
=============================</pre></div></div>

<p>Now that the simulated &#8220;VMs&#8221; are running we can view their contexts and those of their VHDs to be sure they match up to the internal state of the svirt-sim stack:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># ls -l /var/lib/svirt-sim/images
-rw-r-----. 1 root root system_u:object_r:mcs_server_image_t:s0:c850 0 Sep  3 23:27 bad-one.vhd
-rw-r-----. 1 root root system_u:object_r:mcs_server_image_t:s0:c440 1 Sep  3 23:28 good-one.vhd</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">ps auxZ | grep not-qemu
system_u:system_r:not_qemu_t:s0:c440 root 1298  0.0  0.1   1664   544 ?        Ss   23:28   0:00 /sbin/not-qemu --good --file=/var/lib/svirt-sim/images/good-one.vhd
system_u:system_r:not_qemu_t:s0:c850 root 1300  0.0  0.1   1696   544 ?        Ss   23:28   0:00 /sbin/not-qemu --bad --file=/var/lib/svirt-sim/images/bad-one.vhd</pre></div></div>

<p>So far the output looks as we&#8217;d expect: the category assigned to the running <code>not-qemu</code> process matches the category of it&#8217;s VHD file.</p>
<h2>Testing Confinement</h2>
<p>Built in to this simulation is a simple confinement test.  The <code>not-qemu</code> process has an option I call it&#8217;s disposition.  If started with the option <code>--good</code> it will only attempt to access the VHD file it&#8217;s been assigned.  If started with the <code>--bad</code> option then it will cycle through the directory containing all of the VHDs and it will attempt to access all of them.  This is meant to simulate a malicious QEMU process reading the disk of another VM.  Above we&#8217;ve started two VMs, one good and one bad.  We can see the evidence of their behavior in the system logs.</p>
<p>The syslog on my system shows the following trace of accesses made by each of the <code>not-qemu</code> processes.  I&#8217;ve removed the time stamps but the messages should be considered sequential.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">/sbin/not-qemu[1298]: opening VHD file: /var/lib/svirt-sim/images/good-one.vhd
/sbin/not-qemu[1298]: not-qemu with pid: 1298 still alive
/sbin/not-qemu[1300]: new file path: /var/lib/svirt-sim/images/.
/sbin/not-qemu[1300]: opening VHD file: /var/lib/svirt-sim/images/.
/sbin/not-qemu[1300]: open failed: Is a directory
/sbin/not-qemu[1298]: opening VHD file: /var/lib/svirt-sim/images/good-one.vhd
/sbin/not-qemu[1298]: not-qemu with pid: 1298 still alive
/sbin/not-qemu[1300]: new file path: /var/lib/svirt-sim/images/..
/sbin/not-qemu[1300]: opening VHD file: /var/lib/svirt-sim/images/..
/sbin/not-qemu[1300]: open failed: Is a directory
/sbin/not-qemu[1298]: opening VHD file: /var/lib/svirt-sim/images/good-one.vhd
/sbin/not-qemu[1298]: not-qemu with pid: 1298 still alive
/sbin/not-qemu[1300]: new file path: /var/lib/svirt-sim/images/bad-one.vhd
/sbin/not-qemu[1300]: opening VHD file: /var/lib/svirt-sim/images/bad-one.vhd
/sbin/not-qemu[1300]: not-qemu with pid: 1300 still alive
/sbin/not-qemu[1298]: opening VHD file: /var/lib/svirt-sim/images/good-one.vhd
/sbin/not-qemu[1298]: not-qemu with pid: 1298 still alive
/sbin/not-qemu[1300]: new file path: /var/lib/svirt-sim/images/good-one.vhd
/sbin/not-qemu[1300]: opening VHD file: /var/lib/svirt-sim/images/good-one.vhd
/sbin/not-qemu[1300]: open failed: Permission denied
kernel: [ 2678.904913] type=1400 audit(1315107146.430:22): avc:  denied  { read write } for  pid=1300 comm=&quot;not-qemu&quot; name=&quot;go\
od-one.vhd&quot; dev=sda3 ino=1444187 scontext=system_u:system_r:not_qemu_t:s0:c850 tcontext=system_u:object_r:mcs_server_image_t:s\
0:c440 tclass=file
/sbin/not-qemu[1298]: opening VHD file: /var/lib/svirt-sim/images/good-one.vhd
/sbin/not-qemu[1298]: not-qemu with pid: 1298 still alive
/sbin/not-qemu[1300]: new file path: /var/lib/svirt-sim/images/.
/sbin/not-qemu[1300]: opening VHD file: /var/lib/svirt-sim/images/.
/sbin/not-qemu[1300]: open failed: Is a directory
/sbin/not-qemu[1298]: not-qemu with pid 1298 stopping on user request
/sbin/not-qemu[1298]: not-qemu with pid 1298 shutting down
/sbin/not-qemu[1300]: not-qemu with pid 1300 stopping on user request
/sbin/not-qemu[1300]: not-qemu with pid 1300 shutting down</pre></div></div>

<p>There&#8217;s a bit of noise here in that &#8216;bad&#8217; <code>not-qemu</code> instances loop through the <code>images</code> directory contents and don&#8217;t differentiate between files and directories so it will attempt to open and read the special directories <code>.</code> and <code>..</code> which I&#8217;ll clean up in the future.</p>
<p>The important bits are that we can see the &#8216;bad&#8217; <code>not-qemu</code> instance with PID 1300 attempt to access a VHD that doesn&#8217;t belong to it.  This results in the operation failing and an AVC being displayed.</p>
<h2>Conclusion</h2>
<p>Whenever I&#8217;m writing SELinux policy I&#8217;m always looking for ways to test it.  Policy analysis that proves a policy fulfills a specific security goal is the holy grail of security and this simulation isn&#8217;t policy analysis.  Instead it&#8217;s just a simple simulation giving an example of what we&#8217;ve discussed using logical representation of the <code>mlsconstrain</code> statements in the SELinux MCS policy.  Specifically, the category component of a processes context must dominate that of the object it&#8217;s accessing.  We&#8217;ve represented this in logic previously now this simulation shows that the security server in the Linux kernel really does enforce this constraint.</p>
<p>Another interesting use of this simulation would be to use the real QEMU policy from the reference policy and a specifically crafted binary to push the limits of the policy.  This binary could contain any number of known ways information can be leaked across QEMU instances.  If anyone out there tries this I&#8217;d love to hear about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://twobit.us/blog/2011/09/svirt-simulation-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Minuteman Bikeway and the Bike Stop</title>
		<link>http://twobit.us/blog/2011/08/minuteman-bikeway-and-the-bike-stop/</link>
		<comments>http://twobit.us/blog/2011/08/minuteman-bikeway-and-the-bike-stop/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 19:00:29 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[Hobby]]></category>
		<category><![CDATA[Bicycle]]></category>
		<category><![CDATA[Cutter]]></category>

		<guid isPermaLink="false">http://twobit.us/blog/?p=1331</guid>
		<description><![CDATA[With today a wash because of Irene, I figured I&#8217;d write up a fun bike ride I took last weekend on the Minuteman Bikeway. It&#8217;s a fun ride but on a Sunday it&#8217;s pretty crowded. There&#8217;s a good mix of little kids and Lance Armstrong wannabes, perfect for keeping things interesting. I covered the whole [...]]]></description>
			<content:encoded><![CDATA[<p>With today a wash because of <a href="http://en.wikipedia.org/wiki/Hurricane_Irene">Irene</a>, I figured I&#8217;d write up a fun bike ride I took last weekend on the <a href="http://minutemanbikeway.org/">Minuteman Bikeway</a>.  It&#8217;s a fun ride but on a Sunday it&#8217;s pretty crowded.  There&#8217;s a good mix of little kids and Lance Armstrong wannabes, perfect for keeping things interesting.</p>
<p><a href="/files/2011/08/MinuteMan_TrailSign.jpg"><img src="/files/2011/08/MinuteMan_TrailSign-300x225.jpg" alt="" title="MinuteMan_TrailSign" width="300" height="225" class="alignnone size-medium wp-image-1333" /></a></p>
<p>I covered the whole trail in both directions, even had a chance to stop at a shop called <a href="http://www.yelp.com/biz/the-bike-stop-arlington">the Bike Stop</a> that&#8217;s right on the trail.  Be careful going past this place.  There were lots of people out there either chatting or getting air and people have this nasty tendency of stopping their bikes on the trail or wandering out without looking.</p>
<p>The shop was nice though and the guys working there where fun to chat up.  Always a good time talking to people that work at a bike shop when you pull up on an unusual bike.  They always have cool stories and know about some random hardware.  These guys had a really nice shop and the snacks were just what I needed.  Here&#8217;s the evidence:<br />
<a href="/files/2011/08/BikeStop_Cutter.jpg"><img src="/files/2011/08/BikeStop_Cutter-300x226.jpg" alt="" title="BikeStop_Cutter" width="300" height="226" class="alignnone size-medium wp-image-1335" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://twobit.us/blog/2011/08/minuteman-bikeway-and-the-bike-stop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

