<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/blog/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://singe.za.net/blog/feeds/atom.xml" rel="self" title="Dominic White" type="application/atom+xml" />
    <link href="http://singe.za.net/blog/"                        rel="alternate"    title="Dominic White" type="text/html" />
    <link href="http://singe.za.net/blog/rss.php?version=2.0"     rel="alternate"    title="Dominic White" type="application/rss+xml" />
    <title type="html">Dominic White</title>
    <subtitle type="html">.tHE pRODUCT - Security &amp; Privacy Blog</subtitle>
    <icon>http://singe.za.net/pics/links/tHEpRODUCT-blue.gif</icon>
    <id>http://singe.za.net/blog/</id>
    <updated>2010-02-05T03:31:00Z</updated>
    <generator uri="http://www.s9y.org/" version="1.5-beta1">Serendipity 1.5-beta1 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://singe.za.net/blog/archives/996-On-Year-Six.html" rel="alternate" title="On Year Six" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2010-02-05T03:31:00Z</published>
        <updated>2010-02-05T03:31:00Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=996</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=996</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/20-Life" label="Life" term="Life" />
    
        <id>http://singe.za.net/blog/archives/996-guid.html</id>
        <title type="html">On Year Six</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Today my blog turned six, and <a href="https://twitter.com/singe/status/8682594217">I tweeted</a> that fact with the following:</p> 
<blockquote> 
<p>My blog http://singe.za.net/ turned 6 today. The fact that I'm tweeting this rather than blogging it is probably significant.</p> 
</blockquote> 
<p>While blogging remains more a more satisfying and useful means of exploring a thought, twitter let's you skip the work and move onto the conversation (sometimes) a bit sooner, but without any decent record of that conversation occurring (twitter's searchable memory is too short). I'm certainly going to continue blogging, but I don't see my throughput increasing much. Luckily, subscribing to an <a href="http://singe.za.net/blog/feeds/index.rss2">RSS feed</a> is only a cost if there are too many updates ;).</p> 
<p>That being said, I think there's been some fun stuff on the blog in the last year, my favourite posts have been:</p> 
<ul> 
<li><a href="http://singe.za.net/blog/archives/976-Using-Maltego-to-Data-Mine-Twitter.html">Using Maltego to Data Mine Twitter</a></li> 
<li><a href="http://singe.za.net/blog/archives/979-Conficker-Claims-its-First-Human.html">Conficker Claims it's first Human Life</a></li> 
<li>My first guest post - <a href="http://singe.za.net/blog/archives/989-Efficient-extraction-of-data-using-binary-search-and-ordering-information.html">Efficient extraction of data using binary search and ordering information</a></li> 
<li><a href="http://singe.za.net/blog/archives/993-Deloitte-SensePost.html">Deloitte -&gt; SensePost</a> for a personal milestone (there was another personal milestone, my marriage, but that wasn't much of a blog entry).</li> 
</ul>  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://singe.za.net/blog/archives/995-Breach-at-iContact-exposes-my-and-your-details-to-Spammers.html" rel="alternate" title="Breach at iContact exposes my (and your) details to Spammers" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2010-02-02T06:25:09Z</published>
        <updated>2010-02-02T09:25:28Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=995</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=995</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://singe.za.net/blog/archives/995-guid.html</id>
        <title type="html">Breach at iContact exposes my (and your) details to Spammers</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>This week something special happened, something I'd been saving for the right person, something magical. Today, hackers took my private data. Everything's changed, I feel like a part of the world, connected to so many other people who have shared in this experience. Today, I'm a woman! (Ok, I may have gone a bit far with that last bit)</p> 
<p>The skinny is that I use unique e-mail addresses for each service provider that I want to continue communicating with (for the ones I don't I use one-shot addresses). I noticed on the weekend that I was being deluged with pharmaceutical spam to three of these addresses, namely my Threadsy, Numbuzz &amp; Share-it (via a product I bought there, ChatterBlocker) contacts. This lead me <a href="https://twitter.com/singe/status/8489242055">to tweet</a>: &quot;<span class="status-body"><span class="entry-content">Either a security or ethics breach at @<a class="tweet-url username" href="https://twitter.com/threadsy">threadsy</a> &amp; @<a class="tweet-url username" href="https://twitter.com/nimbuzz">nimbuzz</a> Getting Viagra spammed hard on the unique e-mail addresses I gave them.&quot;</span></span> </p> <p>Chatterblocker got back to me with the equivalent of &quot;What? Wasn't me.&quot; <span class="fn"><a title="Skott Kendall" href="http://dskendall.com/">Scott Kendall</a> from Threadsy jumped into an investigation however and contacted me for more details. He also passed on results of his investigation to Nimbuzz, much kudos. Scott then <a href="https://twitter.com/dskendall/status/8516192689">informed me this morning</a> that there has been a <a title="Breach Notification from iContact" href="http://www.icontact.com/blog/index.php?blog=1&amp;p=401&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">breach at iContact</a>, evidently a shared service provider to the affected entities, resulting in the theft of customer contact details that must have been sold to spammers (or by a horizontally integrated crime crew). We're assured by iContact that only our e-mail addresses were stolen. However, we're not given any reason to believe that; unless the data is segmented somehow I don't see why an attacker wouldn't take the whole caboodle.</span></p> 
<p>What concerns me is first that I wasn't even aware I had a relationship with iContact. A quick look of the websites of Threadsy and Nimbuzz don't make reference to them apart from the generic &quot;we may share your data with business relevant third parties&quot; in the privacy policy. Even if it is made explicit in the privacy policy, it doesn't mean you understand it, take this <a href="http://mathiasbynens.be/examples/facebook-friends">Facebook friendlist leak</a> for example. Maybe if we had a &quot;<a title="Nutritional Label for Privacy" href="http://cups.cs.cmu.edu/soups/2009/proceedings/a4-kelley.pdf">nutritional label for privacy</a>&quot; with disclosure of who the third parties were I would feel more in control of my data and more importantly the decisions I make.<br /></p> 
<p>Second, I'm not aware what data of mine had been given to iContact and what could potentially be at risk. Was it just my contact details, or did it include behavioural data too? Even if I can't do anything about it, I'd like to know what was breached with some solid factual basis. More importantly, I'd like to see what is shared with the third-party up front. I believe the small externality of writing that down in human readable and explicit form may encourage service providers to limit it.</p> 
<p>Third, this was a consumer-lead breach-discovery. People with custom e-mail addresses tracked the source and informed iContact they had a breach. We see the same thing with credit card breaches, and with the likes of Google notifying other companies that the APT (do I get points for using it?) got them too. Is it any wonder those are the breaches we see frequently reported. IT shops usually aren't aware they've been breached until an affected third party tells them.<br /></p> 
<p>In conclusion, if you're getting spammed hard with pharmaceutical spam, this is probably why. There's nothing you can do about it, and there's probably a near infinite number of variations of your private (by which I mean data you don't want publicly exposed) data floating around at service providers you know nothing about that doesn't have the same canary-in-a-mine like properties that can make you (and hence the service provider) aware of the breach. Good luck.<br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://singe.za.net/blog/archives/994-First-Week-at-SensePost.html" rel="alternate" title="First Week at SensePost" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2010-01-08T13:49:28Z</published>
        <updated>2010-01-13T06:56:33Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=994</wfw:comment>
    
        <slash:comments>6</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=994</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/20-Life" label="Life" term="Life" />
    
        <id>http://singe.za.net/blog/archives/994-guid.html</id>
        <title type="html">First Week at SensePost</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Today is the last day of my first week at SensePost, so far the number of: <ul> 
<li>Shiny new Macbook Pro's received: 1</li> 
<li>Distrowars: 4</li> 
<li>Foozball games played: 8</li> 
<li>Collared shirts worn: 3 (what do I do with them all now?)<br /></li> 
<li>Black t-shirts worn: 2</li> 
<li>Disco balls in meeting rooms: 1</li> 
<li>Coffee machines per capita: 0.14</li> 
<li>Timesheets completed: 0</li> 
<li>HR forms to complete: 0</li> 
<li>Kilometers traveled: 600 (the only downside)<br /></li> 
<li>Attempts colleagues have made to scan entire Internet: 1</li> 
<li>Finally working at a company 5 years after first applying for a job there: Priceless<br /></li> 
</ul> 
<p>In short, it's been awesome. I haven't done much real work as yet, but that will start soon. The people are smart and easy to get along with, and they're all geeks, a nice change (on the geeks bit, my old colleagues are smart too :) ). I'm also enjoying getting to know &quot;how they roll&quot; and recon living up to it will make me a better security person.</p> 
<p>As an aside, my new work e-mail address is available <a href="http://mailhide.recaptcha.net/d?k=01GMx3_P0QYXcri8vPQo2ZTQ==&amp;c=zRkL1FFtEmN4Xc6ek7Ftg8LasPQO__1d0gD-Aas-oPY=" onclick="window.open('http://mailhide.recaptcha.net/d?k=01GMx3_P0QYXcri8vPQo2ZTQ==&amp;c=zRkL1FFtEmN4Xc6ek7Ftg8LasPQO__1d0gD-Aas-oPY=', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;" title="Reveal this e-mail address">here</a> (<a href="http://mailhide.recaptcha.net/d?k=01GMx3_P0QYXcri8vPQo2ZTQ==&amp;%E2%81%9Ec=zRkL1FFtEmN4Xc6ek7Ftg8LasPQO__1d0gD-Aas-oPY=" title="ReCaptcha MailHide">or sans popup</a>). </p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://singe.za.net/blog/archives/993-Deloitte-SensePost.html" rel="alternate" title="Deloitte -&gt; SensePost" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2009-12-30T07:20:22Z</published>
        <updated>2009-12-31T10:51:29Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=993</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=993</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/20-Life" label="Life" term="Life" />
    
        <id>http://singe.za.net/blog/archives/993-guid.html</id>
        <title type="html">Deloitte -&gt; SensePost</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                As of the 4th of Jan, I will conclude <a href="http://singe.za.net/blog/archives/669-Someone-Employed-Me.html" title="Somebody Employed Me">4-years of service</a> to Deloitte's Security &amp; Privacy group in South Africa, and be moving to SensePost. I have lots to say about it, but didn't want my perseverations over what/how to say it to get in the way of marking the move. My relationship and view of Deloitte is very positive and I learned a massive amount from incredible people. However, I've long wanted to work for SensePost and a combination of a great opportunity offered by the Post'ers and a &quot;time to move on&quot; feeling at Deloitte sealed the deal.  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://singe.za.net/blog/archives/992-Brain-Krebs-Leaves-The-Washington-Post.html" rel="alternate" title="Brain Krebs Leaves The Washington Post" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2009-12-30T06:48:34Z</published>
        <updated>2009-12-30T14:24:54Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=992</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=992</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://singe.za.net/blog/archives/992-guid.html</id>
        <title type="html">Brain Krebs Leaves The Washington Post</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Brian Krebs, author of <a title="SecurityFix" href="http://voices.washingtonpost.com/securityfix/">SecurityFix</a> and one of the very few mainstream infosec journalists, is pulling a McLeodd<sup><a title="Footnote1" href="#foot1">1</a></sup> and leaving the Washington Post to go on his own. He will be reporting from <a tite="Krebs on Security" href="http://www.krebsonsecurity.com/">Krebs on Security</a> from today.</p> 
<p>Apart from the coverage, Brian has also got involved in or instigated responses to some threats, and I hope that fewer editorial restrictions allow him to do and say more.</p> 
<p>In truth, I only really like Brian because he's <a title="The Worm Business" href="http://voices.washingtonpost.com/securityfix/2005/08/the_worm_business_1.html">linked</a>, <a title="More MS Patch Data" href="http://voices.washingtonpost.com/securityfix/2006/01/more_ms_patch_data.html">to me</a> before, encouraging up to 1.5 people to read the abstract on <a href="/masters/thesis" title="Limiting Vulnerability Exposure Through Effective Patch Management">my thesis</a> ;), but more seriously providing data and inspiration to me and several other researchers.</p> 
<p>Good luck Brian</p> <small><a id="foot1">Footnote 1</a>: I probably shouldn't mix my ZA and Infosec references, but Duncan McLeodd left the Financial Mail to form independent tech news startup <a title="TechCentral" href="http://www.techcentral.co.za/">TechCentral</a>.</small>  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://singe.za.net/blog/archives/990-Up-to-Date-isnt-the-same-as-Knowledgeable.html" rel="alternate" title="&quot;Up to Date&quot; isn't the same as &quot;Knowledgeable&quot;" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2009-12-14T05:39:10Z</published>
        <updated>2009-12-14T09:23:17Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=990</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=990</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://singe.za.net/blog/archives/990-guid.html</id>
        <title type="html">&quot;Up to Date&quot; isn't the same as &quot;Knowledgeable&quot;</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Eugene Spafford has a warning for us in his <a title="An old canard reappears, sort of" href="http://www.cerias.purdue.edu/site/blog/post/an_old_canard_reappears_sort_of/">latest entry</a> that I thought worth remembering:</p> 
<blockquote> 
<p>Generally, hackers who specialize in the latest attacks dismiss anyone not versed in their tools as ignorant, so I have heard this kind of criticism before. It is still the case that the &quot;elite&quot; hackers who specialize in the latest penetration tools think that they are the most informed about all things security. Sadly, some decision-makers believe this too, much to their later regret, usually because they depend on penetration analysis as their primary security mechanism.</p> 
</blockquote> 
<p>In many ways, I worry that mechanisms like RSS &amp; twitter and the associated behaviour help us to be up to date, but not knowledgeable, and that the implied arrogance of being up to date stops us from realising it.</p>  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://singe.za.net/blog/archives/989-Efficient-extraction-of-data-using-binary-search-and-ordering-information.html" rel="alternate" title="Efficient extraction of data using binary search and ordering information" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2009-12-01T06:50:41Z</published>
        <updated>2009-12-01T06:50:41Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=989</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=989</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://singe.za.net/blog/archives/989-guid.html</id>
        <title type="html">Efficient extraction of data using binary search and ordering information</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p><em>I'm quite excited and honoured to host a guest entry from Yusuf Moosa Motara covering his talk at ZaCon (a video of which can be found <a href="http://www.vimeo.com/7866525" title="Yusuf Motara @ ZaCon on Vimeo">here</a>, and the slides <a href="/utils/yusuf/Efficient%20extraction%20of%20text%20using%20binary%20search%20and.pptx" title="PowerPoint">here</a>).</em> </p> 
<p><br /></p> <h2>Caveat</h2> 
<p>I make no claims about the novelty of this technique.  For all I know, it's been widely known for some time, but I could find no record of it.  The target server is SQL Server in this text, but the technique is applicable to other implementations.  If nobody else bothers to claim it, I hereby name the technique after myself: nothing impresses random chicks quite as much as having an obscure and totally-irrelevant-to-their-lives technique named after oneself, after all.</p> 
<p>On second thought -- call it whatever you want to ;).</p> 
<h2>Background</h2> 
<p>Some injection points are worse candidates than others.  A difficult injection point is found in the ORDER BY clause of a SQL statement, since there can be no further statement after an ORDER BY and our only real &quot;in&quot; is the ability to put in expressions, though those expressions may do nothing more than change the resulting order.  Such a change of ordering does provide us with a 1-bit channel to slip data along.  We could do so a simple manner:</p> 
<pre>[...] ORDER BY case when (select top 1 substring(username,1,1) from
users)=&lt;91&gt;a&lt;92&gt; then ID else Address end</pre> 
<p>... but a quick examination will tell us that the time taken to extract data with this technique is around 0.5*/n/*/m/, where /n/ is the length of the data, and /m/ is the size of the alphabet, assuming that (on average) the correct character is found after half the search-space has been traversed.  Reordering the character test order in accordance with the frequencies that we expect to find in the text can yield better results, but not results that are significantly better.</p> 
<h2>A better way</h2> 
<p>We can do more than directly compare letters: we can get ordering information out.  This allows us to use a binary search algorithm to find the correct text efficiently.  In other words, we can use a query similar to:</p> 
<pre>[...] ORDER BY case when (select top 1 cast(username as varbinary(255)) from
users where username not in ('')) __OP__ cast('__CANDIDATE__' as varbinary(255))
then ID else Address end</pre> 
<p>The subselect provides us with a way to get the first row of data.  After getting the column data for that row, we can modify the &quot;not in&quot; clause to include the retrieved data, thus shifting us to the next row.  __OP__ is either &quot;&gt;&quot; or &quot;&lt;&quot;, depending on whether we would like to search the upper or lower space.  __CANDIDATE__ is the string that we are comparing against.</p> 
<p>Obtaining __CANDIDATE__ is a simple enough matter of converting text to a number that reflect the ordering of the text.  Unfortunately, SQL makes things difficult by supporting concepts like collation; therefore, the lexicographic ordering of the text in your language may not align with the ordering of the text in SQL.  We can solve this problem by using the same injection point and asking the SQL server to order our alphabet for us.  For a ~90-character alphabet, this takes ~300 queries.  We will make up for this setup cost within the first two or three records.</p> 
<p>SQL Server doesn't play well with strings.  If there are trailing spaces, they aren't counted towards the string length; if there are apostrophes, comparisons become more interesting (for example, &quot;mooo&quot; &lt; &quot;moo''a&quot;, but &quot;mooo&quot; &gt; &quot;moo''z&quot; [ed: note single and double apostrophes look similar in that example]).  To get around both of these (and a few other string-related idiocies), we cast to binary and compare as byte-sequences.</p> 
<p>A binary search searches a range, and we should set our initial range.  A lower bound of 0 will do, and the upper bound should be set to the largest /n/-valued sequence, where /n/ is the length of the string to be retrieved, as determined by a preliminary length-seeking binary search using the same injection point.</p> 
<p>The alphabet used must cover all of the possible letters.  Failure to do this will cause the binary search to fail; more importantly, it will make it difficult to proceed to the next record unless one can identify that record by ROWID or some other method.</p> 
<h2>Web-specific Complications</h2> 
<p>Certain sequences, such as<span style="font-family: monospace;"> </span>&quot;\e&lt;zmo~~&quot; or &quot;Lor,w&amp;#$Jo&quot; get detected, incorrectly, by WAFs as being XSS vectors.  This illustrates the stupidity of blacklist-based security precautions.  The only workaround I can think of at present is to remove the &quot;&lt;&quot; and &quot;&amp;&quot;/&quot;#&quot; characters from the alphabet, and ensure that we skip past sequences that contain such things by modifying our SQL injection query.</p> 
<p>As the number of retrieved items grows, the length of the query grows as well.  Therefore, this technique is of limited use when faced with a GET injection.  A solution to this might be to use adaptive queries: when the strings &quot;Alice&quot;, &quot;Alison&quot;, &quot;Albert&quot;, &quot;Alyssa&quot;, and &quot;Bart&quot; have been retrieved, it might be possible to change the seen strings to &quot;Al%&quot; and &quot;Bart&quot;, thus reducing the length of the query.  I leave this extension as an exercise to the reader.</p> 
<h2>Pay-off</h2> 
<p>A binary search finds its target in log2(n)+1 probes, at worst.  In real-world terms, this leads to an average of a 6x increase in efficiency (and hence speed) for pulling out data, as compared to the simplistic method of exploiting the ordering side-channel: basically, the difference between waiting 10 minutes for a long text blob or 1 hour for the same blob.</p> 
<h2>Notes</h2> 
<p>Though we apply the technique to free-form text extraction here, it would be trivial to apply it to the extraction of GUIDs, or numeric data.  Numeric data extraction would be a particularly interesting exercise, since a binary search works by continually narrowing the search-space.  It might be sufficient to get a &quot;ballpark&quot; figure in some cases, and thus obtain better than O(log2(n)) efficiency.</p> 
<p>I have created a small proof-of-concept, consisting of a <a title="Toy Application and Database (zip)" href="/utils/yusuf/SimpleApp.zip">toy ASP.Net application that is susceptible to injection, a SQL Server database</a>, and the <a title="SQL Extraction PoC" href="/utils/yusuf/get_data_minimal.py">extraction tool coded in Python3</a>.  If the code differs from the explanatory text (which is the text that you are reading right now, of course!), please place your trust in the code.</p> 
<h2>Further work</h2> 
<p>There are a number of optimisations that could be done to the existing proof-of-concept.  More importantly, the idea of using remote comparison functions to efficiently draw out previously-inaccessible data via binary search is an intriguing one, and one which deserves more attention.  <a href="https://twitter.com/AndrewMohawk" title="Andrew from Paterva who wrote Maltego">Andrew MacPherson</a> has pointed out to me that a similar technique is used by the Metasploit framework when trying to determine the EIP in some cases, and I am grateful for the knowledge; I am sure that there are even more applications for the idea just waiting to be found!</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://singe.za.net/blog/archives/988-ZaCon-Information-Security-for-the-Rest-of-Us.html" rel="alternate" title="ZaCon - Information Security for the Rest of Us" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2009-11-19T07:50:46Z</published>
        <updated>2009-12-01T06:53:39Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=988</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=988</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://singe.za.net/blog/archives/988-guid.html</id>
        <title type="html">ZaCon - Information Security for the Rest of Us</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
Update: Haroon's talk &quot;<a href="http://www.vimeo.com/7857004" title="Haroon Meer &quot;Why ZaCon&quot; on Vimeo">Why ZaCon</a>&quot; at the con provides more of an overview. Including some aspects I didn't consider.<br /></p>
<p>Our first South Africa fledgling <a href="http://en.wikipedia.org/wiki/Unconference" title="Wikipedia">unconference</a>-like security conference, <a href="http://zacon.org.za/">ZaCon</a>, takes place this Saturday (21 Nov). Our intention was to have something which fits in the gap between corporate conferences like the <a href="http://ww2.itweb.co.za/events/securitysummit/2009/" title="ITWeb">ITWeb security summit</a> and academic conferences like <a href="http://www.infosecsa.co.za/" title="Information Security South Africa">ISSA</a>. The former is huge and can afford to bring over some of the big names, but also has plenty of &quot;paid for&quot; opinions and a sometimes less meaty content. The latter is peer-reviewed and requires more than a slide deck and a grin to present at, but also sometimes values theory over pragmatism and places a large burden on people already holding down a job.<br /></p> <p>And so ZaCon was born, a security conference both &quot;for security geeks by security geeks&quot; and open to new entrants to the industry. It's on a Saturday, on purpose, you don't get a free day off work. It's also non-aligned, giving speakers the freedom to say what they want, how they want, and also preventing us from having to push agendas in return for money, or people attending so they can be seen in the right places.</p> 
<p>None of this is a middle finger to ITWeb, ISSA, vendors, security companies etc. It serves to outline what we felt was a need, and how we plan on meeting it. We will continue to contribute and support the other conferences, and most of us work for security companies anyway.</p> 
<p>The <a href="http://zacon.org.za/cfp.html">CFP</a> had a <a href="http://zacon.org.za/programme-09.html">great response</a>, we've managed to secure a <a href="http://zacon.org.za/venue-09.html">killer venue</a> (<a href="http://zacon.org.za/directions.html">directions</a>) thanks to the<a href="http://www.uj.ac.za/"> University of Johannesburg</a> and their <a href="http://www.uj.ac.za/csweb/Home/tabid/764/Default.aspx"><font face="Arial, Helvetica, sans-serif"><font size="2">Academy for Information Technology</font></font></a>, we're getting more coverage than we deserve from <a href="http://www.discussit.co.za/">DiscussIT</a>, should have full video/audio+slides to distribute afterwards and even have free wifi courtesy of <a href="http://www.is.co.za/hotspots/Hotspot.htm">IS AlwaysOn Hotspots</a>.<br /></p> 
<p>All in all, apart from the expected teething problems, I'm expecting an awesome day of security geekery. If that interests you, then details are available at <a href="http://zacon.org.za/">the site</a>. Please remember to RSVP to rsvp-@-zacon-org-za if you'll be attending. If you can't make it, follow the <a href="http://twitter.com/zacon09">zacon09</a> twitter feed (or <a href="http://search.twitter.com/search?q=%23zacon">#zacon</a> hashtag) for coverage and I'll see if I can get a liveblog or two in. We're hoping to publish full Defcon-style video of each talk too.<br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://singe.za.net/blog/archives/987-SuperGenPass.html" rel="alternate" title="SuperGenPass" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2009-11-17T18:20:33Z</published>
        <updated>2009-11-18T11:52:51Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=987</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=987</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://singe.za.net/blog/archives/987-guid.html</id>
        <title type="html">SuperGenPass</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                As someone who uses a lot of web apps, I run into the problem of trying to remember multiple passwords. Most people resolve this by just using the same password across all the sites. However, as <a href="http://www.techcrunch.com/2009/07/19/the-anatomy-of-the-twitter-attack/" title="The Anatomy of the Twitter Attack">numerous</a>, <a href="http://blogs.zdnet.com/security/?p=4538" title="Hotmail Breach Exposes Passwords">examples</a>, <a href="http://www.telegraph.co.uk/technology/news/6125081/Security-risk-as-people-use-same-password-on-all-websites.html" title="Security Risk as People use Same Password on All Websites">have</a>, <a href="http://www.theregister.co.uk/2009/03/04/spotify_breach/" title="Spotify Breach Exposes other Accounts">demonstrated</a>, that's not a good idea. The knee-jerk counter is to use a different password (or groups of passwords) across the sites, but that becomes difficult to remember. If you want the quick solution I'm proposing then check out <a title="SuperGenPass" href="http://supergenpass.com/">SuperGenPass</a> (or <a title="Singe's SuperGenPass" href="http://singe.za.net/sgp/">my customised version</a>). The security geek details follow after the jump.<br /> <p>Some of my colleagues use password databases such as <a href="http://www.keepassx.org/" title="KeePassX">KeyPassX</a>, or the browser's &quot;remember password&quot; feature. These solutions are significantly better than using the same password across all sites, but suffer from a few problems:</p> 
<ul> 
<li>You have all your passwords written down somewhere - at some point you may not be the only one looking at this list<br /></li> 
<li>That list isn't always protected - e.g. using Firefox's &quot;remember password&quot; feature without a master password could expose your password on physical theft of the device</li> 
<li>Portability - if you aren't at your machine you can't log in. KeePassX is quite portable, but then ends up making more copies of the password list.<br /></li> 
</ul> 
<p>None of these are killers, but they aren't ideal. This is where <a href="http://supergenpass.com/" title="SuperGenPass">SuperGenPass</a> comes in. SuperGenPass hashes a password with the domain to make a unique password per-site, meaning that a compromise or malicious admin on one site won't give them the password for another site. The main advantage is that there's no database or list of passwords lying around that could be compromised and you only need remember one password. If you wear lots of tinfoil like me, you can remember groups of passwords e.g. critical, important, arb sites. It's ridiculously portable with a <a href="http://supergenpass.com/#Start" title="Bookmarklets">bookmarklet</a> (don't use this, see below), <a href="data:text/html;charset=utf-8;base64,PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQvc3RyaWN0LmR0ZCI%2BDQo8aHRtbCBsYW5nPSJlbiI%2BDQoNCgk8aGVhZD4NCg0KCQk8bWV0YSBodHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD11dGYtOCI%2BDQoJCTxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD0zMjAiPg0KCQk8bGluayByZWw9ImFsdGVybmF0aXZlIiBsYW5nPSJmciIgaHJlZmxhbmc9ImZyIiB0aXRsZT0iRW4gZnJhbsOnYWlzIiBocmVmPSJpbmRleC5mciI%2BDQoJCTxsaW5rIHJlb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CdvcmcuYm0nLCduZXQuYm0nLCdhZG0uYnInLCdhZHYuYnInLCdhZ3IuYnInLCdhbS5icicsJ2FycS5icicsJ2FydC5icicsJ2F0by5icicsJ2Jpby5icicsJ2JtZC5icicsJ2NpbS5icicsJ2NuZy5icicsJ2NudC5icicsJ2NvbS5icicsJ2Nvb3AuYnInLCdlY24uYnInLCdlZHUuYnInLCdlbmcuYnInLCdlc3AuYnInLCdldGMuYnInLCdldGkuYnInLCdmYXIuYnInLCdmbS5icicsJ2ZuZC5icicsJ2ZvdC5icicsJ2ZzdC5icicsJ2cxMi5icicsJ2dnZi5icicsJ2dvdi5icicsJ2ltYi5icicsJ2luZC5icicsJ2luZi5icicsJ2pvci5icicsJ2xlbC5icicsJ21hdC5icicsJ21lZC5icicsJ21pbC5icicsJ211cy5icicsJ25ldC5icicsJ25vbS5icicsJ25vdC5icicsJ250ci5icicsJ29kby5icicsJ29yZy5icicsJ3BwZy5icicsJ3Byby5icicsJ3BzYy5icicsJ3BzaS5icicsJ3FzbC5icicsJ3JlYy5icicsJ3NsZy5icicsJ3Nydi5icicsJ3RtcC5icicsJ3RyZC5icicsJ3R1ci5icicsJ3R2LmJyJywndmV0LmJyJywnemxnLmJyJywnY29tLmJzJywnbmV0LmJzJywnb3JnLmJzJywnYWIuY2EnLCdiYy5jYScsJ21iLmNhJywnbmIuY2EnLCduZi5jYScsJ25sLmNhJywnbnMuY2EnLCdudC5jYScsJ251LmNhJywnb24uY2EnLCdwZS5jYScsJ3FjLmNhJywnc2suY2EnLCd5ay5jYScsJ2djLmNhJywnY28uY2snLCduZXQuY2snLCdvcmcuY2snLCdlZHUuY2snLCdnb3YuY2snLCdjb20uY24nLCdlZHUuY24nLCdnb3YuY24nLCduZXQuY24nLCdvcmcuY24nLCdhYy5jbicsJ2FoLmNuJywnYmouY24nLCdjcS5jbicsJ2dkLmNuJywnZ3MuY24nLCdneC5jbicsJ2d6LmNuJywnaGIuY24nLCdoZS5jbicsJ2hpLmNuJywnaGsuY24nLCdobC5jbicsJ2huLmNuJywnamwuY24nLCdqcy5jbicsJ2xuLmNuJywnbW8uY24nLCdubS5jbicsJ254LmNuJywncWguY24nLCdzYy5jbicsJ3NuLmNuJywnc2guY24nLCdzeC5jbicsJ3RqLmNuJywndHcuY24nLCd4ai5jbicsJ3h6LmNuJywneW4uY24nLCd6ai5jbicsJ2FydHMuY28nLCdjb20uY28nLCdlZHUuY28nLCdmaXJtLmNvJywnZ292LmNvJywnaW5mby5jbycsJ2ludC5jbycsJ25vbS5jbycsJ21pbC5jbycsJ29yZy5jbycsJ3JlYy5jbycsJ3N0b3JlLmNvJywnd2ViLmNvJywnYWMuY3InLCdjby5jcicsJ2VkLmNyJywnZmkuY3InLCdnby5jcicsJ29yLmNyJywnc2EuY3InLCdjb20uY3UnLCduZXQuY3UnLCdvcmcuY3UnLCdhYy5jeScsJ2NvbS5jeScsJ2dvdi5jeScsJ25ldC5jeScsJ29yZy5jeScsJ2NvLmRrJywnYXJ0LmRvJywnY29tLmRvJywnZWR1LmRvJywnZ292LmRvJywnZ29iLmRvJywnb3JnLmRvJywnbWlsLmRvJywnbmV0LmRvJywnc2xkLmRvJywnd2ViLmRvJywnY29tLmR6Jywnb3JnLmR6JywnbmV0LmR6JywnZ292LmR6JywnZWR1LmR6JywnYXNzLmR6JywncG9sLmR6JywnYXJ0LmR6JywnY29tLmVjJywnazEyLmVjJywnZWR1LmVjJywnZmluLmVjJywnbWVkLmVjJywnZ292LmVjJywnbWlsLmVjJywnb3JnLmVjJywnbmV0LmVjJywnY29tLmVlJywncHJpLmVlJywnZmllLmVlJywnb3JnLmVlJywnbWVkLmVlJywnY29tLmVnJywnZWR1LmVnJywnZXVuLmVnJywnZ292LmVnJywnbmV0LmVnJywnb3JnLmVnJywnc2NpLmVnJywnY29tLmVyJywnbmV0LmVyJywnb3JnLmVyJywnZWR1LmVyJywnbWlsLmVyJywnZ292LmVyJywnaW5kLmVyJywnY29tLmVzJywnb3JnLmVzJywnZ29iLmVzJyw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CduZXQudHInLCdvcmcudHInLCdlZHUudHInLCdnb3YudHInLCdtaWwudHInLCdiYnMudHInLCdrMTIudHInLCdnZW4udHInLCdjby50dCcsJ2NvbS50dCcsJ29yZy50dCcsJ25ldC50dCcsJ2Jpei50dCcsJ2luZm8udHQnLCdwcm8udHQnLCdpbnQudHQnLCdjb29wLnR0Jywnam9icy50dCcsJ21vYmkudHQnLCd0cmF2ZWwudHQnLCdtdXNldW0udHQnLCdhZXJvLnR0JywnbmFtZS50dCcsJ2dvdi50dCcsJ2VkdS50dCcsJ25pYy50dCcsJ3VzLnR0JywndWsudHQnLCdjYS50dCcsJ2V1LnR0JywnZXMudHQnLCdmci50dCcsJ2l0LnR0Jywnc2UudHQnLCdkay50dCcsJ2JlLnR0JywnZGUudHQnLCdhdC50dCcsJ2F1LnR0JywnY28udHYnLCdjb20udHcnLCduZXQudHcnLCdvcmcudHcnLCdlZHUudHcnLCdpZHYudHcnLCdnb3YudHcnLCdjb20udWEnLCduZXQudWEnLCdvcmcudWEnLCdlZHUudWEnLCdnb3YudWEnLCdhYy51ZycsJ2NvLnVnJywnb3IudWcnLCdnby51ZycsJ2NvLnVrJywnbWUudWsnLCdvcmcudWsnLCdlZHUudWsnLCdsdGQudWsnLCdwbGMudWsnLCduZXQudWsnLCdzY2gudWsnLCduaWMudWsnLCdhYy51aycsJ2dvdi51aycsJ25ocy51aycsJ3BvbGljZS51aycsJ21vZC51aycsJ2RuaS51cycsJ2ZlZC51cycsJ2NvbS51eScsJ2VkdS51eScsJ25ldC51eScsJ29yZy51eScsJ2d1Yi51eScsJ21pbC51eScsJ2NvbS52ZScsJ25ldC52ZScsJ29yZy52ZScsJ2NvLnZlJywnZWR1LnZlJywnZ292LnZlJywnbWlsLnZlJywnYXJ0cy52ZScsJ2JpYi52ZScsJ2Zpcm0udmUnLCdpbmZvLnZlJywnaW50LnZlJywnbm9tLnZlJywncmVjLnZlJywnc3RvcmUudmUnLCd0ZWMudmUnLCd3ZWIudmUnLCdjby52aScsJ25ldC52aScsJ29yZy52aScsJ2NvbS52bicsJ2Jpei52bicsJ2VkdS52bicsJ2dvdi52bicsJ25ldC52bicsJ29yZy52bicsJ2ludC52bicsJ2FjLnZuJywncHJvLnZuJywnaW5mby52bicsJ2hlYWx0aC52bicsJ25hbWUudm4nLCdjb20udnUnLCdlZHUudnUnLCduZXQudnUnLCdvcmcudnUnLCdkZS52dScsJ2NoLnZ1JywnZnIudnUnLCdjb20ud3MnLCduZXQud3MnLCdvcmcud3MnLCdnb3Yud3MnLCdlZHUud3MnLCdhYy55dScsJ2NvLnl1JywnZWR1Lnl1Jywnb3JnLnl1JywnY29tLnllJywnbmV0LnllJywnb3JnLnllJywnZ292LnllJywnZWR1LnllJywnbWlsLnllJywnYWMuemEnLCdhbHQuemEnLCdib3Vyc2UuemEnLCdjaXR5LnphJywnY28uemEnLCdlZHUuemEnLCdnb3YuemEnLCdsYXcuemEnLCdtaWwuemEnLCduZXQuemEnLCduZ28uemEnLCdub20uemEnLCdvcmcuemEnLCdzY2hvb2wuemEnLCd0bS56YScsJ3dlYi56YScsJ2NvLnp3JywnYWMuencnLCdvcmcuencnLCdnb3YuencnLCdldS5vcmcnLCdhdS5jb20nLCdici5jb20nLCdjbi5jb20nLCdkZS5jb20nLCdkZS5uZXQnLCdldS5jb20nLCdnYi5jb20nLCdnYi5uZXQnLCdodS5jb20nLCduby5jb20nLCdxYy5jb20nLCdydS5jb20nLCdzYS5jb20nLCdzZS5jb20nLCd1ay5jb20nLCd1ay5uZXQnLCd1cy5jb20nLCd1eS5jb20nLCd6YS5jb20nLCdkay5vcmcnLCd0ZWwubm8nLCdmYXgubnInLCdtb2IubnInLCdtb2JpbC5ucicsJ21vYmlsZS5ucicsJ3RlbC5ucicsJ3RsZi5ucicsJ2UxNjQuYXJwYSddOw0KCQkJCQlmb3IodmFyIGk9MDsgaTxUTERMaXN0Lmxlbmd0aDsgaSsrKSB7DQoJCQkJCQlpZihVUkk9PVRMRExpc3RbaV0pIHsNCg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3N3ZCcpLnZhbHVlPScnOyI%2BIDxsYWJlbCBpZD0iU21hbGwiIGZvcj0iRGlzYWJsZVRMRCI%2BRGlzYWJsZSBzdWJkb21haW4gcmVtb3ZhbDwvbGFiZWw%2BDQoJCQkJPC9wPg0KDQoJCQkJPGg0PjxsYWJlbCBmb3I9IkxlbiI%2BUGFzc3dvcmQgbGVuZ3RoPC9sYWJlbD48L2g0Pg0KCQkJCTxwPjxpbnB1dCBpZD0iTGVuIiBuYW1lPSJMZW4iIHR5cGU9InRleHQiIHNpemU9IjIiIHZhbHVlPSIxMCIgb25jaGFuZ2U9ImRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdHZW5QYXNzd2QnKS52YWx1ZT0nJzsiPiBjaGFyYWN0ZXJzPC9wPg0KDQoJCQkJPHA%2BPGlucHV0IHR5cGU9InN1Ym1pdCIgdmFsdWU9IkdlbmVyYXRlIj48L3A%2BDQoNCgkJCQk8aDQ%2BPGxhYmVsIGZvcj0iR2VuUGFzc3dkIj5Zb3VyIGdlbmVyYXRlZCBwYXNzd29yZDwvbGFiZWw%2BPC9oND4NCgkJCQk8cD48aW5wdXQgaWQ9IkdlblBhc3N3ZCIgbmFtZT0iR2VuUGFzc3dkIiB0eXBlPSJ0ZXh0Ij48L3A%2BDQoNCgkJCTwvZm9ybT4NCg0KCQk8L2Rpdj4NCg0KDQoJPC9ib2R5Pg0KDQo8L2h0bWw%2B">data URI</a>, <a href="http://supergenpass.com/mobile/">straight JavaScript</a>, <a href="http://michael.gorven.za.net/files/supergenpass.py">Python</a> (<a href="https://code.launchpad.net/%7Emgiuca/pysgp/">alternative</a>) and <a href="http://mene.za.net/passgen/">J2MEE</a> implementations.</p> 
<p>There are a few potential problems that need to be considered (they all have solutions) however:</p> 
<ul> 
<li>The bookmarklet runs in the same context as the website you're logging into. This means javascript on the site (or POST'ed/GET'ed information) has access to it. This allows a malicious or hacked site to get hold of your master password. There's a better explanation <a title="SuperGenPass is not that Secure" href="http://akibjorklund.com/2009/supergenpass-is-not-that-secure">here</a>, and I put up a demo <a title="SuperGenPass Bookmarlet Master Password Leak" href="http://singe.za.net/exploit/sgp.html">here</a>. So DO NO USE THE BOOKMARKLET. Any of the other versions are good enough, but are vulnerable to shoulder surfing (something the bookmarklet is not vulnerable to).<br /></li> 
<li>The algorithm doesn't include za.net and za.org as top level domains. This means that all your passwords for the approximately 30k domains hosted under these could have the same password. As it is unlikely that the majority of internet users use more than one web-app in these domains, this isn't a huge risk. Although, it does technically make finding the correct MD5 collision slightly easier. When I notified the developers of the bug, the response was that a change in the algorithm would affect users with existing passwords on these sites and hence they would not change it. So I made my <a title="Singe's SuperGenPass" href="http://singe.za.net/sgp/">own</a>, more on that later.</li> 
<li>The default password length is 10. That's fine, but given research <a title="Password Cracking in the Cloud" href="http://news.electricalchemy.net/2009/10/password-cracking-in-cloud-part-5.html">like this</a>, and that setting the default to 12 costs the user nothing and potentially buys them $7,700,102,463 extra protection per password, that sounds like a good deal.</li> 
<li>MD5 - this isn't a problem. The knee jerk I hear from some security people is that is uses MD5 and <a title="MD5 Considered Harmful" href="http://www.win.tue.nl/hashclash/rogue-ca/">that's broken</a>. However, the vulnerability in MD5 allows other values to be found that hash to the same value (a collision). This does not let you work out the reverse i.e. the original value (master password in this case) from a single hash however. So we're safe here (I think, crypto nerds got any comments?)</li> 
</ul> 
<p>In light of the above, I've made my own customised version of sgp. It includes customised versions of all but the J2MEE version (which is partially customised by it's author to include za.net/org already). My recommendation is to use the Data URI as a bookmark loaded in your sidebar (in Firefox). While it is slightly slower logging in to one site because you will need to type the domain, it is faster when logging in to many because you can just change the domain without re-entering your master password. It is vulnerable to shoulder surfing however.</p> 
<p>In summary. SuperGenPass provides a convenient way to use different passwords across different sites. There are some potential problems and improvements, to which I recommend using <a title="singe's SuperGenPass" href="/sgp/">my customised version</a>, with the preferred method being the Data URI as a Bookmark loaded in your sidebar.</p> 
<p>Thanks to <a title="Russell Cloran" href="http://russell.rucus.net/">Russell</a> for pointing SGP out in the first place, and <a title="Michael Gorven" href="http://michael.gorven.za.net/">Michael</a> for the Python and J2MEE version and the changes.<br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://singe.za.net/blog/archives/986-Evil-Thug-goes-after-Full-Disk-Encryption.html" rel="alternate" title="&quot;Evil Thug&quot; goes after Full-Disk Encryption" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2009-10-19T20:35:32Z</published>
        <updated>2009-10-24T14:15:33Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=986</wfw:comment>
    
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=986</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://singe.za.net/blog/archives/986-guid.html</id>
        <title type="html">&quot;Evil Thug&quot; goes after Full-Disk Encryption</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Boy do I have news for you security people out there; I have a 100% reliable way of breaking all encryption! I call it the &quot;Evil Thug&quot; attack. I provide this service for a small fee. The entry level service will get me or an employee for a hour, this is all it will take to break any encryption in the world (and no we don't <a title="Wikipedia Swordfish (film)" href="http://en.wikipedia.org/wiki/Swordfish_(film)#Plot">need a prostitute, even for 2048bit RSA encryption</a>). <p>The basic methodology is to approach the encrypted device... and punch the owner in the face until they decrypt the device. The premium service will have this punch-up upgraded to a <a title="Wikipedia Rubber Hose Cryptanalysis" href="http://en.wikipedia.org/wiki/Rubber-hose_cryptanalysis">rubber hosing</a>, and the platinum version will get you <a title="XKCD Crypto Nerds" href="http://xkcd.com/538/">some drugs and a $5 wrench</a>. Unlike our competitors, you won't need to involve a <a title="Evil Made goes after TrueCrypt" href="http://theinvisiblethings.blogspot.com/2009/10/evil-maid-goes-after-truecrypt.html">notoriously unreliable Latino third-party stereotype</a>.</p> 
<p>Okay, jokes aside. Joanna Rutkowska, who has done some <a href="http://bluepillproject.org/">hardcore stuff in the past</a>, has done a write-up and released a tool showing how easily the passphrase for a full-disk encryption product can be retrieved by an example person who has access to your physical laptop, even if powered off and without requiring the complexity of <a title="Lank Clever" href="http://citp.princeton.edu/memory/">coldboot attacks</a>. While she acknowledges that &quot;the concept behind the Evil Maid Attack is neither new, nor l33t in any way&quot; the <a href="http://search.twitter.com/search?q=%22Evil+Maid%22">amount of non-critical coverage it has gotten</a> has irked me.<br /></p> 
<p>Her scenario involves someone who not only has access to your laptop without you being around, but has repeat access to your living space, and if they choose, *you*. Of the one squillion options available to a thief at this point, some complicated boot-loader jiggery pokery (not to mention extensions to support other full disk encryption software, AV evasion and the inevitable arms-race/maintenance overhead these things turn into) seems far less viable than beating it out of the victim, or even poisoning their toothpaste and only giving them the antidote once decryption has occurred.<br /></p> 
<p>Arguably, actually beating someone exposes you to all sorts of potential law enforcement nastiness, like getting ID'ed in a perp walk. However, if you are going to train an army of maids, *and* have them chain gang laptops out of hotels, you can still get ID'ed by a maid, and you're setting up a fairly big bread trail to your operation by involving that many people, and stealing that much stuff. In short; No, this does not provide you some magic-anti-police ability to scale the theft and is less violent but no more effective than our platinum wrench service.<br /></p> 
<p>In future, please don't look to encryption to stop bullets, or pretend that when it doesn't something interesting has happened.<br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://singe.za.net/blog/archives/985-When-AntiVirus-was-the-Virus.html" rel="alternate" title="When AntiVirus was the Virus" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2009-10-19T10:38:48Z</published>
        <updated>2009-10-19T22:07:22Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=985</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=985</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://singe.za.net/blog/archives/985-guid.html</id>
        <title type="html">When AntiVirus was the Virus</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
This weekend was rather eventful, and we learned a valuable lesson about viruses, security software, and professional scepticism in IT environments. I've briefly documented it below so you can learn from our mistakes.</p> 
<p>Last week Wednesday a virus was detected on a client's network. The anti-virus (AV) host intrusion prevention system (HIPS) was updated to block access to the URLs the virus was using to fetch its payload and other control instruction.. However, the domain lookups[1] to these URLs increased massively by Friday, so much so, they caused the internal firewalls to fail due to the load from trying to inspect this traffic. Domain lookups were then blocked at the firewall, but the source of the lookups persisted. However, network access was restored and outwardly there was nothing wrong.
</p> <p>
We now needed a sample of the virus. Without it we could not get a signature from our AV vendor and get it removed from the whole environment. We also needed to know what it did so we could advise on appropriate remediation (e.g. changing facebook passwords). We tried all sorts of things. We isolated one machine and tried to work out what would make the lookups stop (our test for the existence of the virus). We replaced the local domain cache with static links (in hosts and lmhosts files) to try and make the lookups not traverse the network (and hence not cause outages in future), while we tried looking for the virus. We ran multiple tools and scoured 'infected' hard drives looking for the virus. We even dumped running programs from RAM fearing the virus had injected itself into a legitimate windows process. We killed processes until bluescreen or reboot, everything we could think of to try and find a failure criteria that would identify a sample. Meanwhile, our AV vendor's highest level escalation analysts were connecting in to our machines, we were uploading hundreds of potentially infected files to them, and a hard drive had been priority couriered to them. This continued 24 hours a day during the weekend with IT personnel working 24hr shifts until breaking point. <br /></p> 
<p>Eventually, on Sunday it was discovered that there was no virus (or not as widespread as we believed) and that our AV's HIPS had in fact been causing the domain lookup flood. By assigning the HIPS to block traffic to the viruses' domain, the HIPS would perform a domain lookup to find where the domain current resides and block that. However, instead of caching the lookup's result, our AV would regularly re-lookup the domain. This is likely because of 'fast flux'[2] malware domains which bounce their actual location all over the internet. The unintended consequence however, was a DNS flood. Even then, DNS should not be large enough to cause significant network latency, and it was this in conjunction with the firewalls attempting to inspect and apply policy to this traffic that caused the failure. What's more, is that the domain lookups should have gone to local DNS resolvers and not the internal top-level DNS (which is behind the firewalls), but were bypassing their local cache due to advised against misconfigurations.</p> 
<p>In summary, our own security software caused an unintended consequence, that behaved much like a highly complex virus. In future, I would recommend that at least two solid points of evidence for the existence of a virus be discovered before a sample is attempted to be recovered (usually an infection vector and behaviour, if you see behaviour after infection but not before, then you have something). While, on the surface, I feel quite stupid, in reality not even the top level analysts at our AV spotted the behaviour of their own software. The truth is that IT environments are sufficiently complex, that these sorts of mistakes are more likely than not. As security people, our job is to know this, and make sure we can guide people to get enough evidence to know what is happening before they waste an entire weekend. This is why I want all of you to learn from our mistake :)</p> 
<p>[1] The internet works on IP addresses, these are four sets of numbers. However, they are not very human readable, so the domain name system (DNS) was created to allow human readable names e.g. www.google.com which a domain lookup would translate to something like 209.85.227.103</p> 
<p>[2] Virus writers have worked out that if they rely on one domain then it is fairly easy to get them shut down. So they usually make their viruses query a couple to several thousand domains, and make those domains regularly change the IP address returned (see [1]) providing two layers of rapidly changing complexity, thus making them that much harder to stop.
</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://singe.za.net/blog/archives/983-Twilter-Filtering-Twitter-for-higer-Signal.html" rel="alternate" title="Twilter - Filtering Twitter for higer Signal" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2009-07-17T10:36:06Z</published>
        <updated>2009-07-20T13:58:16Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=983</wfw:comment>
    
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=983</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/5-Geek" label="Geek" term="Geek" />
    
        <id>http://singe.za.net/blog/archives/983-guid.html</id>
        <title type="html">Twilter - Filtering Twitter for higer Signal</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I really love twitter, and use it more than I should. The only problem is, like most conversation, the signal to noise ratio isn't wonderful. However, unlike most conversation, this is digitial and &quot;we can make it better&quot;. This is where my idea for &quot;twilter&quot; came from. It's just an idea, as I don't have the time or skill to implement it, but I'm hoping this forms a functional spec of sorts for someone who does. <p>Basically, there are some people I follow because they talk about a topic I am interested in, however, I'm usually not to interested in their personal lives. Likewise, there are many people I follow where I am interested in their personal lives. And I am never interested in tweets about what people had for lunch or their <a title="The crap people tweet about" href="http://search.twitter.com/search?q=haircut">haircut</a>. Ideally, people would just self-enforce, but it's really hard to do.</p> 
<p>Because people are rarely consistent, or could have very interesting stuff between bouts of 40 blow-by-blow cricket updates, just following or not isn't granular enough to make sure the signal stays high. I tried creating a signal group, but it was still too noisy, and I missed some of the interesting stuff from some people.</p> 
<p> This is where twilter came from. At the simplest level, twilter would filter tweets and only show you tweets about things you have explicitly asked for or explicitly not asked for. For example, anything with the words &quot;haircut&quot; in I would not like to see, ever. These filters could be grouped into blocks of concepts. For example, there could be a &quot;soccer&quot; filter which would look for words or phrases like: &quot;soccer&quot;, &quot;football&quot;, &quot;Manchester United&quot;, &quot;Bafana Bafana&quot; etc. This filter could even be a sub-filter of a greater &quot;sport&quot; filter. Creating these filters would require a bit of work. For example, I've recently been working on determining sentiment from tweets, and words like &quot;interesting&quot; are over-used and can be misleading, whereas words like &quot;awesome&quot; almost certainly imply a positive attitude. At a later stage, or if the right people get involved up front, <a href="http://scholar.google.co.za/scholar?q=natural+language+processing&amp;hl=en&amp;btnG=Search" title="Google Scholar: NLP">natural language processing</a> could be used to do this better. There could even be a crowd-sourcing options with 'community' filters or an option to share your filters with others so easy the development burden.<br /></p> 
<p>These filter groups could then be applied as a blacklist or whitelist to your whole twitter feed, or more interestingly, individual people. Thus, if I use the examples above, if I follow someone because I'm interested in what they have to say about security only, I would apply an &quot;information security&quot; filter in whitelist mode (i.e. only show me those tweets); whereas if I follow someone I'm more generally interested in but who talks about sport and their haircut quite often, I could apply the &quot;sport&quot; and &quot;minutiae&quot; filters in &quot;blacklist&quot; mode (i.e. show me everything except those).</p> 
<p>This brings me to the second part of twilter, the feedback mechanism. I can complain about how uninteresting someone's haircut tweets are, but they'll just look at their follower count and keep doing what they're doing. As twitter is a fairly self-involved activity (follower counts, quitter and all those other services), I would want a feedback mechanism where someone could look up their twitter user on twilter and see what tweets were being filtered and why. Hopefully, this would provide an incentive for people to keep themselves interesting. It will of course allow people to tune things to beat the filters, but if they're that desperate to talk about something many people are filtering, you can just unfollow them ;) <br /></p> 
<p>That's the idea. Now who's going to build it?<br /></p> 
<p><br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://singe.za.net/blog/archives/982-Monitoring-your-LaptopDesktop-Processes-Reduces-Frustration.html" rel="alternate" title="Monitoring your Laptop/Desktop Processes Reduces Frustration" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2009-06-28T04:10:01Z</published>
        <updated>2009-06-28T04:10:01Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=982</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=982</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/5-Geek" label="Geek" term="Geek" />
    
        <id>http://singe.za.net/blog/archives/982-guid.html</id>
        <title type="html">Monitoring your Laptop/Desktop Processes Reduces Frustration</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Using a computer can be frustrating; you click on something and it doesn't complete as fast as it usually does, and you don't know why. Advanced users tend to look at their CPU usage, to provide some form of explanation. &quot;Oh look, my CPU is really busy, that's why stuff is slow.&quot; This is often turned into a widget/gadget/<a title="Linux Desktop Widgets" href="http://screenlets.org/">screenlet</a> that sits on their desktop blinking the current CPU usage.<br /> <p>More advanced users like to know what is nailing their CPU, and have some form of hotkey of screen widget nearby to tell them. But sometimes it takes too much effort for the computer to show you this application while it's thrashing away and I've been looking for a nice unobtrusive on-screen &quot;gadget&quot; that gives me all the information I need. After going through hundreds of windows sidebar gadgets, Mac widgets and now Gnome screenlets, I've hit on a winning strategy (for Linux, but the concept remains the same).</p> 
<p>I'm using a semi-transparent Output screenlet to display the contents of the following command:</p> 
<blockquote> 
<p><font face="courier new,courier,monospace">top -b -n1 -s -i | head -n9 | tail -n3 | grep -v &quot; top &quot; | cut -b1-16,42-50,61-80</font><br /></p> 
</blockquote> 
<p>People often forget that disk IO is also an important indicator.
Sometimes your CPU usage is moderate but your computer is frozen while
your disk thrashes away. So I have a second screenlet with the output of:</p> 
<blockquote> 
<p><font face="courier new,courier,monospace">iotop -n1 -b -o | grep -v &quot;Total DISK READ:&quot; | cut -b1-38,55-80</font> <br /></p> 
</blockquote> 
<p>What does this buy me? Well, with a quick glance I can find out what process is currently killing my CPU or disk. It also includes the PID for quick &quot;kill&quot; or &quot;renice&quot; access (transparent terminals make reading the PID easy). Additionally, in a few weeks, it has given me a far greater understanding of how applications on my computer work and interact with others. For example, Crossover Office (aka wine) makes Xorg flatline a CPU core when it starts a new wineserver (I blame compiz funkiness). I don't actually care about that, what I do care about is I now know how and when to expect delays when starting crossover apps. The end result of this overcomplicated explanation is that the frustration of using a computer has significantly decreased now that I know what to expect.</p> 
<p>Also, when I invariable break something, these strings will be here for me to copy paste back into existence.<br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://singe.za.net/blog/archives/981-What-a-Wedding!.html" rel="alternate" title="What a Wedding!" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2009-05-04T14:35:31Z</published>
        <updated>2009-05-05T08:49:41Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=981</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=981</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/3-Play" label="Play" term="Play" />
    
        <id>http://singe.za.net/blog/archives/981-guid.html</id>
        <title type="html">What a Wedding!</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p><img width="300" height="199" class="alignright size-medium wp-image-99" title="dd_3366" src="http://white.za.org/wp-content/uploads/2009/05/dd_3366-300x199.jpg" alt="dd_3366" style="float: right;" />We loved every moment, if only there was more time. Some photos are up courtesy of our photographers. Our <a href="http://blog.jdphotography.co.za/?p=444">informal engagement shoot</a>, and <a href="http://blog.jdphotography.co.za/?p=447">photos from the wedding</a>.</p> 
<p>In the meantime, we're off on honeymoon!<br /></p>  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://singe.za.net/blog/archives/980-Im-getting-married!.html" rel="alternate" title="I'm getting married!" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2009-05-01T19:57:12Z</published>
        <updated>2009-05-01T19:57:12Z</updated>
        <wfw:comment>http://singe.za.net/blog/wfwcomment.php?cid=980</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=980</wfw:commentRss>
    
            <category scheme="http://singe.za.net/blog/categories/3-Play" label="Play" term="Play" />
    
        <id>http://singe.za.net/blog/archives/980-guid.html</id>
        <title type="html">I'm getting married!</title>
        <content type="xhtml" xml:base="http://singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                In 17 hours. Finally, I can't wait.  
            </div>
        </content>
        
    </entry>

</feed>