<?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/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Security — Jürgen Kreileder</title>
	<atom:link href="/articles/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Software Engineer and Consultant</description>
	<lastBuildDate>Sat, 29 Oct 2016 01:51:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">5303222</site><image><title>Jürgen Kreileder</title><url>/jk-rss.jpg</url><link>/</link><width>144</width><height>114</height><description>Software Engineer and Consultant</description></image>	<item>
		<title>OS X Applications Insecurely Installing World-Writable Files</title>
		<link>/articles/os-x-applications-insecurely-installing-world-writable-files/</link>
					<comments>/articles/os-x-applications-insecurely-installing-world-writable-files/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sun, 17 Jul 2011 23:15:02 +0000</pubDate>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[adium]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[emusic]]></category>
		<category><![CDATA[epson]]></category>
		<category><![CDATA[exploitable]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[hp]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[telltale games]]></category>
		<category><![CDATA[world-writable]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/?p=586</guid>

					<description><![CDATA[Files, directories, and devices that are writable by any user (&#8220;world-writable&#8221;) on a multi-user system can be dangerous locally exploitable security holes. There are very few legitimate reasons for having world-writable files and directories on a system. Many UNIX and Linux systems actually have cron jobs that check for world-writable files. On Apple&#8217;s OS X<br />[&#8594; <a href="/articles/os-x-applications-insecurely-installing-world-writable-files/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>Files, directories, and devices that are writable by any user (&#8220;world-writable&#8221;) on a multi-user system can be dangerous locally exploitable security holes. There are very few legitimate reasons for having world-writable files and directories on a system.</p>
<p>Many UNIX and Linux systems actually have <em>cron</em> jobs that check for world-writable files. On Apple&#8217;s OS X there is no such safeguard and many vendors do not seem to care about file permissions much at all. Several well-known applications are either installed with world-writable files or create them when used:</p>
<h4>World-writable files in system directories</h4>
<p>The following applications install world-writable files in shared directories (<code>/Applications</code>, <code>/Library</code>,&nbsp;&#8230;):</p>
<ul>
<li><strong>Adobe CS 4, CS 5:</strong> Some uninstallers + several files and directories in /Library/Application Support + various stuff in other locations</li>
<li><strong>Adobe Media Player:</strong> directory + some files in <code>Contents/Resources</code></li>
<li><strong>Adobe Flash Player:</strong> directories (including <code>AddIns</code> und <code>AddIns/airappinstaller</code>)</li>
<li><strong>Amazon MP3 Downloader:</strong> some directories</li>
<li><strong>EPSON</strong> (Scan, TWAIN data source, Easy Photo Print, &#8230;): pretty much everything, including <strong>executables</strong></li>
<li><strong>Eye-One Match 3:</strong> complete app, including <strong>executable</strong></li>
<li><strong>eMusic Download Manager:</strong> complete app, including <strong>executable</strong> and JavaScript (the application is based on Mozilla)</li>
<li><strong>Telltale games</strong>: complete apps including <strong>executable</strong> and libraries</li>
<li><strong>Apple OS X</strong>: some plist and cache files, including at least one <strong>LaunchDaemon plist file</strong></li>
<li><strong>Google+Growl Utility</strong> (not a Google product): whole app including <strong>executable</strong></li>
<li><strong>HP Scan Pro</strong> (plus supporting files): everything including <strong>executables</strong></li>
<li><strong>DivX Converter:</strong> resource files</li>
<li><strong>Apple Remote Desktop:</strong> some plist files</li>
<li><strong>Apple GarageBand:</strong> several plist and data files</li>
<li><strong>Apple ColorSync:</strong> some profiles</li>
<li><strong>Microsoft Office 2011:</strong> directory in /Library Application Support</li>
<li><strong>Elgato EyeTV:</strong> several plist files</li>
<li><strong>ABBYY FineReader Sprint 8.0:</strong> several data files</li>
<li><strong>ArcSoft</strong> (Connect Suite, MediaImpression 2): all files, including <strong>executables</strong></li>
<li><strong>Extensis Suitcase Fusion 2</strong>: all files, including <strong>executables</strong></li>
</ul>
<h4>World-writable files in user directories</h4>
<p>The following applications install world-writable files in user directories (<code>/Users/<em>$USER</em></code>):</p>
<ul>
<li><strong>GoogleGrowl.plugin</strong>: whole plugin including <strong>executable</strong></li>
<li><strong>3rd-party extensions for Apple Safari</strong>: some extensions (e.g. AdBlock) install world-writable files</li>
<li><strong>Apple iPhoto</strong>: the whole library seems to be world-writable</li>
<li><strong>Adium add-ons</strong>: several add-ons install world-writable files</li>
<li><strong>eMusic Download Manager:</strong>some preferences files are world-writable</li>
<li><strong>Adobe</strong> (CS 4, CS5, Flash, &#8230;): several preferences files</li>
<li><strong>Apple MobileDevice</strong>: crash logs are world-writable</li>
</ul>
<p>The lists have been compiled by inspecting my own systems and those of several friends by running</p>
<pre>sudo sh -c \
  "find / -xdev -perm +o=w ! \( -type d -perm +o=t \) ! -type l -print0 | \
   xargs -0 ls -dl 2&gt;&amp;1 | \
   tee world-writable-files.txt"</pre>
<p>and analyzing the output.</p>
<p>Note that running <em>Disk Utility</em>&#8216;s &#8220;Repair Disk Permissions&#8221; does not have any influence on the issues described here.</p>
<p>Most OS X installations are probably single-user systems in reality but the situation is still somewhat ugly.</p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/os-x-applications-insecurely-installing-world-writable-files/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">586</post-id>	</item>
		<item>
		<title>Facebook Chat Via XMPP Finally Supports TLS</title>
		<link>/articles/facebook-chat-via-xmpp-finally-supports-tls/</link>
					<comments>/articles/facebook-chat-via-xmpp-finally-supports-tls/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sun, 24 Apr 2011 17:29:57 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[tls]]></category>
		<category><![CDATA[xmpp]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/?p=489</guid>

					<description><![CDATA[Looks like Facebook silently introduced encryption for chats in XMPP/Jabber clients (Pidgin, Adium, etc.): Its servers now support the use of TLS as defined in RFC 3920. Facebook&#8217;s FAQs (1, 2) have not been updated accordingly yet.]]></description>
										<content:encoded><![CDATA[<p>Looks like Facebook silently introduced encryption for chats in <abbr title="Extensible Messaging and Presence Protocol">XMPP</abbr>/Jabber clients (<a href="http://www.pidgin.im/">Pidgin</a>, <a href="http://adium.im/">Adium</a>, etc.): Its servers now support the use of <abbr title="Transport Layer Security">TLS</abbr> as defined in <a href="http://xmpp.org/rfcs/rfc3920.html#tls">RFC 3920</a>.</p>
<p>Facebook&#8217;s FAQs (<a href="https://www.facebook.com/help/?faq=16739">1</a>, <a href="https://www.facebook.com/help/?faq=16740">2</a>) have not been updated accordingly yet.</p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/facebook-chat-via-xmpp-finally-supports-tls/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">489</post-id>	</item>
		<item>
		<title>Google SSL Search Plug-In for Firefox</title>
		<link>/articles/google-ssl-search-plug-in-for-firefox/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sat, 22 May 2010 23:09:38 +0000</pubDate>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Privacy]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[opensearch]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[ssl]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/?p=424</guid>

					<description><![CDATA[As of today Google finally supports searching over SSL. Expectedly, you can use it via https://www.google.com/. Firefox&#8217;s built-in search capabilities still use the unencrypted search, though. To remedy this I built an OpenSearch plug-in which makes Firefox use the HTTPS-based search: Install Google Secure Search Plug-In (Read more about Google&#8217;s SSL Search here)]]></description>
										<content:encoded><![CDATA[<p>As of today Google finally supports searching over SSL.  Expectedly, you can use it via <a href="https://www.google.com/"><strong>https</strong>://www.google.com/</a>.</p>
<p>Firefox&#8217;s built-in search capabilities still use the unencrypted search, though.  To remedy this I built an OpenSearch plug-in which makes Firefox use the HTTPS-based search: </p>
<p><script type="text/javascript">function install() { window.external.AddSearchProvider('http://blog.blackdown.de/static/google-ssl.xml'); }</script></p>
<p class="buttonbar">
<a class="buttonpositive" href="javascript:install()"><img loading="lazy" alt="" src="data:image/gif;base64,R0lGODlhCAAJAJEAAP///3OqIf///wAAACH5BAEHAAIALAAAAAAIAAkAAAIRlBOmArDWFApttotzhO7t9RUAOw==" width="8" height="9"/><span>Install Google Secure Search Plug-In</span></a>
</p>
<p>(Read more about Google&#8217;s SSL Search <a href="http://www.google.com/support/websearch/bin/answer.py?answer=173733&#038;hl=en">here</a>)</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">424</post-id>	</item>
		<item>
		<title>wordpress.org Cracked, Exploit in 2.1.1 Release</title>
		<link>/articles/wordpress-org-cracked-exploit-in-2-1-1-release/</link>
					<comments>/articles/wordpress-org-cracked-exploit-in-2-1-1-release/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sat, 03 Mar 2007 03:08:33 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[rant]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2007/03/03/wordpressorg-cracked-exploit-in-211-release/</guid>

					<description><![CDATA[As pointed out on the WordPress development blog, a cracker gained access to the wordpress.org servers and replaced the 2.1.1 download with a modified exploitable version. The exploitable download may have been on the site for three or four days! It may be a good idea for the WordPress developers to sign their releases with<br />[&#8594; <a href="/articles/wordpress-org-cracked-exploit-in-2-1-1-release/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>As pointed out on the <a href="http://wordpress.org/development/2007/03/upgrade-212/">WordPress development blog</a>, a cracker gained access to the wordpress.org servers and replaced the 2.1.1 download with a modified exploitable version. The exploitable download may have been on the site for three or four days!</p>
<p>It may be a good idea for the <a href="http://wordpress.org/" rel="tag">WordPress</a> developers to sign their releases with a well known and trusted PGP key. This would allow people to verify that downloaded files are really what they should be!<br />
This is a well-established practice used by other projects, for example by the <a href="http://kernel.org/signature.html">Linux kernel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/wordpress-org-cracked-exploit-in-2-1-1-release/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">49</post-id>	</item>
		<item>
		<title>WordPress SSL Patch Update</title>
		<link>/articles/wordpress-ssl-patch-update/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Fri, 12 Jan 2007 16:34:46 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2007/01/12/wordpress-ssl-patch-update/</guid>

					<description><![CDATA[The recently released security update for WordPress introduced some changes that broke my HTTPS patch for it. I have updated the patch for WordPress 2.0.6 and 2.0.7-RC1 now: wp2-ssl.patch. Read the complete SSL setup guide here: Securing WordPress 2 Admin Access With SSL Regarding WordPress security, please note that there still is a possible exploit<br />[&#8594; <a href="/articles/wordpress-ssl-patch-update/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>The recently released security update for <a href="http://wordpress.org/" rel="tag">WordPress</a> introduced some changes that broke my HTTPS patch for it. I have updated the patch for WordPress 2.0.6 and 2.0.7-RC1 now: <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a>.</p>
<p>Read the complete SSL setup guide here: <a href="/2006/01/22/securing-wordpress-2-admin-access-with-ssl/">Securing WordPress 2 Admin Access With SSL</a></p>
<p>Regarding WordPress security, please note that there still is a possible exploit for 2.0.6: <a href="http://www.heise-security.co.uk/news/83575"> New WordPress exploit also affects version 2.0.6</a><br />
Make sure you use safe a PHP version and set <code>register_globals = off</code>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">48</post-id>	</item>
		<item>
		<title>Chrooting Recent MySQL Versions on Debian and Ubuntu</title>
		<link>/articles/chrooting-recent-mysql-versions-on-debian-and-ubuntu/</link>
					<comments>/articles/chrooting-recent-mysql-versions-on-debian-and-ubuntu/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sat, 30 Dec 2006 15:58:22 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2006/12/30/47/</guid>

					<description><![CDATA[I&#8217;ve posted a recipe for chrooting MySQL on Debian sarge a while ago. These instructions no longer work out of the box for newer MySQL packages from Debian and Ubuntu. The main problem is that the startup script added a few extra checks and script invocations that don&#8217;t understand the chroot environment. So here&#8217;s an<br />[&#8594; <a href="/articles/chrooting-recent-mysql-versions-on-debian-and-ubuntu/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve posted a <a href="/2005/03/04/chrooting-mysql-on-debian/">recipe</a> for chrooting MySQL on Debian sarge a while ago. These instructions no longer work out of the box for newer MySQL packages from Debian and Ubuntu. The main problem is that the startup script added a few extra checks and script invocations that don&#8217;t understand the chroot environment. So here&#8217;s an updated plan:</p>
<ul>
<li>Prepare the chroot directory. It&#8217;s recommended to use an extra partition/filesystem for it. I will use <code>/srv/mysql</code> (which is an <a href ="http://sourceware.org/lvm2/">LVM2</a> partition with an ext3 filesystem on my system) for the rest of the text.</li>
<li>Stop MySQL:
<pre>/etc/init.d/mysql stop</pre>
</li>
<li>Copy the databases to new location:
<pre>mkdir -p /srv/mysql/var/lib
cp -a /var/lib/mysql /srv/mysql/var/lib</pre>
</li>
<li>Copy <a href="/static/mysql-chroot">this script</a> to <code>/etc/default/mysql-chroot</code></li>
<li>Edit <code>/etc/init.d/mysql</code>:
<ul>
<li>Source the <code><a href="/static/mysql-chroot">mysql-chroot</a></code> script somewhere at the top:
<pre>&hellip;
test -x /usr/sbin/mysqld || exit 0

<strong>. /etc/default/mysql-chroot</strong>

SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
&hellip;</pre>
</li>
<li>Fix the disk space check:
<pre style="overflow:scroll;width:93%;">
&hellip;
# check for diskspace shortage
datadir=`mysqld_get_param datadir`
if LC_ALL=C BLOCKSIZE= df --portability <strong>$CHROOT_DIR</strong>$datadir/. | tail -n 1 | awk &apos;{ exit ($4&gt;4096) }&apos;; then
  log_failure_msg &quot;$0: ERROR: The partition with $datadir is too full!&quot;
&hellip;</pre>
</li>
<li>Run <code>setup_chroot</code> right in the start section:
<pre>&hellip;
if mysqld_status check_alive nowarn; then
  echo &quot;...already running.&quot;
else
<strong>  setup_chroot</strong>
  /usr/bin/mysqld_safe &gt; /dev/null 2&gt;&amp;1 &amp;
&hellip;</pre>
</li>
<li>Somehow <code>/var/run/mysqld/mysqld.pid</code> disappears after each start.  We have to create it each time, otherwise the <code>stop</code> command won&#8217;t work properly:
<pre>&hellip;
if mysqld_status check_alive warn; then
  log_end_msg 0
<strong>  ln -sf $CHROOT_DIR/var/run/mysqld/mysqld.pid \
                 /var/run/mysqld</strong>
  # Now start mysqlcheck or whatever the admin wants.
  output=$(/etc/mysql/debian-start)
&hellip;</pre>
</li>
</ul>
</li>
<li>In <code>/etc/mysql/debian.cnf</code>, change the two <code>socket</code> lines to:
<pre>socket = /srv/mysql/var/run/mysqld/mysqld.sock</pre>
</li>
<li>In <code>/etc/mysql/my.cnf</code>:
<ul>
<li>Change the <code>socket</code> line in the <code>[client]</code> section to:
<pre>socket = /srv/mysql/var/run/mysqld/mysqld.sock</pre>
<p>Don&#8217;t change the <code>socket</code> lines in the other sections!</p>
</li>
<li>Add
<pre>chroot = /srv/mysql</pre>
<p> to the <code>[mysqld]</code> section.</p>
</li>
</ul>
</li>
<li>Prepend <code>/srv/mysql</code> to the log files listed in <code>/etc/logrotate.d/mysql-server</code></li>
<li>Make <code>/usr/bin/mysql_upgrade_shell</code> use the chrooted socket. <strong>Note: Currently these changes must be made each time mysql gets upgraded because upgrades override this file!</strong>
<pre style="overflow:scroll;width:93%;">&hellip;
&#45;&#45;password=*) password=`echo &quot;$arg&quot; | sed -e &apos;s/^[^=]*=//&apos;` ;;
<strong>&#45;&#45;socket=*) socket=`echo &quot;$arg&quot; | sed -e &apos;s/^[^=]*=//&apos;` ;;</strong>
&#45;&#45;ldata=*|&#45;&#45;data=*|&#45;&#45;datadir=*) DATADIR=`echo &quot;$arg&quot; | sed -e &apos;s/^[^=]*=//&apos;` ;;
&hellip;
fi
$bindir/mysql_fix_privilege_tables &#45;&#45;silent &#45;&#45;user=$user &#45;&#45;password=$password <strong>&#45;&#45;socket=$socket</strong> $args
exit 0
&hellip;
check_args=&quot;&#45;&#45;check-upgrade &#45;&#45;all-databases &#45;&#45;auto-repair &#45;&#45;user=$user &#45;&#45;password=$password <strong>&#45;&#45;socket=$socket</strong>&quot;
&hellip;
$bindir/mysql_fix_privilege_tables &#45;&#45;silent &#45;&#45;user=$user &#45;&#45;password=$password <strong>&#45;&#45;socket=$socket</strong> $args
&hellip;</pre>
</li>
<li>Start MySQL:
<pre>/etc/init.d/mysql start</pre>
</li>
<li>Check <code>/var/log/syslog</code> for errors ;-)</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>/articles/chrooting-recent-mysql-versions-on-debian-and-ubuntu/feed/</wfw:commentRss>
			<slash:comments>23</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">47</post-id>	</item>
		<item>
		<title>Securing WordPress 2 Admin Access With SSL</title>
		<link>/articles/securing-wordpress-2-admin-access-with-ssl/</link>
					<comments>/articles/securing-wordpress-2-admin-access-with-ssl/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sun, 22 Jan 2006 20:34:42 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2006/01/22/securing-wordpress-2-admin-access-with-ssl/</guid>

					<description><![CDATA[A few people have asked for an updated version of my Securing WordPress Admin Access With SSL guide. So here is an updated version for WordPress 2! The situation has not changed much since WordPress 1.5: WordPress 2.0 still does not support HTTPS access to the admin area when the rest of the blog is<br />[&#8594; <a href="/articles/securing-wordpress-2-admin-access-with-ssl/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>A few people have asked for an updated version of my <a href="/2005/05/18/securing-wordpress-admin-access-with-ssl/">Securing WordPress Admin Access With SSL</a> guide. So here is an updated version for <a href="http://wordpress.org/" rel="tag">WordPress</a> 2!</p>
<p>The situation has not changed much since WordPress 1.5: WordPress 2.0 still does not support HTTPS access to the admin area when the rest of the blog is served via normal HTTP and I still do not like logging in to my server over unencrypted connections, especially not when using public WLANs. Getting around this WordPress limitation requires quite a few steps:</p>
<h3>The Goal</h3>
<p>All communication involving passwords or authentication cookies should be done over HTTPS connections. <code>wp-login.php</code> and the <code>wp-admin</code> directory should only be accessible over HTTPS.<br />
Normal reading access, as well as comments, tracebacks, and pingbacks still should go over ordinary HTTP.</p>
<h3>The Plan</h3>
<ul>
<li>Add an HTTPS virtual host that forwards requests to the HTTP virtual host</li>
<li>Modify WordPress to send <em>secure</em> authentication cookies, so cookies never get sent over insecure connections accidentally</li>
<li>Require a valid certificate on HTTPS clients. That means to log in to WordPress you need both a valid certificate and a valid password.  If someone manages to get your password, he still can not login because he does not have a valid certificate.</li>
</ul>
<h3>The Implementation</h3>
<p>Note: This documentation assumes a <a href="http://www.debian.org/">Debian</a> sarge installation with <a href="http://httpd.apache.org/" rel="tag">Apache</a> 2. Some things, in particular Apache module related ones, will be different on other systems.<br />
The server used throughout the instructions is example.org/192.0.34.166. The server&#8217;s <code>DocumentRoot</code> is /blog and WordPress resides in /blog/wp. The value of WordPress&#8217; <code>home</code> option is &#8216;http://example.org&/#8217; and the value of its <code>site_url</code> option is &#8216;http://example.org/wp&#8217;.</p>
<ul>
<li>Prepare the SSL certificates:
<ul>
<li>Generate your own certificate authority (CA) if you don&#8217;t have one already (I&#8217;m using the makefile from <a href="http://sial.org/howto/openssl/ca/">OpenSSL Certificate Authority Setup</a> for managing mine) and import it into your browser.</li>
<li>Generate a certificate for the SSL server and certify it with your private CA.</li>
<li>Generate a certificate for your browser and certify it with your private CA. Most browsers expect a <abbr title="Public-Key Cryptography Standard">PKCS</abbr>#12 file, so generate one with
<pre>$ openssl pkcs12 -export -clcerts &#92;
    -in blogclient.cert &#92;
    -inkey blogclient.key &#92;
    -out blogclient.p12</pre>
<p>Then import <code>blogclient.p12</code> into your browser.</p>
</li>
</ul>
</li>
<li>Make WordPress SSL-ready:<br />
Apply this <a href="/static/wp/wp2-ssl.patch">patch</a> to the WordPress code. It makes the following changes:</p>
<ul>
<li>Use <em>secure</em> authentication cookies in <code>wp_setcookie()</code></li>
<li>Make <code>check_admin_referer()</code> work with HTTPS URLs</li>
<li>Use HTTPS URLs for notification mails</li>
<li>Use HTTPS URLS for redirects to <code>wp-login.php</code></li>
<li>Only allow XML-RPC logins from the local host (ie. the HTTPS proxy)</li>
<li>Add the <em>Mark-as-Spam</em> feature from trunk</li>
</ul>
<p>The patch is against <a href="http://subversion.tigris.org/">svn</a> version 3825 of WordPress (ie. WordPress 2.0.3), when you apply it to a newer version, you will likely get some harmless ‘<code>Hunk succeeded</code>’ message. If you are getting ‘<code>Hunk FAILED</code>’ message, just send me note and I&#8217;ll update the patch.</p>
</li>
<li>Enable the necessary Apache modules:
<ul>
<li>Install <a href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a>.  It will be used to replace absolute &#8216;http://example.org&/#8217; HTTP URLs in the WordPress output with &#8216;https://example.org&/#8217; HTTPS URLs:
<pre>$ aptitude install libapache2-mod-proxy-html</pre>
<p>The module gets enabled automatically after installation.</p>
</li>
<li>Enable mod_proxy and mod_ssl
<pre>$ a2enmod proxy
$ a2enmod ssl</pre>
<p>Debian provides sane default configurations for both modules. You might want to take a look at the configuration files (<code>ssl.conf</code> and <code>proxy.conf</code>) nevertheless.<br />
I have changed <code>SSLCipherSuite</code> to</p>
<pre style="overflow:scroll;width:93%;">TLSv1:SSLv3:!SSLv2:!aNULL:!eNULL:!NULL:!EXP:!DES:!MEDIUM:!LOW:@STRENGTH</pre>
<p>in <code>ssl.conf</code> in order to just allow TLS v1 and SSL v3 ciphers which provide strong encryption and authentication (see <a href="http://www.openssl.org/docs/apps/ciphers.html">ciphers(1)</a>).</p>
</li>
<li>If you are compressing WordPress output (that is if you enabled the <em>&#8216;WordPress should compress articles (gzip) if browsers ask for them&#8217;</em> option) then also enable mod_headers:
<pre>$ a2enmod headers</pre>
</li>
</ul>
</li>
<li>Configure Apache to listen on the HTTPS port
<pre>$ cat &gt; /etc/apache2/conf.d/ssl.conf &lt;&lt; EOF
&lt;IfModule mod_ssl.c&gt;
	Listen 443
&lt;/IfModule&gt;
EOF</pre>
</li>
<li>Modify the blog virtual host to limit access to <code>wp-login.php</code> and <code>wp-admin</code> to the local host. Also completely deny access to files which should never be accessed directly. Here is an example: <a href="/static/wp/10-wp2-example.org"><code>10-wp2-example.org</code></a></li>
<li>Now setup the HTTPS virtual server: <a href="/static/wp/20-wp2-example.org-ssl"><code>20-wp2-example.org-ssl</code></a><br />
If you are compressing WordPress output you have to enable the <code>RequestHeader</code> line.
</li>
<li>Enable the site and restart Apache
<pre>$ a2ensite 20-blog-ssl
$ /etc/init.d/apache2 restart</pre>
</li>
<li>Remove the old WP cookies from your browser</li>
<li>Test the new setup!</li>
</ul>
<p><em><strong>February 1st, 2006:</strong> <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a> updated for WordPress <a href="http://wordpress.org/development/2006/01/201-release/">2.0.1</a></em></p>
<p><em><strong>March 11st, 2006:</strong> WordPress <a href="http://wordpress.org/development/2006/03/security-202/">2.0.2</a> has been released, fixing some security issues. The HTTPS patch still applies fine to that version.</em></p>
<p><em><strong>March 19th, 2006:</strong> Updated <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a>. Changes: Fix bug in list-manipulation.php, use HTTPS for &#8216;Login&#8217; and &#8216;Register&#8217; links, backport &#8216;Mark-as-Spam&#8217; feature from trunk</em></p>
<p><em><strong>May 1st, 2006:</strong> WordPress <a href="http://wordpress.org/development/2006/06/wordpress-203/">2.0.3</a> has been released. Here is the updated <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a>.</em></p>
<p><em><strong>July 29th, 2006:</strong> WordPress <a href="http://wordpress.org/development/2006/07/wordpress-204/">2.0.4</a> has been released, fixing some security issues. Here is an updated version of the <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a>.</em></p>
<p><em><strong>January 12st, 2007:</strong> <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a> updated for 2.0.6 and 2.0.7-RC1</em></p>
<p><em><strong>January 15st, 2007:</strong> WordPress <a href="http://wordpress.org/development/2007/01/wordpress-207/">2.0.7</a> has been released. The patch still applies fine to that version.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/securing-wordpress-2-admin-access-with-ssl/feed/</wfw:commentRss>
			<slash:comments>32</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">43</post-id>	</item>
		<item>
		<title>Blackdown J2SE 1.4.2-03</title>
		<link>/articles/blackdown-j2se-142-03/</link>
					<comments>/articles/blackdown-j2se-142-03/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Fri, 02 Dec 2005 23:45:02 +0000</pubDate>
				<category><![CDATA[Blackdown]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/?p=40</guid>

					<description><![CDATA[I&#8217;ve released Blackdown&#8217;s J2SE 1.4.2-03 for Linux on x86 and AMD64/EM64T yesterday. The release fixes three security issues with the Reflection API (JRE May Allow Untrusted Applet to Elevate Privileges), so make sure you upgrade. The issue isn&#8217;t Blackdown-specific. Sun released an advisory too. Thanks to Matthias Klose, Debian packages for 1.4.2-03 are available too.<br />[&#8594; <a href="/articles/blackdown-j2se-142-03/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve released <a href="http://www.blackdown.org/">Blackdown&#8217;s</a> <a href="ftp://ftp.tux.org/pub/java/JDK-1.4.2/">J2SE 1.4.2-03</a> for Linux on x86 and AMD64/EM64T yesterday. The release fixes three security issues with the <a href="http://java.sun.com/j2se/1.4.2/docs/guide/reflection/index.html">Reflection</a> API (<a href="http://www.blackdown.org/java-linux/java2-status/security/Blackdown-SA-2005-03.txt">JRE May Allow Untrusted Applet to Elevate Privileges</a>), so make sure you upgrade.</p>
<p>The issue isn&#8217;t Blackdown-specific. Sun released an <a href="http://sunsolve.sun.com/search/document.do?assetkey=1-26-102003-1">advisory</a> too.</p>
<p>Thanks to Matthias Klose, Debian packages for 1.4.2-03 are available too.  Just add something like</p>
<pre>deb ftp://ftp.tux.org/java/debian/ sarge non-free</pre>
<p>to your <code>/etc/apt/sources.list</code>.</p>
<p>The <code>Release</code> files are signed with the <em><a href="http://www.blackdown.org/java-linux/java2-status/gpg.asc">Blackdown Java-Linux Package Signing Key</a></em>. If you have recent <code>apt</code> version you can use this key to authenticate our Debian packages. Just import the key with <code>apt-key</code>:</p>
<pre>$ wget http://www.blackdown.org/java-linux/java2-status/gpg.asc
$ apt-key add gpg.asc</pre>
]]></content:encoded>
					
					<wfw:commentRss>/articles/blackdown-j2se-142-03/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">40</post-id>	</item>
		<item>
		<title>Debian Testing Gets Security Support</title>
		<link>/articles/debian-testing-gets-security-support/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Fri, 09 Sep 2005 23:41:09 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/09/10/debian-testing-gets-security-support/</guid>

					<description><![CDATA[The Debian Testing Security Team just announced the beginning of full security support for Debian&#8217;s &#8220;testing&#8221; distribution! The lack of security support was one of the main problems with &#8220;testing&#8221;. You had to pull security fixes from &#8220;unstable&#8221; or even build your own packages to keep it secure. I hope they have the manpower to<br />[&#8594; <a href="/articles/debian-testing-gets-security-support/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>The <a href="http://secure-testing-master.debian.net/">Debian Testing Security Team</a> just <a href="http://lists.debian.org/debian-devel-announce/2005/09/msg00006.html">announced</a> the beginning of full security support for <a href="http://www.debian.org/">Debian&#8217;s</a> <a href="http://www.debian.org/releases/testing/">&#8220;testing&#8221;</a> distribution!</p>
<p>The lack of security support was one of the main problems with &#8220;testing&#8221;. You had to pull security fixes from &#8220;unstable&#8221; or even build your own packages to keep it secure.</p>
<p>I hope they have the manpower to keep up with security issues. Debian&#8217;s main security team, which only provides updates for the &#8220;stable&#8221; distribution, had some problems over the last months.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">39</post-id>	</item>
		<item>
		<title>WordPress Security Annoyances</title>
		<link>/articles/wordpress-security-annoyances/</link>
					<comments>/articles/wordpress-security-annoyances/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Thu, 18 Aug 2005 06:46:54 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/?p=38</guid>

					<description><![CDATA[As if the unprofessional handling of WordPress security announcements (see Another WordPress Security Update and More on Security Announcements) wouldn&#8217;t be bad enough, the WordPress developers also seem to have problems with organizing releases. Stefan Esser reports that there are two WordPress 1.5.2 versions. The first one, which didn&#8217;t fix the problem it was supposed<br />[&#8594; <a href="/articles/wordpress-security-annoyances/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>As if the unprofessional handling of <a href="http://wordpress.org/" rel="tag">WordPress</a> security announcements (see <a href="/2005/08/14/another-wordpress-security-update/">Another WordPress Security Update</a> and <a href="/2005/08/15/more-on-security-announcements/">More on Security Announcements</a>) wouldn&#8217;t be bad enough, the WordPress developers also seem to have problems with organizing releases.</p>
<p>Stefan Esser <a href="http://blog.php-security.org/archives/8-WordPress-irresponsible-silent-tarball-update.html">reports</a> that there are two WordPress 1.5.2 versions. The first one, which didn&#8217;t fix the problem it was supposed to fix, was available for download for several hours before it silently was replaced by the fixed second version.</p>
<p>It&#8217;s hard to understand why the version number wasn&#8217;t bumped for the second release and why the WordPress developers didn&#8217;t inform users about the mistake.</p>
<p>The <a href="http://dougal.gunters.org/blog/2005/08/17/wordpress-152-security-fud">comments</a> from the WordPress crowd are a bit weak in my opinion. If there&#8217;s FUD about WordPress&#8217; security it&#8217;s the sole fault of the WordPress developers!</p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/wordpress-security-annoyances/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">38</post-id>	</item>
		<item>
		<title>More on Security Announcements</title>
		<link>/articles/more-on-security-announcements/</link>
					<comments>/articles/more-on-security-announcements/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Mon, 15 Aug 2005 19:18:07 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/08/15/more-on-security-announcements/</guid>

					<description><![CDATA[Some people seem to misunderstand what I said about the latest WordPress update. I, myself, am perfectly able to figure out what was broken and how it was fixed. That&#8217;s not the point. I was commenting on the handling of security announcements by the WordPress developers. I expect to get information about security issues from<br />[&#8594; <a href="/articles/more-on-security-announcements/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>Some people seem to misunderstand what I <a href="/2005/08/14/another-wordpress-security-update/">said</a> about the latest WordPress update.</p>
<p>I, myself, am perfectly able to figure out what was broken and how it was fixed. That&#8217;s not the point. I was commenting on the handling of security announcements by the WordPress developers.</p>
<p>I expect to get information about security issues from a central, easy-findable place from any project or product that has public exposure and  more than a handful of users. (Yes, I expect that from open source projects too. Look around the net to see how good others handle it.)<br />
Expecting your users to gather information about a problem from forums, blogs, foreign sites, or the source code is simply unprofessional.</p>
<p>The often used argument that more specific information only helps hackers is just plain naïve: WordPress is open source, its code and even nicely formatted svn changesets are freely available on the web. Hackers are not stupid, they&#8217;ll find the issues.</p>
<p>Note, I&#8217;m not saying you should post sample exploits publicly. Just give enough information that administrators can determine whether their systems are vulnerable and how severe the problem is. Again,  go around the net and look how other projects handle security announcements.</p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/more-on-security-announcements/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">37</post-id>	</item>
		<item>
		<title>Another WordPress Security Update</title>
		<link>/articles/another-wordpress-security-update/</link>
					<comments>/articles/another-wordpress-security-update/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sun, 14 Aug 2005 20:00:31 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/08/14/another-wordpress-security-update/</guid>

					<description><![CDATA[WordPress 1.5.2 &#8220;Strayhorn&#8221; has been released today. The changelog mentions that several vulnerabilities have been fixed but &#8212; once again &#8212; the developers don&#8217;t provide any details! One has to look at the diffs to see what has been fixed. I hate that kind of silly security by obscurity. Vague vulnerability descriptions are almost useless<br />[&#8594; <a href="/articles/another-wordpress-security-update/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p><a href="http://wordpress.org/" rel="tag">WordPress</a> <a href="http://wordpress.org/development/2005/08/one-five-two/">1.5.2</a> &#8220;Strayhorn&#8221; has been released today. The changelog mentions that several vulnerabilities have been fixed but &#8212; once again &#8212; the developers don&#8217;t provide any details! One has to look at the diffs to see what has been fixed.</p>
<p> I hate that kind of silly <em>security by obscurity</em>. Vague vulnerability descriptions are almost useless for administrators, just saying &#8220;we&#8217;ve fixed some security problems&#8221; is even worse!</p>
<p><em><strong>August 15th, 2005:</strong> See this <a href="/2005/08/15/more-on-security-announcements/">article</a> for a reply to some comments I&#8217;ve received.</em></p>
<p><em><strong>August 18th, 2005:</strong> The WordPress developers seem to have problems with release management too: There are two different 1.5.2 versions, read more in <a href="/2005/08/18/wordpress-security-annoyances/">WordPress Security Annoyances</a>.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/another-wordpress-security-update/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">36</post-id>	</item>
		<item>
		<title>Debian Packages for J2SE 1.4.2-02</title>
		<link>/articles/debian-packages-for-j2se-142-02/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Thu, 16 Jun 2005 04:15:40 +0000</pubDate>
				<category><![CDATA[Blackdown]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/06/16/debian-packages-for-j2se-142-02/</guid>

					<description><![CDATA[Thanks to Matthias Klose, Debian packages for Blackdown J2SE-1.4.2-02 are available now. Just add something like deb ftp://ftp.tux.org/java/debian/ sarge non-free to your /etc/apt/sources.list. Upgrading is recommended as 1.4.2-02 contains an important security fix.]]></description>
										<content:encoded><![CDATA[<p>Thanks to Matthias Klose, Debian packages for <a href="ftp://ftp.tux.org/java/JDK-1.4.2/">Blackdown J2SE-1.4.2-02</a> are available now.  Just add something like</p>
<pre>deb ftp://ftp.tux.org/java/debian/ sarge non-free</pre>
<p>to your <code>/etc/apt/sources.list</code>.</p>
<p>Upgrading is recommended as 1.4.2-02 contains an important security <a href="http://www.blackdown.org/java-linux/java2-status/security/Blackdown-SA-2005-02.txt">fix</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">34</post-id>	</item>
		<item>
		<title>Blackdown J2SE 1.4.2-02</title>
		<link>/articles/blackdown-j2se-142-02/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Wed, 15 Jun 2005 04:17:41 +0000</pubDate>
				<category><![CDATA[Blackdown]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/06/15/blackdown-j2se-142-02/</guid>

					<description><![CDATA[Blackdown has released J2SE 1.4.2-02 for Linux on x86 and AMD64/EM64T yesterday. The release fixes a security issue (JRE May Allow Untrusted Applet to Elevate Privileges), so make sure you upgrade. Users of other Java implementations based on Sun&#8217;s code should check for updates too.]]></description>
										<content:encoded><![CDATA[<p>Blackdown has released <a href="ftp://ftp.tux.org/pub/java/JDK-1.4.2/">J2SE 1.4.2-02</a> for Linux on x86 and AMD64/EM64T yesterday. The release fixes a security issue (<a href="http://www.blackdown.org/java-linux/java2-status/security/Blackdown-SA-2005-02.txt">JRE May Allow Untrusted Applet to Elevate Privileges</a>), so make sure you upgrade.</p>
<p>Users of other Java implementations based on Sun&#8217;s code should check for updates too.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">33</post-id>	</item>
		<item>
		<title>Antivirus Fun on Inspiron 9300</title>
		<link>/articles/antivirus-fun-on-inspiron-9300/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sun, 05 Jun 2005 22:44:08 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/06/06/antivirus-fun-on-inspiron-9300/</guid>

					<description><![CDATA[I&#8217;ve bought an Dell Inspiron 9300 last week. I&#8217;ll mainly use the machine for Linux and Java development but I&#8217;ve kept a small Windows XP partition. More on Linux installation later, here&#8217;s a short rant about broken Windows applications: I didn&#8217;t want to use the Symantec tools that came bundled with the system due to<br />[&#8594; <a href="/articles/antivirus-fun-on-inspiron-9300/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve bought an Dell Inspiron 9300 last week. I&#8217;ll mainly use the machine for Linux and Java development but I&#8217;ve kept a small Windows XP partition. More on Linux installation later, here&#8217;s a short rant about broken Windows applications:</p>
<p>I didn&#8217;t want to use the Symantec tools that came bundled with the system due to previous experiences, so I had to look for another antivirus &amp; firewall solution. After reading a few reviews I decided to try <em><a href="http://www.gdata.de/trade/productview/514/28/">G-Data AntiVirusKit InternetSecurity 2005</a></em> first. Installation went smooth but after the next reboot the taskbar didn&#8217;t repaint anymore and Explorer was unresponsive. The system was in pretty unusable state.</p>
<p>After booting into <em>Safe Mode</em>, I&#8217;ve changed the <em>Data Execution Prevention</em> (DEP) <a href="http://support.microsoft.com/kb/875352">settings</a> to only cover core Windows programs. Another reboot and G-Data started working! Well that&#8217;s quite disappointing, x86 processor with <em>No-Execute</em> (NX) and <em>Execute Disable</em> (XD) bits are available for more than two years now and XP SP2 isn&#8217;t exactly new either &#8212; still G-Data hasn&#8217;t managed to fix its code!</p>
<p>Lesson learned: If you have a processor that supports NX or XD (same thing, just different marketing names from AMD and Intel) and you plan to actually take advantage of that feature, you better should check twice which software you&#8217;re going to use &#8212; especially when using closed-source software. (Linux users should be on the safe side, I haven&#8217;t see an application having problems with NX for a long time.)</p>
<p>I&#8217;ve removed <em>G-Data AntiVirusKit InternetSecurity 2005</em> and installed <em><a href="http://www.f-secure.com/products/anti-virus/fsis2005/">F-Secure Internet Security 2005</a></em> which seems to work fine with DEP enabled globally.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">31</post-id>	</item>
		<item>
		<title>Shorewall Continued</title>
		<link>/articles/shorewall-continued/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sat, 28 May 2005 01:26:24 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/05/28/shorewall-continued/</guid>

					<description><![CDATA[Shorewall is still alive! After Shorewall creator Tom Eastep announced his departure from the project several people stepped up to continue development on Sourceforge. The website and the CVS repository already have been moved to the new site, the mailing lists are still hosted on the list.shorewall.net. Read more on the shorewall-devel list.]]></description>
										<content:encoded><![CDATA[<p><a href="http://shorewall.sf.net/" rel="tag">Shorewall</a> is still alive! After Shorewall creator Tom Eastep announced his <a href="http://lists.shorewall.net/pipermail/shorewall-users/2005-May/018444.html">departure</a> from the project several people stepped up to continue development on <a href="http://sf.net/">Sourceforge</a>. The website and the CVS repository already have been moved to the new site, the mailing lists are still hosted on the <a href="http://lists.shorewall.net/">list.shorewall.net</a>.</p>
<p>Read more on the <a href="http://lists.shorewall.net/pipermail/shorewall-devel/2005-May/001069.html">shorewall-devel</a> list.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">30</post-id>	</item>
		<item>
		<title>Shorewall in Limbo</title>
		<link>/articles/shorewall-in-limbo/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Wed, 18 May 2005 12:25:11 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/05/18/shorewall-in-limbo/</guid>

					<description><![CDATA[Yesterday Shorewall creator Tom Eastep announced the end of Shorewall development and support. It is sad to hear that, Tom did a great job. Shorewall is one the best firewall tools available for Linux. I sincerely hope somebody will pick up the project and continue development. If I had the time I would do it<br />[&#8594; <a href="/articles/shorewall-in-limbo/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>Yesterday <a href="http://www.shorewall.net/" rel="tag">Shorewall</a> creator Tom Eastep <a href="http://lists.shorewall.net/pipermail/shorewall-users/2005-May/018444.html">announced</a> the end of Shorewall development and support.</p>
<p>It is sad to hear that, Tom did a great job. Shorewall is one the best firewall tools available for Linux. I sincerely hope somebody will pick up the project and continue development. If I had the time I would do it myself.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">29</post-id>	</item>
		<item>
		<title>Securing WordPress Admin Access With SSL</title>
		<link>/articles/securing-wordpress-admin-access-with-ssl/</link>
					<comments>/articles/securing-wordpress-admin-access-with-ssl/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Tue, 17 May 2005 23:11:24 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/05/18/securing-wordpress-admin-access-with-ssl/</guid>

					<description><![CDATA[January 22nd, 2006: There&#8217;s an updated version of this guide for WordPress 2 now: Securing WordPress 2 Admin Access With SSL As one can guess from the look of this site, I&#8217;m using WordPress as my blog engine. At this time WordPress does not support HTTPS access to the admin area when the rest of<br />[&#8594; <a href="/articles/securing-wordpress-admin-access-with-ssl/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p><em><strong>January 22nd, 2006:</strong> There&#8217;s an updated version of this guide for WordPress 2 now: <a href="/2006/01/22/securing-wordpress-2-admin-access-with-ssl/">Securing WordPress 2 Admin Access With SSL</a></em></p>
<p>As one can guess from the look of this site, I&#8217;m using <a href="http://wordpress.org/" rel="tag">WordPress</a> as my blog engine. At this time WordPress does not support HTTPS access to the admin area when the rest of the blog is served via normal HTTP. This is a bit unfortunate. I do not like logging in to my server over unencrypted connections, especially not when using public WLANs. Getting around this WordPress limitation requires quite a few steps:</p>
<h3>The Goal</h3>
<p>All communication involving passwords or authentication cookies should be done over HTTPS connections. <code>wp-login.php</code> and the <code>wp-admin</code> directory should only be accessible over HTTPS.<br />
Normal reading access, as well as comments, tracebacks, and pingbacks still should go over ordinary HTTP.</p>
<h3>The Plan</h3>
<ul>
<li>Add an HTTPS virtual host that forwards requests to the HTTP virtual host</li>
<li>Modify WordPress to send <em>secure</em> authentication cookies, so cookies never get sent over insecure connections accidentally</li>
<li>Require a valid certificate on HTTPS clients. That means to log in to WordPress you need both a valid certificate and a valid password.  If someone manages to get your password, he still can not login because he does not have a valid certificate.</li>
</ul>
<h3>The Implementation</h3>
<p>Note: This documentation assumes a <a href="http://www.debian.org/">Debian</a> sarge installation with <a href="http://httpd.apache.org/" rel="tag">Apache</a> 2. Some things, in particular Apache module related ones, will be different on other systems.<br />
The server used throughout the instructions is example.org/192.0.34.166. The server&#8217;s <code>DocumentRoot</code> is /blog and WordPress resides in /blog/wp. The value of WordPress&#8217; <code>home</code> option is &#8216;http://example.org&/#8217; and the value of its <code>site_url</code> option is &#8216;http://example.org/wp&#8217;.</p>
<ul>
<li>Prepare the SSL certificates:
<ul>
<li>Generate your own certificate authority (CA) if you don&#8217;t have one already (I&#8217;m using the makefile from <a href="http://sial.org/howto/openssl/ca/">OpenSSL Certificate Authority Setup</a> for managing mine) and import it into your browser.</li>
<li>Generate a certificate for the SSL server and certify it with your private CA.</li>
<li>Generate a certificate for your browser and certify it with your private CA. Most browsers expect a <abbr title="Public-Key Cryptography Standard">PKCS</abbr>#12 file, so generate one with
<pre>$ openssl pkcs12 -export -clcerts &#92;
    -in blogclient.cert &#92;
    -inkey blogclient.key &#92;
    -out blogclient.p12</pre>
<p> Then import <code>blogclient.p12</code> into your browser.</p>
</li>
</ul>
</li>
<li>Make WordPress SSL-ready:<br />
Apply this <a href="/static/wp/wp-ssl.patch">patch</a> to the WordPress code. It makes the following changes:</p>
<ul>
<li>Use <em>secure</em> authentication cookies in <code>wp_setcookie()</code></li>
<li>Make <code>check_admin_referer()</code> working with HTTPS URLs</li>
<li>Disable login over XML-RPC</li>
</ul>
</li>
<li>Enable the necessary Apache modules:
<ul>
<li>Install <a href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a>.  It will be used to replace absolute &#8216;http://example.org&/#8217; HTTP URLs in the WordPress output with &#8216;https://example.org&/#8217; HTTPS URLs:
<pre>$ aptitude install libapache2-mod-proxy-html</pre>
<p>The module gets enabled automatically after installation.</p>
</li>
<li>Enable mod_proxy and mod_ssl
<pre>$ a2enmod proxy
$ a2enmod ssl</pre>
<p>Debian provides sane default configurations for both modules. You might want to take a look at the configuration files (<code>ssl.conf</code> and <code>proxy.conf</code>) nevertheless.</p>
</li>
<li>If you are compressing WordPress output (that is if you enabled the <em>&#8216;WordPress should compress articles (gzip) if browsers ask for them&#8217;</em> option) then also enable mod_headers:
<pre>$ a2enmod headers</pre>
</li>
</ul>
</li>
<li>Configure Apache to listen on the HTTPS port
<pre>$ cat &gt; /etc/apache2/conf.d/ssl.conf &lt;&lt; EOF
&lt;IfModule mod_ssl.c&gt;
	Listen 443
&lt;/IfModule&gt;
EOF</pre>
</li>
<li>Modify the blog virtual host to limit access to <code>wp-login.php</code> and <code>wp-admin</code> to the local host. Also completely deny access to files which should never be accessed directly. Here is an example: <a href="/static/wp/10-example.org"><code>10-example.org</code></a></li>
<li>Now setup the HTTPS virtual server: <a href="/static/wp/20-example.org-ssl"><code>20-example.org-ssl</code></a><br />
If you are compressing WordPress output you have to enable the <code>RequestHeader</code> line.
</li>
<li>Enable the site and restart Apache
<pre>$ a2ensite 20-blog-ssl
$ /etc/init.d/apache2 restart</pre>
</li>
<li>Remove the old WP cookies from your browser</li>
<li>Test the new setup!</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>/articles/securing-wordpress-admin-access-with-ssl/feed/</wfw:commentRss>
			<slash:comments>20</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">28</post-id>	</item>
		<item>
		<title>Fixing the ipt_recent Netfilter Module</title>
		<link>/articles/fixing-the-ipt_recent-netfilter-module/</link>
					<comments>/articles/fixing-the-ipt_recent-netfilter-module/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Mon, 09 May 2005 14:52:59 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Kernel]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/05/09/fixing-the-ipt_recent-netfilter-module/</guid>

					<description><![CDATA[I have experienced some strange behavior with my ipt_recent netfilter rules after an uptime of about 25 days. The rules started to block much too early. After rebooting the machine I was able to reproduce the problem for five minutes. This clearly indicated a problem with jiffies (Linux initialized jiffies so that the first roll-over<br />[&#8594; <a href="/articles/fixing-the-ipt_recent-netfilter-module/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>I have experienced some strange behavior with my ipt_recent netfilter <a href="/2005/02/18/mitigating-ssh-brute-force-attacks-with-ipt_recent/">rules</a> after an uptime of about 25 days. The rules started to block much too early. After rebooting the machine I was able to reproduce the problem for five minutes. This clearly indicated a problem with jiffies (Linux initialized jiffies so that the first roll-over happens five minutes after booting).</p>
<p>A closer look at ipt_recent.c revealed that the time tests did not work like intended if one of the last hits was more than <code>LONG_MAX</code> jiffies ago or if the list of last hits contained empty slots and jiffies is greater than <code>LONG_MAX</code>.</p>
<p>To fix this, I replaced <em>jiffies</em> with <em>seconds since &#8217;00:00:00 1970-01-01 UTC&#8217;</em>. I have sent the <a href="/static/kernel/ipt_recent-fix.patch">patch</a> to linux-kernel and netfilter-devel. The patch also includes some 64-bit fixes.</p>
<p><em><strong>May 12th, 2005:</strong> The patch has been added to Linux 2.6.12-rc4-mm1</em></p>
<p><em><strong>September 8th, 2005:</strong> Please note that only the 64-bit parts of my patch have made it into 2.6.12. I&#8217;m working on an updated fix for the time comparison problems which will hopefully get accepted for 2.6.14 or later.</em></p>
<p><em><strong>September 12th, 2005:</strong> These issues have CAN numbers now: <a href="http://nvd.nist.gov/nvd.cfm?cvename=CAN-2005-2872">CAN-2005-2872</a> and <a href="http://nvd.nist.gov/nvd.cfm?cvename=CAN-2005-2873">CAN-2005-2873</a> (which supersede <a href="http://nvd.nist.gov/nvd.cfm?cvename=CAN-2005-2802">CAN-2005-2802</a>)</em></p>
<p><em><strong>July 10th, 2006:</strong> The jiffies issue is fixed in the vanilla kernel now.  Also note that 2.6.18 will contain a rewrite of ipt_recent.c.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/fixing-the-ipt_recent-netfilter-module/feed/</wfw:commentRss>
			<slash:comments>50</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">27</post-id>	</item>
		<item>
		<title>New Blackdown Security Advisory</title>
		<link>/articles/new-blackdown-security-advisory/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Thu, 24 Mar 2005 03:00:55 +0000</pubDate>
				<category><![CDATA[Blackdown]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/24/new-blackdown-security-advisory/</guid>

					<description><![CDATA[Jouko Pynnönen has discovered an argument injection vulnerability in Java Web Start. I&#8217;ve just created a new Blackdown security advisory about this problem. Note that our current releases are not affected.]]></description>
										<content:encoded><![CDATA[<p>Jouko Pynnönen has <a href="http://www.derkeiler.com/Mailing-Lists/Full-Disclosure/2005-03/0650.html">discovered</a> an argument injection vulnerability in Java Web Start. I&#8217;ve just created a new Blackdown <a href="http://www.blackdown.org/java-linux/java2-status/security/Blackdown-SA-2005-01.txt">security advisory</a> about this problem. Note that our current releases are not affected.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">20</post-id>	</item>
		<item>
		<title>Updated MySQL Chroot Script</title>
		<link>/articles/updated-mysql-chroot-script/</link>
					<comments>/articles/updated-mysql-chroot-script/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sun, 13 Mar 2005 03:12:17 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/13/updated-mysql-chroot-script/</guid>

					<description><![CDATA[Debian&#8217;s latest MySQL packages are compiled with --with-mysqld-ldflags = -all-static. That means libc.so.6 is linked statically now. But glibc&#8217;s getpwnam and getpwuid implementations still need the shared libraries. The needed libraries must be copied into the chroot because mysqld calls those functions after calling chroot. I&#8217;ve updated the mysql-chroot script accordingly. (The rest of the<br />[&#8594; <a href="/articles/updated-mysql-chroot-script/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p><a href="http://www.debian.org/">Debian&#8217;s</a> latest <a href="http://dev.mysql.com/">MySQL</a> packages are compiled with <code>--with-mysqld-ldflags = -all-static</code>.</p>
<p>That means <code>libc.so.6</code> is linked statically now. But glibc&#8217;s <code>getpwnam</code> and <code>getpwuid</code> implementations still need the shared libraries. The needed libraries must be copied into the chroot because <code>mysqld</code> calls those functions after calling <code>chroot</code>. I&#8217;ve updated the <code><a href="/static/mysql-chroot">mysql-chroot</a></code> script accordingly.<br />
<em>(The rest of the chroot setup procedure still works as described in <a href="/2005/03/04/chrooting-mysql-on-debian/">Chrooting MySQL on Debian</a>.)</em></p>
<p>By the way, I&#8217;ve filed a wishlist bug at Debian&#8217;s BTS (<a href="http://bugs.debian.org/299265">#299265</a>). <code>mysqld</code> should do all <code>/etc/passwd</code> lookups before calling <code>chroot</code>. That way chrooting would work without <code>$CHROOT/etc/passwd</code> and with copying any libraries into the chroot. That&#8217;s how Apache and Bind 9 do it.</p>
<p><em><strong>March 17th, 2005:</strong> Debian has removed the <code>-all-static</code> flag again. I&#8217;m leaving the additional bits in the chroot script however, just in case the maintainers decide to add the flag again.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/updated-mysql-chroot-script/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">12</post-id>	</item>
		<item>
		<title>PHP Error Logging to syslog from a chroot</title>
		<link>/articles/php-error-logging-to-syslog-from-a-chroot/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Mon, 07 Mar 2005 06:48:34 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/php-error-logging-to-syslog-from-a-chroot/</guid>

					<description><![CDATA[Here&#8217;s a little trick to log PHP errors to syslog from an apache chroot. Instead of creating a $CHROOT/dev/log socket in the chroot and configuring syslog to listen on that, just define a bogus virtual host that logs to syslog. &#60;VirtualHost 127.0.0.2:80&#62; ServerName JustForOpeningSyslog Redirect permanent / http://127.0.0.1/ ErrorLog syslog &#60;/VirtualHost&#62; Now apache calls openlog(3)<br />[&#8594; <a href="/articles/php-error-logging-to-syslog-from-a-chroot/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>Here&#8217;s a little trick to log <a href="http://www.php.net/">PHP</a> errors to syslog from an <a href="http://httpd.apache.org/">apache</a> chroot. Instead of creating a <code>$CHROOT/dev/log</code> socket in the chroot and configuring syslog to listen on that, just define a bogus virtual host that logs to syslog.</p>
<pre>
&lt;VirtualHost 127.0.0.2:80&gt;
        ServerName JustForOpeningSyslog
        Redirect permanent / http://127.0.0.1/
        ErrorLog syslog
&lt;/VirtualHost&gt;</pre>
<p>Now apache calls <code>openlog(3)</code> with <code>LOG_NDELAY</code> before being chrooted by libapache2-mod-chroot, and libapache2-mod-php4&#8217;s <code>syslog(3)</code> calls work just fine.<br />
(Idea stolen from <a href="http://cryptio.net/~ferlatte/blog/2004/10/01/#syslog_and_chroot">syslog(3) and chroot(2)</a>.)</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">8</post-id>	</item>
		<item>
		<title>Chrooting MySQL on Debian</title>
		<link>/articles/chrooting-mysql-on-debian/</link>
					<comments>/articles/chrooting-mysql-on-debian/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Fri, 04 Mar 2005 22:46:45 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/</guid>

					<description><![CDATA[It&#8217;s quite easy to chroot bind9 and apache on Debian. (See this page for bind9 and libapache2-mod-chroot or libapache2-mod-security for apache.) But I&#8217;ve found no guide for chrooting MySQL, so here&#8217;s my short recipe: Prepare the chroot directory. It&#8217;s recommended to use an extra partition/filesystem for it. I will use /srv/mysql (which is an LVM2<br />[&#8594; <a href="/articles/chrooting-mysql-on-debian/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>It&#8217;s quite easy to chroot <a href="http://www.isc.org/sw/bind/">bind9</a> and <a href="http://httpd.apache.org/">apache</a> on <a href="http://www.debian.org/">Debian</a>.  (See <a href="http://cryptio.net/~ferlatte/blog/config/bind9/">this page</a> for bind9 and <a href="http://packages.debian.org/libapache2-mod-chroot">libapache2-mod-chroot</a> or <a href="http://packages.debian.org/libapache2-mod-security">libapache2-mod-security</a> for apache.)</p>
<p>But I&#8217;ve found no guide for chrooting <a href="http://dev.mysql.com/">MySQL</a>, so here&#8217;s my short recipe:</p>
<ul>
<li>Prepare the chroot directory. It&#8217;s recommended to use an extra partition/filesystem for it. I will use <code>/srv/mysql</code> (which is an <a href ="http://sourceware.org/lvm2/">LVM2</a> partition with an ext3 filesystem on my system) for the rest of the text.</li>
<li>Stop MySQL:
<pre>/etc/init.d/mysql stop</pre>
</li>
<li>Copy the databases to new location:
<pre>mkdir -p /srv/mysql/var/lib
cp -a /var/lib/mysql /srv/mysql/var/lib</pre>
</li>
<li>Copy <a href="/static/mysql-chroot">this script</a> to <code>/etc/default/mysql-chroot</code></li>
<li>Edit <code>/etc/init.d/mysql</code>:
<ul>
<li>Source the <code><a href="/static/mysql-chroot">mysql-chroot</a></code> script somewhere at the top:
<pre>&hellip;
test -x /usr/sbin/mysqld || exit 0

<strong>. /etc/default/mysql-chroot</strong>

SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
&hellip;</pre>
</li>
<li>Run <code>setup_chroot</code> right in the start section:
<pre>&hellip;
if mysqld_status check_alive nowarn; then
  echo &quot;...already running.&quot;
else
<strong>  setup_chroot</strong>
  /usr/bin/mysqld_safe &gt; /dev/null 2&gt;&amp;1 &amp;
&hellip;</pre>
</li>
<li>Somehow <code>/var/run/mysqld/mysqld.pid</code> disappears after each start.  We have to create it each time, otherwise the <code>stop</code> command won&#8217;t work properly:
<pre>&hellip;
if mysqld_status check_alive warn; then
  echo &quot;.&quot;
<strong>  ln -sf $CHROOT_DIR/var/run/mysqld/mysqld.pid \
                 /var/run/mysqld</strong>
  # Now start mysqlcheck or whatever the admin wants.
  /etc/mysql/debian-start
&hellip;</pre>
</li>
</ul>
</li>
<li>In <code>/etc/mysql/debian.cnf</code>, change the <code>socket</code> line to:
<pre>socket = /srv/mysql/var/run/mysqld/mysqld.sock</pre>
</li>
<li>In <code>/etc/mysql/my.cnf</code>:
<ul>
<li>Change the <code>socket</code> line in the <code>[client]</code> section to:
<pre>socket = /srv/mysql/var/run/mysqld/mysqld.sock</pre>
<p>Don&#8217;t change the <code>socket</code> lines in the other sections!</p>
</li>
<li>Add
<pre>chroot = /srv/mysql</pre>
<p> to the <code>[mysqld]</code> section.</p>
</li>
</ul>
</li>
<li>Prepend <code>/srv/mysql</code> to the log files listed in <code>/etc/logrotate.d/mysql-server</code></li>
<li>Start MySQL:
<pre>/etc/init.d/mysql start</pre>
</li>
<li>Check <code>/var/log/syslog</code> for errors ;-)</li>
</ul>
<p><em><strong>March 13th, 2005:</strong> I&#8217;ve updated the script for newer Debian packages, see <a href="/2005/03/13/updated-mysql-chroot-script/">Updated MySQL Chroot Script</a> for more information.</em></p>
<p><em><strong>July 30th, 2006:</strong> These modifications still work fine on the current stable Debian release (3.1, &#8220;sarge&#8221;).  The mysql packages in the testing (&#8220;etch&#8221;) and unstable (&#8220;sid&#8221;) distributions of Debian need a few additional changes, I&#8217;ll post an updated guide in a few days.</em></p>
<p><em><strong>December 30th, 2006:</strong> I&#8217;ve made an <a href="/2006/12/30/chrooting-recent-mysql-versions-on-debian-and-ubuntu/">updated guide</a> on how to chroot more recent MySQL packages on Debian and Ubuntu</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/chrooting-mysql-on-debian/feed/</wfw:commentRss>
			<slash:comments>16</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7</post-id>	</item>
		<item>
		<title>Mitigating SSH Brute Force Attacks with ipt_recent</title>
		<link>/articles/mitigating-ssh-brute-force-attacks-with-ipt_recent/</link>
					<comments>/articles/mitigating-ssh-brute-force-attacks-with-ipt_recent/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Fri, 18 Feb 2005 19:16:37 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/?p=3</guid>

					<description><![CDATA[As my SSH server only accepts public key based authentication, I&#8217;m not really worried about brute force password attacks. But these scans tend to clobber my auth.log. So after some discussion with Andrew Pollock, I&#8217;ve written a few custom actions for my shorewall setup. They use the ipt_recent module which allows to track seen IP<br />[&#8594; <a href="/articles/mitigating-ssh-brute-force-attacks-with-ipt_recent/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>As my <a href="http://www.openssh.com/">SSH</a> server only accepts public key based authentication, I&#8217;m not really worried about brute force password attacks. But these scans tend to clobber my <code>auth.log</code>. So after some discussion with <a href="http://blog.andrew.net.au/2005/02/17#ipt_recent_and_ssh_attacks">Andrew Pollock</a>, I&#8217;ve written a few custom actions for my <a href="http://www.shorewall.net/">shorewall</a> setup. They use the <a href="http://snowman.net/projects/ipt_recent/">ipt_recent</a> module which allows to track seen IP addresses and match against them using some criteria.</p>
<p>The <code><a href="/static/shorewall/Limit">Limit</a></code> action can be used to limit accepted connections per IP and timeframe.  The hardcoded limit currently is 6 connections per 60 seconds.  If an IP tries to connect more often, the attempts will be DROPed.</p>
<p>The <code><a href="/static/shorewall/Whitelist">Whitelist</a></code> action provides some simple port-knocking whitelist.  If you know the <code>WHITELIST_PORT</code> and can lift the limits imposed by the <code><a href="/static/shorewall/Limit">Limit</a></code> action for your IP and 60 seconds by connecting to that port.</p>
<p>Here&#8217;s how you can integrate those two actions:</p>
<ul>
<li>Create two empty files:
<ul>
<li><code>shorewall/action.Limit</code>
</li>
<li><code>shorewall/action.Whitelist</code></li>
</ul>
</li>
<li>Copy <code><a href="/static/shorewall/Limit">Limit</a></code> and <code><a href="/static/shorewall/Whitelist">Whitelist</a></code> to the <code>shorewall</code> directory</li>
<li>Add <code>Limit</code> and <code>Whitelist</code> to <code>shorewall/actions</code></li>
<li>Set <code>WHITELIST_PORT</code> in <code>shorewall/params</code>
</li>
<li>Use <code>Limit</code> in <code>shorewall/rules</code>,  for instance:
<pre>
Limit:ULOG:SSH    net  fw  tcp  ssh
Limit:ULOG:IMAP   net  fw  tcp  imap,imaps
</pre>
<p>Note: You <strong>must</strong> use the &lt;action&gt;:&lt;log&gt;:&lt;tag&gt; format for the rules. <code><a href="/static/shorewall/Limit">Limit</a></code> uses the &lt;tag&gt; for the ipt_recent table name.</p>
</li>
<li>Optionally add a <code>Whitelist</code> rule:
<pre>
Whitelist:ULOG    net  fw
</pre>
</li>
</ul>
<p>If you&#8217;re running <a href="http://www.openssh.com/">OpenSSH</a> 3.9 or later, you additionally might want to  set <code>MaxAuthTries</code> to 1 (see <code>sshd_config(5)</code>).</p>
<p><em><strong>May 9th, 2005:</strong> I have found a bug in the ipt_recent module, see <a href="/2005/05/09/fixing-the-ipt_recent-netfilter-module/">this article</a> for more information and a fix.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/mitigating-ssh-brute-force-attacks-with-ipt_recent/feed/</wfw:commentRss>
			<slash:comments>11</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3</post-id>	</item>
	</channel>
</rss>
