<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Darth Null</title>
	<atom:link href="http://darthnull.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://darthnull.org</link>
	<description>Random ramblings from the Dark Lord of Absolutely Nothing</description>
	<lastBuildDate>Wed, 05 Oct 2011 18:56:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='darthnull.org' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Darth Null</title>
		<link>http://darthnull.org</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://darthnull.org/osd.xml" title="Darth Null" />
	<atom:link rel='hub' href='http://darthnull.org/?pushpress=hub'/>
		<item>
		<title>How to Lose $1000 in Vegas Without Even Gambling</title>
		<link>http://darthnull.org/2011/08/30/bh11-fidelis-puzzle/</link>
		<comments>http://darthnull.org/2011/08/30/bh11-fidelis-puzzle/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 01:04:27 +0000</pubDate>
		<dc:creator>Darth Null</dc:creator>
				<category><![CDATA[Cryptography]]></category>

		<guid isPermaLink="false">http://darthnull.org/?p=396</guid>
		<description><![CDATA[On July 15, Fidelis Security Solutions announced that they&#8217;d be running a crypto puzzle at Black Hat. And that the prize would be $1000. So, naturally, I was quite interested. I went to their site, downloaded the puzzle, and set to work: ^ ¥Ð§µ ¶®Æä æ©×ä ÷ĳŒĐ ƆķėĲ ŦůŶū ƂƐƔƆ ŦƉƶǴ ƆƅƦƬ ǆƹɇʃ As always, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=396&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>On July 15, Fidelis Security Solutions announced that they&#8217;d be running <a href="http://www.fidelissecurity.com/node/287">a crypto puzzle</a> at Black Hat. And that the prize would be $1000. So, naturally, I was quite interested.  I went to their site, downloaded the puzzle, and set to work:</p>
<pre style="font-size:16pt;"><code>^
¥Ð§µ
¶®Æä
æ©×ä
÷ĳŒĐ
ƆķėĲ
ŦůŶū
ƂƐƔƆ
ŦƉƶǴ
ƆƅƦƬ
ǆƹɇʃ
</code></pre>
<p style="text-align:center;font-weight:bold;color:red;">As always, if you’d like to try to solve this yourself, then STOP now, as the rest of this post is full of spoilers. The text above is all that you need to get started, or you can <a href="http://darthnull.org/puzzles-and-contests/fidelis-bh11-ciphertext">click here</a> to see the ciphertext and the hints that were revealed during the conference.</p>
<p>It&#8217;s immediately obvious that we&#8217;re not looking at straight ASCII. I figured it would be UTF-8 encoded, and verified that quickly. But the question then was whether the decoding work should be in UTF-8 or if, for example, I needed to convert it to UTF-16 first. I even considered that maybe I needed to look to the official Unicode name for each character, instead of the binary representation of it. Here&#8217;s the hexdump of the ciphertext, in UTF-8 (with newlines dropped for clarity):</p>
<pre><code>5e
c2 a5 c3 90 c2 a7 c2 b5
c2 b6 c2 ae c3 86 c3 a4
c3 a6 c2 a9 c3 97 c3 a4
c3 b7 c4 b3 c5 92 c4 90
c6 86 c4 b7 c4 97 c4 b2
c5 a6 c5 af c5 b6 c5 ab
c6 82 c6 90 c6 94 c6 86
c5 a6 c6 89 c6 b6 c7 b4
c6 86 c6 85 c6 a6 c6 ac
c7 86 c6 b9 c9 87 ca 83
</code></pre>
<p>The little ^ character at the beginning made me think of XOR &#8212; since in many languages, that&#8217;s the operator used for that. So I need to find some binary key stream that, when XORd with the ciphertext, will give me plaintext.</p>
<p>I played with that for a while, then watched their little promo video again. And there, at the very end of the video, the phrase &#8220;ALL YOUR ¥Ð§µ ARE BELONG TO US&#8221; zooms past the viewer. So &#8220;¥Ð§µ&#8221; == &#8220;BASE&#8221;? Okay, that&#8217;s something else I can work with.</p>
<p>Another interesting thing that I noticed: in UTF-16, the first byte of each two-byte pair (each character is represented by two bytes) increases gradually over the entire ciphertext:</p>
<pre><code>005E
00A5 00D0 00A7 00B5
00B6 00AE 00C6 00E4
00E6 00A9 00D7 00E4
00F7 0133 0152 0110
0186 0137 0117 0132
0166 016F 0176 016B
0182 0190 0194 0186
0166 0189 01B6 01F4
0186 0185 01A6 01AC
01C6 01B9 0247 0283
</code></pre>
<p>In the UTF-8 version, the first byte varies among c2, c3, c4, c5, etc., but is generally increasing (just not quite as clearly in the UTF-8 version). So it seems pretty likely that the first byte is irrelevant. </p>
<p>After a few days, pulling the puzzle out every now and then, the original puzzle page was removed and replaced with something that essentially said &#8220;You&#8217;re too early. Come back later for the puzzle.&#8221; Damn &#8212; maybe what I&#8217;ve been playing with was just a teaser, and not the real puzzle. Okay, I&#8217;ll forget about it for a while (and finish my talk slides&#8230;)</p>
<p>Fast forward to Black Hat, I stop by the Fidelis booth. And discover that the original puzzle is in fact the real puzzle. Arrgh! I could&#8217;ve been working on this all along!</p>
<p>Every few hours over the course of the conference, they sent out hints via Twitter. Predictably, the first few hints don&#8217;t help me at all, though one tweet &#8220;get to know xxd&#8221; helps. As sending the original ciphertext through xxd would just give me a straight UTF-8 dump in hex, I now know I&#8217;m supposed to use that encoding and not convert to UTF-16.</p>
<p>But that&#8217;s not helping me any. They tell me in person that the &#8220;BASE&#8221; bit wasn&#8217;t meant to mean anything, so that was just a red herring. They also tweet some of the plaintext (&#8220;Fidelis&#8221; is in it), but still I&#8217;m getting nowhere. I tried writing some tools that&#8217;d drag &#8220;Fidelis&#8221; across the ciphertext, looking at what the XORd keystream would have to be in order to produce that plaintext. That gets me nowhere. </p>
<p>A later tweet says that there are only 20 characters in the plaintext. Ooooh, that changes things. Now I&#8217;m playing with XORing two bytes in a row (like A5 ^ D0, then A7 ^ B5, etc.) but again, no luck. Another hint tells me that ¥ and µ are the same, but that doesn&#8217;t help either (one&#8217;s encoded as A5, the other as B5), and if we&#8217;re talking about two-character sequences, then now I&#8217;m really confused).</p>
<p>Finally, at 1:07 on Thursday, they released this hint: &#8220;&#8216;C2A5&#8242; =~ /.{3}(.)/&#8221;. This tells me that for every four-character hex sequence, I only need to look at the last character. </p>
<p>I get off the escalator, pull up the ciphertext hex on my phone, and start decoding ASCII in my head. &#8220;P&#8230;u&#8230;n&#8230;d&#8230;&#8221; Oh, crap. Finding a corner to sit in, I open the hex in a text editor and pull up an ASCII chart. What I end up with is this:</p>
<pre><code>a5 90 a7 b5
b6 ae 86 a4
a6 a9 97 a4
b7 b3 92 90
86 b7 97 b2
a6 af b6 ab
82 90 94 86
a6 89 b6 b4
86 85 a6 ac
86 b9 87 83
</code></pre>
<p>becomes:</p>
<pre><code>5 0 7 5
6 e 6 4
6 9 7 4
7 3 2 0
6 7 7 2
6 f 6 b
2 0 4 6
6 9 6 4
6 5 6 c
6 9 7 3
</code></pre>
<p>which then becomes:</p>
<pre><code>50 75 6e 64 69 74 ....
</code></pre>
<p>or </p>
<pre><code>Pundits grok Fidelis
</code></pre>
<p>I immediately went to the Fidelis booth, walked up to Will (the creator of the puzzle), looked him in the eye, and simply said &#8220;Really? REALLY!?&#8221;  That got a laugh.  Apparently, in his words, I gave him &#8220;too much credit.&#8221; I was looking for an actual, cryptographic solution, when really the answer was staring me in the face THE ENTIRE TIME.</p>
<p>And if I&#8217;d taken the time to really think about it, I should have solved this in 10 minutes just by visual inspection.  Remember when I said that I&#8217;d determined pretty quickly to drop the initial byte of each pair? The &#8220;c2&#8243; and &#8220;c3&#8243; and so forth?  Well, part of figuring out whether it was UTF-8 or UTF-16 involved me looking at the Wikipedia pages for UTF. Which told me that when a pair begins with c2 through cf, the next byte MUST start with 8, 9, a, or b. So I knew, almost from the beginning, that not only did the first byte have no real bearing in the puzzle, but the next nybble (the first character of the 2nd byte) had no bearing either.  But that fact just never registered.</p>
<p>In fact, hindsight has helped me to recognize not just one, but two different ways to look at the data and quickly solve the puzzle. Let&#8217;s look at the hex dump again (with column headers to make the discussion easier):</p>
<pre><code>
AB CD EF GH IJ KL MN OP
-----------------------
c2 a5 c3 90 c2 a7 c2 b5
c2 b6 c2 ae c3 86 c3 a4
c3 a6 c2 a9 c3 97 c3 a4
c3 b7 c4 b3 c5 92 c4 90
c6 86 c4 b7 c4 97 c4 b2
c5 a6 c5 af c5 b6 c5 ab
c6 82 c6 90 c6 94 c6 86
c5 a6 c6 89 c6 b6 c7 b4
c6 86 c6 85 c6 a6 c6 ac
c7 86 c6 b9 c9 87 ca 83
</code></pre>
<p>Looking at the columns, it should have been even more obvious. I&#8217;ve already discussed dropping columns A, B, E, F, I, J, M, and N (I came to this conclusion shortly after I originally started the puzzle). But what I didn&#8217;t &#8220;grok,&#8221; but should have, was that I needed to drop columns C, G, K, and O as well. What&#8217;s left after that? Column D is either a 2, 5, 6, or 7. Column H is 0, 3, 5, 7, 9, e, or f. Column L: 2, 4, 6, or 7, and finally the last column, P, which is 0, 2, 3, 4, 5, 6, b, or c. So two columns (H and P) with truly random-looking numbers, and two columns (D and L) with 2, 4, 5, 6, or 7. In ASCII, a byte that begins with 4 or 5 is a capital letter, and 6 and 7 denote lowercase letters. Bytes beginning with 2 are punctuation &#8212; in this case, the 2 is always paired with a 0, or a space.</p>
<p>Another way to look at this, mathematically, is in terms of bits of entropy. Columns A, E, I, and M have 0 bits, since they never change. Columns B, F, J, and N have 4 bits, since they&#8217;re anything between 2 and a. Similarly, columns C, G, K, and O only bring 2 bits to the game (since 8, 9, a, and b are all 10xx in binary, it&#8217;s just the last 2 bits that change). And D and L have only 3 bits of entropy (2, 4, 5, 6, and 7 all fit within 0xxx in binary). Finishing it up, we have:</p>
<pre><code>
AB CD EF GH IJ KL MN OP
-----------------------
04 23 04 24 04 23 04 24</code></pre>
<p>One can pretty readily see what might&#8217;ve been obscured before: That each line has 2 repeated pairs (04 23 04 24). Looking at the UTF-16 version, again, we see that the characters are taken from increasingly higher code pages in the Unicode alphabet&#8230;which further strengthens the supposition that columns B, F, J, and N are all meaningless (since they&#8217;re largely derived from the Unicode pages as well). So instead we have &#8220;00 23 00 24&#8243; or just &#8220;23 24&#8243;. That&#8217;s 11 bits&#8230;.but we only need 8 bits for letters (or really, 7 bits for ASCII). But wait &#8212; the 2s here are also largely driven by the Unicode layout&#8230;if we drop those, now our data has &#8220;03 04&#8243; bits, or 7 bits total. Just enough to build ASCII data. And sure enough, that&#8217;s what it does.</p>
<p>The plaintext wasn&#8217;t even encrypted. Just hidden in noise. </p>
<p>I should have walked into their booth first thing Wednesday morning, handed them the solution, and walked away $1000 richer.</p>
<p>To say I was frustrated&#8230;well&#8230;.that doesn&#8217;t begin to cover it.</p>
<p>So in the end&#8230;.was this a good or bad puzzle? As much as it pains me to admit it, this was an excellent puzzle. It made me think about UTF-8 encoding (which many, especially us old dumb-terminal types, overlook in favor of flat ASCII). It had a red herring (the ^ making me think of XOR). It had obvious, blatant signs that should have been seen, at least by experienced cryptographers. Like most good riddles, it had a simple, obvious, easy-to-execute solution. Also like most most good riddles, I felt like a complete idiot for having missed the answer.</p>
<p>Thanks, Fidelis, for reminding me to keep my eye on the basics, and for driving home the first rule of cryptanalysis, as defined by the late Robert Morris: &#8220;Check for plaintext.&#8221;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darthnull.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darthnull.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darthnull.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darthnull.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darthnull.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darthnull.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darthnull.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darthnull.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darthnull.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darthnull.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darthnull.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darthnull.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darthnull.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darthnull.wordpress.com/396/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=396&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://darthnull.org/2011/08/30/bh11-fidelis-puzzle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b58ed6e3547fbf761105f63a576e1ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dschuetz</media:title>
		</media:content>
	</item>
		<item>
		<title>First Anniversary</title>
		<link>http://darthnull.org/2011/08/23/first-anniversary/</link>
		<comments>http://darthnull.org/2011/08/23/first-anniversary/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 12:46:05 +0000</pubDate>
		<dc:creator>Darth Null</dc:creator>
				<category><![CDATA[Bit-o-Everything]]></category>
		<category><![CDATA[Navel Gazing]]></category>

		<guid isPermaLink="false">http://darthnull.org/?p=390</guid>
		<description><![CDATA[A year ago today, I left the comfortable confines of an 18-year career in big-name Government contracting, and joined a very small security startup called Intrepidus Group. It&#8217;s been an interesting year. One major change &#8212; I&#8217;ve really stepped up my blogging. I&#8217;ve posted detailed analysis on issues ranging from the RSA breach (including a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=390&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A year ago today, I left the comfortable confines of an 18-year career in big-name Government contracting, and joined a very small security startup called <a href="http://www.intrepidusgroup.com">Intrepidus Group.</a></p>
<p>It&#8217;s been an interesting year.</p>
<p>One major change &#8212; I&#8217;ve really stepped up my blogging. I&#8217;ve posted detailed analysis on issues ranging from the <a href="http://intrepidusgroup.com/insight/2011/03/risk-posed-by-securid-hack/">RSA breach</a> (including a <a href="http://intrepidusgroup.com/insight/2011/03/quantifying-theoretical-rsa-securid-attack/">theoretical attack</a> on their SecurID tokens) to the question of whether iPhones were <a href="http://intrepidusgroup.com/insight/2011/04/ios-location-db-privacy/">tracking your location</a> (I still say &#8220;no.&#8221;)</p>
<p>My research efforts have also expanded, resulting in two detailed white papers, the first describing a hack to build <a href="http://intrepidusgroup.com/insight/2010/12/crypt3-rainbow-tables/">rainbow tables for UNIX crypt() passwords</a>, and the second providing documentation for Apple&#8217;s <a href="http://intrepidusgroup.com/insight/2011/08/apple-mdm-talk/">iOS Mobile Device Management (MDM)</a> protocol / API. Both those papers also included detailed code that people could use right away to further their own research.</p>
<p>This research also led to opportunities to speak at major information security conferences. In January, I spoke briefly to a huge crowd at ShmooCon on my rainbow table work as part of the closing panel, discussing passwords &#8212; past, present, and future. And just a few weeks ago, I headlined my own talk at Black Hat in Las Vegas, discussing the good, bad, and ugly of Apple&#8217;s iOS MDM system.</p>
<p>Speaking of iOS, I&#8217;ve even found a few interesting bugs, all related in one way or another to MDM. The biggest, of course, was a bit of an 0-day which I dropped during my Black Hat talk: Exploiting man-in-the-middle vulnerabilities in iOS MDM to accomplish an &#8220;Evil Maid&#8221; attack, and thus bypass secure passcodes on a locked iOS device. Full details are in the <a href="http://intrepidusgroup.com/insight/downloads/272">talk slides</a>.</p>
<p>Speaking at two cons in a 6-month period was definitely a thrill, and I thank both ShmooCon and Black Hat for the chance to present my results to a broader audience. But speaking wasn&#8217;t the only thing I did for cons&#8230; Right when I joined Intrepidus, I learned that we&#8217;d signed up to rebuild the ShmooCon ticket sales system, and I jumped at the opportunity to tackle that challenge. We had some growing pains during the first round of sales (none of which were my fault, honest! the servers melted into a heap of slag long before my code was activated). In the end, Bruce and company fixed the server issues, and with the help of 3ric Johansen, I optimized my code significantly and the sales ended up going pretty well in the end.</p>
<p>Unfortunately, all that focus on ShmooCon meant that I negelected another project, <a href="http://www.khanfu.com">Khan Fu.</a> However, that&#8217;s beginning to spin back up again, and after supporting Black Hat, BSidesLV,and DEFCON, we&#8217;re ready to enhance and extend Khan Fu for next year&#8217;s con season.</p>
<p>I&#8217;ve also continued to have fun with crypto. I was first to solve the <a href="http://www.haxbysakebomb.com/thotcon.html">THOTCON 0&#215;2 pre-sale puzzle</a>, and also won the ShmooCon badge contest for the 3rd year running. I didn&#8217;t go to Toorcon or CarolinaCon, but was able to solve crypto contests for both of those at home, just for fun. Unfortunately, I also ran into my first major defeats: I was soundly beaten by Sak3bomb&#8217;s THOTCON 0&#215;2 stego, and totally missed the incredibly obvious for <a href="http://www.fidelissecurity.com/node/287/">Fidelis Security&#8217;s</a> Black Hat challenge. (I blame that one on being pre-occupied by my talk. Yeah. That&#8217;s my story, and I&#8217;m sticking to it.)</p>
<p>All in all, though, it&#8217;s been a great year. I&#8217;ve learned a lot, I&#8217;ve done a lot, and I&#8217;ve worked with some incredibly smart and interesting people. I can&#8217;t wait to see what the next year brings!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darthnull.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darthnull.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darthnull.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darthnull.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darthnull.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darthnull.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darthnull.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darthnull.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darthnull.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darthnull.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darthnull.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darthnull.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darthnull.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darthnull.wordpress.com/390/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=390&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://darthnull.org/2011/08/23/first-anniversary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b58ed6e3547fbf761105f63a576e1ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dschuetz</media:title>
		</media:content>
	</item>
		<item>
		<title>Great Googly Moogly! I&#8217;m speaking at Black Hat!</title>
		<link>http://darthnull.org/2011/07/28/blackhat-2011-preview/</link>
		<comments>http://darthnull.org/2011/07/28/blackhat-2011-preview/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 13:02:04 +0000</pubDate>
		<dc:creator>Darth Null</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://darthnull.org/?p=385</guid>
		<description><![CDATA[One week from today I&#8217;ll be presenting a talk at Black Hat. Black Hat! Wow. I&#8217;m still a little amazed at this turn of events, but am trying not to dwell on it for fear of slipping into a blind panic. But I think I&#8217;m ready. I submitted a nice long white paper a couple [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=385&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One week from today I&#8217;ll be presenting a talk at Black Hat. Black Hat! Wow. I&#8217;m still a little amazed at this turn of events, but am trying not to dwell on it for fear of slipping into a blind panic. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>But I think I&#8217;m ready. I submitted a nice long white paper a couple of weeks ago, and sent in my presentation yesterday. I&#8217;m comfortable with the material. I (think) I&#8217;ll be able to intelligently field questions. I&#8217;m pretty sure I won&#8217;t be a complete, blithering idiot on stage. And to settle my nerves, I&#8217;ve put in an early order for a bottle of Drambuie. Though I think I&#8217;ll save that for the obligatory post-talk celebration.</p>
<p>Of course, this isn&#8217;t the first time I&#8217;ve spoken at a conference &#8212; I was lucky enough to get a spot on the closing panel at ShmooCon this past January. There were four of us on the panel, so I didn&#8217;t get to speak long (only about 10 minutes). But being the closing session, most of the con was there &#8212; perhaps as many as 1000 people. I haven&#8217;t seen the video, but people tell me that I did well, so I guess there&#8217;s really no reason to be nervous here.</p>
<p>I still have yet to write up anything about that ShmooCon appearance, and hopefully I&#8217;ll finally do something soon. There&#8217;s been quite a bit happening in the password cracking / authentication business in the past six months, and I have a lot of interesting ideas swirling around that I really need to put down for others to comment on. Maybe I&#8217;ll write some on the flight to Vegas. You know, to keep my mind off of my talk.</p>
<p>It&#8217;s actually my talk that I&#8217;m writing now, to, er, talk about. Since joining Intrepidus Group, I&#8217;ve spent a good deal of time helping to assess risk and craft security guidelines for iOS devices in large enterprises. A large part of securing iStuff in the enterprise relies upon the use of Mobile Device Management technology (MDM).  MDM has been around for a while, especially for some of the older, more corporately-established mobile devices (like BlackBerry or Windows Mobile). Last summer, though, Apple jumped into the arena, adding support for their devices as part of iOS 4.0.</p>
<p>Unfortunately, the way that MDM works for iOS hasn&#8217;t been very well described, publicly. Which makes it difficult when you&#8217;re trying to demonstrate to a customer that it will make their enviroment more secure. </p>
<p>So I set about doing everything I could to understand, at a deep, technical level, exactly how the technology worked. We were already pretty satisifed, abstractly, with the features and capabilities of Apple&#8217;s MDM, but we felt it necessary to go that extra step to truly know what it&#8217;s doing. The end result of this is that we now have a mostly-complete understanding of how the protocol works.</p>
<p>Which is what I&#8217;ll be talking about next week. I start with how iOS settings work, move into additional features available through the iPhone Configuration Utility, and then start talking about MDM. The talk shows in detail how MDM uses the Apple Push Notification Service, and describes the message format used to make that notification. It&#8217;ll also document the interaction between device and server, from authentication and enrollment to receiving commands and providing responses.  Enough detail is provided to enable you to write your own experimental MDM server (or, you could simply use the one I&#8217;ll be releasing at the talk).</p>
<p>Finally, I&#8217;ll talk about some limitations and weaknesses I&#8217;ve uncovered, and their potential security ramifications. There might even be a surprise for those hardy enough to sit through the whole talk.</p>
<p>This is going to be quite the experience for me. If your work involves securing iOS devices, especially at the enterprise level, please drop by and give a listen. If you can&#8217;t make it, check out the <a href="http://intrepidusgroup.com/insight">Intrepidus Group website</a> after the conference &#8212; I hope to write up some of the more interesting bits of the talk for a standalone post, and we should also have the slides, white paper, and source code available for download at some point.</p>
<p>See you in Vegas!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darthnull.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darthnull.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darthnull.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darthnull.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darthnull.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darthnull.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darthnull.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darthnull.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darthnull.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darthnull.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darthnull.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darthnull.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darthnull.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darthnull.wordpress.com/385/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=385&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://darthnull.org/2011/07/28/blackhat-2011-preview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b58ed6e3547fbf761105f63a576e1ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dschuetz</media:title>
		</media:content>
	</item>
		<item>
		<title>DEF CON 16 Punch Card Puzzle</title>
		<link>http://darthnull.org/2011/07/27/def-con-16-punch-card-puzzle/</link>
		<comments>http://darthnull.org/2011/07/27/def-con-16-punch-card-puzzle/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 02:15:07 +0000</pubDate>
		<dc:creator>Darth Null</dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://darthnull.org/?p=377</guid>
		<description><![CDATA[Back in 2008, at DEF CON 16, G. Mark Hardy presented his second crypto challenge. I didn&#8217;t go to DC16, so I didn&#8217;t see the challenge (and even if I had, I wasn&#8217;t really tracking these at the time). But in 2010, at ShmooCon, he dusted the challenge off and handed it out again, as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=377&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Back in 2008, at DEF CON 16, G. Mark Hardy presented his second crypto challenge. I didn&#8217;t go to DC16, so I didn&#8217;t see the challenge (and even if I had, I wasn&#8217;t really tracking these at the time). But in 2010, at ShmooCon, he dusted the challenge off and handed it out again, as nobody had solved it yet. I&#8217;d managed, with a buddy, to solve the ShmooCon badge puzzle that year, and after I got home I started on the DC16 puzzle. It took me a few days, but I managed to beat it. </p>
<p>I&#8217;ve held off on writing this one up, because the original included a phone number, and I didn&#8217;t want to publish that without G. Mark&#8217;s approval. And though we&#8217;re in frequent contact, it wasn&#8217;t until recently that I remembered to ask him about it. At his request, I&#8217;ve modified the puzzle slightly, with a different phone number (which I&#8217;m sure you&#8217;ll recognize). The method to arrive at the solution is still the same as the original.</p>
<p>The puzzle was handed out in five pieces, each printed on old computer punch cards. Each card included some additional text and two lines of code. Here are the five cards (again, modified for a different endgame):</p>
<pre><code>VFLASGGGGIUGAAGYBDAWHOEVHUUVLLHGJYOLGFGP
GHALGGGOAAGGJPLLHZIHBFMHWIHSRYOIFPMIFVTF

XBMGRMBULEMPBMSRGMEBYRGMGRGHFMAGNMRLRZOM
GXMJRMLNBMEMUAZEGNVSOSFCUMXDSLDPFFUMXDVY

BVQZWOOBPPUSAZJEAUBTMATDFAJTTAUIFDSAQPVI
PFTIBOPWAUFOFHFAAJBUGBQBBCNXLQJMBUJVQDGN

QRJRWGDNMCZQTGYRZGFWRLRJRUFRSYWWKARAGMLS
RRGSKGMWYZKGSREOAVSXAQRZWHDKEQICCVMVUSAQ

KCPNCEJPKPPAFFFZZKDKEPEPZZFXRCOKLAVDYDKO
XTXEJHKKPPEKECMSKKWAMCLAADOJDADZKSNXIJJQ
</code></pre>
<p style="text-align:center;font-weight:bold;color:red;">As always, if you’d like to try to solve this yourself, then STOP now, as the rest of this post is full of spoilers. The text above is all that you need to get started.</p>
<p>One of the first things I did was to try the simple attacks: ROT-13, for example. After those gained me nothing, I wrote a simple python script to output letter frequencies for each card. The results looked something like this:</p>
<pre><code>A :    7     2     9     5     6
B :    2     5     9     0     0
C :    0     1     1     3     5
D :    1     3     3     2     6
E :    1     4     1     2     6
F :    6     4     6     2     4
G :   15     8     2     7     0
H :    8     1     1     1     1
I :    5     0     3     1     1
J :    2     1     5     2     5
K :    0     0     0     4    12
L :    7     4     1     2     2
M :    2    15     2     4     2
N :    0     3     2     1     2
O :    4     2     4     1     3
P :    3     2     5     0     8
Q :    0     0     5     5     1
R :    1     7     0    12     1
S :    2     4     2     6     2
T :    1     0     5     1     1
U :    3     4     6     2     0
V :    4     2     3     3     1
W :    2     0     2     6     1
X :    0     4     1     1     4
Y :    3     2     0     3     1
Z :    1     2     2     4     5
</code></pre>
<p>So the five cards have distinctly different frequency distributions, but none of them are really flat. The first card had more Gs than any other letter, the second, slightly more Ms than Gs, etc. Pretty quickly I&#8217;d noticed a pattern: GMARK. I later saw this as a recurring theme in his puzzles, but this was the first time I&#8217;d seen it, and so I was kind of stoked. First, I tried shifting the letters back such that the most common letter was E, but that didn&#8217;t seem to look right. Remembering that he often uses Z for a space, I then shifted them back to Zs (G -&gt; Z, M -&gt; Z, etc.), and now my texts looked like this:</p>
<pre><code>OYETLZZZZBNZTTZRUWTPAHXOANNOEEAZCRHEZYZI
ZATEZZZHTTZZCIEEASBAUYFAPBALKRHBYIFBYOMY

KOZTEZOHYRZCOZFETZROLETZTETUSZNTAZEYEMBZ
TKZWEZYAOZRZHNMRTAIFBFSPHZKQFYQCSSHZKQIL

AUPYVNNAOOTRZYIDZTASLZSCEZISSZTHECRZPOUH
OESHANOVZTENEGEZZIATFAPAABMWKPILATIUPCFM

YZRZEOLVUKHYBOGZHONEZTZRZCNZAGEESIZIOUTA
ZZOASOUEGHSOAZMWIDAFIYZHEPLSMYQKKDUDCAIY

ZRECRTYEZEEPUUUOOZSZTETEOOUMGRDZAPKSNSZD
MIMTYWZZEETZTRBHZZLPBRAPPSDYSPSOZHCMXYYF
</code></pre>
<p>But this still didn&#8217;t give me a cleartext. Some kind of wild guess made me think that I was dealing with a columnar transposition, which I&#8217;d never tried to break before. So I resolved to do this one, and to do it &#8220;by hand&#8221; (without resorting to brute-force computer programs). I tried some simple rearrangements of each card&#8217;s text, but got nowhere&#8230;</p>
<p>Then I realized, that I might be able to do an attack &#8220;in depth&#8221;: Since I had 5 different ciphertexts, if they were all encoded with the same key, then I could use bits of one to help solve another. I lined all the text up in five columns, and started trying to rearrange the rows such that words formed. For example, if I found a Q in the first column, I&#8217;d then look for another row with a U in the first column, and put them together. I did that for all the Qs I could find, then looked in the other columns to see if other obvious digraphs were being formed.</p>
<p>This way, I figured, I might start with &#8220;QUI&#8221; in one column, and notice &#8220;HIS&#8221; in another. Then I&#8217;d just have to put a row with &#8220;T&#8221; above HIS&#8221; and I&#8217;d have another word built. Repeat, and repeat, and eventually I&#8217;d solve all of them.</p>
<p>Except that this wasn&#8217;t how the puzzle worked. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>As I realized that I was getting nowhere, I noticed that there were two rows which read &#8220;Z  Y  O  U  Z.&#8221; And for the first time, I saw the word &#8220;YOU&#8221; in the middle of two Zs. And realized that I was being an idiot.</p>
<p>I eliminated some spaces, to make it easier to read, and found the plaintext. [I was working vertically, but to save space I'll rotate it here, in two blocks. The first block is the 1st half of each card's shifted text, placed one on top of the next, the 2nd block is the same for the 2nd half of each card].</p>
<pre><code>OYETLZZZZBNZTTZRUWTPAHXOANNOEEAZCRHEZYZI
KOZTEZOHYRZCOZFETZROLETZTETUSZNTAZEYEMBZ
AUPYVNNAOOTRZYIDZTASLZSCEZISSZTHECRZPOUH
YZRZEOLVUKHYBOGZHONEZTZRZCNZAGEESIZIOUTA
ZRECRTYEZEEPUUUOOZSZTETEOOUMGRDZAPKSNSZD

ZATEZZZHTTZZCIEEASBAUYFAPBALKRHBYIFBYOMY
TKZWEZYAOZRZHNMRTAIFBFSPHZKQFYQCSSHZKQIL
OESHANOVZTENEGEZZIATFAPAABMWKPILATIUPCFM
ZZOASOUEGHSOAZMWIDAFIYZHEPLSMYQKKDUDCAIY
MIMTYWZZEETZTRBHZZLPBRAPPSDYSPSOZHCMXYYF</code></pre>
<p>Reading down each column in the 1st block, then continuing in the 2nd, we get:</p>
<pre><code>OKAYZYOUZREZPRETTYZCLEVERZZNOTZONLYZHAVEZYOUZBROKE
NZTHEZCRYPTOZBUTZYOUZFIGUREDZOUTZHOWZTOZTRANSPOSEZ
ALLZTHEZTEXTSZTOZCREATEZONEZCONTINUOUSZMESSAGEZZGR
ANTEDZTHEZCAESARZCIPHERZKEYZISZEPONYMOUSZBUTZIZHAD
ZTOZMAKEZITZSOMEWHATZEASYZZNOWZYOUZHAVEZTOZGETZTHE
ZRESTZZNOZCHEATINGZREMEMBERZWHATZIZSAIDZ
</code></pre>
<p>Or, cleaned up:</p>
<pre><code>OKAY YOU RE PRETTY CLEVER  

NOT ONLY HAVE YOU BROKEN THE CRYPTO BUT YOU FIGURED OUT HOW
TO TRANSPOSE ALL THE TEXTS TO CREATE ONE CONTINUOUS MESSAGE  

GRANTED THE CAESAR CIPHER KEY IS EPONYMOUS BUT I HAD TO MAKE
IT SOMEWHAT EASY  

NOW YOU HAVE TO GET THE REST  

NO CHEATING REMEMBER WHAT I SAID
</code></pre>
<p>Woohoo! Of course, that&#8217;s not all. There&#8217;s still a block of text at the end that&#8217;s not right:</p>
<pre><code>BAUYFAPBALKRHBYIFBYOMY
IFBFSPHZKQFYQCSSHZKQIL
ATFAPAABMWKPILATIUPCFM
AFIYZHEPLSMYQKKDUDCAIY
LPBRAPPSDYSPSOZHCMXYYF
</code></pre>
<p>So there&#8217;s more to decode. Fortunately, G. Mark gave us a big hint when he said &#8220;NO CHEATING.&#8221; That&#8217;s his clue, made clear in his Tales from the Crypto talk, that this stage requires the Playfair cipher.  But what key? Well, for his Mardi Gras puzzle, he used the title of his talk, so what talk did he give at DEF CON 16? &#8220;A Hacker Looks Past Fifty.&#8221;</p>
<p>Plugging this into a friendly online Playfair decoder reveals the final cleartext:</p>
<pre><code>TEXTTHEPHRASEFIFTYISNI
FTYTOSEVENTIMESSEVENFO
URTHREETIMESFOURTWOEIG
HTFIVEZERONINEANDTHEFI
RSTPERSONTOSOLVEWINSIT
</code></pre>
<p>Or, cleaned up:</p>
<pre><code>TEXT THE PHRASE FIFTY IS NIFTY TO
SEVEN TIMES SEVEN FOUR THREE TIMES FOUR TWO EIGHT FIVE ZERO NINE
AND THE FIRST PERSON TO SOLVE WINS IT
</code></pre>
<p>Still not quite finished. So now we&#8217;ve got to do some math and number manipulation. At first, I thought it was several different multiplaction operations, somethng like:</p>
<pre><code>7 * 7, 4, 3 * 4, 2, 8, 5, 0, 9 == 49 4 12 2 8 5 0 9 or 494-122-8509
</code></pre>
<p>I texted the phrase to that number, but got no response. After a while, I sent an email directly to G. Mark, who confirmed that I&#8217;d broken the cipher, but did the math wrong.</p>
<p>It wasn&#8217;t a bunch of separate operations, but a single operation, like this:</p>
<pre><code>7 * 743 * 428509
</code></pre>
<p>Which yields the following (obviouly faked for this blog entry) phone number:</p>
<pre><code>222 867 5309
</code></pre>
<p>This was a fun puzzle! I took some wrong turns, tried some new techniques, had some good luck, and made some stupid mistakes. A little of everything. Of course, tweaking the puzzle so I could (finally) publish the writeup was fun, too, especially factoring numbers to get them to fit into the ciphertext space available. Interesting bit of trivia: Turns out that 8675309 is a prime number. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darthnull.wordpress.com/377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darthnull.wordpress.com/377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darthnull.wordpress.com/377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darthnull.wordpress.com/377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darthnull.wordpress.com/377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darthnull.wordpress.com/377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darthnull.wordpress.com/377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darthnull.wordpress.com/377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darthnull.wordpress.com/377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darthnull.wordpress.com/377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darthnull.wordpress.com/377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darthnull.wordpress.com/377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darthnull.wordpress.com/377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darthnull.wordpress.com/377/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=377&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://darthnull.org/2011/07/27/def-con-16-punch-card-puzzle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b58ed6e3547fbf761105f63a576e1ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dschuetz</media:title>
		</media:content>
	</item>
		<item>
		<title>CarolinaCon Flag Puzzle</title>
		<link>http://darthnull.org/2011/05/08/carolinacon-flag-puzzle/</link>
		<comments>http://darthnull.org/2011/05/08/carolinacon-flag-puzzle/#comments</comments>
		<pubDate>Mon, 09 May 2011 03:04:03 +0000</pubDate>
		<dc:creator>Darth Null</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Cryptography]]></category>

		<guid isPermaLink="false">http://darthnull.org/?p=344</guid>
		<description><![CDATA[About two weeks ago, G. Mark Hardy asked if I was planning to attend CarolinaCon at the end of April. He had a puzzle set to go and was even thinking of using me as a clue. I replied that I wouldn&#8217;t be at the con, but would love to see the puzzle. So he [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=344&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>About two weeks ago, G. Mark Hardy asked if I was planning to attend CarolinaCon at the end of April. He had a puzzle set to go and was even thinking of using me as a clue.  I replied that I wouldn&#8217;t be at the con, but would love to see the puzzle. So he sent me a copy.</p>
<p>Here is what he sent me, which was printed on the conference badge:</p>
<p><a href="http://darthnull.files.wordpress.com/2011/05/carolinacon-flag1.png"><img src="http://darthnull.files.wordpress.com/2011/05/carolinacon-flag1.png?w=462&#038;h=376" alt="" title="CarolinaCon Flag" width="462" height="376" class="aligncenter size-full wp-image-370" /></a></p>
<p>Unfortunately, I was already busy with another puzzle &#8212; THOTCON &#8212; and was eyeing a third (the Verizon DBIR). Plus, the Easter weekend was fast approaching. So I didn&#8217;t really have the time to hit it full force. But I did eventually solve the puzzle. </p>
<p style="text-align:center;font-weight:bold;color:red;">As always, if you’d like to try to solve this yourself, then STOP now, as the rest of this post is full of spoilers. The image above is all that you need to get started.</p>
<p>The cipher text, then, is just this:</p>
<blockquote><p>OOAI YELL MBOP QXTY EBPL JJHQ KIPW FWAL VPHW OHYC ELJU WQCV CAIL AIJJ<br />
RHNK UCNP JIGY XYJD WNAU LJCY GAIL VSNB WMTH GCLX XPTJ CWQI WRHA<br />
BLCA EQMN XRKM VVQS PJXE OWHE SVGP HTTH EKSA VQKH YCTB MVRV XWNQ<br />
QGPL RACG RLRF EFMW ITFP KHFS TPTZ UUBX XFVB SRSI WHCD JHZB VVUM<br />
AYDY LKBF FEOA NTYF LZWP YWMY MMLG DMFL VIGU WGNA MQBP
</p></blockquote>
<p>Beyond that, there wasn&#8217;t much to go on. During the con, G. Mark tweeted a couple of clues trying to focus people on the flag &#8212; and to lead them to Google searches on Confederate cryptography. He also tried to help people recognize the kind of cipher it likely was, and those it was not. </p>
<p>Of course I didn&#8217;t need any of those hints. Having written an extensive post <a href="http://darthnull.org/2010/12/30/civil-war-code/">about a Civil War message</a>, I not only knew what kind of cipher the Confederacy used, I also knew the three keys they used most frequently.</p>
<p>Not wanting to make it too easy on myself, I chose to try a crib first. I guessed the message might start with CONGRATULATIONS, and after three letters, I knew what the key was. But for illustration, here&#8217;s a way that one could have tested a crib using an online tool (I already discussed a more manual approach in the Civil War post).</p>
<p>A site I frequently use for crypto tools (and suggested by G. Mark in one of his hints at the con) is <a href="http://rumkin.com/tools/cipher">Rumkin Cipher tools</a>.  Using the Vigenère tool, enter the ciphertext and select &#8220;decrypt.&#8221; Then, instead of the key, enter the start-of-message crib. In this case, I tried &#8220;CONGRAT&#8221; (to account for the possibility it was abbreviated). Doing this gives something like this for the start of the plaintext:</p>
<blockquote><p>
key: CONGRAT<br />
<span style="text-align:center;font-weight:bold;color:red;">MANC HES</span>J YOIY QERK RVYL QHTD ERPD DINF EPOU AUSL<br />
ESHG JKLV JYUY URJQ PTAE DCUN VVAH XFHP JHJU SHOL </p></blockquote>
<p>So the first 6 letters represent the key that would spell CONGRAT in the plaintext. Change the key to MANCHES and now we see this:</p>
<blockquote><p>
key: MANCHES<br />
CONG RATZ MOMI MFHY RZIH RXHD IBLE TWNJ OLPK OUWV<br />
ATXU JOVR KOIY YBFR FHAI NYVD JVER TGXD JLTQ TXCL </p></blockquote>
<p>Now, if this were the whole key, then we&#8217;d see words pop out later in the output. There&#8217;s &#8220;D IBLE&#8221; in the first line, but nothing anywhere else. So start adding As to the end of the key, and eventually we find:</p>
<blockquote><p>
key: MANCHESAAAAAAAA<br />
CONG RATL MBOP QXTM EONE FRHQ KIPW FW<span style="text-align:center;font-weight:bold;color:red;">OL INAS</span> WHYC<br />
ELJU WECI ATET AIJJ RHNK ICAN CEOY XYJD WNAI LWAR </p></blockquote>
<p>It looks like &#8220;OLINAS&#8221; on the first line, which must be &#8220;CAROLINAS,&#8221; so figure out which letters in the key correspond to the WFW just in front of it, and change them to CAR.</p>
<blockquote><p>
key: MANCHESAAAAA<span style="text-align:center;font-weight:bold;color:red;">CAR</span><br />
CONG RATL MBOP OXCM EONE FRHQ KIP<span style="text-align:center;font-weight:bold;color:red;">U FF</span>OL INAS WHYC<br />
ELHU FECI ATET AIJJ RFNT ICAN CEOY XYJD UNJI LWAR </p></blockquote>
<p>The three characters in question are now UFF, so that&#8217;s the next key fragment. Replace CAR with UFF and look for another place to stretch the key out:</p>
<blockquote><p>
key: MANCHESAAAAAUFF<br />
CONG RATL MBOP WSOM EONE FRHQ KIPC AROL INAS WHYC<br />
ELPP RECI ATET AIJJ RN<span style="text-align:center;font-weight:bold;color:red;">IF ICAN CE</span>OY XYJD CIVI LWAR</p></blockquote>
<p>We&#8217;re definitely on the right track, as line 2 now includes &#8220;CIVIL WAR.&#8221; In the second line is &#8220;IF ICAN CE,&#8221; which is probably SIGNIFICANCE. Do the same trick: replace the end of the AAA with SIG, see the corresponding plaintext letters change to RBL, and change the letters in the key from SIG to RBL, and now we see:</p>
<blockquote><p>
key: MANCHESAARBLUFF<br />
CONG RATL MKNE WSOM EONE FRHQ THEC AROL INAS WHYL<br />
DAPP RECI ATET AISI GNIF ICAN CEOY XHIS CIVI LWAR </p></blockquote>
<p>Let&#8217;s reformat to maybe make it easier to find the missing words:</p>
<blockquote><p>
CONGRAT <span style="text-align:center;font-weight:bold;color:red;">LM</span> KNEW SOMEONE FJHQ THE CAROLINAS OHYLD<br />
APPRECIATE LAI SIGNIFICANCE GYXHIS CIVI LWAR </p></blockquote>
<p>We still have two letters left to guess in the key, and there&#8217;s a two-letter bit in the first line that looks like it should be &#8220;SI.&#8221; Insert SI into the key, retrieve &#8220;TE&#8221; from the plaintext, put those in place of SI, and bingo:</p>
<blockquote><p>
key: MANCHESTER BLUFF</p>
<p>CONGRATS I KNEW SOMEONE FROM THE CAROLINAS WOULD<br />
APPRECIATE THE SIGNIFICANCE OF THIS CIVIL WAR<br />
CIPHER CH RHHH TAET FWPS BLWD RFHN ZEYI LMVM MXFH<br />
JVDQ IFFL KFGT YQBD HGRA ASZW EPZN TXHB ZTKR FDJZ<br />
PVVG MOCT PENN LBVV XZAK YHSQ MLBG QDAM DAQP SEQB<br />
SPJZ SGOH QQIM NWWU TRXO ETUV IHYS JSSX FSVX BSGB<br />
RMSJ OEOB SPMP SLWD</p></blockquote>
<p>And bingo! We&#8217;re &#8212; wait, what? Dammit.</p>
<p>At this point, I was stumped for a while. For one: do I use the &#8220;decrypted&#8221; output of the first stage? One other G. Mark puzzle worked that way, so it seemed reasonable. Plus, that would make the second stage dependent upon solving the first. Or, should I just find the original cipertext that corresponds to what didn&#8217;t decrypt and use that?</p>
<p>In the end, I tried both avenues with a variety of approaches. I tried the other two commonly-used Confederate keys, ruled out Playfair and simple Caesar shifts, and just tried lots of different keys. I also tried dragging a crib back and forth. This is essentially the same as what I described above, but I try the word (&#8220;THE&#8221; is what I tried) against every position in the ciphertext, and hope that I&#8217;ll see an obvious 3-letter sequencde pop out. None of these met with any success.</p>
<p>I was sure this was a Vigenère, based on the historical connection, so I kept plugging away. In addition to crib dragging, I tried various other tests to help guess a key size, and even started noodling with some new techniques of my own devising. But no luck. (Though I did learn a lot more about Civil War cryptography in the process.)</p>
<p>After a few days not getting far, I regrouped and tried simplifying (per G. Mark&#8217;s inevitable admonition that I&#8217;m making it too complicated.) Looking at the remaining text, I decide to try an &#8220;offset&#8221; key. Basically, I took COMPLETE VICTORY and just started rolling letters off the beginning and onto the end. When I hit TORYCOMPLETEVIC I found success.</p>
<blockquote><p>
UNFORTUNATELY BAD CRYPTO MAY HAVE LED TO THE DEFEAT OF LEE IN THE WAR OF<br />
NORTHERN AGGRESSION BUT YOU CAN MAKE UP FOR IT
</p></blockquote>
<p>But even that didn&#8217;t get everything. There&#8217;s still a block of cipher text at the end. Of course, now I know what to do. I simply put the entire original cipher text into the online applet and use each of the three Confederate keys in sequence. The first decoded the first block, when replaced with the second it decoded a chunk in the middle, and when I replaced it with COME RETRIBUTION the last message was decrypted:</p>
<blockquote><p>
TO CLAIM THE PRIZE FOR SOLVING THIS YOU MUST TELL G MARK THIS WHOLE TEXT<br />
BY THE END OF THE CON
</p></blockquote>
<p>In the end, a very simple, almost trivial, solution. Especially since all the keys were available in the Wikipedia article on Vigenère. But mashing all three texts together the way he did totally ruined my attempts at traditional cryptanalysis. If I&#8217;d known there were three parts to the puzzle, I might&#8217;ve figured out the trick earlier. Maybe. Now I&#8217;m just trying to figure out if there&#8217;s an easy way to &#8220;discover&#8221; such partitions in the cipher text or if you just have to guess or stumble upon them.</p>
<p>But this was all before the con even happened. Once it started, I periodically checked Twitter to see if anyone was working the puzzle, and if so, whether they were making any progress. Early on, I saw a couple of people post links to the image, or to a pastebin copy of just the text, but not much beyond that. One person did suggest &#8220;POTOMAC RIVER,&#8221; probably as a possible key, as the battle flag originally came from the Confederate Army of the Potomac. </p>
<p>Finally, late on Sunday, I started to see a few people make progress. Then about 3:45, a tweet from Korotos to G. Mark said, simply, &#8220;Solved.&#8221; So congratulations to Korotos! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>Knowing the secret, being &#8220;on the inside,&#8221; was an interesting change for me. It was a different challenge having to keep my mouth shut&#8230;.and I&#8217;m glad I did. Both because to say anything would&#8217;ve been wrong (it&#8217;s not my game, after all!), but also because the few times I did think about what to say, I realized hours later that I would have given away too much. There&#8217;s an art to giving hints that are Just Good Enough&#8230;</p>
<p>So speaking of hints, what ever happened to the bit about using me as a hint? About midday Sunday, G. Mark tweeted this:</p>
<blockquote><p>
Hint: on CTF network was file named &#8220;.notthis&#8221;; contents were: a8979e8b df88908a 939bdfbb 9e8d8b97 dfb18a93 93df9b90 c0ff
</p></blockquote>
<p>The file name was a hint as to how to decode the hint: logically invert (or NOT) all the bits. Or, XOR with 0xFF, which is functionally the same. Doing this reveals the hint he&#8217;d warned me he might use:</p>
<blockquote><p>
What would Darth Null do?
</p></blockquote>
<p>I don&#8217;t know if anyone ever decoded the hint. I do know that nobody viewed my Civil War blogpost during the entire con, so if anyone did decode it, they didn&#8217;t take the next step. Of course, the first key was right there in my blog&#8230;and even without the hint, a Google search for &#8220;G. Mark confederate crypto puzzle&#8221; lists my blog as the first hint &#8212; proving that sometimes, the direct attack actually <b><i>is</i></b> the best choice. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darthnull.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darthnull.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darthnull.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darthnull.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darthnull.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darthnull.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darthnull.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darthnull.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darthnull.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darthnull.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darthnull.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darthnull.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darthnull.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darthnull.wordpress.com/344/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=344&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://darthnull.org/2011/05/08/carolinacon-flag-puzzle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b58ed6e3547fbf761105f63a576e1ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dschuetz</media:title>
		</media:content>

		<media:content url="http://darthnull.files.wordpress.com/2011/05/carolinacon-flag1.png" medium="image">
			<media:title type="html">CarolinaCon Flag</media:title>
		</media:content>
	</item>
		<item>
		<title>Analysis of iOS Location Data from Multiple Devices</title>
		<link>http://darthnull.org/2011/04/25/analysis-of-ios-location-data/</link>
		<comments>http://darthnull.org/2011/04/25/analysis-of-ios-location-data/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 21:21:47 +0000</pubDate>
		<dc:creator>Darth Null</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://darthnull.org/?p=320</guid>
		<description><![CDATA[This &#8220;Your iPhone Is Tracking Your Every Move!!&#8221; craziness just won&#8217;t go away. I&#8217;ve been kind of disappointed by the lack of very detailed analysis of the data that&#8217;s actually being collected, so I spent some time collecting information of my own. I have access to four iOS devices running 4.0 or better: my personal [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=320&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This &#8220;Your iPhone Is Tracking Your Every Move!!&#8221; craziness just won&#8217;t go away. I&#8217;ve been kind of disappointed by the lack of very detailed analysis of the data that&#8217;s actually being collected, so I spent some time collecting information of my own.</p>
<p>I have access to four iOS devices running 4.0 or better: my personal iPhone 3GS, a family iPad with 3G subscription, a company-owned iPad (whose 3G has never been activated), and just arrived an iPad 2 that belongs to a client. So I spent some time this weekend trying to better understand what the Core Location daemons are doing.</p>
<p>First, please forgive me if I&#8217;m retreading already explored ground. Turns out that a few other people did the same thing this weekend, and so maybe I&#8217;m late to the party. I don&#8217;t want to be a &#8220;Me, too!&#8221; poster, but I also think there&#8217;s a little that I&#8217;ve found that I haven&#8217;t seen mentioned yet. Plus, I should mention the work of <a href="https://alexlevinson.wordpress.com/">Alex Levinson</a>, who looked at this in detail a year ago and has been a solid voice of reason from the beginning.</p>
<p>Anyway, first I&#8217;ll talk about some what I observed, then I&#8217;ll see if I can&#8217;t draw a few (hopefully valid) inferences. Some of the data were taken from the devices just as they were last week. Saturday, though, we went out to lunch and I took my phone, company iPad, and personal iPad all with me. During that trip, I kept the personal iPad locked the entire time, and I used the company iPad on the road (with Google Maps open the whole way). I used my phone briefly to make a call, and checked twitter a couple times while at the restaurant, and also for a while in a parking lot as my wife went into the grocery store.</p>
<p>First, the database.</p>
<p>I can see 5 tables within the consolidated.db that seem to be pertinent: CellLocation, CellLocationLocal, CellLocationHarvest, WifiLocation, and WifiLocationHarvest. All of these include details about speed, accurracy, elevation, and other such items that I&#8217;m not really concerned with (and many of which don&#8217;t seem to be used, at any rate). All also include a timestamp, latitude, and longitude, as well as some way of uniquely identifying the point it represents. In the case of a Wi-Fi access point, this is the MAC address, and in the case of a cell tower, it&#8217;s a tuple of four data items. Each entry in these tables appears to be unique &#8212; that is, no single cell tower or Wi-Fi access point appears more than once.  <b>Point 1: The devices are not tracking my every movement.</b></p>
<p>Now, my phone.</p>
<p>I see several access points noted all around my house. The accuracy isn&#8217;t phenomenal, as it puts my access point on my deck, and a neighbor&#8217;s in the middle of my kitchen. In fact, there are 11 different access points displayed either in my house, my yard, or just into my neighbors&#8217; yards.  <b>Point 2: The Wi-Fi data points are not precisely located.</b></p>
<p>Also, the timestamps are varied. Four of the 11 around my house show a date/time from a couple days before I dumped the database (and another 4 are stamped two seconds later). But the other three are from early March, late February, and mid January. <b>Point 3: The Wi-Fi data does not represent the last time I visited a location.</b></p>
<p>Finally, huge swaths are blanketed with data about Wi-Fi access points. Neighborhoods I&#8217;ve not driven through in months, if not years (or ever). These points share similar timestamps as the data within my neighborhood. <b>Point 4: Data is present in the database for locations I&#8217;ve not visited.</b></p>
<p>The cell tower data is very similar. It shows towers located in areas I&#8217;ve not recently visited, with locations not corresponding to actual towers (in many cases, not even close &#8212; several were shown in residential communities where I&#8217;ve never seen a tower). The timestamps are similarly varied, with some I randomly clicked on going back to October 2010. <b>Point 5: Cell tower data is treated the same as Wi-Fi access point data.</b></p>
<p>I did not see any new data points appear during the drive to the restaurant, or while we ate. However, a batch of data, both Cell and Wi-Fi, was timestamped while we sat outside the grocery store. The cell data, in particular, was scattered over a very wide area, at least several miles on a side. <b>Point 6: Data appears for a wide area simultaneously, and is not necessarily tied to length of time sitting still.</b></p>
<p>Finally, I observed new data in the WifiLocationHarvest table. A total of 11 Wi-Fi access points were simultaneously recorded while I waited in the parking lot. The precision on this was pretty good &#8212; only about 50 feet from where I was sitting. <b>Points 7 and 8: Actual recording of new data is not predictable, and is highly accurate.</b></p>
<div id="attachment_341" class="wp-caption aligncenter" style="width: 610px"><a href="http://darthnull.files.wordpress.com/2011/04/greenbriar.png"><img src="http://darthnull.files.wordpress.com/2011/04/greenbriar.png?w=600&#038;h=382" alt="" title="Greenbriar Wi-Fi Points" width="600" height="382" class="size-full wp-image-341" /></a><p class="wp-caption-text">Wi-Fi points near Greenbriar shopping center. Expanded red points from WifiHarvest.</p></div>
<p>I was also able to look at some past data on the phone. I took a one-day trip to Dallas at the end of March, and found large collections of data centered on the location I&#8217;d visited, the area I ate lunch, and three locations on the highway leading from the airport. Those locations roughly, I believe, correspond with times when I&#8217;d refreshed Google Map directions. <b>Point 9: You may be able to force a data fetch by refreshing the maps application.</b></p>
<p>Next, iPads.</p>
<p>My family iPad, which I&#8217;d woken up before we left and promptly locked again, did not record any new data the entire time. <b>Point 10: When locked, the device might not record anything at all.</b></p>
<p>The company iPad was in use the whole way to the restaurant. It has no record of any cell towers, which isn&#8217;t terribly surprising, since it does not have an active 3G data plan (though it does have the 3G hardware).  <b>Point 11: No data plan, no cell info.</b></p>
<p>Obviously, since there was no data plan, it couldn&#8217;t collect any new data along the way. However, as we left the grocery store, I unlocked the device, refreshed the map location, and locked it again. Once we&#8217;d returned home, the iPad fetched 394 Wi-Fi points, in an area about a 1/2 mile by 1/2 mile square, roughly corresponding to the place we were when I refreshed the map. All these data points were timestamped when they were fetched &#8212; that is, when the iPad had access to the Wi-Fi at home &#8212; <b>not</b> when I was actually on the road. <b>Point 12: The device may cache your last request and fetch related data the next time a network is availble.</b> </p>
<p>All three iPads showed a curious distribution of points around my office. The customers&#8217;s iPad, which has only been to the customer facility and my office, displayed points in a very short and wide rectangle centered on my office. My family iPad, which has only been a few placed since I loaded 4.0 on it, showed virtually the same distribution around the office and a similar distribution, but not as wide, around my house. Not all of these points had the same timestamp, but over time, it definitely started filling out that shape. <b>Point 13: When fetching data, the device appears to collect points over a nearly-fixed vertical range (about 30 arcseconds of Latitude) and a variable horizontal range.</b></p>
<p>Finally, my wife had taken the family iPad on a short trip last weekend. The iPad showed a square burst of Wi-Fi data points about where she pulled over to check a map, and another wide rectangle around the hotel she stayed in. It also showed data in the CellLocationLocal table. That table showed her track along the interstate, and appeared to be an actual positional track. Interestingly, the CellLocation table did not have tower locations for virtually anywhere along that track. On my phone, I had two points from my Dallas trip, and a half-dozen points from a taxi ride into Manhattan a week prior. <b>Point 14: The CellLocationLocal table may record actual trip data, but it appears to be very limited.</b></p>
<p>One further point of (potential) interest: The timestamps on the data were, if you&#8217;ll pardon the pun, all over the map. Many data sets had timestamps only a few seconds or minutes apart. But when I stripped out data sets that were within five minutes of another set of points, the average time between updates was about 14 hours. Note that there&#8217;s very little stastical rigor to this, but I thought it was interesting. <b>Point 15: When the device spends an extended time at one place, data appears to be fetched about twice a day.</b></p>
<p>Summary of Observations</p>
<p>So, to sum up, here are my observations thus far:</p>
<ul>
<li>Point 1: The devices are not tracking my every movement.</li>
<li>Point 2: The Wi-Fi data points are not precisely located.</li>
<li>Point 3: The Wi-Fi data does not represent the last time I visited a location.</li>
<li>Point 4: Data is present in the database for locations I&#8217;ve not visited.</li>
<li>Point 5: Cell tower data is treated the same as Wi-Fi access point data.</li>
<li>Point 6: Data appears for a wide area simultaneously, and is not necessarily tied to length of time sitting still.</li>
<li>Points 7 and 8: Actual recording of new data is not predictable, and is highly accurate.</li>
<li>Point 9: You may be able to force a data fetch by refreshing the maps application.</li>
<li>Point 10: When locked, the device might not record anything at all.</li>
<li>Point 11: No data plan, no cell info.</li>
<li>Point 12: The device may cache your last request and fetch related data the next time a network is available.</li>
<li>Point 13: When fetching data, the device appears to collect points over a nearly-fixed vertical range (about 30 arcseconds of Latitude) and a variable horizontal range.</li>
<li>Point 14: The CellLocationLocal table may record actual trip data, but it appears to be very limited.</li>
</ul>
<p>What does all this tell us? I think we can infer at least a few things, which are consistent with what others have been saying, and with Apple&#8217;s statements last year.</p>
<ul>
<li>The data in WifiLocation and CellLocation are not your device&#8217;s actual location at any given point in time, but instead are the location of others&#8217; Wi-Fi access points and cell towers. </li>
<li>The location of these points are estimated by Apple based on data harvested by iOS devices and provided to Apple on a periodic basis. </li>
<li>Individual devices periodically record the Wi-Fi points and cell towers visible to them, record a precise location, and send that data to Apple. (I have not yet observed this happen, but it makes sense, and Apple&#8217;s already said as much).</li>
<li>Periodically, the device will poll Apple&#8217;s servers for location information nearby. This seems to happen when the device has been at rest for some time, or when the location information is refreshed in the map application (it may be reasonable to expect that other applications querying the Core Location service may also trigger a refresh).  There may be some logic in terms of what data gets fetched, perhaps to avoid downloading duplicate information. I haven&#8217;t been able to dig into that yet.</li>
<li>The timestamp for the fetched data appear to be the time the data was fetched. One may be able to look in the middle of a set of identically-stamped data to infer where the user was when that data was fetched. However, the data don&#8217;t appear to be fetched every time you&#8217;re in any given location, even if you&#8217;re there for an extended time (like, say, lunch).</li>
</ul>
<p>So what&#8217;s my conclusion? I&#8217;m still not sure about the CellLocationLocal table, which perhaps might be for recording locations for future data fetches. But the rest of the data all seem very consistent with what Apple&#8217;s told us: they&#8217;re used to aid in geolocating the device. Why are so many points stored? So that it won&#8217;t have to pull data down again in the future. It&#8217;s a big, personalized cache, made to make my personal use of geolocated features faster and more accurate.</p>
<p>[Note -- if you're interested in the python script I used to load the data into Google Earth, I'm posting it on the Intrepidus Group blog. It should be attached to <a href="http://intrepidusgroup.com/insight/2011/04/ios-location-db-privacy/">this post</a> from last week about my first review of the data.]</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darthnull.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darthnull.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darthnull.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darthnull.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darthnull.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darthnull.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darthnull.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darthnull.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darthnull.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darthnull.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darthnull.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darthnull.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darthnull.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darthnull.wordpress.com/320/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=320&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://darthnull.org/2011/04/25/analysis-of-ios-location-data/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b58ed6e3547fbf761105f63a576e1ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dschuetz</media:title>
		</media:content>

		<media:content url="http://darthnull.files.wordpress.com/2011/04/greenbriar.png" medium="image">
			<media:title type="html">Greenbriar Wi-Fi Points</media:title>
		</media:content>
	</item>
		<item>
		<title>The 2009 Verizon Data Breach Investigation Report</title>
		<link>http://darthnull.org/2011/04/12/2009-dbir-puzzle/</link>
		<comments>http://darthnull.org/2011/04/12/2009-dbir-puzzle/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 03:45:40 +0000</pubDate>
		<dc:creator>Darth Null</dc:creator>
				<category><![CDATA[Cryptography]]></category>

		<guid isPermaLink="false">http://darthnull.org/?p=294</guid>
		<description><![CDATA[In 2009, the Verizon Business Risk Team released their first public Data Breach Investigations Report. I saw it reasonably soon after release, and noticed a whole bunch of binary numbers in the background on the cover. &#8220;Cool,&#8221; I thought, but I didn&#8217;t bother trying to decode it. A week or so later, I learned that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=294&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In 2009, the Verizon Business Risk Team released their first public Data Breach Investigations Report. I saw it reasonably soon after release, and noticed a whole bunch of binary numbers in the background on the cover. &#8220;Cool,&#8221; I thought, but I didn&#8217;t bother trying to decode it. A week or so later, I learned that there&#8217;d been a contest, and I missed out. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>In 2010, I was ready, and tried to solve the puzzle, but failed. That story comes later.</p>
<p>But now, on the eve of the release of the 2011 DBIR, I&#8217;m finally documenting the method needed to solve these puzzles. Here&#8217;s a quick, fresh look at the 2009 puzzle.</p>
<p style="text-align:center;font-weight:bold;color:red;">As always, if you’d like to try to solve this yourself, then STOP now, as the rest of this post is full of spoilers. If you’d like a copy of just the raw data (in this case, two ciphertexts), click <a href="http://darthnull.org/puzzles-and-contests/2009-dbir">here</a>.</p>
<p>So, I vaguely remembered how this worked. And also that it was a very simple puzzle. Let&#8217;s see how quickly I can solve it, without digging too deep into my memory for what needed to get done. First, I pulled down the original PDF. And there, all over the background of the cover, is a whole bunch of binary numbers. Highlight, copy, and paste out into a file.</p>
<p>First, how do we break up the numbers? 8-bits? 7-bits? I removed the line breaks, counted, and divided by 8, but didn&#8217;t get an even number of bytes. Found some text in the middle, removed that. Now count again &#8212; ah, beter. Looks like it&#8217;s 900 8-bit characters.</p>
<p>Next up &#8212; a simple script to decode the binary. Doesn&#8217;t take more than a few minutes, and now I&#8217;ve got a big block of ciphertext. </p>
<blockquote><p>
EVNTXIGYIMWSNEHEIEFOTXBSCWYHRQMWGUZABVYCBBFREYFBVEDKEVMFRIFN<br />
GFNRBFGVKSFPNBUFZJGCEEEWAKHPXEBTZJCZOWGTBSQGTMIAYDPYDRIRYETK<br />
CJRPYHEPWKUOAEKNVTVZHSMZNTTIVIKMMRYSNUIAKBRKQMSTYCGCCRLRRIIR<br />
EFGYTJUBUXHEYSGLEYRVHIYXDEYZCJKVTOSOIXJEHOXEVMWJBNZMTKWZEFOF<br />
CNBWNCUWMYFIUVBKWNPWTYOEYQTIRRYRCMNVFVLRSBNTPWPAOCZPEKHLFCEE<br />
RRVWVUYBVJPUVPOAYMIKQQNSWZGHZKDGYLAEGWPKESGCYZFVJDMEPQKSSLNV<br />
SVPUVVRVYERHDTUTYYMQGEVWRMQSZFNPNRJIGGWAJNNJLKOEQHNETRPUQYDF<br />
ZWCZKVJEXLMCKCSIFTCTSUTLDRRMIKQTNINPGRPQQXPTZDPAIOTCEUAZFEWD<br />
QLLPZRHXLXQGSLRJTBLZRIRVISNZIWLMVYADVOHFEVNAKKGORRXSYGXPUMVG<br />
BOMRJLCREFCMRQVXTMIYMJJVHXNBTSZMTJEFKFGKURFLNHXPKCWLEXMIYLGY<br />
NNRWAKSEWTHPKGZKKXGAZELLUTAYCIEKWISHUNDKEKWARGBYZFGKEPKQGZZS<br />
RIMFLGKARTURAINSNGEEUMEXRVEELZXTISUWVZKOYLTPBHZWEOQWNXNPXPKS<br />
SXJHPANCVFPRYADRLROEWEBQEWHZRGATZDGUCEKLFYHZJNNZIJRGNZRVBOCA<br />
UYEZGKPSJXJIASMVFTDWFXBIDHQZEYKDRTDRIOPPKJRPISSKMCZJFZTBVBJU<br />
GEYANJIGJTDCPTZDEOGUTLZPEKHTNIHTGGUMVGBOMRJLCREFSWFZOCROHEAU
</p></blockquote>
<p>Okay, what kind of encryption did they use? A quick test of ROT-13 and such doesn&#8217;t get me anywhere. It&#8217;s awfully long, so I really don&#8217;t want to try a substitution cipher if I can avoid it. Then I remember that there was a clue somewhere in the report. Skimming through, I found a footnote on page 48:</p>
<blockquote><p>yr puvsser vaqrpuvssenoyr</p></blockquote>
<p>Let&#8217;s run that through ROT-13, and sure enough, we get a hint:</p>
<blockquote><p>le chiffre indechiffrable</p></blockquote>
<p>Aha! That&#8217;s French. And one of the most commonly found ciphers, it seems, for hacker crypto challenges was created by a Frenchman. And I also know, because of how often I&#8217;ve run against this cipher, that he called it &#8220;le chiffre indechiffrable&#8221; (or the indecipherable cipher). So which cipher it is has been decided: it&#8217;s a Vigènere.</p>
<p>But how long is the key? I found an online applet that would do a Kasiski analysis, which looks for repeated trigraphs in the cipher and measures the distance between them. If you can find a common factor amongst a bunch of repeated trigraph distances, that could very well be the key length. I found 10 repeated trigraphs, but their distances are all over the map, and I can&#8217;t see anything that&#8217;s a clear common factor.</p>
<p>Next up, the index of coincidence, which is a way of looking at the ciphertext in varying keylengths to see which one seems to have &#8220;slices&#8221; that are the most internally consistent. That&#8217;s a simplification. Truth is, I don&#8217;t understand it much beyond a zen-like vagueness, so I&#8217;m not going to try to explain it here.</p>
<p>Anyway, the IC applet makes 9 characters look like a good potential key length, though it&#8217;s far from certain. But at least one of the Kasiski distances was 72, which is a multiple of 9, and so this is as good a place to start as any.</p>
<p>Next up, I stick the ciphertext into <a href="http://math.ucsd.edu/~crypto/java/EARLYCIPHERS/Vigenere.html">a nice interactive Vigenere applet</a>, set it to a 9-character key, and start sliding the alphabets around to see if anything pops out. Not having anywhere better to start, I make a guess that the plaintext starts with &#8220;CONGRATULATIONS.&#8221;  As I adjust the various alphabets to make this happen, the key starts to appear. C-H-A-N-G-I-N-E. Hm. So close. Let&#8217;s change it to CHANGING&#8230;and now it&#8217;s looking a lot more real. Here&#8217;s the beginning of the plaintext:</p>
<blockquote><p>
CONGRATSGFWFHWUYGXFBNPOMAPYULIZQENZNVNLWZUFEYQSVTXDXYNZZPBFA<br />
AXALZYGIEKSJLUUSTBTWCXEJUCUJVXBGTBPTMPGGVKDARFINSVCSBKIESWGE<br />
ACRCSZRJUDUBUWXHTMVMBKZTLMTVPAXGKKYFHMVUIURXKEFNWVGPWJYLPBIE<br />
YXTSRCUOOPUYWLGYYQEPFBYKXWLTACKINGFIGQJRBGKYTFWWVFMGRDWMYXBZ
</p></blockquote>
<p>Except that this is the only plaintext I see. If it were a 9-character key, then a key of &#8220;CHANGINGA&#8221; would at least give me 8 characters of real text, repeated down the length of the output, with a junk character in between each. At this point, I could think back, remember that the key was actually present in the text, find the two instances of &#8220;changing&#8221; in the report and have the puzzle solved in less than 30 minutes total. But that&#8217;d be cheating. So let&#8217;s try something new.</p>
<p>It&#8217;s looking pretty likely that the key starts with &#8220;CHANGING.&#8221; But I don&#8217;t know how many characters come next. I didn&#8217;t see a repeat at 8 or 9 characters, so let&#8217;s add another A, and another, and another, until I see things repeat. Once I get to 26 characters it happens. Now I&#8217;ve got plaintext that starts like this:</p>
<blockquote><p>
CONGRATSIMWSNEHEIEFOTXBSCW<br />
WARDGOTOZABVYCBBFREYFBVEDK<br />
COMSLASHGFNRBFGVKSFPNBUFZJ<br />
EVERYONEHPXEBTZJCZOWGTBSQG<br />
RFINSVCSDRIRYETKCJRPYHEPWK<br />
SHAREFINVZHSMZNTTIVIKMMRYS<br />
LNINETEEQMSTYCGCCRLRRIIREF
</p></blockquote>
<p>So now, let&#8217;s start changing the letters after CHANGING and see what happens. A is no good, neither is B, nor C, but D &#8212; that seems to extend the cleartext words properly. In fact, the ZZZ after GOTO are probably supposed to be WWW. To make that happen, my key now starts with &#8220;CHANGING DEF&#8221;, which gives me this:</p>
<blockquote>
<p>CONGRATSFIRSNEHEIEFOTXBSCW<br />
WARDGOTOWWWVYCBBFREYFBVEDK<br />
COMSLASHDBIRBFGVKSFPNBUFZJ<br />
EVERYONEELSEBTZJCZOWGTBSQG<br />
RFINSVCSANDRYETKCJRPYHEPWK<br />
SHAREFINSVCSMZNTTIVIKMMRYS<br />
LNINETEENINTYCGCCRLRRIIREF
</p></blockquote>
<p>From here, it&#8217;s a pretty easy job to finish out the key this way. The result is &#8220;Changing default credentials.&#8221; (it also appears in the report as &#8220;Changing default credentials is key.&#8221; Is. Key. Heh. Funny.) The final plaintext tells where to write with your solution, and the rest is a terse, high-level summary of the entire report. Here it is with spaces and newlines entered for clarity.</p>
<blockquote><p>
CONGRATS<br />
FIRST TO CRACK GETS REWARD<br />
GO TO WWW VERIZONBUSINESS COM SLASH DBIRHUNT TO CLAIM<br />
FOR EVERYONE ELSE HIGH LVL STATS FOR FIN SVCS AND RETAIL FOLLOW </p>
<p>PLS SHARE </p>
<p>FIN SVCS<br />
SOURCES EXTERNAL NINETEEN INTERNAL NINE PARTNER TWO<br />
THREATS MALWARE ELEVEN HACKING FIFTEEN DECEIT FOUR MISUSE SIX PHYSICAL TWO ERROR ONE<br />
ERROR SIG CONTRIBUTOR IN FIFTEEN<br />
TOP THREE HACK TYPES SQL INJECTION SEVEN MISCONFIG ACLS SEVEN DEFAULT CREDS TWO<br />
TOP HACK VECTOR IS WEB APP<br />
TEN TOP ASSET IS ONLINE DATA TWENTY SIX AND<br />
ALL RECORDS TOP THREE DATA TYPES AUTH CRED ELEVEN PII TEN PYMNT CARD EIGHT<br />
PYMNT CARD WAS NINETY EIGHT PCT OF RECORDS<br />
TOP UU IS UNKNOWN CONNECTIONS SEVEN<br />
DISCOVERY TAKES WEEKS TO MONTHS </p>
<p>RETAIL SOURCES<br />
EXTERNAL TWENTY THREE INTERNAL ONE PARTNER EIGHT<br />
THREATS MALWARE TEN HACKING TWENTY ONE DECEIT TWO MISUSE TWO PHYSICAL ZERO ERROR ZERO<br />
ERROR SIG CONTRIBUTOR IN SIXTEEN<br />
TOP TWO HACK TYPES SQL INJECTION SEVEN STOLEN CREDS SEVEN<br />
TOP HACK VECTOR IS REM ACCMGT EIGHT<br />
TOP ASSET IS POS ELEVEN AND<br />
OVER HALF OF RECORDS TOP TWO DATA TYPES PAYCARD TWENTY THREE PII NINE<br />
DISCOVERY TAKES MOSTLY MONTHS
</p></blockquote>
<p>My memory was correct in one respect &#8212; this was a very simple puzzle. Even the long approach I took, once I&#8217;d figured it out, went fast. If I&#8217;d received this puzzle new, today, I&#8217;m sure I would have solved it in an evening, tops. Two years ago, I almost certainly wouldn&#8217;t have been so lucky. For one, the trick of padding out the potential key to look for repeats isn&#8217;t something that&#8217;d ever occurred to me before, that I can recall, though it&#8217;s pretty obvious in retrospect. I&#8217;ll definitely have to remember this technique for future puzzles. </p>
<p>Also, having &#8220;CONGRATS&#8221; as the opening word gave me a really easy crib. Without that, I honestly don&#8217;t know where I&#8217;d have started. </p>
<p>So though I was right, this was a simple puzzle, I was wrong in another key respect: That its simplicity would mean it wasn&#8217;t going to be any fun, especially (subconciously at least) knowing what I needed to do. Learning a new approach to break this cipher was fantastic fun. And proof that even the easy puzzles shouldn&#8217;t be ignored.</p>
<p>Thanks to the whole Verizon crew for this one.  The 2010 puzzle was a different story, but that&#8217;ll wait until later. Hopefully I&#8217;ll write that up before next week&#8217;s new puzzle starts sucking up all my free time&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darthnull.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darthnull.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darthnull.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darthnull.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darthnull.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darthnull.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darthnull.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darthnull.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darthnull.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darthnull.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darthnull.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darthnull.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darthnull.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darthnull.wordpress.com/294/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=294&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://darthnull.org/2011/04/12/2009-dbir-puzzle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b58ed6e3547fbf761105f63a576e1ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dschuetz</media:title>
		</media:content>
	</item>
		<item>
		<title>Crazy idea for multi-user iPads</title>
		<link>http://darthnull.org/2011/02/25/ios-filesystem-overlays/</link>
		<comments>http://darthnull.org/2011/02/25/ios-filesystem-overlays/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 16:43:40 +0000</pubDate>
		<dc:creator>Darth Null</dc:creator>
				<category><![CDATA[Crazy Ideas]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://darthnull.org/?p=283</guid>
		<description><![CDATA[While lying on the couch last Friday, trying to decompress after a busy day and expecting an even more hectic weekend, I had a crazy idea for how Apple might implement multiple user accounts on iOS devices like the iPad. File System Overlays. Applications in iOS are all restricted to their own sandbox &#8212; that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=283&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While lying on the couch last Friday, trying to decompress after a busy day and expecting an even more hectic weekend, I had a crazy idea for how Apple might implement multiple user accounts on iOS devices like the iPad.</p>
<p>File System Overlays.</p>
<p>Applications in iOS are all restricted to their own sandbox &#8212; that is, they can only access files and data within their own application bundle, and nothing else. So right off the bat, data&#8217;s pretty well segregated.</p>
<p>Now, imagine that there&#8217;s an easy way for the operating system to distinguish between the application itself and its data. Like if all apps stored data in, say, Documents and Private Documents and Caches and other similarly-named folders. Anything that&#8217;s user-specific would be pretty easy to identify and peel away from the rest of the app.</p>
<p>Here&#8217;s where the hare-brained idea comes in: Across the entire filesystem, take any of those such folders, and move them off of the main disk, and into a second filesystem that&#8217;s mounted as an overlay on the actual disk.</p>
<p>This is sort of weird. It probably needs a picture.</p>
<p><a href="http://darthnull.files.wordpress.com/2011/02/ios-overlay.png"><img src="http://darthnull.files.wordpress.com/2011/02/ios-overlay.png?w=600&#038;h=651" alt="" title="Separate User Data as Filesystem Overlays" width="600" height="651" class="aligncenter size-full wp-image-285" /></a></p>
<p>The base iOS filesystem has system files (the operating system itself plus built-in apps and such), and has separate applications installed by the user. Let&#8217;s assume that each app stores user-specific data in a standardized place, like &#8220;Documents.&#8221;</p>
<p>The device simply puts all the Documents folder into a separate filesystem, then depending on which user has been activated, takes that filesystem and merges it with the base filesystem, overlaying the folders back into their proper locations. So to the device, to the apps, it&#8217;s as if nothing has changed. Data&#8217;s where you expect it to be.</p>
<p>You could merge preferences in a similar way. iOS already supports multiple configuration profiles, and dynamically merges them into a single active settings profile. So you could have perhaps one &#8220;master&#8221; account, that can make unalterable settings for the entire device, then create different users, each of which could add their own preferences to what&#8217;s already been defined.</p>
<p>Imagine going back to the main home screen, and doing a five-finger pinch to &#8220;zoom out&#8221; of the iPad and into a new screen with different users listed. Tap on a different user (and enter a passcode, if that user has one set), and the OS removes your overlay and installs the other user&#8217;s overlay. Then it&#8217;s a whole new iPad!</p>
<p>And the best part about this is it&#8217;s all handled at the operating system level. No changes to the applications are necessary (obviously, they need to be following at least some kind of predictable approach for storing data, though there might be some sneaky ways for the OS to figure that out on the fly as well). Of course, if users wanted to share data with other users on the same device (think music or videos), then applications would need to add support for that.</p>
<p>iOS already supports some pretty fancy magic at the filesystem level, with the built-in data protections present in iOS 4. (In fact, it was while musing on those protections that this idea occurred to me). So I don&#8217;t see this as being too far off in terms of difficulty to implement. Provided they can get the right filesystem support into the kernel, which I&#8217;m sure wouldn&#8217;t be too difficult.</p>
<p>Any comments? Is this totally whacked out, or is there some potential here? Also, think about taking this to the desktop&#8230;it could definitely add a lot more security to data at rest where multiple users (or the same user, with multiple roles) are sharing a system&#8230;..</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darthnull.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darthnull.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darthnull.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darthnull.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darthnull.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darthnull.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darthnull.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darthnull.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darthnull.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darthnull.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darthnull.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darthnull.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darthnull.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darthnull.wordpress.com/283/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=283&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://darthnull.org/2011/02/25/ios-filesystem-overlays/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b58ed6e3547fbf761105f63a576e1ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dschuetz</media:title>
		</media:content>

		<media:content url="http://darthnull.files.wordpress.com/2011/02/ios-overlay.png" medium="image">
			<media:title type="html">Separate User Data as Filesystem Overlays</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple Bypass of Safari Restrictions on iOS</title>
		<link>http://darthnull.org/2011/02/15/simple-bypass-of-safari-restrictions-on-ios/</link>
		<comments>http://darthnull.org/2011/02/15/simple-bypass-of-safari-restrictions-on-ios/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 22:04:44 +0000</pubDate>
		<dc:creator>Darth Null</dc:creator>
				<category><![CDATA[Bug]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://darthnull.org/?p=276</guid>
		<description><![CDATA[Okay, so in iOS you can disable things. To protect the user, the device, the organization, from misuse, etc. One of the things you can do is disable Safari, so the end user can&#8217;t surf to anything bad. (I&#8217;m being a little snarky &#8212; there are some good cases where you&#8217;d want to prevent end-user [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=276&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Okay, so in iOS you can disable things. To protect the user, the device, the organization, from misuse, etc. One of the things you can do is disable Safari, so the end user can&#8217;t surf to anything bad. (I&#8217;m being a little snarky &#8212; there are some good cases where you&#8217;d want to prevent end-user web surfing: Gambling sites. Porn. Chat rooms. Competitors&#8217; tip sites. Stuff like that). It&#8217;s very easy, and appears to be very complete.</p>
<p>But yesterday I was testing something out and found an easy way around the restrictions. You can install what&#8217;s called a Web Clip to the iOS device (iPhone, iPad, etc.)  That clip is basically a single web page, taken from whatever URL you configure when you create the clip. This clip goes on the main application screen of the device, just like a &#8220;real&#8221; application would, and allows quick and easy access to, well, just about anything. You could have a clip that shows a security dashboard. Or a weather report. Or list of important emergency contacts. Really, just about anything you could put into a web page.</p>
<p>The trick is that the device disables any links within that clip. So though you could display, for example, the front page of CNN, you couldn&#8217;t navigate to any of the links on that site. Or so I thought.</p>
<p>Turns out that some simple javascript methods aren&#8217;t properly trapped by the display engine.  I found this while testing a web clip that pointed to the Google home page. As I entered terms into the search field, it instantly showed me similar searches in a drop-down list. It&#8217;s a pretty cool feature that I&#8217;ve grown to like. But what I didn&#8217;t expect was that I could tap on any of those suggested searches (or on the &#8220;I Feel Lucky&#8221; button), and that the clip would load the desired search results. I was able to navigate beyond the source of the web clip. For most pages, that was the end &#8212; I couldn&#8217;t navigate further. But some more &#8220;modern&#8221; web applications, like Gmail, worked just fine, as if I weren&#8217;t in a restricted browser at all.</p>
<p>So I dug a little deeper, and figured out how to replicate the behavior. I&#8217;m not sure if I&#8217;m using exactly the same method that Google did (their javascript code is notoriously obfuscated, and I&#8217;m definitely not a javascript expert). I&#8217;m sure there are other ways to accomplish this. But what I ended up creating was a simple document that uses <code>window.location=url</code> to replace the contents of the window with the contents of the supplied URL variable. Pretty simple stuff.</p>
<p>I looked around (via google, naturally) for any other writeups of this vulnerability, but couldn&#8217;t find any. So I wrote it up and posted it <a href="http://intrepidusgroup.com/insight/2011/02/mobile-safari-restrictions-bypass/">here, on the Intrepidus Group website</a>.</p>
<p>If you&#8217;ve seen this before, or have any additional details or thoughts, or especially, suggestions for a workaround, please let me know. I can&#8217;t believe I&#8217;m the only person to have noticed this.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darthnull.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darthnull.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darthnull.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darthnull.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darthnull.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darthnull.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darthnull.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darthnull.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darthnull.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darthnull.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darthnull.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darthnull.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darthnull.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darthnull.wordpress.com/276/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=276&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://darthnull.org/2011/02/15/simple-bypass-of-safari-restrictions-on-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b58ed6e3547fbf761105f63a576e1ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dschuetz</media:title>
		</media:content>
	</item>
		<item>
		<title>ShmooCon 2011 Badge Contest</title>
		<link>http://darthnull.org/2011/02/09/shmoocon-2011-badge-contest/</link>
		<comments>http://darthnull.org/2011/02/09/shmoocon-2011-badge-contest/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 02:39:20 +0000</pubDate>
		<dc:creator>Darth Null</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Cryptography]]></category>

		<guid isPermaLink="false">http://darthnull.org/?p=251</guid>
		<description><![CDATA[Ah, ShmooCon 2011. This time we&#8217;re in a new building, The Washington Hilton, and a little earlier than usual: the last weekend of January. But aside from that, it&#8217;s still ShmooCon. And it wouldn&#8217;t be a ShmooCon without something fun on the badges. For the third year in a row, the puzzle came from the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=251&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ah, ShmooCon 2011. This time we&#8217;re in a new building, The Washington Hilton, and a little earlier than usual: the last weekend of January. But aside from that, it&#8217;s still ShmooCon. And it wouldn&#8217;t be a ShmooCon without something fun on the badges. For the third year in a row, the puzzle came from the subtle and devious mind of G. Mark Hardy.</p>
<p>This time, I was actually helping out at the con. I&#8217;d been a little concerned about whether I&#8217;d be able to fairly compete for the puzzle, since I might get exposed to the badges, or programs, or other material, before anyone else is.  Heidi did her best to ensure that I didn&#8217;t learn anything unfairly &#8212; to the point that the Wednesday before the con, when I was helping with some of the check-in code and at the bag stuffing party, she repeatedly told everyone that &#8220;David&#8217;s not allowed to see inside the programs!&#8221; She&#8217;s so helpful.  </p>
<p>Though I have to admit, it was certainly frustrating being surrounded by 1500 copies of the puzzle, and not being able to do anything about it. </p>
<p>Adding to the stress was the fact that I&#8217;d won (or shared winning) this contest in 2009 and 2010. The fact that this drive to keep winning was purely internal didn&#8217;t make it less real. And being somewhat not-100%, physically (more on that later) certainly didn&#8217;t help. More than once I&#8217;d wished I&#8217;d simply opted out of the contest at the beginning.</p>
<p>So anyway, the con started, I got my badge, my buddies got theirs, and we were off!</p>
<p style="text-align:center;font-weight:bold;color:red;">As always, if you’d like to try to solve this yourself, then STOP now, as the rest of this post is full of spoilers. If you’d like a copy of just the raw data (ciphertexts and other clues revealed during the contest), click <a href="http://darthnull.org/puzzles-and-contests/shmoocon-7-ciphertexts/">here</a>.</p>
<p>Pretty quickly we decided that there were probably five badges total: one for staff, one for speakers, and three for attendees. Each badge was made to look like a school hall pass, and had fields for the &#8220;student&#8221;&#8216;s name, the reason they were issued the hall pass, and the teacher who issued it. The names were all amusing, but didn&#8217;t really pertain &#8212; the important parts were the lines the names were written on.  Two of the lines weren&#8217;t really lines, but were finely drawn Morse code.</p>
<p>Being hungry, we went off to lunch and, while waiting, decoded all five badges. We ended up with this (first line is hall pass reason, second line is the authorization, right column is the decoded text):</p>
<table class="styled">
<tr>
<th>Badge Text</th>
<th>Morse Code</th>
<th>Badge Type</th>
</tr>
<tr>
<td>A Room With a Moose   </td>
<td>      2 YESTERDAY</td>
<td rowspan="2">Attendee</td>
</tr>
<tr>
<td>Mr. Shmoo             </td>
<td>      3 TELEGRAPH</td>
</tr>
<tr>
<td>F5 Fingers            </td>
<td>      0 MOGADISHU</td>
<td rowspan="2">Attendee</td>
</tr>
<tr>
<td>Anon E. Moose         </td>
<td>      1 ARMADILLO</td>
</tr>
<tr>
<td>I Haz Barcodes        </td>
<td>      4 HYPNOTIST</td>
<td rowspan="2">Attendee</td>
</tr>
<tr>
<td>Bullwinkle            </td>
<td>      5 EUCALYPTI</td>
</tr>
<tr>
<td>Lost Voice on Alcan   </td>
<td>      8 ORANGE CAB</td>
<td rowspan="2">Speaker</td>
</tr>
<tr>
<td>A Noony Moose         </td>
<td>      9 STIMULATE</td>
</tr>
<tr>
<td>Yearly Migration      </td>
<td>      6 MICROBREW</td>
<td rowspan="2">Staff/Security</td>
</tr>
<tr>
<td>Dr. Doc Doctor, MD    </td>
<td>      7 OBJECTIVE</td>
</tr>
</table>
<p>It seemed pretty obvious that they needed to be put in numerical order. This gave us:</p>
<pre><code>0 MOGADISHU
1 ARMADILLO
2 YESTERDAY
3 TELEGRAPH
4 HYPNOTIST
5 EUCALYPTI
6 MICROBREW
7 OBJECTIVE
8 ORANGECAB
9 STIMULATE
</code></pre>
<p>Almost immediately we noticed &#8220;MAY THE MOOSE BE WITH YOU&#8221; read down the first column and up the last. So, that&#8217;s one part done. What other parts were there to the puzzle?</p>
<p>On the bottom of several pages were individual letters in a large font. Taken together, these spelled out:</p>
<pre><code>RJWUD TKOOA EGPAD CRLUS
</code></pre>
<p>Obviously some ciphertext. I tried basic attacks (various Caesar shifts, &#8220;obvioius&#8221; Vigenère keys, etc.) but didn&#8217;t get anywhere.  </p>
<p>On page 6 of the program was some base-64 data. I quickly entered that into an online tool and decided it was binary data, likely encrypted output from OpenSSL, and therefore almost certainly not part of G. Mark&#8217;s puzzle.</p>
<p>Page 12 had a section titled &#8220;Crypto Contest&#8221; with the following block of text:</p>
<pre><code>CRYPTOCONTEST
MWHFGYBBXQBJA
OXIHADLIDWXVW
OUXGHIPCSAPHI
SZHWHPGMAXGNI
EYTKNSIYMJPJD
</code></pre>
<p>This one I just left alone for the time being.  On page 27, we found a word search game:</p>
<pre><code>0 1 2 3 4 5 6 7 8 9
S A V E H I M O M G
S E X H I B I T O M
D E C I M A L D P A
B A R R O R M A K R
F U R W E I N T O K
P C P T N T B O O M
G V M U H O C A R K
W I S E A N D O D I
I O R V S E U T D K
N O T H E R E L I E
N O T T H E R E L I
</code></pre>
<p>It didn&#8217;t take long for us to start finding words and names in the square.  Popping out at us were SAVE, HI MOM, EXHIBIT, DECIMAL, and NOT HERE. Also the names G MARK, WINN, GOD MINUS ON(e), and amusingly enough, DARTH NULL. Also, SECRET CODE. And some others. How many of the words we found were deliberate, and how many were accidents of the encoding? That wasn&#8217;t a purely academic question, as we figured that whatever letters were left over (not part of words) would themselves constitute a ciphertext.</p>
<p>Finally, the back of the schedule card had the following:</p>
<pre><code>  A B C D E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
A S H M O O C O N A B D E F G I J K L P Q R T U V W X Y Z L
B H M O O C O N A B D E F G I J K L P Q R T U V W X Y Z S E
C M O O C O N A B D E F G I J K L P Q R T U V W X Y Z S H S
D O O C O N A B D E F G I J K L P Q R T U V W X Y Z S H M S
E O C O N A B D E F G I J K L P Q R T U V W X Y Z S H M O M
F C O N A B D E F G I J K L P Q R T U V W X Y Z S H M O O O
G O N A B D E F G I J K L P Q R T U V W X Y Z S H M O O C O
H N A B D E F G I J K L P Q R T U V W X Y Z S H M O O C O S
I A B D E F G I J K L P Q R T U V W X Y Z S H M O O C O N E
J B D E F G I J K L P Q R T U V W X Y Z S H M O O C O N A T
K D E F G I J K L P Q R T U V W X Y Z S H M O O C O N A B H
L E F G I J K L P Q R T U V W X Y Z S H M O O C O N A B D A
M F G I J K L P Q R T U V W X Y Z S H M O O C O N A B D E N
N G I J K L P Q R T U V W X Y Z S H M O O C O N A B D E F E
O I J K L P Q R T U V W X Y Z S H M O O C O N A B D E F G V
P J K L P Q R T U V W X Y Z S H M O O C O N A B D E F G I E
Q K L P Q R T U V W X Y Z S H M O O C O N A B D E F G I J R
R L P Q R T U V W X Y Z S H M O O C O N A B D E F G I J K G
S P Q R T U V W X Y Z S H M O O C O N A B D E F G I J K L M
T Q R T U V W X Y Z S H M O O C O N A B D E F G I J K L P A
U R T U V W X Y Z S H M O O C O N A B D E F G I J K L P Q R
V T U V W X Y Z S H M O O C O N A B D E F G I J K L P Q R K
W U V W X Y Z S H M O O C O N A B D E F G I J K L P Q R T M
X V W X Y Z S H M O O C O N A B D E F G I J K L P Q R T U M
Y X Y Z S H M O O C O N A B D E F G I J K L P Q R T U V W X
Z Y Z S H M O O C O N A B D E F G I J K L P Q R T U V W X I
  A B C D E F G H I J K L M N O P Q R S T U V W X Y Z A B C D 

"Thanks to Gary Phillips for providing the Jim Sanborn font"
</code></pre>
<p>The little attribution was clearly to help people unfamilar with the image to narrow their google search a little bit. Jim Sanborn is the artist who created a sculpture at CIA Headquarters called Kryptos. Half of the sculpture is ciphertext, the other half is a keyed Vigenère tableau. The image on the schedule card was likewise a keyed Vigenère, though not properly constructed.  I figured this would be used to decode the last part of the puzzle, and didn&#8217;t think much more of it. (There&#8217;s also a little easter egg in the rightmost column. &#8220;LESS MOOSE THAN EVER GMARK MMXI&#8221;).  </p>
<p>So by now, we&#8217;re done with lunch, and have found a place to sit for the opening ceremonies. I didn&#8217;t really play too much with the puzzle then, but near the end, I started again. I first tried some of the usual suspects against the code on page 12 (Vigenère, mostly), but didn&#8217;t see anything pop out at me. Then I looked a little more closely at it.</p>
<p>The first row &#8220;CRYPTOCONTEST&#8221; was obviously just a header. What I didn&#8217;t notice right away was that the first column also spells something. MOOSE. I had a hunch, tried it, and was quickly rewarded. The key for each of the five rows is the first letter in that row. That is, the first row (after the header) starts with the M in MOOSE, so that row is a Caeser cipher shifted by M (or, in this particular case, what&#8217;s commonly called ROT-13). The next two rows were shifted by 15 letters (O), etc. So, about 4:00 on Friday, I&#8217;d decoded it:</p>
<pre><code>JUST LOOK DOWN
ITS LOW TO HIGH
FIRST AND LAST
GO DOWN THEN UP
TO FIND THE KEY
</code></pre>
<p>This was to be the last progress I made for nearly 24 hours. And even this wasn&#8217;t much progress, since we&#8217;d already &#8220;looked down&#8221; (at the badges) and found the key (&#8220;MAY THE MOOSE BE WITH YOU.&#8221;)</p>
<p>On the other hand, now I know what I&#8217;m supposed to do with that phrase. And now that I&#8217;m thinking about it, the key has 20 letters, and the text on the bottom of the pages has 20 letters. Woohoo!  Let&#8217;s just add one to the other, and&#8230;.er&#8230;nothing. Okay, subtract. Subtract the other way? Start with 1 instead of 0? No? Shoot. After about 20 minutes, I give up (plus, the room was getting warm) so we get up to stretch our legs.  I played with it a little more during the Keynote, but again, got nowhere. </p>
<p>After the con closed down for the evening, and we&#8217;d made (and changed and changed again) reservations for dinner, I ran into G. Mark. I told him a little about what we&#8217;d done so far, and mostly tried to get a feel for whether we had the right approach on the word search bit. Naturally, I didn&#8217;t get much help.</p>
<p>The next morning, when I woke up, I had a bit of a medical scare. See, I&#8217;d slipped on ice a little over a week before and banged my right knee pretty badly. It was still a little swollen, but I was making do. Well, when I got out of bed, I saw huge bruises all over my foot &#8212; which hadn&#8217;t been injured at all when I fell. Naturally, this Freaked Me Out. I ended up spending most of the morning going to, being at, and returning from, the local urgent care clinic.  Fortunately, I checked out fine &#8212; the diagnosis was that invisible bruises got exacerbated by all the walking at the con, and also that extended use of Motrin and Alleve made the bruising appear much worse. Relieved, I returned to the con, and to the talks.</p>
<p>I kept playing with the codes, off and on, over the afternoon, but made no progress. In the meantime, G. Mark tweeted a few hints, but they don&#8217;t help me much. At 3:51, he tweets that &#8220;The tools you received in the challenge will work best without unauthorized modificaions.&#8221; What the hell is that supposed to mean? Tools? I can&#8217;t think straight, and decide to go upstairs to take a quick nap. On the way to the elevator, I get another tweet from G. Mark: &#8220;Serious breakthrough for one of the teams! Competition get hot or eat thier bits!&#8221; Great, so now I&#8217;m tired, AND bummed out.</p>
<p>Once in my room, I pull out the swag bag and begin going through it. I try opening all the pens, to see if perhaps there&#8217;s a clue hidden inside something, but have no luck. Then I look at the schedule card. I look at the tableau on the back. The one that was made incorrectly. I shake my head and quietly muter &#8220;No. No, you didn&#8217;t.&#8221; And then I start copying the tableau onto the computer so it&#8217;ll be easier to trace out (the font he used didn&#8217;t really line up into nice columns).</p>
<p>Basically, this kind of Vigenère tableau uses a different base alphabet. In the traditional cipher, the key simply switches among different Caesar shifts for each letter in the plaintext. A keyed tableau mixes up the alphabet itself, making it even harder to break. Of course, even in a keyed alphabet, the alphabet can only have 26 letters. It CERTAINLY can&#8217;t have the letter O appear three times, as it did in this table. I&#8217;d tried using a keyed Vigenère with the &#8220;MAY THE MOOSE BE WITH YOU&#8221; key many times, with many variants, but got nowhere, because I was always constructing the keyed alphabet <i>correctly</i>.</p>
<p>Here&#8217;s what G. Mark&#8217;s alphabet looks like:</p>
<pre><code>SHMOOCONABDEFGIJKLPQRTUVWXYZ
</code></pre>
<p>and here&#8217;s what it <i>should</i> have looked like:</p>
<pre><code>SHMOCNABDEFGIJKLPQRTUVWXYZ
</code></pre>
<p>Those extra Os mess  everything up. But how bad does it really make it? Well, let&#8217;s take the table, and the key we got from the badges, and start decoding. First, take the first letter of the key &#8220;M&#8221; and find the row that starts with M. Then, I go over to the first letter of the ciphertext &#8220;R&#8221; and straight up to the header row to find the letter &#8220;I.&#8221; This is the first letter of the plaintext.</p>
<p>The next key letter is A, with ciphertext J, looking straight up I get P. So now I&#8217;ve got &#8220;IP.&#8221; I keep at this for a while, and eventually turn the ciphertext (top) into plaintext (bottom): </p>
<pre><code>RJWUD TKOOA EGPAD CRLUS

IPADD RE??S HMOOC ONVII
</code></pre>
<p>Only two letters, both of which are key letter O paired with cipher letter O, are ambiguous. Each could be R, S, or U. It&#8217;s pretty easy to see what the right decryption is just by looking at the context. So the letters at the bottom of the page decrypt to:</p>
<pre><code>IP ADDRESS SHMOOCON VII.
</code></pre>
<p>Woohoo! Finally! Progress! Now I just need to open a browser&#8230;and&#8230;er&#8230;hm.</p>
<p>Okay, maybe it&#8217;s telling me to get the ip address for the shmoocon.org site and surf to that by IP, not by name. This will almost certainly give me different data that way. But then what do I do with the VII?  Also, since I&#8217;ve been helping out with the ticket sales system, I know a little bit about how the ShmooCon server is configured. And one bit of knowledge worries me &#8212; the address on the webserver itself is <strong>not</strong> the same as the address that browsers go to, because there&#8217;s a load balancer in between the server and the world. So I&#8217;m wondering &#8212; did they account for this when they set it up? </p>
<p>I sent a note to G. Mark mentioning I had a concern, and went back down to the conference. Not long after getting there, he walks by, and we talk for a bit. Not to worry, he tells me, everything is working fine. Cool. He asks me what parts I have left, and I told him the only piece of the puzzle I haven&#8217;t used is the word search, and talk again about how to get a ciphertext out of the puzzle by eliminating words, etc. He looks at me and tells me &#8220;back off.&#8221; I&#8217;m not sure if this means &#8220;back off asking questions, I won&#8217;t tell you anything&#8221; or &#8220;back off from that approach, it&#8217;s wrong.&#8221; Either way, I know that&#8217;s where I need to go next, so I run over to the Intrepidus Group table and pull out the program.</p>
<p>But how am I supposed to get an IP address out of the puzzle, using &#8220;SHMOOCON VII&#8221; as the key? S appears in the first column twice, and also once in column 2. There are 3 Hs in column number 4, and it appears twice in column 3. Maybe it&#8217;s the column with the most of each letter? No, there are 2 Ms in both columns 6 and 9. Maybe the total number of occurrences of each letter? That probably wouldn&#8217;t work either, &#8217;cause then you&#8217;d have 3 digits forced to the same number, which seems unlikely. </p>
<p>After a little while, I remember that the table has 11 rows, which had struck me as a little odd, not for any particular reason, but just that there must be a <i>reason</i> for 11 rows. This little bit of trivia had been completely forgotten until this moment. &#8220;SHMOOCON VII&#8221; has 11 letters. One letter per row?</p>
<p>Let&#8217;s see&#8230; There is only one S in the first row, and it&#8217;s under column 0. Hm. One H in the second row, under 3. Only one M in the third row, and it&#8217;s beginning to look like I&#8217;m on to something, though the number still seems weird. In the end, I get this:</p>
<pre><code>03448155389
</code></pre>
<p>Heh. Tricky. IP addresses are just big 32-bit numbers, but we typically split them into four 1-byte blocks for easy readability. For <i>human</i> convenience. However, many applications don&#8217;t care and can take a single big number just as easily as a dotted-quad address. However, I&#8217;m not 100% sure about the iPhone browser. And when I try entering that number, sure enough, it doesn&#8217;t work. So I convert it to hex and get CD86ACFD. Converting each pair of digits to decimal, I get 205, 134, 172, and 253. So the address I need to surf to is:</p>
<pre><code>http://205.134.172.253/
</code></pre>
<p>Now I&#8217;m getting excited. I get back a simple web page, with the title &#8220;Well done!&#8221;, and the following text:</p>
<pre><code>Good things come in threes.
Add this to the other plaintexts.
Tell that person you solved it.

KVATY DBKZA BZICB USYWO
</code></pre>
<p>Cool. Okay. So&#8230;there are 20 characters there, and I&#8217;ve got two other 20 character strings. So I need to get this plaintext and add them all together. Again, I try the usual suspects, and get nowhere. Then I stop and think for a moment. And realize that I&#8217;m being an idiot. Of course I can&#8217;t take three English strings, add them together, and get English again. (I mean, <i>maybe</i>, but it&#8217;d be tough to arrange). I need to add the new ciphertext to the two plaintexts. Basically:</p>
<pre><code>MAYTH EMOOS EBEWI THYOU
IPADD RESSS HMOOC ONVII
KVATY DBKZA BZICB USYWO
</code></pre>
<p>Now there are a few different ways you can &#8220;add&#8221; letters together. First, you can simply number them starting with 1 (so A + A = B, because 1 + 1 = 2). Or you can number them starting at zero (so A + A = A, A + B = B, but B + B = C). The latter is actually an easy way to implement the Vigenère cipher, and since I&#8217;ve have some favorite tools to do that online, that&#8217;s what I do &#8212; enter the first string as the key, and the second string as the plaintext, hit encrypt, and I get the &#8220;sum&#8221; of the strings. Do it again with that sum as the key and the 3rd string as plaintext, and I get:</p>
<pre><code>EKYPI YRQFK MMAML BMRSQ
</code></pre>
<p>Damn. Nothing. Well, let&#8217;s assume that it&#8217;s been encoded itself, again trying the standby Vigenère, and I&#8217;ll use GMARK as the key. Now I get:</p>
<pre><code>YYYYY SFQOA GAAVB VARBG
</code></pre>
<p>Oooh! Oooh! That&#8217;s important! That pretty much tells me that the string <i>starts</i> with GMARK. So instead of GMARK as the key, I just enter &#8220;Y&#8221;, and out pops:</p>
<pre><code>GMARK ATSHM OOCON DOTUS
</code></pre>
<p>It turns out if I&#8217;d used the other way to add, it would have been a lot easier &#8211; the &#8220;shift by Y&#8221; decode kind of undoes the offsets I&#8217;d introduced using what was supposed to be a shortcut.  If you number M as the 13th letter, I as the 9th, and K as the 11th, you get 13+9+11 = 33. Subtract 26, and you get 7. The 7th letter is G.  Similarly, 1 (A) + 16 (P) + 22 (V) = 39, 39 &#8211; 26 = 13 (M). And so forth. So, once again, I apparently took the long way around. </p>
<p>Anyway, the instructions said to &#8220;tell that person you solved it,&#8221; so I quickly sent an email to gmark at shmoocon.us. I also sent him a direct message saying &#8220;Check your .us email account.&#8221; This was at 6:21 on Saturday. At 6:28, I got a response saying I&#8217;d won, and two minutes later he announced it to the world on Twitter. </p>
<p>Whew! My winning streak is safe!</p>
<p>At the closing ceremonies, G. Mark again explained the puzzle and how it worked, which is always great fun. For one, it verified that I&#8217;d taken the wrong approach for the final plaintext addition step. It&#8217;s also great to see the responses of the crowd as things are revealed. What was really priceless for me, though, was hearing groans and &#8220;Not again!&#8221; comments from people around me as my name was announced as the winner. </p>
<p>I&#8217;m still amazed by my ability to overcomplicate matters, even after solving so many of G. Mark&#8217;s puzzles. In this case, I spent a good deal of time trying to determine which words were &#8220;real&#8221; in the word search puzzle, trying to build a ciphertext out of the puzzle, when really, literally 90% of the letters in that block were fluff. </p>
<p>Also, I&#8217;d interpreted the Vigenère table as a hint, telling me what technique to use at some critical stage of the game. In fact, it was not really a hint, so much as the actual method and half the key. G. Mark has made mistakes in his puzzles before, but those mistakes are almost always very minor and had no real impact on solving the puzzle. In this case, I tacitly assumed that the tableau was wrong, and it was wrong simply because he was having fun. What I should have assumed was that it was right, and to use it exactly as provided. Had I really thought more clearly about all that, I might&#8217;ve solved the puzzle 24 hours earlier. </p>
<p>In the end, though, it was another great puzzle. I was glad to see him follow somewhat the pattern he took with ToorCon, where each stage tells you where to go next and hints at the method and key to use. It wasn&#8217;t quite exactly like that, but you could see some similarities. And it&#8217;s also great that there was a stage that wasn&#8217;t pure classical cryptography, and a stage that was classical crypto, but with an unexpected twist. Being forced to think outside of the box is the best feature of any puzzle, and once again, I was not disappointed.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darthnull.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darthnull.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darthnull.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darthnull.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darthnull.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darthnull.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darthnull.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darthnull.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darthnull.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darthnull.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darthnull.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darthnull.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darthnull.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darthnull.wordpress.com/251/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=darthnull.org&amp;blog=8726510&amp;post=251&amp;subd=darthnull&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://darthnull.org/2011/02/09/shmoocon-2011-badge-contest/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b58ed6e3547fbf761105f63a576e1ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dschuetz</media:title>
		</media:content>
	</item>
	</channel>
</rss>
