<?xml version="1.0"?>

<rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
>

<channel rdf:about="http://simon.incutio.com/syndicate/sysadmin/rss1.0">
  <title>Systems Administration</title>
  <link>http://simon.incutio.com/</link>
  <description>Simon Willison's Systems Administration cateory</description>
  <language>en-uk</language>
  <webMaster>simon@incutio.com</webMaster>
  <items>
    <rdf:Seq>
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2005/03/04/trac" />
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2004/09/09/commandline" />
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2004/06/09/backporting" />
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2004/03/27/notSoWitty" />
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2004/03/02/apache2" />
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2004/02/27/bizex" />
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2004/02/25/novel" />
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2004/02/24/brian" />
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2004/01/22/defendingWebApplications" />
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2003/12/31/psycopg" />
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2003/12/19/openMosix" />
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2003/11/30/repartitioning" />
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2003/11/26/windowsOnATMs" />
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2003/11/19/contributeFixed" />
      <rdf:li rdf:resource="http://simon.incutio.com/archive/2003/11/17/contributeProblem" />
    </rdf:Seq>
  </items>
</channel>

<item rdf:about="http://simon.incutio.com/archive/2005/03/04/trac">
  <title>Problems with Trac? Switch to FSFS</title>
  <description>&lt;p id=&quot;p-0&quot;&gt;I'm head over heels in love with &lt;a href=&quot;http://projects.edgewall.com/trac/&quot;&gt;Trac&lt;/a&gt;, and have been for about 6 months now. It really is best-of-breed software: it neatly integrates a wiki, a simple bug tracker and a Subversion repository browser with clean markup, a nice default design and a learning curve for new users that can be measured in minutes. No wonder it's started to show up all &lt;a href=&quot;http://dev.wp-plugins.org/&quot; title=&quot;WordPress Plugin Repository&quot;&gt;over&lt;/a&gt; &lt;a href=&quot;http://trimpath.com/project/&quot; title=&quot;TrimPath&quot;&gt;the&lt;/a&gt; &lt;a href=&quot;http://dev.rubyonrails.com/&quot; title=&quot;Ruby on Rails&quot;&gt;place&lt;/a&gt;.&lt;/p&gt;

&lt;p id=&quot;p-1&quot;&gt;The software has only two disadvantages. The first is that it's hideously difficult to install thanks to the myriad of dependencies (although apt-get on Debian or &lt;a href=&quot;http://fink.sourceforge.net/&quot;&gt;Fink&lt;/a&gt; on OS X go a good way towards lessening the blow). The second is that if you're using &lt;samp&gt;BDB&lt;/samp&gt; and you're not careful it can corrupt your repository. Thankfully this corruption isn't permanent (you can revert it with &lt;samp&gt;svnadmin recover&lt;/samp&gt;) but it's still very, very annoying.&lt;/p&gt;

&lt;p id=&quot;p-2&quot;&gt;Happily, a solution exists to problem two. Subversion 1.1 introduces a new storage mechanism called &lt;samp&gt;FSFS&lt;/samp&gt;. The advantages and disadvantages are discussed in &lt;a href=&quot;http://svn.collab.net/repos/svn/trunk/notes/fsfs&quot;&gt;this advocacy document&lt;/a&gt;, but the key advantages as far as Trac is concerned appear to be &quot;Write access not required for read operations&quot;, &quot;Little or no need for recovery&quot; and &quot;No umask issues&quot;. Switching a BDB Subversion repository over to FSFS is &lt;a href=&quot;http://julien.danjou.info/blog/index.php/2004/12/31/103-subversion-fsfs-migration&quot; title=&quot;Subversion fsfs migration&quot;&gt;short and painless&lt;/a&gt;, and provided you have up-to-date Subversion/Python bindings Trac will be able to access the new repository without needing any other changes at all. I've made the switch on my local machine and the weird corruption and performance issues I was having have vanished without a trace.&lt;/p&gt;

&lt;p id=&quot;p-3&quot;&gt;For the record, the trick to successfully installing Trac with Fink is to make sure it's pulling from the &quot;unstable&quot; tree. That will give you Subversion 1.1 (with FSFS support) and allow you to install the &lt;samp&gt;trac-py23&lt;/samp&gt; package which should sort everything out for you. The &lt;a href=&quot;http://projects.edgewall.com/trac/wiki/TracOnOsx&quot;&gt;instructions on the Trac wiki&lt;/a&gt; cover the essentials, but be sure not to miss the troubleshooting note about using a custom shell script in place of the regular &lt;samp&gt;trac.cgi&lt;/samp&gt;.&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2005/03/04/trac</link>
  <dc:subject>Systems Administration</dc:subject>
  <dc:date>2005-03-04T01:11:26-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>
<item rdf:about="http://simon.incutio.com/archive/2004/09/09/commandline">
  <title>Command line blacklisting</title>
  <description>&lt;p id=&quot;p-0&quot;&gt;Just over a year ago, &lt;a href=&quot;http://simon.incutio.com/archive/2003/09/02/blacklisting&quot; title=&quot;Blacklisting Comment Spam&quot;&gt;I started blacklisting&lt;/a&gt; domain names from links featured in comment spam. My idea then was that these blacklists could become a shared resource: people would publish their own blacklist and subscribe to those of people they trust, thus making it much harder for spammers to operate. While the sheer volume of spam domains meant that the technique was much less useful than I originally anticipated, I've continued to maintain my blacklist ever since as a preventative measure against repeat spammers.&lt;/p&gt;

&lt;p id=&quot;p-1&quot;&gt;I have a confession to make: all of my blog administration (with the exception of adding entries and blogmarks) is performed using &lt;a href=&quot;http://www.phpmyadmin.net/&quot;&gt;phpMyAdmin&lt;/a&gt;. The trouble with writing your own software is that it's very easy to skimp on the backend tools, since you're the only person who will ever see them. Incidentally, this is the main reason I plan to switch to &lt;a href=&quot;http://wordpress.org/&quot;&gt;WordPress&lt;/a&gt; just as soon as I find the inspiration to write the necessary import scripts. Comments are deleted in phpMyAdmin, and domains are blacklisted by manually editing the &lt;a href=&quot;http://simon.incutio.com/blacklist.txt&quot;&gt;blacklist.txt&lt;/a&gt; file via &lt;acronym title=&quot;File Transfer Protocol&quot;&gt;FTP&lt;/acronym&gt;.&lt;/p&gt;

&lt;p id=&quot;p-2&quot;&gt;This has been really bugging me, especially since I have so little other use for &lt;acronym title=&quot;File Transfer Protocol&quot;&gt;FTP&lt;/acronym&gt; that my only installed client is an unregistered version of &lt;a href=&quot;http://www.panic.com/transmit/&quot;&gt;Transmit&lt;/a&gt; (closes after ten minutes, won't save passwords along with account details). I've been muddling along with that for longer than I care to admit, but today I decided to take 10 minutes out to solve the problem once and for all. I could have put together a web interface for adding new domains but I wasn't really in the mood, so I decided to put time spent reading &lt;a href=&quot;http://www.faqs.org/docs/artu/&quot;&gt;&lt;cite&gt;The Art of Unix Programming&lt;/cite&gt;&lt;/a&gt; to good use and knock out a simple command line application.&lt;/p&gt;

&lt;p id=&quot;p-3&quot;&gt;The result (minus my login details) can be found &lt;a href=&quot;http://simon.incutio.com/code/python/blacklist.py&quot; title=&quot;blacklist.py&quot;&gt;here&lt;/a&gt;. Sample usage: &lt;samp&gt;./blacklist.py www.domain.org www.domain2.com&lt;/samp&gt;. It follows the Unix ideal of being the simplest-thing-that-could-possibly-work, and ended up taking longer to write than I expected thanks mainly to the craziness of Python's &lt;a href=&quot;http://www.python.org/doc/current/lib/module-ftplib.html&quot;&gt;ftplib&lt;/a&gt;. I've seen complaints about this before, and it thoroughly deserves its bad reputation.&lt;/p&gt;

&lt;p id=&quot;p-4&quot;&gt;Here's one example: &lt;code&gt;retrlines&lt;/code&gt; is the method used to retrieve ascii text from the server. Bizzarely, it doesn't actually return the text receieved; instead, it expects you to provide it with a callback function that will be fed each line in turn, minus the newline. Sounds like a job for &lt;a href=&quot;http://www.python.org/doc/current/lib/module-StringIO.html&quot;&gt;StringIO&lt;/a&gt;, but &lt;code&gt;StringIO&lt;/code&gt; objects don'y have a writeline method (required to add the newline back on). I ended up writing my own extension of the &lt;code&gt;StringIO2&lt;/code&gt; class and adding a writeline method just to preserve the newlines returned from the server!&lt;/p&gt;

&lt;p id=&quot;p-5&quot;&gt;Strange &lt;acronym title=&quot;Application Programming Interface&quot;&gt;API&lt;/acronym&gt;s aside, I'm pretty pleased with the final result. It follows a bunch of Unix design patterns (and skips others such as those related to configuration, but I'm not overly bothered about those) including the following:&lt;/p&gt;

&lt;ol&gt;
 &lt;li&gt;A usage note is displayed if no arguments are provided.&lt;/li&gt;
 &lt;li&gt;Multiple domains can be blacklisted at once, by providing them as multiple command line arguments.&lt;/li&gt;
 &lt;li&gt;Domains that are already in the blacklist are skipped, and a message is written to standard error.&lt;/li&gt;
 &lt;li&gt;If the script suceeds, it doesn't say anything at all.&lt;/li&gt;
&lt;/ol&gt;

&lt;p id=&quot;p-6&quot;&gt;It also uses the common Python idiom of wrapping the principle logic in a function and then calling that from a block that runs only if the file is executed directly (the &lt;a href=&quot;http://www.artima.com/weblogs/viewpost.jsp?thread=4829&quot; title=&quot;Guido van Rossum: Python main() functions&quot;&gt;&lt;code&gt;__name__ == '__main__'&lt;/code&gt; idiom&lt;/a&gt;) so that other Python code can import the module and reuse its functionality if required.&lt;/p&gt;

&lt;p id=&quot;p-7&quot;&gt;There's plenty of room for improvement: being able to pipe a list of domains in via standard input would be nice, and hard coding the (unencrypted) username and password is sloppy (as is expecting the blacklist.txt file to live in the &lt;acronym title=&quot;File Transfer Protocol&quot;&gt;FTP&lt;/acronym&gt; home directory). Even better, with &lt;acronym title=&quot;Secure SHell&quot;&gt;SSH&lt;/acronym&gt; access the whole thing could be replaced with an infinitely more secure one-liner: &lt;code class=&quot;bash&quot;&gt;echo www.domain-to-ban.org | ssh username@server &quot;cat - &gt;&gt; blacklist.txt&quot;&lt;/code&gt;. I'm happy though: an irritating task has become much less irritating and I have some example code to fall back on next time I need to get mucky with &lt;code&gt;ftplib&lt;/code&gt;.&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2004/09/09/commandline</link>
  <dc:subject>Python, Systems Administration</dc:subject>
  <dc:date>2004-09-09T05:59:46-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>
<item rdf:about="http://simon.incutio.com/archive/2004/06/09/backporting">
  <title>Backporting from Python 2.3 to Python 2.2</title>
  <description>&lt;p id=&quot;p-0&quot;&gt;We have a home-grown templating system at work, which I intend to dedicate an entry to some time in the future. We originally wrote it in Python 2.2, but upgraded to Python 2.3 a while ago and have since been evolving our code in that environment. Today I found a need to load the most recent version of our templating system on to a small, long neglected application that had been running the original version ever since it had enough features to be usable.&lt;/p&gt;

&lt;p id=&quot;p-1&quot;&gt;Unfortunately, this application was running on a server that only had Python 2.2. Installing Python 2.3 would have been somewhat more painful here than on other servers we run for reasons I won't go in to, so I decided to have a go at getting our current code to run under the older Python version.&lt;/p&gt;

&lt;p id=&quot;p-2&quot;&gt;In the end, I only had to make three minor changes, all at the top of the file in question.&lt;/p&gt;

&lt;ol&gt;
 &lt;li&gt;&lt;p id=&quot;p-3&quot;&gt;I added &lt;code class=&quot;python&quot;&gt;from __future__ import generators&lt;/code&gt; as the very first line of the file. We use generators (with the &lt;code class=&quot;python&quot;&gt;yield&lt;/code&gt; statement) in a few places - this feature was only properly added in Python 2.3, but was made available in Python 2.2 as a &quot;future enhancement&quot; through the aforementioned obscure import.&lt;/p&gt;&lt;/li&gt;
 &lt;li&gt;&lt;p id=&quot;p-4&quot;&gt;I added &lt;code class=&quot;python&quot;&gt;True, False = 1, 0&lt;/code&gt; on the next line down. Surprisingly, Python 2.2 had no support for a boolean type and instead used a test for non-zero. The above line defines constants that behave enough like Python 2.3's True and False to avoid any problems.&lt;/p&gt;&lt;/li&gt;
 &lt;li&gt;&lt;p id=&quot;p-5&quot;&gt;I defined an &lt;code class=&quot;python&quot;&gt;enumerate&lt;/code&gt; function, which was introduced for real in Python 2.3. Here's the code I used:&lt;/p&gt;
 &lt;pre&gt;&lt;code class=&quot;python&quot;&gt;
def enumerate(obj):
    for i, item in zip(range(len(obj)), obj):
        yield i, item 
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p id=&quot;p-6&quot;&gt;All in all it only took around ten minutes to put the above together, after which the script worked just fine. It was interesting to see how our code had grown to rely on Python 2.3 features without us realising it.&lt;/p&gt;

&lt;p id=&quot;p-7&quot;&gt;&lt;strong&gt;Update:&lt;/strong&gt; Check this entry's comments for improvements to the above code snippets.&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2004/06/09/backporting</link>
  <dc:subject>Python, Systems Administration</dc:subject>
  <dc:date>2004-06-09T04:58:22-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>
<item rdf:about="http://simon.incutio.com/archive/2004/03/27/notSoWitty">
  <title>It's only going to get worse</title>
  <description>&lt;p&gt;This analysis of &lt;a href=&quot;http://www.caida.org/analysis/security/witty/&quot;&gt;the spread of the witty worm&lt;/a&gt; is fascinating for a whole bunch of different reasons.&lt;/p&gt;

&lt;p&gt;Firstly, the analysis was made possible by USCD's Network Telescope, a network monitoring system on a massive scale which takes advantage of the fact that IP arranges were &lt;a href=&quot;http://euclid.math.brandeis.edu/turtschi/whois/neta1.html&quot; title=&quot;List of Class A Networks&quot;&gt;handed out like candy&lt;/a&gt; back when the 'net was in its infancy. USCD controls a huge chunk of all potential IPv4 addresses, and their network telescope tracks data sent to 1/256th of all IPv4 traffic. Since most worms target random IP addresses this makes the telescope a unique tool in analysing the spread of hostile code in the wild.&lt;/p&gt;

&lt;p&gt;Next, Witty Worm was no ordinary worm. It targeted an exploit in &lt;a href=&quot;http://www.iss.net/&quot;&gt;ISS&lt;/a&gt; firewall products, which include the popular &lt;a href=&quot;http://blackice.iss.net/&quot;&gt;BlackICE&lt;/a&gt; product targeted at home users; this means the worm was actively attacking people who had made an effort to secure their machines! It also carried a destructive payload - a rarity for worms in the wild. Additionally, the exploit it used had only been publically announced the day before. It's possible the authors new of the vulnerability in advance, but it's far more likely they had already written the payload and were just waiting for a new vulnerability to use as the carrier.&lt;/p&gt;

&lt;p&gt;From reading the report, it seems that the worm managed to infect virtually every one of its potential targets that were connected to the internet. This critical point is what makes the worm so interesting, because it destroys the idea that non-Windows users are made more secure by  their relatively lesser numbers. If a worm came out with a similar methodology to Witty Worm but that targeted Linux, OS X or even something with a truly tiny statistical footprint like BeOS it could still achieve almost total infection of its chosen target audience.&lt;/p&gt;

&lt;p&gt;The worm also appears to have used a number of techniques that had previously been hypothesized by the security communit, such as spreading from a number of pre-infected hosts.&lt;/p&gt;

&lt;p&gt;If a worm can spread this fast, with this little notice, and infect almost all of the vulnerable population, we're in a pretty precarious state.&lt;/p&gt;

&lt;p&gt;Related reading: &lt;a href=&quot;http://m.bacarella.com/papers/secsoft/html/&quot;&gt;The Peon's Guide to Secure System Development&lt;/a&gt;, Slashdot's &lt;a href=&quot;http://slashdot.org/articles/04/03/26/0140254.shtml&quot; title=&quot;Analysis of the Witty Worm&quot;&gt;thread on the Witty Worm analysis&lt;/a&gt; (some of the +5 comments are pretty good).&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2004/03/27/notSoWitty</link>
  <dc:subject>Systems Administration</dc:subject>
  <dc:date>2004-03-27T00:32:59-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>
<item rdf:about="http://simon.incutio.com/archive/2004/03/02/apache2">
  <title>In praise of Apache documentation</title>
  <description>&lt;p&gt;I spent much of today upgrading a distinctly hairy Apache 1.3 server to Apache 2.0 as part of a routine &lt;acronym title=&quot;Operating System&quot;&gt;OS&lt;/acronym&gt; upgrade. It certainly wasn't plain sailing - I still have a few crinkles to iron out - but that's more down to the weirdness of the existing configuration than any problems with Apache 2.&lt;/p&gt;

&lt;p&gt;Apache 2 is a beautifully designed piece of software. The &lt;a href=&quot;http://httpd.apache.org/docs-2.0/&quot;&gt;documentation&lt;/a&gt; is superb - the &lt;a href=&quot;http://httpd.apache.org/docs-2.0/upgrading.html&quot; title=&quot;Upgrading to 2.0 from 1.3&quot;&gt;migration guide&lt;/a&gt; proved invaluable but the real gem was the &lt;a href=&quot;http://httpd.apache.org/docs-2.0/mod/quickreference.html&quot;&gt;directive quick reference&lt;/a&gt;. Armed with the quick reference and Firefox's &lt;a href=&quot;http://www.mozilla.org/projects/ui/accessibility/typeaheadfind.html&quot;&gt;Type Ahead Find&lt;/a&gt; the previously inpenetrable &lt;samp&gt;httpd.conf&lt;/samp&gt; file becomes a living tutorial on the wild and wonderful ways of Apache configuration. A wise old sysadmin once told me that the best way of learning Linux is to &lt;samp&gt;ls /bin&lt;/samp&gt; and run &lt;samp&gt;man &amp;lt;command&amp;gt;&lt;/samp&gt; for every command in there - then do the same thing for &lt;samp&gt;/sbin&lt;/samp&gt;, then &lt;samp&gt;/usr/bin&lt;/samp&gt; and so on until you run out of things to read. The same appears to be true of Apache configuration directives.&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2004/03/02/apache2</link>
  <dc:subject>Systems Administration</dc:subject>
  <dc:date>2004-03-02T05:11:41-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>
<item rdf:about="http://simon.incutio.com/archive/2004/02/27/bizex">
  <title>Bizex</title>
  <description>&lt;p&gt;I'm going to try not to turn this in to a blog about Windows security exploits but this one is genuinely interesting in that it actively tries to steal financial information and important passwords. Bizex spreads itself by spamming messages over ICQ advising the recipient to visit a specific &lt;acronym title=&quot;Universal Republic of Love&quot;&gt;URL&lt;/acronym&gt;. When they visit it, Internet Explorer exploits are used to download and execute the main payload which then infects their ICQ program and uses it to message their contacts. The worm also scans their hard drive for information relating to a number of well known financial services which it then uploads to a server via &lt;acronym title=&quot;File Transfer Protocol&quot;&gt;FTP&lt;/acronym&gt;, and it apparently snoops on their browser for any passwords travelling over HTTPS connections as well.&lt;/p&gt;

&lt;p&gt;It seems that the sole purpose of this worm was to steal a bunch of cash quickly, and it looks very likely to succeed. The servers used to spread the worm have since been taken offline but you can be sure the person or people behind the worm were smart enough to cover their tracks.&lt;/p&gt;

&lt;p&gt;More on Bizex can be found &lt;a href=&quot;http://www.kaspersky.com/news.html?id=4277566&quot; title=&quot;'Bizex' worm attacks ICQ users [02/24/2004]&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://www.viruslist.com/eng/viruslist.html?id=1029528&quot; title=&quot;Worm.Win32.Bizex&quot;&gt;here&lt;/a&gt;; Thors Larholm's &lt;a href=&quot;http://www.securityfocus.com/archive/1/355149/2004-02-24/2004-03-01/0&quot; title=&quot;Fw: [Unpatched] The Bizex worm&quot;&gt;analysis on BugTraq&lt;/a&gt; is particularly insightful.&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2004/02/27/bizex</link>
  <dc:subject>Systems Administration</dc:subject>
  <dc:date>2004-02-27T23:30:28-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>
<item rdf:about="http://simon.incutio.com/archive/2004/02/25/novel">
  <title>Novel security measures</title>
  <description>&lt;p&gt;An &lt;a href=&quot;http://www.securityfocus.com/columnists/221&quot; title=&quot;Knock, Knock, Knock&quot;&gt;article on SecurityFocus&lt;/a&gt; led me to this site about &lt;a href=&quot;http://www.portknocking.org/&quot;&gt;Port Knocking&lt;/a&gt;. Port Knocking is an interesting security technique in which a box sits online with no ports open to connections and awaits a specific sequence of connection attempts. A user wishing to connect to the box must first attempt to initiate connections to ports in a specific, secret order. Once they do, the box starts up the required service (such as an &lt;acronym title=&quot;Secure SHell&quot;&gt;SSH&lt;/acronym&gt; daemon) on a designated port and allows the user to connect properly.&lt;/p&gt;

&lt;p&gt;It's a pretty neat trick, and one that may well start showing up in backdoors and trojans in the future. It reminds me of a couple of other novel firewall related tricks: &lt;a href=&quot;http://www.openlysecure.org/openbsd/how-to/invisible_firewall.html&quot; title=&quot;Invisible Firewalling How-To&quot;&gt;invisible firewalls&lt;/a&gt; and &lt;a href=&quot;http://www.linuxsecurity.com/articles/firewalls_article-4418.html&quot; title=&quot;Running Your Firewall in runlevel 0&quot;&gt;firewalls that are effectively turned off&lt;/a&gt;.&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2004/02/25/novel</link>
  <dc:subject>Systems Administration</dc:subject>
  <dc:date>2004-02-25T23:40:06-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>
<item rdf:about="http://simon.incutio.com/archive/2004/02/24/brian">
  <title>"I'm Brian and so's my wife"</title>
  <description>&lt;p&gt;I'm subscribed to a whole bunch of mailing lists, mostly as a lurker as I have a hard enough time just keeping up with some of them. One of those lists is &lt;a href=&quot;http://www.securityfocus.com/archive/1&quot;&gt;Bugtraq&lt;/a&gt;, which is pretty much required reading for anyone with sysadmin responsibilities for a server connected to the public internet. Bugtraq is the central hub of the &quot;public disclosure&quot; security community and is actually surprisingly low traffic with only twenty or so messages a day. It's fascinating to watch the latest exploits for all manner of popular software packages tick by on an hourly basis.&lt;/p&gt;

&lt;p&gt;Last week, someone &lt;a href=&quot;http://www.securityfocus.com/archive/1/354615/2004-02-14/2004-02-20/0&quot; title=&quot;Bank of America contact&quot;&gt;posted&lt;/a&gt; to the list asking if anyone knew of a contact address for the security team at Bank of America. Today, they posted &lt;a href=&quot;http://www.securityfocus.com/archive/1/354779/2004-02-21/2004-02-27/0&quot; title=&quot;Re: Bank of America Contact&quot;&gt;a follow-up&lt;/a&gt; which included the following gem:&lt;/p&gt;

&lt;blockquote cite=&quot;http://www.securityfocus.com/archive/1/354779/2004-02-21/2004-02-27/0&quot;&gt;
&lt;p&gt;I'd also like to thank the 0-day social engineers for their variety of
approaches used to attempt to gain access to this exploit.  We received
responses ranging from fraudulent &quot;Bank of America&quot; employees to phone
calls from people claiming to be from Bank of America's IT Security.  (One
caller claimed to be from Bank of America's IT Security but didn't know
what PGP is and then said he couldn't give his PGP key due to security
restrictions.  And when we asked him to provide information so we could
verify the contact, he said he would call back but never did.  To this
caller: Yes, your social engineering failed and your caller-id spoofing was
almost perfect.  Emphasis on &quot;almost&quot;.)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For some reason, I'm reminded of &lt;a href=&quot;http://www.imdb.com/title/tt0079470/quotes#qt0034335&quot; title=&quot;I'm Brian and so's my wife!&quot;&gt;a classic scene&lt;/a&gt; from Monty Python's &lt;cite&gt;Life of Brian&lt;/cite&gt;.&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2004/02/24/brian</link>
  <dc:subject>Humour, Systems Administration</dc:subject>
  <dc:date>2004-02-24T01:26:57-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>
<item rdf:about="http://simon.incutio.com/archive/2004/01/22/defendingWebApplications">
  <title>Defending web applications against dictionary attacks</title>
  <description>&lt;p&gt;Over at Reflective Surface, Ronaldo M. Ferraz &lt;a href=&quot;http://www.reflectivesurface.com/weblog/archives/2004/01/21/security_vs_usability&quot; title=&quot;Security vs. usability&quot;&gt;discusses&lt;/a&gt; the usability of an authentication system that locks down an account for a certain period of time after three failed login attempts. Ronaldo sees this as a trade off between usability and security, but I see it more as an added security issue in that it allows malicious third parties to lock other user's accounts armed only with their username.&lt;/p&gt;

&lt;p&gt;The problem then is how best to defend web applications against brute force password guessing attacks without enabling denial of service attacks at the same time. The largest risk is from automated scripts that try every possible password until they get in. Identifying these attacks should be trivial - a real user could potentially fail a dozen or so times, but would be unlikely to try hundreds of combinations in quick succession. Assuming a malicious cracking attempt has been identified, what steps should a system take to foil the attack while still allowing the real user to access the site?&lt;/p&gt;

&lt;p&gt;I can think of a few options, none of which seem like the ideal solution:&lt;/p&gt;

&lt;ol&gt;
 &lt;li&gt;Ban login requests from the attacker's &lt;acronym title=&quot;Internet Protocol&quot;&gt;IP&lt;/acronym&gt; address. This introduces the usual problems with &lt;acronym title=&quot;Internet Protocol&quot;&gt;IP&lt;/acronym&gt; banning, namely the risk of banning a whole bunch of people indiscriminately but leaving the attacker free to skip the ban using open web proxies.&lt;/li&gt;
 &lt;li&gt;Lock the user's account and email them a warning of the attack and a special key needed to unlock the account again. This relies on the user having access to their email account when they next have a need to access the system. It also assumes that the user's email account is secure, but since both the user's password and the secret unlocking key will be required to access the system email security is of less importance (the user's password is not sent with the unlock key).&lt;/li&gt;
 &lt;li&gt;Send an automated alert to a system administrator so they can analyze the situation in real time and take any necessary action. This relies on administrators being available 24/7 - hardly a safe assumption for most systems.&lt;/li&gt;
 &lt;li&gt;After a certain number of failed attempts, challenge the user to &quot;prove their humanity&quot; with one of those obscured-text-as-image things. This comes with accessibility issues which have as yet been unresolved.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If anyone has any better solutions, please leave a comment.&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2004/01/22/defendingWebApplications</link>
  <dc:subject>Online Issues, Systems Administration</dc:subject>
  <dc:date>2004-01-22T01:02:07-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>
<item rdf:about="http://simon.incutio.com/archive/2003/12/31/psycopg">
  <title>Installing psycopg on Red Hat 9</title>
  <description>&lt;p&gt;Adrian Holovaty and I spent some time today figuring out how to get the &lt;a href=&quot;http://initd.org/software/psycopg/&quot;&gt;psycopg Postgres module&lt;/a&gt; to install on Red Hat 9. It took a while, but eventually we tweaked the spec file and used it to compile our own &lt;acronym title=&quot;Red Hat Package Manager&quot;&gt;RPM&lt;/acronym&gt;. I've posted our modified spec file &lt;a href=&quot;http://lists.initd.org/pipermail/psycopg/2003-December/002482.html&quot; title=&quot;[Psycopg] Updated spec file for Redhat 9&quot;&gt;to the psycopg mailing list&lt;/a&gt;. More for my own record than anything else, the arcane incantations needed to create the &lt;acronym title=&quot;Red Hat Package Manager&quot;&gt;RPM&lt;/acronym&gt; went roughly as follows:&lt;/p&gt;

&lt;ol&gt;
 &lt;li&gt;Copy the modified &lt;samp&gt;psycopg.spec&lt;/samp&gt; file in to &lt;samp&gt;/usr/src/redhat/SPECS/&lt;/samp&gt;&lt;/li&gt;
 &lt;li&gt;Copy &lt;samp&gt;psycopg-1.1.11.tar.gz&lt;/samp&gt; in to &lt;samp&gt;/usr/src/redhat/SOURCES&lt;/samp&gt;&lt;/li&gt;
 &lt;li&gt;In the SPECS directory, run &lt;samp&gt;rpmbuild -ba psycopg.spec&lt;/samp&gt;&lt;/li&gt;
 &lt;li&gt;Install the resulting &lt;acronym title=&quot;Red Hat Package Manager&quot;&gt;RPM&lt;/acronym&gt;, which materialised in &lt;samp&gt;/usr/src/redhat/RPMS&lt;/samp&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The above was recreated by digging through my bash history - hopefully I haven't missed a step. The technique appears to work for Fedora as well.&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2003/12/31/psycopg</link>
  <dc:subject>Systems Administration</dc:subject>
  <dc:date>2003-12-31T04:43:03-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>
<item rdf:about="http://simon.incutio.com/archive/2003/12/19/openMosix">
  <title>Open Mosix</title>
  <description>&lt;p&gt;I can't remember how I stumbled across it, but &lt;a href=&quot;http://openmosix.sourceforge.net/&quot;&gt;Open Mosix&lt;/a&gt; looks like a really interesting project. It's a Linux kernel extension that makes creating a Linux cluster is as simple as installing a kernel module on a number of machines and supplying each one with a shared config file.&lt;/p&gt;

&lt;p&gt;Once the cluster is set up, any of the machines on the network has the ability to farm long running processes out to a different box. The clustering only kicks in when a process is running in the background takes more than a few seconds to execute. Once that happens, Open Mosix checks the load averages on the machines in the cluster and, if a better host is found, migrates the process over to the other machine. The whole process is completely transparent; as far as the end user is concerned the processes they run just keep on running until they terminate.&lt;/p&gt;

&lt;p&gt;Since clustering only kicks off for longer running processes this woudn't be much use for something like a web server farm, but could be ideal for tasks such as compilation or rendering where individual processes perform computationally intensive work for a long period of time.&lt;/p&gt;

&lt;p&gt;Even more fascinating is &lt;a href=&quot;http://bofh.be/clusterknoppix/&quot;&gt;ClusterKnoppix&lt;/a&gt;, a modified Knoppix distro that uses an Open Mosix enabled kernel. Burn a bunch of CDs, boot some standard networked PCs with them and you've got an instant cluster.&lt;/p&gt;

&lt;p&gt;I've been doing some pretty intense log crunching today on a year's worth of daily web server logs, each one between 15 and 20 MB in size. Since most of the work is in running a regular expression on each line of each file it's likely a cluster would have speeded the whole thing up considerably. Unfortunately, I doubt my co-workers would have been overjoyed with me turning their machines in to cluster nodes for the day.&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2003/12/19/openMosix</link>
  <dc:subject>Systems Administration</dc:subject>
  <dc:date>2003-12-19T23:44:04-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>
<item rdf:about="http://simon.incutio.com/archive/2003/11/30/repartitioning">
  <title>Repartitioning with Knoppix</title>
  <description>&lt;p&gt;I've been long bemoaning the fact that if you want to repartition your hard drive to install Linux as a dual boot with an existing Windows system the most frequently recommended method is to buy a copy of Partion Magic. You would have thought the open source software world would have provided a free alternative by now.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.halfcooked.com/mt/archives/000655.html&quot; title=&quot;Even More Knoppix&quot;&gt;Via Andy Todd&lt;/a&gt;, it turns out that they have. &lt;a href=&quot;http://www.gnu.org/software/parted/&quot;&gt;GNU Parted&lt;/a&gt; is a repartioning tool for Linux. &lt;a href=&quot;http://qtparted.sourceforge.net/&quot;&gt;QtParted&lt;/a&gt; wraps it in a &lt;acronym title=&quot;Graphical User Interface&quot;&gt;GUI&lt;/acronym&gt; with a Partition Magic style interface. And the awesome &lt;a href=&quot;http://simon.incutio.com/archive/2003/10/23/knoppix&quot; title=&quot;An earlier entry about Knoppix&quot;&gt;Knoppix&lt;/a&gt; comes with QtParted included on the disk. So instead of shelling out for an expensive package that you are unlikely to ever use more than once, you can download and burn a Knoppix &lt;acronym title=&quot;Compact Disk&quot;&gt;CD&lt;/acronym&gt;, boot in to Linux and repartition from there. I'll be trying this out for real on Monday, and I'll report back with the results when I do.&lt;/p&gt;

&lt;p&gt;As an aside, has anyone ever found a web page that lists all of the software included on the Knoppix &lt;acronym title=&quot;Compact Disk&quot;&gt;CD&lt;/acronym&gt;?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Closer inspection reveals that Parted can't resize &lt;acronym title=&quot;New Technology File System&quot;&gt;NTFS&lt;/acronym&gt;. Thankfully, &lt;a href=&quot;http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html&quot;&gt;ntfsresize&lt;/a&gt; can - and ntfsresize is integrated in to QtParted. Magic.&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2003/11/30/repartitioning</link>
  <dc:subject>Open Source, Systems Administration</dc:subject>
  <dc:date>2003-11-30T00:36:02-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>
<item rdf:about="http://simon.incutio.com/archive/2003/11/26/windowsOnATMs">
  <title>Why run Windows on an ATM?</title>
  <description>&lt;p&gt;So you're writing the software for an &lt;acronym title=&quot;Automated Teller Machine&quot;&gt;ATM&lt;/acronym&gt;. It needs to display something pretty on the screen, control the hardware that serves out the money and talk securely to your central servers. It also needs to be stable, secure, reliable and allow remote administration. Why on &lt;em&gt;earth&lt;/em&gt; would you choose Windows as the operating system?&lt;/p&gt;

&lt;p&gt;Check out this article on The Register: &lt;a href=&quot;http://www.theregister.co.uk/content/55/34175.html&quot;&gt;Nachi worm infected Diebold ATMs&lt;/a&gt;. This just beggars belief. How a Windows worm spread on to a network with &lt;acronym title=&quot;Automated Teller Machine&quot;&gt;ATM&lt;/acronym&gt;s connected to it is beyond me - even if you take in to account employee laptops plugged in behind the firewall it's still incredible that the &lt;acronym title=&quot;Automated Teller Machine&quot;&gt;ATM&lt;/acronym&gt;s weren't on their own separate secure network.&lt;/p&gt;

&lt;p&gt;Here's the best bit:&lt;/p&gt;

&lt;blockquote cite=&quot;http://www.theregister.co.uk/content/55/34175.html&quot;&gt;&lt;p&gt;Billett defended the company's patching process, which he said involves testing each new bug fix, and deploying at a wide variety of institutions with a mix of network architectures. &quot;A lot of those machines actually have to be visited by a service technician&quot; to be patched, said Billett. &quot;Our experience in the past is we are able to turn those around in one or two days.&quot;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;What do you have to do to patch these things, plug in a keyboard and mouse?&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2003/11/26/windowsOnATMs</link>
  <dc:subject>Rants, Systems Administration</dc:subject>
  <dc:date>2003-11-26T05:16:33-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>
<item rdf:about="http://simon.incutio.com/archive/2003/11/19/contributeFixed">
  <title>Contribute / ProFTPd problem solved</title>
  <description>&lt;p&gt;After further analysis of the Contribute problem &lt;a href=&quot;http://simon.incutio.com/archive/2003/11/17/contributeProblem&quot; title=&quot;Contribute hammering FTP servers?&quot;&gt;described earlier&lt;/a&gt;, we discovered that Contribute was opening a new &lt;acronym title=&quot;File Transfer Protocol&quot;&gt;FTP&lt;/acronym&gt; connection every time we clicked a link within the application even before we had hit the &quot;edit page&quot; button to fire up the editing mode. Switching the connection over to use &lt;acronym title=&quot;Secure FTP&quot;&gt;SFTP&lt;/acronym&gt; instead of &lt;acronym title=&quot;File Transfer Protocol&quot;&gt;FTP&lt;/acronym&gt; had the same problem, with a secure connection being opened for each link we clicked instead. The connections remained open until we shut down Contribute.&lt;/p&gt;

&lt;p&gt;My hunch is that this could be an obscure bug that only surfaces when Contribute is used with ProFTPd 1.2.9. At any rate, we've solved the problem by setting the &lt;a href=&quot;http://proftpd.org/docs/directives/linked/config_ref_MaxClientsPerUser.html&quot;&gt;MaxClientsPerUser&lt;/a&gt; directive in the ProFTPd configuration file. Contribute doesn't seem to mind in the slightest.&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2003/11/19/contributeFixed</link>
  <dc:subject>Systems Administration</dc:subject>
  <dc:date>2003-11-19T23:05:30-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>
<item rdf:about="http://simon.incutio.com/archive/2003/11/17/contributeProblem">
  <title>Contribute hammering FTP servers?</title>
  <description>&lt;p&gt;We're having a problem at work with &lt;a href=&quot;http://www.macromedia.com/software/contribute/&quot;&gt;Macromedia Contribute&lt;/a&gt;. We host sites for a number of local companies, and one of them wants to use Contribute to update its site. The problem is that whenever Contribute tries to connect to our &lt;acronym title=&quot;File Transfer Protocol&quot;&gt;FTP&lt;/acronym&gt; server, it opens up 30 simultaneous connections, effectively running a denial of service that prevents other clients from logging in during peak times. I've searched the 'net and haven't found any references to this problem; does anyone know anything about the issue? We're running ProFTPD 1.2.9 and the client is using Macromedia Contribute 2.&lt;/p&gt;</description>
  <link>http://simon.incutio.com/archive/2003/11/17/contributeProblem</link>
  <dc:subject>Systems Administration</dc:subject>
  <dc:date>2003-11-17T23:34:25-00:00</dc:date>
  <dc:creator>Simon Willison</dc:creator>
</item>

</rdf:RDF>