<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Christopher J. Buckley &#187; Security</title>
	<atom:link href="http://www.cjbuckley.net/blog/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cjbuckley.net/blog</link>
	<description>Free-Software, GNU/Linux, Traffic Management &#38; Thoughts</description>
	<lastBuildDate>Mon, 16 Mar 2009 16:18:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>OSSEC rulesets for Zeus Webserver and ZXTM</title>
		<link>http://www.cjbuckley.net/blog/2007/05/04/ossec-ruleset-for-zeus-webserver-and-zxtm/</link>
		<comments>http://www.cjbuckley.net/blog/2007/05/04/ossec-ruleset-for-zeus-webserver-and-zxtm/#comments</comments>
		<pubDate>Fri, 04 May 2007 13:27:04 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[intrusion prevention]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[ossec]]></category>
		<category><![CDATA[zeus]]></category>
		<category><![CDATA[zxtm]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/2007/05/04/ossec-ruleset-for-zeus-webserver-and-zxtm/</guid>
		<description><![CDATA[OSSEC is a leading Intrusion Detection System for Enterprise UNIX(-like) and Windows platforms.  OSSEC is, by quite a way, the most innovative and customisable IDS product I have worked with.  
As a result of it&#8217;s ease of customisations, the developer Daniel B. Cid, with a little bit of help from myself, have implemented [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ossec.net/">OSSEC </a>is a <a href="http://www.linuxworld.com/news/2007/031207-top-5-security.html">leading Intrusion Detection System</a> for Enterprise UNIX(-like) and Windows platforms.  OSSEC is, by quite a way, the most innovative and customisable IDS product I have worked with.  </p>
<p>As a result of it&#8217;s ease of customisations, the developer Daniel B. Cid, with a little bit of help from myself, have implemented supported rule-sets for my former employers&#8217; products: <a href="http://www.zeus.com/products/zws">Zeus WebServer</a> and <a href="http://www.zeus.com/products/zxtm">ZXTM</a>.  Both products are widely deployed across many enterprise environments; adding specific rulesets for their software is one which I hope assists all fellow sysadmins tasked with running infrastructure using Zeus software. </p>
<h2>Download</h2>
<p>You can download the latest snapshot of OSSEC from <a href="http://www.ossec.net/files/snapshots/">this page</a>.  </p>
<h2>Implementation</h2>
<p>After running <code>install.sh</code> you can add the Zeus rulesets as you would any other supported rule set. </p>
<p><b>Example:</b></p>
<p>     &lt;localfile&gt;<br />
     &lt;log_format&gt;syslog&lt;/log_format&gt;<br />
     &lt;location&gt;/usr/local/zeus/zxtm/zxtm/log/errors&lt;/location&gt;</p>
<p>     &lt;localfile&gt;<br />
     &lt;log_format&gt;syslog&lt;/log_format&gt;<br />
     &lt;location&gt;/usr/local/zeus/zws/web/log&lt;/location&gt;</p>
<h2>Alerts</h2>
<p>Below you can clearly see the ruleset alerting you, quickly and efficiently, to a failure.<br />
&nbsp;<br />
<a href='http://www.cjbuckley.net/blog/wp-content/uploads/2007/05/ossec-monitor.png' title='OSSEC IDS Web Monitor'><img src='http://www.cjbuckley.net/blog/wp-content/uploads/2007/05/ossec-monitor.png' alt='OSSEC IDS Web Monitor' /></a></p>
<h2>Help..</h2>
<p>Any questions, just ask!  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2007/05/04/ossec-ruleset-for-zeus-webserver-and-zxtm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Achieving an Application upgrade, whilst still maintaining High Availability</title>
		<link>http://www.cjbuckley.net/blog/2007/04/23/achieving-an-application-upgrade-whilst-still-maintaining-high-availability/</link>
		<comments>http://www.cjbuckley.net/blog/2007/04/23/achieving-an-application-upgrade-whilst-still-maintaining-high-availability/#comments</comments>
		<pubDate>Mon, 23 Apr 2007 14:36:46 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[zeus]]></category>
		<category><![CDATA[zxtm]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/2007/04/23/achieving-an-application-upgrade-whilst-still-maintaining-high-availability/</guid>
		<description><![CDATA[Upgrading part of your back-end application is a task that must be planned and implemented meticulously.  This site has recently under-gone a code change to its Gallery application.  Here&#8217;s how this site was able to perform a full code upgrade, as well as still achieving full availability across both servers.
Considerations

Backup, backup, backup! We [...]]]></description>
			<content:encoded><![CDATA[<p>Upgrading part of your back-end application is a task that must be planned and implemented meticulously.  This site has recently under-gone a code change to its <a href="http://gallery.menalto.com/">Gallery</a> application.  Here&#8217;s how this site was able to perform a full code upgrade, as well as still achieving full availability across both servers.</p>
<h2>Considerations</h2>
<ul>
<li><b>Backup, backup, backup!</b> We must make sure that our backups are held securely and cannot be corrupted.  This database is small enough to use mysqldump, but incremental backups of the SQL binaries is a serious consideration in large scale enterprises</li>
<li><b>Gallery is clustered across two Apache webservers:</b> Any changes to my document root, will be quickly replicated across to the other webserver.  This must not be allowed to happen until regression testing has taken place across one production server.</li>
<li><b>MySQL replication:</b> any code changes rolled out will immediately be replicated across the MySQL cluster.   If the application upgrade fails, it will be a lot easier to roll back only one database.  We must be careful to not push this change across our databases until regression tested across one production box.</li>
<li><b>What role does our Load Balancer play?</b>  What rules do we need to implement to make sure traffic is directed accordingly&#8230;</li>
<li>For file replication, this site uses <a href="http://en.wikipedia.org/wiki/Rsync">rsync</a>.  To ensure code consistency during the maintenance window, this replication must be disabled. </li>
</ul>
<h2>Maintenance Actions</h2>
<ol>
<li>Perform a full backup of both the original Gallery code and the MySQL DB Binaries</li>
<li>Stop the replication slave running on Webserver 02.  The code change will be rolled out across Webserver 01, so it&#8217;s important no changes are replicated within our maintenance window.</li>
<li>How to deal with our traffic across our load balancers?  This will be covered in the next section.  Ultimately, we want all requests that <b>do not</b> contain /gallery/ in the path to be spread across all webservers; all requests for /gallery/ must be directed across the node not under maintenance (webserver 02) </li>
<li>Stop the rsync file replication process on both servers.</li>
</ol>
<h2>Load Balancer specifics</h2>
<ul>
<li>Create a rule that distributes requests for all requests that <b>do not</b> equal /gallery/ across all available webservers</li>
<pre>
if( ! string.contains( $path, "gallery" ) ) break;
</pre>
<li>Make sure that my IP address can reach the maintenance pool</li>
<pre>
   if ( ! string.ipmaskmatch( $ip, "my.ip.address/32" ) ) {
        pool.use( "Sticky Pool" );
}     else {
        pool.use( "Maintenance" ); }
</pre>
</ul>
<p>This ensures that my IP address reaches a pool containing one specific node &#8211; webserver01.  All other requests are load-balanced to the &#8216;Sticky Pool&#8217; which includes two nodes &#8211; webserver01 &#038; 02, however 01 is put in a draining node (no further connections being sent to it).  </p>
<p>So, both quickly and easily, using <a href="http://www.zeus.com/products/zxtm/manage/trafficscript">ZXTM&#8217;s trafficscript</a> we&#8217;re able to create rules to efficiently distribute traffic appropriately.   </p>
<p><b>End Result:</b> All requests are still load-balanced across both webservers, with the exception of requests for $path == /gallery/.  These requests are sent to one specific node (not under maintenance).  This allows the webmaster (me!) to upgrade the code base, and regression test, across webserver 01.</p>
<h2>Code Upgrade</h2>
<p>Load Balancer rules enabled, we can safely proceed with our code upgrade.  This is simply a matter of uploading the new codebase across the existing one.  We can then proceed to the <a href="http://www.cjbuckley.net/gallery/">Gallery site</a> knowing that we will go to webserver 01; able to both test and perform the application upgrade as applicable.  This completed, and tested, we can now restart our rsync daemons, and allow the MySQL slave to start again on webserver 02.  Within seconds the code change has been pushed out across the remaining webserver.  </p>
<p><b>End Result:</b> A complete success.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2007/04/23/achieving-an-application-upgrade-whilst-still-maintaining-high-availability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postfix: Why should I use a different port for SMTP-AUTH?  Any instructions?</title>
		<link>http://www.cjbuckley.net/blog/2007/04/17/postfix-smtp-auth/</link>
		<comments>http://www.cjbuckley.net/blog/2007/04/17/postfix-smtp-auth/#comments</comments>
		<pubDate>Mon, 16 Apr 2007 23:57:40 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/2007/04/17/postfix-why-should-i-use-a-different-port-for-smtp-auth-any-instructions/</guid>
		<description><![CDATA[Today I was implementing smtp-auth across our mail-cluster for clients whose ISPs block port 25.  I&#8217;d like to blog my experience here so as to save others encountering the anomalies I did. 
Firstly, I already run postfix on the recommended MUA/MTA submission port (587), then make entries for trusted static IPs in postfix&#8217;s $mynetworks [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was implementing smtp-auth across our mail-cluster for clients whose ISPs block port 25.  I&#8217;d like to blog my experience here so as to save others encountering the anomalies I did. </p>
<p>Firstly, I already run postfix on the recommended MUA/MTA submission port (587), then make entries for trusted static IPs in postfix&#8217;s $mynetworks variable.  However, the time has come to push smtp-auth via username &#038; password, and to remove the ever-growing $mynetworks entry.  </p>
<h1>Tech Philosophy</h1>
<p>So, why do I run postfix on port 587?  What is special about this port?  <a href="http://www.faqs.org/rfcs/rfc2476.html">RFC 2476</a> states. . .</p>
<blockquote>
<p>1.  Abstract</p>
<p>SMTP was defined as a message *transfer* protocol, that is, a means to route (if needed) and deliver finished (complete) messages.  Message Transfer Agents (MTAs) are not supposed to alter the message text, except to add &#8216;Received&#8217;, &#8216;Return-Path&#8217;, and other header fields as required by [SMTP-MTA].</p>
<p>However, SMTP is now also widely used as a message *submission* protocol, that is, a means for message user agents (MUAs) to introduce new messages into the MTA routing network.  The process which accepts message submissions from MUAs is termed a Message Submission Agent (MSA).</p>
<p>3.1.  Submission<br />
Port 587 is reserved for email message submission as specified this document.  Messages received on this port are defined to submissions.  The protocol used is ESMTP [SMTP-MTA, ESMTP], with additional restrictions as specified here.
</p></blockquote>
<p>Essentially, the RFC informs us that if you wish to perform SMTP submissions (ie, direct interaction between an MUA and an MTA in submitting e-mail) you should perform it via port 587.  <a href="http://archives.seul.org/or/talk/Sep-2005/msg00204.html">GMail, for instance, defaults to SMTP-AUTH via port 587</a></p>
<h1>Implementation</h1>
<p>Ok, technical philosophy out of the way, let&#8217;s move onto quickly and easily setting up your MTA correctly.  My MTA of choice, as I&#8217;ve written about quite a lot on this blog, is <a href="http://en.wikipedia.org/wiki/Postfix_%28software%29">Postfix</a>.</p>
<p>According to the <a href="http://www.postfix.org/faq.html">Postfix FAQ </a> you can instruct Postfix to run on a port that ! == 25.</p>
<p>This is performed by editing master.cf and appending:</p>
<pre>
# service type  private unpriv  chroot  wakeup  maxproc command + args
#                  (yes)   (yes)   (yes)   (never) (100)
# ==========================================================
  587       inet     n      -       n         -       -       smtpd
</pre>
<p>So far, this will allow you to submit a message to the MTA as long as your IP is contained within $mynetworks.  Well, this was my first problem &#8211; I wanted to move away from this way of doing things.  Whenever I tried to perform an smtp-auth, utilising saslauthd, I saw this in my syslog:</p>
<pre>
postfix/smtpd[15281]: warning: SASL authentication failure:
cannot connect to saslauthd server: No such file or directory
postfix/smtpd[15281]: warning: SASL authentication failure:Password verification failed
postfix/smtpd[15281]: warning: foo.bar (x.x.x.x): SASL PLAIN authentication failed: generic failure
</pre>
<p>This just didn&#8217;t make any sense &#8211; port 25 accepted smtp-auth with no problems.  Just what was different?  I had to perform some research&#8230;</p>
<p>After much searching, I found the answer! It&#8217;s frustratingly simple.  By default, <a href="http://www.debian.org/">debian</a> runs postfix in a chroot, this is for increased security. <a href="http://www.elantech.ru/docs/postfix-docs-ru/SMTPD_PROXY_README.html?print=Y">However, due to the issues raised here with regards to Postfix Before-Queue Content Filter</a>&#8230;</p>
<blockquote><p>
The before-filter Postfix SMTP server forwards the MAIL FROM, RCPT TO and DATA commands that it has approved, but it does not forward other commands such as TLS or SASL commands. It can therefore not be transparent.
</p></blockquote>
<p>The answer to this?  Simply enter back into the chroot.  I still am unsure why the postfix faq recommends that you break-out of the chroot to accept mail on an alternative port &#8211; could someone perhaps enlighten me?  </p>
<p>So, I changed our master.cf to reflect these changes&#8230;</p>
<pre>
# service type  private unpriv  chroot  wakeup  maxproc command + args
#                  (yes)   (yes)   (yes)   (never) (100)
# ==========================================================
  587       inet     n      -       -         -       -       smtpd
</pre>
<p>&#8230;I now have a fully clustered, smtp-auth (via sasl) postfix server running on the appropriate RFC designated ports.  </p>
<p>Result!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2007/04/17/postfix-smtp-auth/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Speaking CCTV &#8211; enough! We&#8217;ve gone too far.</title>
		<link>http://www.cjbuckley.net/blog/2007/04/04/speaking-cctv-enough-weve-gone-too-far/</link>
		<comments>http://www.cjbuckley.net/blog/2007/04/04/speaking-cctv-enough-weve-gone-too-far/#comments</comments>
		<pubDate>Wed, 04 Apr 2007 13:21:32 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[cctv]]></category>
		<category><![CDATA[ranting]]></category>
		<category><![CDATA[surveillance]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/2007/04/04/speaking-cctv-enough-weve-gone-too-far/</guid>
		<description><![CDATA[The BBC leads today with a story of great concern to anyone who holds any remote hope that Britain has not sleep-walked into a surveillance society.  Ex-Communist, and current Home Secretary, John Reid blindly pontificates that these cameras will only concern those&#8230;
In the minority who will be more concerned about what they claim are [...]]]></description>
			<content:encoded><![CDATA[<p>The BBC leads today with a story of great concern to anyone who holds any remote hope that Britain has not sleep-walked into a surveillance society.  <a href="http://www.findarticles.com/p/articles/mi_qn4158/is_200101/ai_n9661596/pg_3">Ex-Communist</a>, and current Home Secretary, John Reid blindly pontificates that these cameras will only concern those&#8230;</p>
<blockquote><p>In the minority who will be more concerned about what they claim are civil liberties intrusions.  But the vast majority of people find that their life is more upset by people who make their life a misery in the inner cities because they can&#8217;t go out and feel safe and secure in a healthy, clean environment because of a minority of people.</p></blockquote>
<p>Britain now has more CCTV surveillance cameras than any other nation on earth &#8211; yes, even <i>more than China and N. Korea</i>.    Well, i don&#8217;t know about anyone else, but i&#8217;m scared.  This is how democracies fall into autocracies; through the subversion of democracy by the democratically-elected political ruling elite.  </p>
<p>Please, people of the UK, vote this government out at the next election.  To not do so would be a reckless injustice to what little is left of Britain&#8217;s democratic process.  Already the government is re-drawing political boundaries to give their candidates unfair advantage, after having spent years trying to (misguidedly) re-haul the House Of Lords (the voice of sanity recently).  </p>
<p>Enough is enough!  You have a vote on May 2nd &#8211; use it. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2007/04/04/speaking-cctv-enough-weve-gone-too-far/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Matt Cutts Hacked!</title>
		<link>http://www.cjbuckley.net/blog/2007/04/01/matt-cutts-hacked/</link>
		<comments>http://www.cjbuckley.net/blog/2007/04/01/matt-cutts-hacked/#comments</comments>
		<pubDate>Sun, 01 Apr 2007 12:25:55 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/2007/04/01/matt-cutts-hacked/</guid>
		<description><![CDATA[I awake today, to find that SEO expert Matt Cutts&#8217; personal blog has been the victim of a defacement attack.  Here&#8217;s a screengrab:

This doesn&#8217;t appear to be an April Fool&#8217;s&#8230;
Interstingly, this isn&#8217;t a wordpress hack, but appears to be an exploit in the version of Apache (1.3.37) Matt&#8217;s webhost were running (note: Matt&#8217;s site [...]]]></description>
			<content:encoded><![CDATA[<p>I awake today, to find that SEO expert <a href="http://www.mattcutts.com/blog/">Matt Cutts&#8217; personal blog</a> has been the victim of a defacement attack.  Here&#8217;s a screengrab:</p>
<p><a href='/blog/wp-content/uploads/2007/04/matt-cutts.png' title='Matt Cutts Hacked'><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src='/blog/wp-content/uploads/2007/04/matt-cutts.thumbnail.png'  alt='Matt Cutts Hacked'/></a></p>
<p>This doesn&#8217;t appear to be an April Fool&#8217;s&#8230;<br />
Interstingly, this isn&#8217;t a wordpress hack, but appears to be an exploit in the version of Apache (1.3.37) Matt&#8217;s webhost were running (note: <u>Matt&#8217;s site is not hosted by Google</u>).<br />
<span id="more-152"></span><br />
Rule number 1 in security: never make your webservers directly publically accessible.  Always reverse-proxy to them.  You can then inspect silly hack attempts like this and stop them before the client request reaches your webserver.  </p>
<p>The team responsible for the defacement have written this to Matt:</p>
<blockquote><p>
Dear Matt,</p>
<p>Sorry it falls on you! We at DarkSeoteam appreciate your blog, respect your workâ€¦ and you look like a nice guy. But your blog looked like the perfect target. First because you donâ€™t rely on it for income, second because, on the internet, there is no better proof than a punchy example.</p>
<p>As many fellow webmasters, we have been reading the endless threads at webmasterworld, where site owners were complaining for having their websites â€œGooglewashedâ€, and income hurt by unscrupulous competitors.</p>
<p>As many fellow webmasters, we were shocked that Google and GoogleGuy did not even dare to comment.</p>
<p>Matt ! Google doesnâ€™t have to feel ashamed for the bugs. Everyone involved in software and algorithms can understand what bug means for real. We all had bugs. The only thing we canâ€™t understand is that Google doesnâ€™t say itâ€™s going to fix it asap.</p>
<p>We wonâ€™t make public the way we ranked on &#8220;bacon polenta&#8221;because we donâ€™t want the technic used spreading on the web. However, it seems that many posters at webmasterworld and threadwatch understood the whole thing. But thatâ€™s not the point.</p>
<p>The point is:</p>
<p>    Anyone can use Googleâ€™s duplicate content filters to ruin a competitorâ€™s website, and steal his ranking and traffic.</p>
<p>Moreover, Matt, the webmasters&#8217; community does not need an immediate fix, but it needs Google to admit that it is not able to differentiate between the original contents and the duplicate one, and it needs to hear that Google is working hard on fixing this severe issue.</p>
<p>Last thing Matt. You said at threadwatch that you were not going to do anything special for your blog. It honors you, but beware that the whole thing could worsen in the next days. Not that we are going to do anything else about it, but our test is very recent. It was just set-up on September 25 (yeah, less than 10 days to get a visit from GoogleGuy, weâ€™re proud lol), and Googlebot has not finished his job yet.</p>
<p>As we said Matt, weâ€™re leaving the test &#8220;as it is&#8221;. Hopefully you guys in the Googleplex can use it as a &#8220;cobaye&#8221; to fix your algo. After all, our site is just a lab, and youâ€™re welcome to use it.</p>
<p>The DarkSeoTeam
</p></blockquote>
<p>I&#8217;ve just read that the guys at <a href="http://www.unofficialseoblog.com/2007/04/01/matt-cutts-get-hacked/">Unofficial SEO Blog</a> believe that &#8216;<i>Matt&#8217;s upgrade of WordPress installation from 2.0.x to 2.1.x might have helped Dark SEO Team to hack it</i>.&#8217;  This does not appear to be a wordpress hack, but rather an Apache exploit.  It will be interesting if the precise exploit is ever detailed.   All this demonstrates is why <u>every enterprise site must use some form of application firewall</u>.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2007/04/01/matt-cutts-hacked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to protect against SSH dictionary attacks</title>
		<link>http://www.cjbuckley.net/blog/2007/02/02/how-to-protect-against-ssh-dictionary-attacks/</link>
		<comments>http://www.cjbuckley.net/blog/2007/02/02/how-to-protect-against-ssh-dictionary-attacks/#comments</comments>
		<pubDate>Fri, 02 Feb 2007 12:48:20 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/2007/02/02/how-to-protect-against-ssh-dictionary-attacks/</guid>
		<description><![CDATA[The question is often ponderered &#8211; how does a good systems administrator protect against dictionary attacks on an openSSH server?  You will hear many, all fully relevant, opinions opining complete lock-down at firewall level of port 22, holes punched for known good-hosts, and the use of application programs such as DenyHosts and Cracklib.
All these [...]]]></description>
			<content:encoded><![CDATA[<p>The question is often ponderered &#8211; how does a good systems administrator protect against dictionary attacks on an openSSH server?  You will hear many, all fully relevant, opinions opining complete lock-down at firewall level of port 22, holes punched for known good-hosts, and the use of application programs such as <a href="http://denyhosts.sourceforge.net/">DenyHosts</a> and <a href="http://www.fifi.org/doc/cracklib2/">Cracklib</a>.</p>
<p>All these options are excellent ideas, however, has the option of using your firewall&#8217;s strategic capabilities been considered?  Let&#8217;s take a look.</p>
<p>Within iptables you can essentially add IP addresses to a list, which are then checked against by all future matched incoming connections. This allows a sysadmin to limit the number of connections against either a number of seconds, or connection attempts. </p>
<p>The following two rules will limit incoming connections to port 22 to no more than 5 attemps in a minute &#8211; any more than that will be dropped:</p>
<blockquote><p>
iptables -I INPUT -p tcp &#8211;dport 22 -i eth0 -m state &#8211;state NEW \<br />
-m recent &#8211;set<br />
iptables -I INPUT -p tcp &#8211;dport 22 -i eth0 -m state &#8211;state NEW \<br />
 -m recent &#8211;update &#8211;seconds 60 &#8211;hitcount 5 -j DROP
</p></blockquote>
<p>This rule firstly records all new incoming connections, the second rule is where the clever stuff is done..<br />
Ultimately, these rules means that:</p>
<ul>
<li> The IP address which initiated the connection has previously been added to the list and</li>
<li> The IP address has sent a logged packet in the past 60 seconds and</li>
<li> The IP address has sent >=5 packets in total.</li>
</ul>
<p>&nbsp;<br />
With this rule implemented you can protect yourself safely, efficiently and securely against dictionary attacks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2007/02/02/how-to-protect-against-ssh-dictionary-attacks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Stopping O2 from disclosing your network location</title>
		<link>http://www.cjbuckley.net/blog/2006/10/04/stopping-o2-from-disclosing-your-network-location/</link>
		<comments>http://www.cjbuckley.net/blog/2006/10/04/stopping-o2-from-disclosing-your-network-location/#comments</comments>
		<pubDate>Wed, 04 Oct 2006 18:23:51 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[surveillance]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/?p=78</guid>
		<description><![CDATA[The Register reports how O2 have changed their T&#038;C&#8217;s to allow them to disclose your movement and location patterns to outside interests.  Act now &#8211; disable this invasion of privacy.  Dial 1300 from your O2 phone, and opt-out of their tracking service.  You have been warned&#8230;
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.theregister.co.uk/2006/10/04/mobile_phone_location_data/">The Register reports how O2 have changed their T&#038;C&#8217;s</a> to allow them to disclose your movement and location patterns to outside interests.  Act now &#8211; disable this invasion of privacy.  <strong>Dial 1300</strong> from your O2 phone, and opt-out of their tracking service.  You have been warned&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2006/10/04/stopping-o2-from-disclosing-your-network-location/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tesco finally introduces self-service chip and pin!</title>
		<link>http://www.cjbuckley.net/blog/2006/09/15/tesco-finally-introduces-self-service-chip-and-pin/</link>
		<comments>http://www.cjbuckley.net/blog/2006/09/15/tesco-finally-introduces-self-service-chip-and-pin/#comments</comments>
		<pubDate>Thu, 14 Sep 2006 23:14:09 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/?p=67</guid>
		<description><![CDATA[The local Tesco&#8217;s here in Cambridge has finally introduced chip and pin to their self-service kiosks!  Previously, there was a _huge_ security lapse here; a customer could simply steal a debit/credit card, use a self-service machine, swipe the stolen card with no signature or pin check required!  It&#8217;s nice to see Tesco finally [...]]]></description>
			<content:encoded><![CDATA[<p>The local Tesco&#8217;s here in Cambridge has finally introduced <a href="http://en.wikipedia.org/wiki/Chip_and_PIN">chip and pin</a> to their self-service kiosks!  Previously, there was a _huge_ security lapse here; a customer could simply steal a debit/credit card, use a self-service machine, swipe the stolen card with no signature or pin check required!  It&#8217;s nice to see Tesco finally doing something about this huge security hole.</p>
<p><img id="image68" src="http://www.cjbuckley.net/blog/wp-content/uploads/2006/09/14092006.jpg" alt="Chip and Pin at Tesco, Bar Hill." /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2006/09/15/tesco-finally-introduces-self-service-chip-and-pin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to change the location of your Google Desktop index</title>
		<link>http://www.cjbuckley.net/blog/2006/09/05/how-to-change-the-location-of-your-google-desktop-index/</link>
		<comments>http://www.cjbuckley.net/blog/2006/09/05/how-to-change-the-location-of-your-google-desktop-index/#comments</comments>
		<pubDate>Tue, 05 Sep 2006 10:43:50 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/?p=47</guid>
		<description><![CDATA[
Google Desktop Search is perhaps the one program that makes Windows worth using again&#8230;however, as i&#8217;ve spoken about previously, your privacy is drastically reduced after you install this search utility.  The contents of your computer will now be contained within one directory on your filesystem &#8212; imagine if this contents was read by someone [...]]]></description>
			<content:encoded><![CDATA[<p>
<a href="http://desktop.google.com/">Google Desktop Search</a> is perhaps the one program that makes Windows worth using again&#8230;however, as i&#8217;ve spoken about previously, your privacy is drastically reduced after you install this search utility.  The contents of your computer will now be contained within one directory on your filesystem &#8212; imagine if this contents was read by someone you did not wish to have access?  Google has an option to &#8216;encrypt index data&#8217;, but this is false security &#8212; Microsoft backdoors this (already weak) algorithm, and anyone with administrator rights to your PC can simply change your account password to decrypt the index.
</p>
<p>The answer is to allow your desktop index to reside on an encrypted drive.  However, <a href="http://desktop.google.com/support/bin/answer.py?answer=10727&#038;topic=198">google does not allow you to directly change your index location</a>.  Here&#8217;s how you over-come this&#8230;</p>
<p>Load up &#8220;regedit&#8221;, then navigate to:<br />
<code>HKEY_CURRENT_USER\SOFTWARE\Google\Google Desktop\</code></p>
<p>Change the file <code>data_dir</code> to your new, custom, location:<br />
<br />
<img id="image46" src="http://www.cjbuckley.net/blog/wp-content/uploads/2006/09/gds.png" alt="gds.png" /></p>
<p>Exit regedit, restart GDS.</p>
<p>Done!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2006/09/05/how-to-change-the-location-of-your-google-desktop-index/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Terrorism?</title>
		<link>http://www.cjbuckley.net/blog/2006/08/23/what-is-terrorism/</link>
		<comments>http://www.cjbuckley.net/blog/2006/08/23/what-is-terrorism/#comments</comments>
		<pubDate>Wed, 23 Aug 2006 13:05:34 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/?p=42</guid>
		<description><![CDATA[â€˜One manâ€™s terrorist is another manâ€™s freedom fighterâ€™.  This theme and its variations have been heard so often, that it has become impossible to agree on a single definition of terrorism that exclusively satisfies everyone.  There are certain components that tend to appear in more authoritative attempts to define this elusive term, however [...]]]></description>
			<content:encoded><![CDATA[<p>â€˜One manâ€™s terrorist is another manâ€™s freedom fighterâ€™.  This theme and its variations have been heard so often, that it has become impossible to agree on a single definition of terrorism that exclusively satisfies everyone.  There are certain components that tend to appear in more authoritative attempts to define this elusive term, however none is without its difficulties.    The first focuses on the nature of the targeted victims.  The deliberate killing of innocent civilians is a central element in most established definitions of terrorism.  This can certainly not be argued as the only criterion, however. By this definition the bombings of Hiroshima, Nagasaki and Dresden by the armed forces of the United States and Great Britain would have to be considered terrorism.  Whatever else these actions might have constituted, most would not regard them as an act of terrorism.  This being the case, why is it that the attacks on the Pentagon and the Marine barracks in Lebanon and Saudi Arabia are widely regarded as acts of terrorism â€“ certainly by the U.S. Government â€“ even though the targets were primarily military.<br />
<span id="more-42"></span><br />
A second element that often factors into the definition of terrorism concerns the nature of those who commit the violence.  According to several definitions of terrorism, only groups that are not part of the official apparatus of the state can commit terrorism.  Dershowitz writes that  a â€˜distinguishing characteristic of what many people regard as terrorismâ€™, and the characteristic of what many people regard as terrorism, â€˜is its shadowy natureâ€™.   The majority of acts of terrorism are difficult to pin on individual nation states.  Instead, they are committed by unofficial groups that have no standing army and no â€˜return addressâ€™ where preventive or retaliatory attacks can be carried out.  The terrorist carries out his murderous duty, then slips quietly back into the civilian population, or is sometimes killed.  The modern terrorist is not someone we can simply put into any stereotypical category, as increasingly the terrorist might be a women, a teenager, or even a child.  The actual word â€˜terrorismâ€™ has its historical origins not in the actions of shadowy groups, but in acts of terror inflicted by the state on its own citizens.  Dershowitz observes that the â€˜reign of terror, conducted by the revolutionary government of France was the paradigmâ€™.   It is worthwhile noting that terror was an integral part of the Stalinist, Nazi, Peronist, and other totalitarian and authoritarian regimes.</p>
<p>The third aspect to consider when considering defining terrorism, seeks to include the mechanism by which those who engage in violence seek to influence the actions and attitudes of their intended audiences.  Terrorists seek to attract attention to their cause by employing, or directly threatening, sensational acts of violence that seize the attention of the media, serving to terrorise populations.   One academic characterised terrorism as â€˜propaganda  by deedâ€™.   Dershowitz seeks to further elaborate this as â€˜by violent and deadly deeds, often against the vulnerable and innocent of victims, and often only as an initial step in a multifaceted program of violenceâ€™.   As Clausewitz once commented, if â€˜war is a mere continuation of policy of other meansâ€™ then terrorism is war by other means.  Criminal organisations have a history of employing the technique of terror.  However, in this case their objectives are financial rather than military, religious or nationalistic. </p>
<p>Consequently, and not surprisingly, there is very little established agreement on the meaning of the word â€˜terrorismâ€™.    It is regarded as an extraordinary and extreme form of political behaviour; its historical, political, economic, religious and social causes far from clear.  Terrorism is extremely diffuse, indeed an explicit definition is often not even attempted, and when the matter is broached, it is routinely admitted that there is â€˜no single universally accepted definition of the termâ€™.   Even the various agencies of the U.S. government are not united, offering very different definitions of terrorism.  The U.S. State Department, for example, uses the definition of terrorism contained in Title 22 of the United States Code, Section 2656(d):</p>
<p><em>. . .premeditated, politically motivated violence perpetrated against non-combatant targets by sub-national groups or clandestine agents, usually intended to influence an audience </em></p>
<p>The U.S Federal Bureau of Investigation defines terrorism as </p>
<p><em>. . . the unlawful use of force or violence against persons or property to intimidate or coerce a Government, the civilian population, or any segment thereof, in furtherance of political or social objectives, </em></p>
<p>whereas the U.S. Department of Defence defines it as</p>
<p><em>. . .the unlawful use of â€“ or threatened use of â€“ force or violence against individuals or property to coerce or intimidate governments or societies, often to achieve political, religious, or ideological objectives. </em></p>
<p>Bruce Hoffman concedes that â€˜not surprisingly, each of the above definitions reflects the priorities and particular interests of the specific agency involvedâ€™.   The State Departmentâ€™s emphasis is on the premeditated and planned, or calculated, nature of terrorism in direct contrast to more spontaneous acts of political violence.  Its definition is also the only one of the three to place emphasis on both the ineluctably political nature of terrorism and the perpetratorsâ€™ fundamental â€˜sub-nationalâ€™ characteristic.  Notably, the State Departmentâ€™s definition is sufficiently lacking when it comes to considering the psychological dimension of terrorism.  Hoffman believes Terrorism to be as much â€˜about the threat of violence as the violent act itself, and accordingly, is deliberately conceived to have far reaching psychological repercussions beyond the actual target of the act among a wider, watching, â€˜targetâ€™ audienceâ€™.   As Brian Jenkins carefully noted just over two decades ago, â€˜terrorism is theatreâ€™.  Quite simply, the terrorist prefers a lot of people watching rather than a lot of people dead.     </p>
<p>The Department of Defenceâ€™s definition is arguably the most complete of the above  definitions.  As Hoffman notes, their definition seeks to highlight the threat of the terrorist equally as much as the actual act of violence, focusing on terrorismâ€™s targeting of whole societies as well as governments and state apparatus.  Notably, the Department of Defence cites the religious and ideological aims of terrorism alongside its fundamental political objectives â€“ however, omits the crucial social dimensions founds in the FBIâ€™s definition.   </p>
<p>So, just why is the word â€˜terrorismâ€™ seemingly so difficult to define?  Hoffman observes that â€˜as the meaning and usage of the word  have changed over time to accommodate the political vernacular and discourse of each successive era, terrorism has proved increasingly elusive in the face of attempts to construct one consistent definitionâ€™.   Indeed, earlier terrorist practitioners were far more willing to co-operate in this endeavour than their contemporaries.  Early terrorists didnâ€™t suppress their terrorist desires or hide behind such semantics such as â€˜freedom fighterâ€™ or â€˜urban guerrillaâ€™. </p>
<p>Indeed, the nineteenth century anarchists unashamedly and with forthright, proclaimed themselves to be terrorists and admitted their tactics to be that of terrorism.   By the middle of the 20th Century, however, this forthright language was beginning to quell.  The Jewish terrorist organisation of the 1940â€™s known as Lehi is thought to be one of the last terrorist organisations to publicly describe itself as such.   Similarly, more than twenty years later the Brazilian revolutionary Carlos Marighela pulled no punches when it came to the avocation of terrorist tactics , yet he still insisted on portraying himself and his followers as â€˜urban guerrillasâ€™ rather than â€˜urban terroristsâ€™.  Furthermore, it is clear from Marighelaâ€™s writings that he was fully aware of the wordâ€™s undesirable connotations, and took steps to replace them with more favourable ones.   The usage of the words â€˜terrorismâ€™ and â€˜terroristâ€™ have acquired an intensely negative connotation in contemporary discourse.  Part of the explanation is the perception that terrorism targets (innocent) people who should not be targeted, and involves methods that should not be employed, for example, the taking and killing of hostages.  Accordingly, the perpetrators of terrorist acts are commonly perceived to be morally depraved, even when the terrorist is willing to sacrifice their own life to further their cause. </p>
<p>There is one point that political scientists generally all agree on: terrorism is a pejorative term.   It is a word with distinctly negative connotations that is generally applied to oneâ€™s enemies and opponents, or to those with whom one disagrees and would otherwise prefer to ignore.  Brian Jenkins wrote that â€˜what is called terrorism, thus seems to depend on oneâ€™s point of view.  Use of the term implies a moral judgement; and if one party can successfully attach the label terrorist to its opponent, then it has indirectly persuaded others to adopt its moral viewpointâ€™.   Hoffman believes that the decision to call someone or label an organisation â€˜terroristâ€™ thus becomes almost unavoidably subjective, depending largely on whether one sympathises with or opposes the person/group/cause concerned.  If one identifies with the victim of the violence, for example, then the act is classed as terrorism.  </p>
<p>On the other hand, if one identifies with the perpetrator, the violent act is regarded in a more sympathetic, if not positive light; and it is not classed as terrorism.    This  statement could not be better demonstrated than when, following the 1972 Munich Olympics massacre, then UN Secretary-General Kurt Waldheim urged the UN member states to take practical steps that might prevent further bloodshed.    Whilst most member states supported the Secretary-General, a minority of Arab states and various African and Asian countries sought to derail the discussions.  They argued that â€˜people who struggle to liberate themselves from foreign oppression and exploitation have the right to use all methods at their disposal, including forceâ€™.  </p>
<p>The delegates from the Third World attempted to justify their stance with two arguments.   They first claimed that all bona-fide liberation movements are invariably labelled as â€˜terroristsâ€™ by the regimes against which their struggles for freedom are directed.  For example, the Naziâ€™s labelled resistance groups who opposed Germanyâ€™s occupation of their lands, â€˜terroristsâ€™.  Therefore, by seeking to condemn terrorism the UN was effectively endorsing the power of the strong over the weak â€“ in effect, acting to defend the status quo.    Secondly, the delegates argued that it is not the violence itself that is germane, but its â€˜underlying causesâ€™: that is, the â€˜misery, frustration, grievance and despairâ€™ that produce such violent atrocities.    As  a result of these actions, UN efforts to make substantial progress on international co-operation against terrorism were throttled.</p>
<p>It is perhaps comforting to know, that even the wisest of scholars and respected experts have struggled to come up with an all-encompassing definition of â€˜terrorismâ€™.  Indeed, Alex Schmid devoted more than a hundred pages to examining more than a hundred definitions of terrorism in an effort to discover a reasonably acceptable, comprehensive explication of the word.  Four years and a second edition later, Schmid was no closer in achieving his quest, conceding in the first sentence of his revised volume that the â€˜search for an adequate definition is still onâ€™.    In his ground-breaking work on the subject, Walter Laqueur experienced immense trouble trying to define terrorism.  Eventually concluding that â€˜it is neither possible to do so nor worthwhile to make the attemptâ€™.   Responding to a survey on definitions by Schmid, Laqueur asserted that â€˜ten years of debates on typologies and definitions have not enhanced our knowledge of the subject to a significant degreeâ€™.    </p>
<p>Throughout, this essay has deliberately not attempted to explicitly define the word terrorism, but rather to demonstrate the elements that factor into attempted definitions of the word; as well as demonstrating just how variable the term â€˜terrorismâ€™ actually is.  In Inside Terrorism, Hoffman, whilst acknowledging the obvious difficulties with defining the word, sought to attempt his own definition.  It is with this definition that this essay concludes.  </p>
<p>Hoffman sought firstly to  distinguish terrorists from other types of criminals, then to distinguish terrorism from other types of crime.  He  concluded that terrorism is the â€˜deliberate creation and exploitation of fear through violence or the threat of violence in the pursuit of political changeâ€™.    It is important to note that all terrorist acts involve either violence or the direct threat of violence.  Terrorism directly seeks to establish far-reaching psychological effects, going beyond the immediate victim or object of the terrorist attack.  It is designed to instil fear, seeking to intimidate a wider target audience.  </p>
<p>This audience can include a rival ethnic or religious group, an entire country, a national government or political party, or just public opinion in general.  Specifically, terrorism is â€˜designed to create power where there is none or to consolidate power where there is very littleâ€™.   Through their actions â€“ violent or non violent â€“ terrorists seek to obtain the leverage, influence and power they require to effect political change on either a local or international stage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2006/08/23/what-is-terrorism/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
