<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Adam Caudill]]></title>
  <link href="http://adamcaudill.com/atom.xml" rel="self"/>
  <link href="http://adamcaudill.com/"/>
  <updated>2012-05-19T16:05:16-04:00</updated>
  <id>http://adamcaudill.com/</id>
  <author>
    <name><![CDATA[Adam Caudill]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Slipping Past LastPass]]></title>
    <link href="http://adamcaudill.com/2012/05/19/slipping-past-lastpass/"/>
    <updated>2012-05-19T13:54:00-04:00</updated>
    <id>http://adamcaudill.com/2012/05/19/slipping-past-lastpass</id>
    <content type="html"><![CDATA[<p>I&#8217;m a big fan of <a href="https://lastpass.com/">LastPass</a> - it&#8217;s a great service that has impressed me every step of the way. Though it&#8217;s not perfect, and I&#8217;ve found a small hole that makes it easier for an attacker to get your passwords - if the following are true:</p>

<ol>
<li>The attacker has physical access to your PC.</li>
<li>You&#8217;ve made the mistake of not locking your PC when you walk away.</li>
<li>You&#8217;ve select the option to stay logged on - which happens to be a default, or, you&#8217;ve left your browser open (as I expect most people do).</li>
</ol>


<p><img class="center" src="http://adamcaudill.com/files/lastpass_default_opt.png"></p>

<p>If all three of these are true (or your PC is otherwise compromised) - you probably shouldn&#8217;t expect much in the way of security, but LastPass does protect you - most of the time. If you try to copy or view a password, you&#8217;ll be prompted to enter your Master Password - but there&#8217;s one case that can easily expose your passwords without needing to know the Master Password.</p>

<p>The issue is that LastPass allows you to change the address associated with a login without confirming your master password. This would allow an attacker to update an entry in your vault to a specially crafted page to echo the password - allowing the attacker to see the password and leave minimal tracks behind. I setup a <a href="http://adamcaudill.com/files/EchoLoginForm.html">special page</a> to test this, it echoes the password as soon as LastPass enters it, allowing me to see the password in a few seconds without providing the master password (it&#8217;s also possible to update the password without providing the Master Password, providing another opportunity for mischief).</p>

<p><img class="center" src="http://adamcaudill.com/files/lastpass_edit.png"></p>

<p><strong>Automation</strong></p>

<p>While I&#8217;ve not taken the time to build a tool to automate this - it would be a fairly simple process to do, just a matter of investing the time (which unfortunately I don&#8217;t have). The obvious solution would be to automate the GUI interaction to perform the following steps:</p>

<ul>
<li>Change the URL to a malicious page.</li>
<li>Navigate to the page, and log the login data.</li>
<li>Revert the URL to the original value.</li>
</ul>


<p>Using this method it would be possible to collect all of a users credentials within just a few minutes. It&#8217;s possible there may be a simpler &amp; faster route available by interacting directly with the plug-ins, though in looking at the exports and COM interfaces I didn&#8217;t see an obvious way to achieve this (which as a LastPass user, this makes me happy).</p>

<p>For an attacker, one substantial upside is that there would be little evidence of the event - while the LastPass Vault will show that all entries have been &#8220;touched&#8221; recently, I would venture to say that very few users would actually notice.</p>

<p>While this attack requires full access as the logged-in user, if a PC is otherwise compromised (perhaps as part of an APT type attack), it could allow an attacker to greatly expand their activities with a minimal time investment. This is the type of situation that could take a fairly small local information disclosure and turn it into a real nightmare scenario for a targeted user.</p>

<p><strong>Solution</strong></p>

<p>The simplest solution for this issue is to require Master Password verification if the URL changes, or at least require it if the domain changes. This should be a minor change for them and will eliminate this attack vector. Thankfully this is a minor issue, due to the three requirements required to pull this off - so I don&#8217;t believe there is too much risk due to this oversight.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[MiniPwner]]></title>
    <link href="http://adamcaudill.com/2012/05/13/minipwner/"/>
    <updated>2012-05-13T16:24:00-04:00</updated>
    <id>http://adamcaudill.com/2012/05/13/minipwner</id>
    <content type="html"><![CDATA[<p>I recently finished building my first <a href="http://minipwner.com/">MiniPwner</a> - a tiny <a href="https://openwrt.org/">OpenWrt</a>-based system for pen-testing. At only 2.25 x 2.25 inches, the device plus battery is still extremely small - it easily fits in a pocket, and could be hidden anywhere.</p>

<p>The device is based on the <a href="http://wiki.openwrt.org/toh/tp-link/tl-wr703n">TP-LINK TL-WR703N</a>, which uses a 400Mhz Atheros AR7240 CPU - not exactly a power-house, but enough power for standard pen-testing (or even just as a super-portable linux box). In cases where the 400Mhz CPU and 32MB RAM aren&#8217;t enough, you can easily use OpenVPN as a tunnel to run your tests remotely.</p>

<p>The total investment for the build was only $38 - though next time I&#8217;ll pay a little extra and get the <a href="http://www.amazon.com/gp/product/B005FYNSZA/ref=as_li_ss_tl?ie=UTF8&amp;tag=adamcaucom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B005FYNSZA">16GB drive</a> - mostly for extra room when working with logs. The 4GB drive used in the standard build has plenty of room for the software - but I&#8217;d rather have the extra room to work with.</p>

<p>The build process was process was simple - thankfully the <a href="http://minipwner.com/index.php/minipwner-build">instructions</a> are quite good, though I did have to change a few things to make it all work.</p>

<p>Step 1): To save looking, <a href="http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin">here&#8217;s</a> a direct link to the OpenWrt image.</p>

<p>Step 4): I formated the thumb drive by mounting it in a Ubuntu VM, and used <a href="http://gparted.sourceforge.net/">GParted</a> to delete the existing partition, and created a 512MB swap partition, then the rest is ext4.</p>

<p>Step 16): Read step 17 first so you don&#8217;t feel so stupid for wasting time trying to figure out why step 16 doesn&#8217;t seem to do anything.</p>

<p>Step 21): I use WPA2 on my network, so I had to edit the <code>/etc/config/wireless</code> a little differently:</p>

<pre><code>config wifi-iface
        option device   wlan0
        option network  wan
        option mode     sta
        option ssid     &lt;ssid&gt;
        option encryption psk2+tkip
        option key &lt;password&gt;
</code></pre>

<p>More information about the wireless setup can be found <a href="http://wiki.openwrt.org/doc/uci/wireless">here</a>.</p>

<p>Step 24): My local wireless network is in the 192.168.1.x range, so this wasn&#8217;t working for me. Seeing as changing the wireless doesn&#8217;t make sense for me (way too many static devices), I had to change the IP address of <code>eth0</code> to deal with the issue. I updated my <code>/etc/config/network</code> to look something like this:</p>

<pre><code>config 'interface' 'lan'
        option 'ifname' 'eth0'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'ipaddr' '192.168.2.1'
        option 'netmask' '255.255.255.0'
</code></pre>

<p>Once the change is made, you&#8217;ll need to execute <code>/etc/init.d/network restart</code> - then update your PC&#8217;s static IP address to &#8220;192.168.2.111&#8221; and reconnect your telnet session.</p>

<p>Step 27): When executing the installs I was receiving this error:</p>

<pre><code>opkg_install_cmd: Cannot install package &lt;package-name&gt;
</code></pre>

<p>To correct this error, I had to run <code>opkg update</code> - after this the installs started working fine.</p>

<p>Step 27b): The install for <code>samba2-client</code> was failing, as there isn&#8217;t a package by that name - though <code>samba36-client</code> installed fine.</p>

<p>Overall, it&#8217;s a great little setup - I&#8217;m quite pleased.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Gpg4win & IDEA]]></title>
    <link href="http://adamcaudill.com/2012/05/13/gpg4win-idea/"/>
    <updated>2012-05-13T03:22:00-04:00</updated>
    <id>http://adamcaudill.com/2012/05/13/gpg4win-idea</id>
    <content type="html"><![CDATA[<p>Huge PGP files, an ancient version of PGP, and errors every time they tried to decrypt a file - that was my completely unexpected challenge on Friday. Dealing with file processing issues really isn&#8217;t part of my job description, but I&#8217;m the closest thing my company has to an expert when it comes to encryption, so the task fell to me.</p>

<p>After looking at the options and issues to get the server upgraded to a non-stone-age version of the PGP software, the easiest answer looked like decrypting the files with GPG - it wasn&#8217;t as easy as expected, but I did get some useful information that may help others.</p>

<h3>IDEA</h3>

<p>If it wasn&#8217;t for <a href="http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm">IDEA</a> this would have been easy, but the keys used for this transfer were old (thankfully the data isn&#8217;t sensitive) and IDEA it was. GPG <a href="http://www.gnupg.org/faq/why-not-idea.en.html">doesn&#8217;t support IDEA</a> due to various patents (most if not all of which are now expired), so that leaves us to use a rather old plug-in to fill in the gap. Unfortunately for me, the server that hosts up that plug-in is misconfigured, making it impossible to retrieve the file.</p>

<p>Thankfully there are <a href="http://www.spywarewarrior.com/uiuc/gpg-idea/gpg-idea.htm">other sources</a> (<a href="http://www.spywarewarrior.com/uiuc/gpg-idea/ideadll.zip">plug-in</a>, <a href="http://adamcaudill.com/files/ideadll.zip">mirror</a>).</p>

<h3>Gpg4win</h3>

<p>I used <a href="http://www.gpg4win.org/">Gpg4win</a> so I could decrypt the files from Windows - which had unexpected consequences. The current version of Gpg4win uses gpg version 2.0, which isn&#8217;t compatible with the IDEA plug-in - a fact that isn&#8217;t pointed out anywhere.</p>

<p>The key to making this work was to use an older version of Gpg4win - I used <a href="http://files.gpg4win.org/gpg4win-1.1.4.exe">v1.1.4</a>, which thankfully is compatible with the plug-in. Though I do wish I found this out a few hours sooner than I did.</p>

<h3>Setup</h3>

<p>The setup for this is pretty simple, it&#8217;s documented in a few places, but here is a quick wrap-up:</p>

<ol>
<li>Install <a href="http://files.gpg4win.org/gpg4win-1.1.4.exe">Gpg4win v1.1.4</a></li>
<li>Download the <a href="http://www.spywarewarrior.com/uiuc/gpg-idea/ideadll.zip">plug-in</a>, and copy to <code>C:\Program Files (x86)\GNU\GnuPG\lib</code></li>
<li><p>Update (or create if it’s not there) the <code>C:\Users\&lt;user&gt;\AppData\Roaming\gnupg\gpg.conf</code> file to include the following:</p>

<p> <code>load-extension "C:\Program Files (x86)\GNU\GnuPG\lib\idea.dll"</code></p></li>
</ol>


<p>Once this is done, you can run <code>gpg --version</code> which will give you information about what algorithms are supported. It should look like this:</p>

<pre><code>&gt;gpg --version
gpg (GnuPG) 1.4.9 (Gpg4win 1.1.4)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: C:/Users/Adam/AppData/Roaming/gnupg
Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
</code></pre>

<p>If you note the first item on the &#8220;Cipher&#8221; line is IDEA, that means it worked. If you don&#8217;t see that - something went wrong, probably a bad path.</p>

<p>This version is able to handle the large files that old versions of PGP can&#8217;t, and it allowed for a quick solution to the problem until we can upgrade the server.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Detecting .NET 4.0 Remotely]]></title>
    <link href="http://adamcaudill.com/2012/05/08/detecting-net-4-dot-0-remotely/"/>
    <updated>2012-05-08T03:47:00-04:00</updated>
    <id>http://adamcaudill.com/2012/05/08/detecting-net-4-dot-0-remotely</id>
    <content type="html"><![CDATA[<p>While preparing to deploy an internal application I started to wonder if all of the workstations were properly configured - after a quick search I found a number of methods for detecting the .NET framework locally, but I didn&#8217;t find any clean options that worked remotely.</p>

<p>Thankfully I found a post with a few <a href="http://skatterbrainz.blogspot.com/2011/05/assorted-ways-to-detect-net-40.html">detection methods</a>, one of which was using <a href="https://en.wikipedia.org/wiki/Windows_Management_Instrumentation">WMI</a> from VBScript - which gave me the inspiration I needed:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>strComputer = "."
</span><span class='line'>Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
</span><span class='line'>Set colItems = objWMIService.ExecQuery( _
</span><span class='line'>    "SELECT * FROM Win32_Product WHERE Caption LIKE '%.NET Framework 4%'",,48)
</span><span class='line'>For Each objItem in colItems
</span><span class='line'>    Wscript.Echo "Caption: " & objItem.Caption
</span><span class='line'>Next</span></code></pre></td></tr></table></div></figure>


<p>I pulled up <a href="http://www.linqpad.net/">LINQPad</a> and whipped up a quick script to check for both the Client Profile and full (extended) version on a list of computers. Hopefully it&#8217;ll be of some use others.</p>

<div><script src='https://gist.github.com/2631085.js?file='></script>
<noscript><pre><code>void Main()
{
  //read the list of computrers to hit from computers.txt
  var path = Path.Combine(Environment.GetEnvironmentVariable(&quot;USERPROFILE&quot;), 
    @&quot;Desktop\computers.txt&quot;);
  var computers = File.ReadAllLines(path);
  
  //use a parallel searh as this process is quite slow
  Parallel.ForEach (computers.Where(s =&gt; !string.IsNullOrWhiteSpace(s)), comp =&gt;
  {
    try
    {
      bool extended = false;
      bool client = false;
    
      var search = new ManagementObjectSearcher(string.Format(@&quot;\\{0}\root\cimv2&quot;, comp),
        &quot;SELECT * FROM Win32_Product WHERE &quot; + 
        &quot;Caption = 'Microsoft .NET Framework 4 Client Profile' &quot; +
        &quot;OR Caption = 'Microsoft .NET Framework 4 Extended'&quot;);
    
      foreach (ManagementObject res in search.Get())
      {
        if (res.Properties[&quot;Name&quot;].Value.ToString() == &quot;Microsoft .NET Framework 4 Client Profile&quot;)
          client = true;
      
        if (res.Properties[&quot;Name&quot;].Value.ToString() == &quot;Microsoft .NET Framework 4 Extended&quot;)
          extended = true;
      }
    
      Console.WriteLine(string.Format(&quot;{0}: Client: {1}; Extended: {2}&quot;, comp, client, extended));
    }
    catch (Exception ex)
    {
      Console.WriteLine(string.Format(&quot;{0}: Failed ({1})&quot;, comp, ex.Message));
    }
  });
}</code></pre></noscript></div>


<p>One thing to note, is that you do need Administrator permissions on the remote workstations.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[A month with DuckDuckGo]]></title>
    <link href="http://adamcaudill.com/2012/05/02/a-month-with-duckduckgo/"/>
    <updated>2012-05-02T14:08:00-04:00</updated>
    <id>http://adamcaudill.com/2012/05/02/a-month-with-duckduckgo</id>
    <content type="html"><![CDATA[<p>It wasn&#8217;t long after Google went live that they became my search engine of choice - with the only other (somewhat) viable option being Yahoo, it was an easy choice. In the years since then, I&#8217;ve not questioned that choice, but now that Google is focusing on killing features and building little-used social features, the time seemed right to see if there are better options.</p>

<p>So a month ago I began an experiment, I committed to using <a href="https://duckduckgo.com/">DuckDuckGo</a> for a month - here&#8217;s what I&#8217;ve found.</p>

<p><em>Quality:</em> The quality of the results is at par with Google for the vast majority of queries. On some queries where there are few results, Google tends to rank the results more accurately.</p>

<p><em>Index Size:</em> The Google index seems to be larger, with faster additions than DuckDuckGo, though this was only a real issue for very obscure search terms. For the majority of queries, this isn&#8217;t noticeable.</p>

<p><em>Bang Syntax:</em> DuckDuckGo has a great feature called &#8217;<a href="https://duckduckgo.com/bang.html">!bang</a>&#8217; which allows you to search specific sites easily. Of all the options here are the ones I used most often:</p>

<ul>
<li>!amazon - Search Amazon.com</li>
<li>!g - Google Search</li>
<li>!man Search the *nix man pages</li>
</ul>


<p>The bang syntax works great with the Search/Address bar in Chrome, making this my favorite feature.</p>

<p><em>Speed:</em> DuckDuckGo feels much faster that Google does now (which is sad, as Google used to be amazingly fast, even on extremely slow connections), and the results page is clean and free of useless distractions.</p>

<p><em>Image Search:</em> One that DuckDuckGo is missing compared to Google is a useful image search feature. Though you can easily jump to Google&#8217;s image search by adding &#8220;!i&#8221; to your query.</p>

<p><em>Zero Click Info:</em> For a number of searches, DuckDuckGo displays an answer from an authoritative source, often giving you what you need to know without having to go any further. For me, the most useful of these is data from StackOverflow and Wikipedia.</p>

<p><em>Auto-Complete / Suggestions:</em> This is the single biggest thing I&#8217;ve missed, it seems like a minor feature but I didn&#8217;t realize how useful it was until is wasn&#8217;t available. Hopefully they&#8217;ll add this at some point, would be a real step in the right direction.</p>

<p><strong>Overall:</strong> I&#8217;m impressed. It&#8217;s not perfect, but it&#8217;s far more competitive than I expected. It&#8217;s clean, lean, and <a href="http://donttrack.us/">private</a>. Over the last month I&#8217;ve still used other Google services and products (Chrome, Gmail, Google Voice, Google Authenticator, etc.) so it wasn&#8217;t a complete separation from Google - but enough to remind me that innovation is still happening elsewhere.</p>

<p>As Google has shifted much of its energy from information to social, companies like DuckDuckGo are continuing to innovate and find better ways to provide the information that we live on.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Absolute Deniability]]></title>
    <link href="http://adamcaudill.com/2012/04/29/absolute-deniability/"/>
    <updated>2012-04-29T17:38:00-04:00</updated>
    <id>http://adamcaudill.com/2012/04/29/absolute-deniability</id>
    <content type="html"><![CDATA[<p><a href="http://sebsauvage.net/wiki/doku.php?id=php:zerobin">ZeroBin</a> (<a href="https://github.com/sebsauvage/ZeroBin">code</a>) is a new and interesting piece of software to compete with services such PasteBin - largely in response to PasteBin&#8217;s new aggressiveness in <a href="http://www.bbc.co.uk/news/technology-17544311">removing objectionable posts</a>. For PasteBin, it&#8217;s easy to see why their policy changed - currently they can&#8217;t deny knowledge of what they are hosting, it&#8217;s plain-text and easily scanned (look <a href="http://www.leakedin.com/">at this</a> if you don&#8217;t believe me). ZeroBin on the other hand has taken a very different approach - to not just have <a href="https://en.wikipedia.org/wiki/Plausible_deniability">plausible deniability</a>, but absolute deniability.</p>

<p>The key to this is that ZeroBin stores pastes and discussions encrypted - and the encryption is performed in the browser, with a browser generated key. This means that the people running the ZeroBin software have no knowledge of what they are storing.</p>

<p>So, if they are asked to remove content, all they can do is remove specific named items - it would be impossible to remove all items that contain specific material (where if PasteBin was to be ordered to remove all items containing credit card numbers, it&#8217;s a realistic possibility). As long as knowledge of the key remains limited - the paste will likely live on, no matter the content.</p>

<p>To make it even better, there are no accounts - so there&#8217;s no way to see what a specific user is posting. With a properly configured server, this could be completely anonymous. With no knowledge of the content, no knowledge of users - it&#8217;s the ultimate in deniability.</p>

<p>I really expect that this technique will become far more common in the future. It allows a much higher level of deniability for hosts and service provider, and greatly restricts the ability of investigators to research the activities of a user or group.</p>

<p>Take a closer look at this, I expect you&#8217;ll see more of this.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[HP Folio 13]]></title>
    <link href="http://adamcaudill.com/2012/04/23/hp-folio-13/"/>
    <updated>2012-04-23T00:01:00-04:00</updated>
    <id>http://adamcaudill.com/2012/04/23/hp-folio-13</id>
    <content type="html"><![CDATA[<p>When Intel and various industry partners started talking about &#8220;ultra-books&#8221; as competition against Apple and tablets, I was more than a little skeptical. Ultra-books are small and light weight - but not cheap (average price being around $1,000) and rather underpowered compared to what you can get for the same money with a more traditional laptop (they are basically MacBook Air knock-offs). I had written them off almost as soon as they were announced.</p>

<p>I really expected the ultra-book to be a fad, and a short-lived one at that.</p>

<p>Then came the <a href="http://www.amazon.com/gp/product/B006OEL86Q/ref=as_li_ss_tl?ie=UTF8&amp;tag=adamcaucom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B006OEL86Q">HP Folio 13</a> - my desktop recently failed, and since then I&#8217;ve been using my 2+ year old ASUS G73 as my only machine. While the G73 is great - it&#8217;s also massive, hot, and heavy. After parting with my unused camera gear, I acquired a Folio 13 to act as my main laptop, leaving the G73 to play the role of desktop / development machine.</p>

<p>Within a couple hours of getting the Folio 13 it was clear, I was in love.</p>

<p>It&#8217;s not quite the love I felt when I <a href="http://adamcaudill.com/2011/01/02/thoughts-on-the-ipad-from-an-apple-hater/">first found the iPad</a>, but it&#8217;s an amazing machine. Fast, super-light, and the battery goes on forever - it&#8217;s the ideal laptop. With the power of my G73 available anytime via RDP, I think this combination is about as good as it gets.</p>

<p>Here&#8217;s a rough overview of the Folio:</p>

<ul>
<li>Intel Core i3 / i5**</li>
<li>128GB SSD</li>
<li>4GB RAM</li>
<li>13.3&#8221; 1366x768 display</li>
<li>9 hour battery (so far 7-8 hours seems to be the realistic number)</li>
<li>Brushed aluminum case</li>
<li>3.3lbs</li>
</ul>


<p>Also included are the normal things you would expect, like a web cam, Bluetooth, etc..</p>

<p>I&#8217;ve been extremely impressed with what this little thing can do, from large compiles to generating <a href="https://github.com/mojombo/jekyll">Jekyll</a> sites, it&#8217;s more capable than I expected. So far it&#8217;s handled everything I&#8217;ve thrown at it - and most taking around the same time as my G73 would (and some taking less, thanks to the Folio&#8217;s SSD).</p>

<p>I&#8217;ll be doing most of my writing and non-development work on the Folio, and the G73 will still be my go-to system anytime I need Visual Studio or other heavy-weight development tools (though I&#8217;d be willing to bet, it&#8217;ll be via RDP from the Folio more often than not).</p>

<p>Overall: I&#8217;m extremely pleased. It&#8217;s a great device - it has the battery life and portability of a tablet (i.e. an iPad), with the power and flexibility of a traditional laptop.</p>

<p>** The Core i3 version is less expense, and thanks to the lower power consumption, it also stretches the battery life better than the i5 - making it a win-win.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Moving to Octopress]]></title>
    <link href="http://adamcaudill.com/2012/04/12/moving-to-octopress/"/>
    <updated>2012-04-12T21:15:00-04:00</updated>
    <id>http://adamcaudill.com/2012/04/12/moving-to-octopress</id>
    <content type="html"><![CDATA[<p>As you might be able to tell from looking, something is different around here.  So what&#8217;s changed?</p>

<p><strong>Octopress</strong></p>

<p>I&#8217;ve switched from WordPress to <a href="http://octopress.org/">Octopress</a>, a <a href="https://github.com/mojombo/jekyll">Jekyll</a>-based blogging platform that generates a completely static site. So there&#8217;s no database, no dynamic code (i.e. PHP), minimal memory footprint (which is great, given my <a href="http://adamcaudill.com/2012/04/05/quickpacket-hosting/">recent hosting change</a>) and best of all - it&#8217;s fast and secure. Using Octopress, it greatly reduces the security surface of the server, which means I spend less time worrying about updates and more time writing.</p>

<p>Thanks to the completely static nature of the platform, it&#8217;s extremely fast - it allows the server software to do what it does best: shove bits down the wire, instead of waiting on a database and parsing and executing dynamic code. In the coming days I&#8217;ll be tweaking the server software to optimize for performance, so it should get even faster.</p>

<p>I&#8217;m still trying to figure out the ideal workflow, but so far I think it&#8217;s the right platform for me. Hopefully, I&#8217;ll be able to keep the friction low and spend more time writing.</p>

<p><strong>WordPress</strong></p>

<p>So what about WordPress? I still love the product - in general. It&#8217;s not perfect, and while it&#8217;s easy to get running, it takes effort to make it fast and secure - something most people don&#8217;t do. If you want a full CMS and you&#8217;re willing to do it right, WordPress is a great option.</p>

<p>Personally, there are some frustrations with WordPress that I&#8217;m happy to be rid of - not the least of which is fighting the WordPress editor to maintain code formatting. It&#8217;s little things like this, that has had me looking for better options.</p>

<p>For your average non-developer, something like Octopress has too much friction - as the tag line says, it&#8217;s for hackers. If you aren&#8217;t comfortable with Ruby development, this probably isn&#8217;t the solution for you. If you are, and you want a lightning fast, flexible, and powerful platform - it&#8217;s a great option.</p>

<p><strong>Comments</strong></p>

<p>You may have noticed that there isn&#8217;t a comment form - I&#8217;ve went back to not having comments.</p>

<p>While I do greatly appreciate those that have taken the time to leave a comment, comments make up the vast minority of feedback I receive. Twitter, and Facebook are more common - so instead of slowing the site down and wasting my time fighting spam, I&#8217;ll just turn off the comments.</p>

<p>If you have feedback - question, suggestions, anything else - <a href="http://twitter.com/adamcaudill">find me on twitter</a> for the quickest response.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[QuickPacket Hosting]]></title>
    <link href="http://adamcaudill.com/2012/04/05/quickpacket-hosting/"/>
    <updated>2012-04-05T02:00:21-04:00</updated>
    <id>http://adamcaudill.com/2012/04/05/quickpacket-hosting</id>
    <content type="html"><![CDATA[<p>Continuing my long tradition of frequent host changes, this site has been moved to yet another host. In the last few years I&#8217;ve used a <a href="http://adamcaudill.com/2009/06/13/switching-hosts-again/">number of hosts</a> (and there&#8217;s a couple more not on that list), and this time I&#8217;m taking a bit of a risk - so it&#8217;ll be interesting to see how this one works out. I&#8217;ve switched to a company called <a href="https://www.quickpacket.com/">QuickPacket</a>, but this time instead of a fairly beefy VPS, I&#8217;ve went in the opposite direction - absolute minimum.</p>

<p>The new plan is about as minimal as it gets:</p>

<ul>
<li><p>128 MB RAM</p></li>
<li><p>256 MB vSwap</p></li>
<li><p>1 CPU Cores</p></li>
<li><p>20 GB Disk Space</p></li>
<li><p>500 GB Bandwidth</p></li>
</ul>


<p>The upside to this? It&#8217;s only <a href="http://www.lowendbox.com/blog/quickpacket-4-99m-128mb-xen-in-atlanta-ga-san-jose-ca-openvz-also-available/">$15 per year</a>.</p>

<p>So I&#8217;m going to focus on caching and optimization to keep this and a few other sites running on such lean resources. In theory WordPress should be able to do it, if it can&#8217;t - I&#8217;ll switch to <a href="http://octopress.org/">Octopress</a> or something similar.</p>

<p>This should be a fun challenge.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[My 5 minutes of infamy]]></title>
    <link href="http://adamcaudill.com/2012/03/31/my-5-minutes-of-infamy/"/>
    <updated>2012-03-31T01:19:23-04:00</updated>
    <id>http://adamcaudill.com/2012/03/31/my-5-minutes-of-infamy</id>
    <content type="html"><![CDATA[<p>October 28, 2004 is a day I&#8217;ll remember for the rest of my life.</p>

<p>I was coding away on the next version of a small product called GSuite that I was building for a tiny (and now nonexistent) software company called Imspire Software. It was a simple tool that provided some goodies for Gmail users, and had a few thousand users (it eventually died as a result of rapid API changes and new tools directly from Google). As I took a break to check my email, I saw something that shocked me:</p>

<div><script src='https://gist.github.com/2259106.js?file='></script>
<noscript><pre><code>###############################################
######    Gmail suit decripting password     ##########
###############################################
os:win 2000 sp 4 ie 6.x whith all fixes
vendor url:http://www.imspire.com/gsuite/index.html
impact: disclosure user information decript password

gmail suit is an application that offers different utilities for
contextual gmail and adds menus our explorer for as much being able to
consult as to send post office to gmail from this suit

Gmail suit once installed leaves in the user folder:
(documents and settings\user_name\Application Data\GSuit\) creates a
called file 'settings.xml' if we watched within this file we see
several data:

&lt;configuration&gt;
&lt;User&gt;
  &lt;Email&gt;User_name_login&lt;/Email&gt;
  &lt;Password&gt;ìïéóìáîå&lt;/Password&gt;
&lt;/User&gt;
&lt;/configuration&gt;

1 name of user of the account of gmail
2 password codified

somehow password codified has the same length of characters that
password in flat text introduced by the  user to know like decoding as
simple the one whom serious as to pass character through character to
its 128 to him value ASCII(http://www.bbsinc.com/symbol.html) of
reducing and the turn out to watch in table ASCII and we will have the
correct character of password

example:

ì=(236-128)=108
108 = a

another

á=(225-128)=97
97=a

ìïéóìáîå = loislane

atentamente:

Lostmon (lostmon(at)gmail.com)
</code></pre></noscript></div>


<p>[The full email is still <a href="http://osvdb.org/ref/11/11176-gsuite.txt">posted</a> over at osvdb, and I make a point to go and look at it and the <a href="http://osvdb.org/show/osvdb/11176">details</a> once a year or so - just to remind myself of what can happen.]</p>

<p>As I worked through the somewhat iffy English of the email I was in shock. I instantly understood the issue, I could see the code in my mind. It was written by another developer, and I could remember questioning its security - but I had other things I was supposed to be doing and didn&#8217;t worry about it. What a mistake that was.</p>

<p>I went back to Visual Studio and found the code that caused it all:</p>

<div><script src='https://gist.github.com/2258783.js?file='></script>
<noscript><pre><code>    Public Function Crypt(ByVal strText As String) As String
        Dim strTempChar As String, i As Integer
        For i = 1 To Len(strText)
            If Asc(Mid$(strText, i, 1)) &lt; 128 Then
                strTempChar = _
          CType(Asc(Mid$(strText, i, 1)) + 128, String)
            ElseIf Asc(Mid$(strText, i, 1)) &gt; 128 Then
                strTempChar = _
          CType(Asc(Mid$(strText, i, 1)) - 128, String)
            End If
            Mid$(strText, i, 1) = _
                Chr(CType(strTempChar, Integer))
        Next i
        Return strText
    End Function
</code></pre></noscript></div>


<p>Shifting values is obfuscation and little more, it looks like security - it might even smell like security, but it isn&#8217;t. It&#8217;s a false sense of safety, it was a mistake to implement and even more of a mistake to actually use in a consumer product.</p>

<p>While this is only a local information disclosure, and not something far more serious like a remote arbitrary code execution issue - it was still enough to really shake me. I had always considered myself to be a good developer, and part of that is writing secure code. This was many things - but secure isn&#8217;t one of them.</p>

<p>Thankfully, <a href="http://lostmon.blogspot.com/">Lostmon</a>, the finder of the issue was courteous enough to give me a couple of days advance notice before making it public. Allowing me plenty of time to get a notice up on the web site, and get the next (fixed) version ready for release. I switched from a glorified <a href="http://en.wikipedia.org/wiki/Caesar_cipher">Caesar cipher</a>, to <a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Rijndael</a> - a significant step up I would say.</p>

<p>Was anybody harmed by this issue? I don&#8217;t believe so - it was a relativity minor issue given what was needed to get the password. Was anybody impacted? Most certainly.</p>

<ul>
<li><p>Users: They now wonder if they are secure - did somebody steal their information?</p></li>
<li><p>Company: The brand is weakened, less trusted, and questioned more.</p></li>
<li><p>Developers: Confidence is lost, self doubts start creeping in.</p></li>
</ul>


<p>Because of this, every time I release an application I give much more thought to what I&#8217;m exposing and how it could be leveraged in an attack against my users. The only way I&#8217;ll agree to an application release is if I&#8217;m completely certain that I&#8217;m not risking a user&#8217;s security - if there are any unknowns, any doubts, then it&#8217;s not worth the risk. Just that simple.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[CCSRCH v1.0.7]]></title>
    <link href="http://adamcaudill.com/2012/02/29/ccsrch-v1-0-7/"/>
    <updated>2012-02-29T23:47:17-05:00</updated>
    <id>http://adamcaudill.com/2012/02/29/ccsrch-v1-0-7</id>
    <content type="html"><![CDATA[<p>I&#8217;ve released a new version of <a href="https://github.com/adamcaudill/ccsrch">CCSRCH</a>, the open-source PAN (a.k.a credit card number) search tool to help companies maintain PCI compliance. This is a fairly minor release, primarily focusing on reducing false positives. The scanner has been updated to exclude the following:</p>

<ul>
<li><p>Results made up of the same two digits repeating (i.e. 5454545454545454).</p></li>
<li><p>Results that have seven or more of the same digits repeating (i.e. 5555555555554444).</p></li>
</ul>


<p>I also fixed a bug that I introduced in v1.0.6 that prevented it from compiling on certain *nix systems; while I was in there I also fixed several instances of this building warning on newer Linux distros:</p>

<pre><code>warning: call to __builtin___strncat_chk might overflow destination buffer
 [enabled by default]
</code></pre>

<p>I also took the time to write-up really simple build instructions for *nix users:</p>

<pre><code>$ wget -O ccsrch.tar.gz https://github.com/adamcaudill/ccsrch/tarball/master
$ tar -xvzf ccsrch.tar.gz
$ cd adamcaudill-ccsrch-&lt;rev&gt;/
$ make all
</code></pre>

<p>This will probably be the last release for now unless a bug turns up; to improve results further I&#8217;m working on a new project (<a href="https://github.com/adamcaudill/ccsrch-score">ccsrch-score</a>), hopefully it&#8217;ll be released soon.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[IIN (BIN) Database]]></title>
    <link href="http://adamcaudill.com/2012/01/26/iin-bin-database/"/>
    <updated>2012-01-26T12:58:28-05:00</updated>
    <id>http://adamcaudill.com/2012/01/26/iin-bin-database</id>
    <content type="html"><![CDATA[<p>An <a href="http://en.wikipedia.org/wiki/ISO/IEC_7812">Issuer Identification Number</a> (IIN, more commonly called a BIN) is the first 6 digits of a credit or debit card, and it identifies the bank that issued it - and if you want to know if a number is a real credit card or just a bunch or random digits, it&#8217;s a huge help. While credit card numbers do use the <a href="http://en.wikipedia.org/wiki/Luhn_algorithm">Luhn algorithm</a> (mod 10 check) to see if the number is valid, it still produces a huge false-positive rate.</p>

<p>For an application like <a href="https://github.com/adamcaudill/ccsrch">ccsrch</a>, having this data available would be very handy to reduce false positives when scanning a large file system (scanning a large server produces a huge number of possible hits), but for what I would call fairly misguided reasons, the official registrar of these numbers (the <a href="http://www.aba.com/default.htm">ABA</a>) doesn&#8217;t make this data publicly available. As a result many people have pulled together what data they could find and made it freely available.</p>

<p>So I&#8217;ll add my name to that list.</p>

<p>I&#8217;ve pulled data from many public sources (sorry, I didn&#8217;t keep very good notes as to the sources) and cleaned it up to a reasonable point. All told, I&#8217;ve probably spent 40 hours or more cleaning this data up and getting it to a usable state. It contains over 60,000 entries, including major credit cards (Visa, MasterCard, Amex, Discover) as well as a few merchant entries.</p>

<p>Each record contains the following:</p>

<ul>
<li><p>IIN</p></li>
<li><p>Type (Mastercard, Visa, Visa Credit, etc.)</p></li>
<li><p>Name (Issuer name)</p></li>
<li><p>Length</p></li>
</ul>


<p><strong>Data Quality</strong></p>

<p>It&#8217;s not perfect. It&#8217;s from public sources so there may be errors, and there are some duplicates from cases where I wasn&#8217;t able to determine who the IIN actually belongs to. I&#8217;ve also updated for name changes and mergers where possible, but I&#8217;m sure I&#8217;ve missed a few and there are some where the assets where split, so I don&#8217;t know who the correct owner actually is (Washing Mutual being the leading example of this).</p>

<p>In general, I leaned to the side of caution - so if I didn&#8217;t know for sure, I left the duplicate in.</p>

<p>If you need absolutely correct data - contact the ABA, they are the only source that can give you the completely accurate listing. If you need to have a decent idea if a number is valid for most cases - I would say that this data is good enough.</p>

<p><strong>Warranty</strong></p>

<p>Just to make it really, really, really clear: There is no guarantee that this data is accurate, that it won&#8217;t cause to lose your job, cause your house to burn down, or cause Rebecca Black&#8217;s <a href="http://www.youtube.com/watch?v=kfVsfOSbJY0">Friday</a> to get stuck in your head (yup, you&#8217;re welcome ;)).</p>

<p><strong>Copyright</strong></p>

<p>Based on my understanding of US copyright law, it is my understanding that this data is not subject to copyright as it is a compilation of facts and doesn&#8217;t constitute an original expression. Thus, to the best of my knowledge, this data is in the public domain.</p>

<p><strong>Download</strong></p>

<p><a href="http://adamcaudill.com/files/2012/01/IIN.zip">Here</a> (zipped CSV)</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Poking Mykonos]]></title>
    <link href="http://adamcaudill.com/2012/01/23/poking-mykonos/"/>
    <updated>2012-01-23T22:28:56-05:00</updated>
    <id>http://adamcaudill.com/2012/01/23/poking-mykonos</id>
    <content type="html"><![CDATA[<p>While checking on the latest updates in the start-up world from TechCrunch, I came across <a href="http://techcrunch.com/2012/01/23/mykonos-helps-companies-battle-hackers-raises-4-million/">their article</a> on <a href="http://www.mykonossoftware.com/">Mykonos</a>; the important part of their article (at least for me), is this:</p>

<p><em>Mykonos’s Web Security product uses deception to “detect, confuse, slow down and prevent attackers” in real-time in order to help companies protect their websites and Web apps from malicious hacker and proactively prevent fraud and theft.</em></p>

<p>A couple of minutes of reading, and my interest was piqued - to say the least. The thing that most interested me was the claim of no false positives, while they do <a href="http://www.mykonossoftware.com/early-detection.php">talk about it</a> - I really wanted to see it for myself. Assuming they used their own product to protect their site, I took a few minutes to see what I could find - and find I did.</p>

<p>The first thing I did was a view-source to see what I could learn about their site - mainly to see if there were any obvious signs of using one CMS or another. The first thing that jumps out at me is this from the HTML:</p>

<pre><code>&lt;!-- InstanceBegin template="/Templates/mykonos.dwt.php"
     codeOutsideHTMLIsLocked="false" --&gt;
</code></pre>

<p>So, this tells us they are using Dreamweaver, and the name of the template. So, the next question is, does that <a href="http://www.mykonossoftware.com/Templates/"><code>/Templates/</code></a> directory exist on the server?</p>

<p><img src="http://adamcaudill.com/files/2012-01-23_1930.png" alt="File Listing" /></p>

<p>Yup.</p>

<p>So, not only does it exist, they have directory listings turned on - which to me was a real shock. Unfortunately for us though, these files are named with the <code>.php</code> extension and not the <code>.dwt</code> I was hoping for, so we can&#8217;t get much useful from them.</p>

<p>So, from looking at the source of the home page, we can see that the css files are stored in a <a href="http://www.mykonossoftware.com/css/">/css/</a> directory - maybe that&#8217;ll be interesting.</p>

<p><img src="http://adamcaudill.com/files/2012-01-23_1935.png" alt="File Listing" /></p>

<p>It&#8217;s there, and like last time, we can see all of the files. While CSS files are of no real interest, the <a href="http://www.mykonossoftware.com/css/_notes/">/_notes/</a> directory is, because it&#8217;ll contain a file called <code>dwsync.xml</code> - which can be quite interesting (since we knew they are using Dreamweaver, it&#8217;s not too surprising to see this). This file contains data about the last time the site was pushed from Dreamweaver, and will contain one entry per file, and looks like this:</p>

<pre><code>&lt;file name="style.css"
 server="ftp.belincreative.com/public_html/clients/mykonos/site/"
 local="129651858311162109"
 remote="129651936600000000"/&gt;
</code></pre>

<p>The most interesting thing there is the <code>server</code> entry, as it tells us a little about the file-system; which if we were really trying to attack the site, knowing that would be handy. The other thing of interest is that when you see one <code>/_notes/</code> directory, you&#8217;ll see lots more, as Dreamweaver likes to put them everywhere.</p>

<p>So, let&#8217;s see if there&#8217;s one in the root - that should be the most interesting one. Sure enough: <a href="http://www.mykonossoftware.com/_notes/">/_notes/</a></p>

<p><img src="http://adamcaudill.com/files/2012-01-23_1949.png" alt="" /></p>

<p>This one has a few interesting entries, such as a <a href="http://www.mykonossoftware.com/TechSpecsWhatsNew.html">PHP file</a> that is named with an HTML extension - causing the code not to execute. Viewing the source of that file in the browser exposes the <a href="http://www.mykonossoftware.com/inc/">/inc/</a> directory; potentially interesting, but yields little information. The next file I tried (knowing it would be way too easy if it worked), was the <a href="http://www.mykonossoftware.com/.htaccess">.htaccess</a> file:</p>

<pre><code>&lt;files "webadmin.pl"&gt;
    AuthUserFile /usr/local/www/public_html/.htpasswd
    AuthType Basic
    AuthName "Server Administration"
    require valid-user
&lt;/files&gt;
</code></pre>

<p>Now, at first glance things look too good to be true - and that&#8217;s because they are. Look at the path in <code>AuthUserFile</code> and compare that to the entries from the <code>dwsync.xml</code> files. This <code>.htaccess</code> file is part of the trap, which is all but confirmed if you try to go to the <a href="http://www.mykonossoftware.com/.htpasswd">.htpasswd</a> file which shouldn&#8217;t work, since the path isn&#8217;t what we would expect.</p>

<p>Now, while mucking around looking at the aforementioned files, and others such as <a href="http://www.mykonossoftware.com/robots.txt">robots.txt</a>, I would periodically see this, which I would assume is part of that &#8220;no false positive&#8221; promise:</p>

<p><img src="http://adamcaudill.com/files/2012-01-23_1716.png" alt="" /></p>

<p>I was hoping to run into the firewall (for lack of a better term) - looks like I got my wish; though since I wasn&#8217;t using anything automated and was just poking around by hand, it didn&#8217;t have any impact. Not terribly exciting, but it did provide some insight into what they are doing.</p>

<p>So far we&#8217;ve found a few interesting things, and bumped into their firewall, but that all pales in comparison to the last entry in the <code>dwsync.xml</code> file:</p>

<pre><code>&lt;file name="local-site.zip"
 server="ftp.belincreative.com/public_html/clients/mykonos/site/"
 local="129695851046591796"
 remote="129695888400000000"/&gt;
</code></pre>

<p>When I saw the file name I was shocked - could it really be? But I was right. It&#8217;s a 59MB file containing everything on the site - all the PHP and everything else. Out of curiosity, I compared the <code>.htaccess</code> to that in the zip file, as expected it&#8217;s quite different and more believable:</p>

<pre><code>Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^mykonossoftware.com [nc]
rewriterule ^(.*)$ http://www.mykonossoftware.com/$1 [r=301,nc]
</code></pre>

<p>That confirms what I suspected, the file I saw earlier was just part of the trap.</p>

<p><strong>So what have we learned?</strong></p>

<p>1). Mykonos makes a really cool product, and had I not known what I was up against (and thus less skeptical about everything) it probably would have killed a lot of my time - just as intended.</p>

<p>2). No matter what you put in front or your site or application,<em> human mistakes are still your greatest risk</em>. A second set of eyes and a little paranoia go a long way in securing your systems, and stopping hackers.</p>

<p>3). Mykonos was either lucky or smart in that there was little on their site that shouldn&#8217;t be seen by the public. If they were using a CMS with a database back-end instead of simple (mostly-)static pages, this could have been worse. If they had source code or other valuable IP on the server, a mistake like this could be devastating.</p>

<p>4). Mykonos should take some of their new-found cash and hire somebody to finish the audit of their site that I started. ;)</p>

<p><em>Note:</em> I notified Mykonos about that zip file before posting this (through a couple of channels), and I&#8217;m intentionally not linking to it. While I didn&#8217;t see anything in there that would be an issue to be publicly disclosed, I&#8217;m sure they don&#8217;t want it getting out. Hopefully by the time anybody reads this, they will have taken care of that file.</p>

<p><em><strong>Update:</strong></em> As expect, they&#8217;ve cleaned up the files I mentioned - and a bit more. In a <a href="http://twitter.com/#!/dkoretz/status/162033710202486786">tweet</a> from the company&#8217;s CEO, <a href="http://www.davidkoretz.com/">David Koretz</a>, he mentioned that they had left a surprise for me. So I went to my starting point (the <code>/Templates/</code> directory), and was greeted with this:</p>

<p><img src="http://adamcaudill.com/files/2012-01-25_0005.png" alt="Welcome &amp; Thanks" /></p>

<p>Yeah, cool product and cool people. I&#8217;m impressed.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Google Chrome Leaking Credit Card Data?]]></title>
    <link href="http://adamcaudill.com/2012/01/15/google-chrome-leaking-credit-card-data/"/>
    <updated>2012-01-15T11:04:04-05:00</updated>
    <id>http://adamcaudill.com/2012/01/15/google-chrome-leaking-credit-card-data</id>
    <content type="html"><![CDATA[<p>While testing <a href="https://github.com/adamcaudill/ccsrch">ccsrch</a> I noticed a number that looked familiar - my debit card number. Now, being just a little paranoid, I don&#8217;t leave such information on my system unencrypted - so seeing it was a real surprise. But, here&#8217;s the real kicker: it was on my work PC, where it never should have been. But there it was, plain as day, in clear text. I spent a couple of minutes staring at the log trying to figure out why it would be there.</p>

<p>Once I saw the file name, a sinking feeling set in and the answer became clear:</p>

<p><code>%LocalAppData%\Google\Chrome\User Data\Default\Sync Data\SyncData.sqlite3</code></p>

<p>So it turns out that it&#8217;s Chrome&#8217;s <a href="http://support.google.com/chrome/bin/answer.py?hl=en&amp;answer=165139">sync</a> feature that was saving my information, but why?</p>

<p>It turns out that auto-fill data is synced with your Google account (if you&#8217;re signed in and have the feature enable, of course), and all of the computers you&#8217;re signed into - and by default, without the benefit of encryption. This file may contain any number of things, from mine I was able to extract the following:</p>

<ul>
<li><p>Full name</p></li>
<li><p>Wife&#8217;s full name</p></li>
<li><p>Date of birth</p></li>
<li><p>Wife&#8217;s date of birth</p></li>
<li><p>Social Security Number</p></li>
<li><p>Multiple credit card numbers</p></li>
<li><p>Multiple <a href="http://en.wikipedia.org/wiki/Card_security_code">CVV</a>s</p></li>
<li><p>Bank account &amp; routing number</p></li>
</ul>


<p>Not to mention quite a few websites I&#8217;ve been to, various addresses, employer&#8217;s name and other various useful tidbits. All would be quite useful for identity theft or highly targeted <a href="http://www.fbi.gov/news/stories/2009/april/spearphishing_040109">spear phishing</a>.</p>

<p>Now am I saying that syncing auto-fill is bad? No, not at all. It&#8217;s a very useful time saver, but what takes it from a useful feature to security issue is the fact that by default, this <em>data isn&#8217;t encrypted</em>!</p>

<p><img src="http://adamcaudill.com/files/2012-01-15_0905.png" alt="Default Encryption Setting" /></p>

<p><strong>What are the risks?</strong></p>

<p>There are three significant risks I see here:</p>

<p>1). <em>Disclosure to less trusted systems</em>:</p>

<p>In my case, I trust my laptop to be secure; between full-disk encryption (via <a href="http://www.truecrypt.org/">TrueCrypt</a>) and other precautions, I know that I don&#8217;t have too much to worry about. On the other hard, my Work PC is on a corporate domain, and at least a couple dozen people have permissions sufficient to access my personal files - thus I don&#8217;t trust anything too valuable on it.</p>

<p>Now because of the fact that this feature is insecure by default, that data is exposed to a less trusted system.</p>

<p>It can also go the other way: a number of auto-fill entries on my personal laptop were from forms on internal-only applications that only my Work PC would be able to access. So this means that anything sensitive could be leaked to home networks which are typically less secure than corporate environments. If you routinely handle PCI, HIPAA, or other restricted information - this type of leak could be a major issue.</p>

<p>2). <em>Spear Phishing</em>:</p>

<p>Let&#8217;s imagine a scenario:</p>

<p>You work for a defense contractor and I work for a foreign intelligence agency. Through some targeted attacks I manage to penetrate your home network, but have been unable to make it into your corporate network. I grab the sync database file from your home PC and extract one of your credit card numbers. I look up the <a href="http://en.wikipedia.org/wiki/List_of_Issuer_Identification_Numbers">IIN</a> and find out what bank the card is from. Once I have this, I build a PDF with the latest 0day exploit, and send it with a convincing subject line:</p>

<p>&#8220;Important Information about your Bank of America credit card ending in 7850&#8221;</p>

<p>Normally you&#8217;d dismiss it as spam, but the last four digits are right - so you open it, just in case. The exploit kicks in. I&#8217;m in, you&#8217;re done.</p>

<p>This is just a simple and quite contrived example, but you get the idea.</p>

<p>3). <em>Google Data Mining</em>:</p>

<p>This is the most paranoid and least likely, but given Google&#8217;s issues in controlling their people - I&#8217;d say not impossible (see <a href="http://www.electronista.com/articles/10/05/14/google.admits.collecting.wi.fi.info.with.map.team/">here</a>, <a href="http://searchengineland.com/google-chrome-page-will-have-pagerank-reduced-due-to-sponsored-posts-106551">here</a>, and <a href="http://boingboing.net/2012/01/13/google-fraudulently-solicits-f.html">here</a>).</p>

<p>Just for a moment, think about the fact that Google has the following:</p>

<ul>
<li><p>Your account data (name, email, etc.)</p></li>
<li><p>Your auto-fill history (see the list of items I found above)</p></li>
<li><p>Tons of data from their other services</p></li>
<li><p>At least parts of your browsing history, if not much of it</p></li>
<li><p>Engineers that truly enjoy data mining</p></li>
</ul>


<p>Most other companies I wouldn&#8217;t worry about; but knowing the people that Google hires, and the skill they have in manipulating data - you know that some engineer is using his <a href="http://www.nytimes.com/2007/10/21/jobs/21pre.html">20% time</a> to do this (or at least is wishing he could).</p>

<p>If nothing else, I know if I worked at Google - playing with this data would be tons of fun. ;)</p>

<p><strong>Want to see your data?</strong></p>

<p>To see what Chrome has saved about you, download <a href="http://sqlitebrowser.sourceforge.net/">SQLite Browser</a>, and open the file I mentioned above. Go to the &#8220;Browse Data&#8221; tab, and select the &#8220;metas&#8221; table. What you&#8217;re looking for is in the &#8220;non_unique_name&#8221; column (among other places). You should see something like this:</p>

<p><img src="http://adamcaudill.com/files/2012-01-15_0942.png" alt="SQLite Browser" /></p>

<p>The entries starting with &#8220;autofill_entry&#8221; are the ones you are interested in, but you&#8217;ll likely find some of the other records interesting as well. If you see the word &#8220;encrypted&#8221; then your data is already encrypted, and you don&#8217;t have to worry about this.</p>

<p><strong>Is this a vulnerability in Chrome?</strong></p>

<p>No, not at all - though it was a mistake. They should encrypt everything by default, and not provide an option to do otherwise. There&#8217;s no reason to expose users to a potential security risk when there&#8217;s a simple fix. Security isn&#8217;t something users should have to opt-in to; and unless there&#8217;s a very good reason, they shouldn&#8217;t have a way to opt-out.</p>

<p>Google should understand security and the value of the data they hold; they should be more responsible for the data (and faith) people give them.</p>

<p><strong>How do I fix it?</strong></p>

<p>Simple, from the &#8220;wrench&#8221; menu, select Options -> Personal Stuff -> Sign In -> Advanced&#8230; and then under &#8220;Encrypted data types&#8221; select &#8220;Encrypt all synced data&#8221; - and that&#8217;s it. After a couple of minutes the entries that were visible before will now just display the word &#8220;encrypted.&#8221;</p>

<p><img src="http://adamcaudill.com/files/2012-01-15_0944.png" alt="Encrypt all data" /></p>

<p>You can also go a step further, and get rid of this data by disabling auto-fill to ensure that potentially sensitive information isn&#8217;t being persisted when it shouldn&#8217;t be.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[CCSRCH v1.0.5]]></title>
    <link href="http://adamcaudill.com/2012/01/14/ccsrch-v1-0-5/"/>
    <updated>2012-01-14T08:08:39-05:00</updated>
    <id>http://adamcaudill.com/2012/01/14/ccsrch-v1-0-5</id>
    <content type="html"><![CDATA[<p>During my employers annual <a href="https://www.pcisecuritystandards.org/">PCI</a> audit, our auditor requested that we perform a search of all of our servers for credit card data. He recommended a tool called &#8220;ccsrch&#8221; - which like many open source projects had a couple of issues, and hadn&#8217;t been updated in years. So, I fixed it.</p>

<p>CCSRCH is a cross-platform, command-line application that reads every file from the starting point passed in, and scans them for what looks like credit card numbers (and using the <a href="http://en.wikipedia.org/wiki/Luhn_algorithm">Luhn algorithm</a> to check each possible result). It&#8217;s fairly brute-force, but it gets the scans required for PCI - though I would be careful about using it during production hours, it can have a pretty significant impact on a server&#8217;s I/O performance.</p>

<p>I&#8217;ve forked the application and setup a new <a href="https://github.com/adamcaudill/ccsrch">ccsrch</a> project over at github (the original is on <a href="http://sourceforge.net/projects/ccsrch/">SourceForge</a>), and made a few modifications to better suit my needs (from the <a href="https://github.com/adamcaudill/ccsrch#readme">change log</a>):</p>

<ul>
<li><p>Added option to output the file name, and how many hits were found to the console when using -o (see -c in usage).</p></li>
<li><p>Added option to limit the number of results from a single file before going on to the next file (see -l in usage).</p></li>
<li><p>Added option to exclude certain file types from the scan (see -n in usage).</p></li>
<li><p>Fix for ignoring NULL, CR &amp; LF.</p></li>
<li><p>Ignore dash when scanning.</p></li>
<li><p>Exclude results with the last 8 digits repeating (very unlikely to be a real PAN).</p></li>
</ul>


<p>I&#8217;ve <a href="https://github.com/adamcaudill/ccsrch/downloads">uploaded</a> a Windows build of the new 1.0.5 release to github, and for *nix systems, you can just download the latest <a href="https://github.com/adamcaudill/ccsrch/tags">tag</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[SOPA Is Inevitable]]></title>
    <link href="http://adamcaudill.com/2012/01/07/sopa-is-inevitable/"/>
    <updated>2012-01-07T02:10:53-05:00</updated>
    <id>http://adamcaudill.com/2012/01/07/sopa-is-inevitable</id>
    <content type="html"><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act">SOPA</a>, while it&#8217;s not likely to be passed as-is, I would be willing to bet money that something SOPA-like will be passed. It may be watered down with many of the most offending parts removed, but for those backing SOPA it&#8217;ll still be a real victory. For them getting it on the books, even in a weakened form means it can be tweaked (and extended) later.</p>

<p>There&#8217;s been an amazing resistance to SOPA, from the <a href="http://arstechnica.com/tech-policy/news/2011/12/victory-boycott-forces-godaddy-to-drop-its-support-for-sopa.ars">boycott of GoDaddy</a> to public statements from celebrities such as <a href="http://www.popularmechanics.com/science/mythbusters/articles/mythbuster-adam-savage-sopa-could-destroy-the-internet-as-we-know-it-6620300">Adam Savage</a> - the public outcry against this horrid piece of legislation has been quite inspiring. But how often will you be able to get so many people to stand up and take action before they start to lose interest? How many times can you raise the troops before the numbers start to dwindle; how long before the celebrities start fearing they&#8217;ll be branded in the media as extremist or crazy? How many times can you raise the call of breaking the internet and freedom of speech before the public gets bored and goes to read about the latest Hollywood divorce instead?</p>

<p>Here&#8217;s how I see it going:</p>

<ol>
<li><p>Strip many of the worst parts of SOPA and get it through congress. By removing these offending pieces, those backing SOPA will try to make themselves look responsive to the community, and it&#8217;ll be played as a victory for the community in the media. All in all, if you aren&#8217;t paying attention it&#8217;ll look like a victory for the people.</p></li>
<li><p>Next year, introduce a bill to modify SOPA to change the wording here are there, edging it just a little closer to the original. If done carefully, it&#8217;ll be easy to dismiss those that try to stir up another outcry as over-reacting or even paranoid.</p></li>
<li><p>In a few years after a series of modifications, we have SOPA, just as broad and dangerous as originally intended - and the vast majority of people who fought SOPA would have no idea.</p></li>
</ol>


<p>If you have a financial motivation to get something like this passed, they key to success would be patience. Chip away slowly at <a href="http://www.chillingeffects.org/dmca512/">DMCA Safe Harbor</a> protections, at what requires a judge instead of an administrative action, at transparency so that any action ends up happening behind closed doors. In enough time you&#8217;ve established a law that gives the US Federal Government a massive amount of control of the internet, without oversight - all in a way designed to get offending web sites off the internet as quickly as possible. To say it would be ripe for abuse would be a massive understatement.</p>

<p>Am I being paranoid? I honestly hope so - I really hope that there aren&#8217;t people out there looking to limit the freedoms we cherish for their own profit, but the fact that SOPA was introduced in the first place makes that hard to believe.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Masking Credit Cards for PCI]]></title>
    <link href="http://adamcaudill.com/2011/10/20/masking-credit-cards-for-pci/"/>
    <updated>2011-10-20T16:14:40-04:00</updated>
    <id>http://adamcaudill.com/2011/10/20/masking-credit-cards-for-pci</id>
    <content type="html"><![CDATA[<p>PCI DSS, the security standard for companies that handle credit cards, defines a number of <a href="https://www.pcisecuritystandards.org/pdfs/pci_audit_procedures_v1-1.pdf">rules</a> as to how credit cards are handled. One of those rules, 3.3, is defined as follows:</p>

<p><em>Mask PAN when displayed (the first six and last four digits are the maximum number of digits to be displayed)</em></p>

<p>So based on this requirement I assumed that the code to do this would be common and widely available; much to my surprise there are rather few samples that do this, and of those I found they only showed the last four (which when you are handling a lot of credit cards, searching for an account by the last four isn&#8217;t all that helpful) and were often rather fragile.</p>

<p>So I whipped this up, hopefully it&#8217;ll be useful to others.</p>

<div><script src='https://gist.github.com/1674453.js?file='></script>
<noscript><pre><code>public static string MaskCreditCard(string value)
{
  const string PATTERN = @&quot;\b(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|&quot; +
    @&quot;6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|&quot; +
    @&quot;[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})\b&quot;;
 
  var replace = Regex.Replace(value, PATTERN, new MatchEvaluator(match =&gt;
  {
    var num = match.ToString();
    return num.Substring(0, 6) + new string('*', num.Length - 10) +
      num.Substring(num.Length - 4);
  }));
 
  return replace;
}</code></pre></noscript></div>


<p>The regex pattern is from <a href="http://www.regular-expressions.info/creditcard.html">Regular-Expressions.info</a> and should detect most major cards.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Why Cringely is wrong about Java]]></title>
    <link href="http://adamcaudill.com/2011/10/15/why-cringely-is-wrong-about-java/"/>
    <updated>2011-10-15T15:47:52-04:00</updated>
    <id>http://adamcaudill.com/2011/10/15/why-cringely-is-wrong-about-java</id>
    <content type="html"><![CDATA[<p>A couple of days ago I was sent a link to Robert Cringely&#8217;s latest treatise:  <em><a href="http://www.cringely.com/2011/10/the-second-coming-of-java/">The second coming of Java</a></em> - and to say I disagreed was a bit of an understatement. To me, it represents a fundamental flaw in his perception of developers, and more importantly the economics of software development.</p>

<p>The key to Cringely&#8217;s argument comes down to this:</p>

<p>When SSDs gain enough capacity there will be a shift from the Ruby world back to the Java world. Not for prototyping, because, well, it’s prototyping. But simply because the statement “<strong>Ruby is _incredibly_ slow but I don’t care because my database is slower</strong>” will no longer be true.</p>

<p>What he&#8217;s missing here is the real reason people use frameworks like Rails; it&#8217;s not about it being Ruby, or being the latest cool thing - it&#8217;s about developer productivity. That&#8217;s it, and that&#8217;s all there is to it - Rails allows a developer to do more in less time. That&#8217;s one of the key reasons so many Java web developers jumped ship (though I can think of a few others), and what pushed Microsoft to invest so heavily in their <a href="http://www.asp.net/mvc">MVC framework</a>.</p>

<p>I could fully rehash the argument, but in what I consider to be one of Jeff Atwood&#8217;s best articles,  <em><a href="http://www.codinghorror.com/blog/2008/12/hardware-is-cheap-programmers-are-expensive.html">Hardware is Cheap, Programmers are Expensive</a></em>, he covers a key point to my argument - developer time is vastly more expensive than hardware. Atwood&#8217;s take on the issue is clear:</p>

<p>Clearly, <strong>hardware is cheap, and programmers are expensive</strong>. Whenever you&#8217;re provided an opportunity to leverage that imbalance, it would be incredibly foolish not to.</p>

<p>When there&#8217;s a choice between developer productivity, and spending money on hardware - the conclusion should be the same. It&#8217;s much cheaper to throw more hardware at a slower framework than it is to invest more developer time in a faster framework. For any non-trivial application, throwing more front-end servers at it will always be cheaper than slowing the development process down with a non-productivity-centric toolkit.</p>

<p>It&#8217;s simple economics; server hardware is getting faster and cheaper, developer time is only getting more expensive.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Pen-Testing Silverlight+RIA with SoapUI]]></title>
    <link href="http://adamcaudill.com/2011/07/06/pen-testing-silverlightria-with-soapui/"/>
    <updated>2011-07-06T17:39:37-04:00</updated>
    <id>http://adamcaudill.com/2011/07/06/pen-testing-silverlightria-with-soapui</id>
    <content type="html"><![CDATA[<p>I was recently given the task of ensuring that a Silverlight+RIA application that could contain private information was secure for deployment to a public web site. So I started searching for automated pen-testing tools that could work against Microsoft&#8217;s Binary SOAP protocol (<code>msbin1</code>, a.k.a <code>application/soap+msbin1</code>) and found only disappointment. For various reasons, it&#8217;s significantly more complex to pen-test a application using <code>msbin1</code> than traditional <code>SOAP</code> + <code>WSDL</code>.</p>

<p>To properly test the services, I had to make a compromise: temporarily modify the application to expose a <code>SOAP</code> endpoint. While this changes the state of the application and thus reduces the validity of the tests, it does provide a reasonable way of testing the web services to ensure that they are behaving as intended.</p>

<p>The recently released <a href="http://www.soapui.org/About-SoapUI/go-pro.html">SoapUI Pro 4</a> adds new <a href="http://www.soapui.org/Security/getting-started.html">security testing tools</a> that makes this a viable (and attractive option). To get this working, there are a few small changes that need to be made to the solution:</p>

<p>First, you&#8217;ll need to add a reference to <code>Microsoft.ServiceModel.DomainServices.Hosting.EndPoints</code> which is part of the RIA Services Toolkit; this allows you to expose different End Points for the service such as <code>SOAP</code> and <code>OData</code>.</p>

<p>Next, you&#8217;ll want to add the following <code>configSections</code> entry to your <code>Web.config</code>:</p>

<pre><code>&lt;configuration&gt;
 &lt;configSections&gt;
   &lt;sectionGroup name="system.serviceModel"&gt;
     &lt;section name="domainServices"
      type="System.ServiceModel.DomainServices.Hosting.DomainServicesSection,
      System.ServiceModel.DomainServices.Hosting,
      Version=4.0.0.0,
      Culture=neutral,
      PublicKeyToken=31bf3856ad364e35" /&gt;
   &lt;/sectionGroup&gt;
 &lt;/configSections&gt;
 ...
</code></pre>

<p>Finally, to expose the <code>SOAP</code> end point:</p>

<pre><code>&lt;configuration&gt;
 ...
 &lt;system.serviceModel&gt;
  ...
  &lt;domainServices&gt;
   &lt;endpoints&gt;
    &lt;add name="Soap"
     type="Microsoft.ServiceModel.DomainServices.Hosting.SoapXmlEndpointFactory,
     Microsoft.ServiceModel.DomainServices.Hosting,
     Version=4.0.0.0,
     Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;
   &lt;/endpoints&gt;
  &lt;/domainServices&gt;
  ...
</code></pre>

<p>Finally, just follow the <a href="http://www.soapui.org/Security/security-scans-overview.html">instructions</a> for SoapUI to setup your tests, and you can feel (just a little) more confident in your application. Passing with flying colors obviously doesn&#8217;t mean your application is bulletproof, but it helps to confirm that web service code is solid.</p>

<p>Now, while this does provide some insight into your application and should help find common issues, it&#8217;s not a replacement for a professional assessment by a qualified auditor. If you are handling credit cards or other highly targeted information, <em>please</em> consult a security specialist before a public deployment.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[A brief look at the latest @LulzSec release]]></title>
    <link href="http://adamcaudill.com/2011/06/16/a-brief-look-at-the-latest-lulzsec-release/"/>
    <updated>2011-06-16T20:01:41-04:00</updated>
    <id>http://adamcaudill.com/2011/06/16/a-brief-look-at-the-latest-lulzsec-release</id>
    <content type="html"><![CDATA[<p>Earlier today, the hacker collective <a href="http://lulzsecurity.com/">Lulz Security</a> released a batch of 62,156 email/password combinations from unknown sites; I decided to take a look at the data and see if there was anything to be learned from it.</p>

<div class='embed tweet'><blockquote class="twitter-tweet tw-align-center"><p>And as always, LulzSec delivers: <a href="http://t.co/yQlcu5x" title="http://www.mediafire.com/?9em5xp7r0rd2yod">mediafire.com/?9em5xp7r0rd2y…</a> 62,000+ emails/passwords just for you. Enjoy.</p>&mdash; The Lulz Boat (@LulzSec) <a href="https://twitter.com/LulzSec/status/81327464156119040" data-datetime="2011-06-16T11:49:13+00:00">June 16, 2011</a></blockquote>
<script src="http://adamcaudill.com//platform.twitter.com/widgets.js" charset="utf-8"></script></div>


<p>So, let&#8217;s take a look at a few stats:</p>

<p>Total Domains: ~5,230</p>

<p>Top 15 Domains:</p>

<p><img src="http://adamcaudill.com/files/2011-06-16_1922.png" alt="Top 15 Domains" /></p>

<p>There are over 50,000 unique passwords, but even with this many passwords, there&#8217;s still a few quite common - and very bad passwords in use:</p>

<p><img src="http://adamcaudill.com/files/2011-06-16_1936.png" alt="Top Passwords" /></p>

<p>While this is a fairly small release, the <a href="http://twitter.com/#!/LulzSec/">LulzSec</a> twitter stream has a number of entries like these:</p>

<div class='embed tweet'><blockquote class="twitter-tweet tw-align-center"><p>There is some very angry level 85 WoW player cutting his wrists right now, thanks to @<a href="https://twitter.com/MiracleJoe">MiracleJoe</a> and LulzSec. Let it flow&#8230;</p>&mdash; The Lulz Boat (@LulzSec) <a href="https://twitter.com/LulzSec/status/81334551686815745" data-datetime="2011-06-16T12:17:22+00:00">June 16, 2011</a></blockquote>
<script src="http://adamcaudill.com//platform.twitter.com/widgets.js" charset="utf-8"></script></div>


<p>There are several tweets about people accessing Facebook, Twitter, and even Amazon accounts - what&#8217;s so unfortunate here is that service providers could easily restrict accounts on lists like this to protect the users and greatly reduce the impact of these breaches.</p>

<p>Until people learn that password reuse is dangerous, this will keep happening.</p>

<p><em>Update:</em> I&#8217;ve removed a link to a tweet, as the account has since been removed. The tweet said: &#8220;@LulzSec Cheers for the paypal account with £250 in it! ;)&#8221;</p>
]]></content>
  </entry>
  
</feed>

