<?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>Security Viewpoints &#187; Best practices</title>
	<atom:link href="http://advosys.ca/viewpoints/category/best-practices/feed/" rel="self" type="application/rss+xml" />
	<link>http://advosys.ca/viewpoints</link>
	<description>Security, operating systems and the IT industry</description>
	<lastBuildDate>Wed, 30 Jun 2010 14:18:17 +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>DNS security talk</title>
		<link>http://advosys.ca/viewpoints/2010/03/dns-security-talk/</link>
		<comments>http://advosys.ca/viewpoints/2010/03/dns-security-talk/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 11:41:48 +0000</pubDate>
		<dc:creator>D Webber</dc:creator>
				<category><![CDATA[Best practices]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[dns security]]></category>

		<guid isPermaLink="false">http://advosys.ca/viewpoints/?p=807</guid>
		<description><![CDATA[I spoke on DNS security at the March 16 meeting of the Ottawa Area Security Klatch (OASK). 
This was updated version of my famous &#8220;Seven Deadliest Sins&#8221; talk, intended for a technical audience.
The slides with speakers notes are here: 

DNS Security: The Seven Deadliest Sins


OASK is a new security group in Ottawa. It&#8217;s supposed to [...]]]></description>
			<content:encoded><![CDATA[<p>I spoke on DNS security at the March 16 meeting of the <a href="http://www.oask.ca/">Ottawa Area Security Klatch</a> (OASK). </p>
<p>This was updated version of my famous &#8220;Seven Deadliest Sins&#8221; talk, intended for a technical audience.</p>
<p>The slides with speakers notes are here: </p>
<ul>
<li><a href="http://advosys.ca/presentations/dns-deadliest-sins.pdf">DNS Security: The Seven Deadliest Sins</a>
</li>
</ul>
<p>OASK is a new security group in Ottawa. It&#8217;s supposed to be technical, informal and free. If you&#8217;re in town, check out the <a href="http://www.oask.ca/">OASK web site</a> for meeting dates and location.</p>
Copyright &copy; 2010 <a href="http://advosys.ca/">Advosys Consulting Inc.</a>

<p><em>Related posts:</em><ul><li><a href='http://advosys.ca/viewpoints/2009/06/dns-security-seven-deadliest-sins/' rel='bookmark' title='Permanent Link: DNS security: The seven deadliest sins'>DNS security: The seven deadliest sins</a></li>
<li><a href='http://advosys.ca/viewpoints/2007/08/unencrypted-site-security-confirmed/' rel='bookmark' title='Permanent Link: (Unencrypted) site security confirmed!'>(Unencrypted) site security confirmed!</a></li>
<li><a href='http://advosys.ca/viewpoints/2009/06/dns-root-zone-getting-dnssec/' rel='bookmark' title='Permanent Link: DNS root zone getting DNSSEC'>DNS root zone getting DNSSEC</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://advosys.ca/viewpoints/2010/03/dns-security-talk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The most effective malware prevention</title>
		<link>http://advosys.ca/viewpoints/2009/07/most-effective-malware-prevention/</link>
		<comments>http://advosys.ca/viewpoints/2009/07/most-effective-malware-prevention/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 11:35:06 +0000</pubDate>
		<dc:creator>D Webber</dc:creator>
				<category><![CDATA[Best practices]]></category>
		<category><![CDATA[Windows security]]></category>
		<category><![CDATA[authorization]]></category>
		<category><![CDATA[Malware]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://advosys.ca/viewpoints/?p=488</guid>
		<description><![CDATA[Three years ago I wrote The most important Windows security tool, detailing why changing user accounts on Windows from being Local Administrator to a &#8220;standard user&#8221; (no local admin rights) is the single most effective thing you can do to prevent malicious software.
Over at InfoWorld, Roger Grimes has written The one essential truth of computer [...]]]></description>
			<content:encoded><![CDATA[<p>Three years ago I wrote <a title="The most important Windows security tool" href="http://advosys.ca/viewpoints/2006/04/windows-most-important-security/">The most important Windows security tool</a>, detailing why changing user accounts on Windows from being Local Administrator to a &#8220;standard user&#8221; (no local admin rights) is the single most effective thing you can do to prevent malicious software.</p>
<p>Over at InfoWorld, Roger Grimes has written <a title="The one essential truth of computer security" href="http://www.infoworld.com/print/82028">The one essential truth of computer security</a>, saying much the same thing:</p>
<blockquote><p>&#8230;the risk from reckless end-users unwittingly executing Trojans and installing their own software is so high that all the other intrusion methods and their resulting mitigations are but a small percentage of the overall attacks in the wild.</p></blockquote>
<p>Back in February, CIO Magazine also <a title="Removing Admin Rights Stymies 92% of Microsoft's Security Vulnerabilities" href="http://www.cio.com/article/479228/Removing_Admin_Rights_Stymies_of_Microsoft_s_Security_Vulnerabilities"> promoted the idea</a>, citing a security vendor claim that &#8220;The vast majority of critical Microsoft vulnerabilities &#8212; 92% of them &#8212; could have been mitigated by stripping users of administrative rights&#8221;.<span id="more-488"></span></p>
<p>With a little research, you can also see for yourself. Take the <a title="Monthly Malware Statistics: june 2009" href="http://www.viruslist.com/en/analysis?pubid=204792067">Top Twenty Malware for June 2009</a> from Viruslist and look at the infection method of each&#8230; nearly all malware relies on the user&#8217;s local permissions to infect the machine:</p>
<table style="border-collapse: collapse; width: 500px; text-align: left; margin-left: auto; margin-right: auto;" border="0" cellspacing="2" cellpadding="0">
<tbody>
<tr>
<td style="font-weight: bold; text-align: center; background-color: #3366ff; color: white;"><span>Rank</span></td>
<td style="font-weight: bold; text-align: center; background-color: #3366ff; color: white;">Name</td>
<td style="font-weight: bold; text-align: center; background-color: #3366ff; color: white;">User must be<br />
local admin</td>
<td style="font-weight: bold; text-align: center; background-color: #3366ff; color: white;">Exploits a<br />
vulnerability</td>
</tr>
<tr>
<td style="text-align: center; background-color: #e2e2e2;">1</td>
<td style="background-color: #e2e2e2;"><span style="color: windowtext; text-decoration: none;">Net-Worm.Win32.Kido.ih</span></td>
<td style="text-align: center; background-color: #e2e2e2;">Y</td>
<td style="text-align: center; background-color: #e2e2e2;">N</td>
</tr>
<tr>
<td style="text-align: center; background-color: #e2e2e2;">2</td>
<td style="background-color: #e2e2e2;">Virus.Win32.Sality.aa</td>
<td style="text-align: center; background-color: #e2e2e2;">Y</td>
<td style="text-align: center; background-color: #e2e2e2;">N</td>
</tr>
<tr>
<td style="text-align: center; background-color: #e2e2e2;">3</td>
<td style="background-color: #e2e2e2;">Trojan-Dropper.Win32.Flystud.ko</td>
<td style="text-align: center; background-color: #e2e2e2;">Y</td>
<td style="text-align: center; background-color: #e2e2e2;">N</td>
</tr>
<tr>
<td style="text-align: center; background-color: #e2e2e2;">4</td>
<td style="background-color: #e2e2e2;">Trojan-Downloader.Win32.VB.eql</td>
<td style="text-align: center; background-color: #e2e2e2;">Y</td>
<td style="text-align: center; background-color: #e2e2e2;">N</td>
</tr>
<tr>
<td style="text-align: center; background-color: #e2e2e2;">5</td>
<td style="background-color: #e2e2e2;">Worm.Win32.AutoRun.dui</td>
<td style="text-align: center; background-color: #e2e2e2;">Y</td>
<td style="text-align: center; background-color: #e2e2e2;">N</td>
</tr>
<tr>
<td style="text-align: center; background-color: #e2e2e2;">6</td>
<td style="background-color: #e2e2e2;">Trojan.Win32.Autoit.ci</td>
<td style="text-align: center; background-color: #e2e2e2;">Y</td>
<td style="text-align: center; background-color: #e2e2e2;">N</td>
</tr>
<tr>
<td style="text-align: center; background-color: #e2e2e2;">7</td>
<td style="background-color: #e2e2e2;">Virus.Win32.Virut.ce</td>
<td style="text-align: center; background-color: #e2e2e2;">Y</td>
<td style="text-align: center; background-color: #e2e2e2;">N</td>
</tr>
<tr>
<td style="text-align: center; background-color: #e2e2e2;">8</td>
<td style="background-color: #e2e2e2;"><span style="color: windowtext; text-decoration: none;">Worm.Win32.Mabezat.b</span></td>
<td style="text-align: center; background-color: #e2e2e2;">N</td>
<td style="text-align: center; background-color: #e2e2e2;">N</td>
</tr>
<tr>
<td style="text-align: center; background-color: #e2e2e2;">9</td>
<td style="background-color: #e2e2e2;">Net-Worm.Win32.Kido.jq</td>
<td style="text-align: center; background-color: #e2e2e2;">N</td>
<td style="text-align: center; background-color: #e2e2e2;">Y</td>
</tr>
<tr>
<td style="text-align: center; background-color: #e2e2e2;">10</td>
<td style="background-color: #e2e2e2;">Virus.Win32.Sality.z</td>
<td style="text-align: center; background-color: #e2e2e2;">Y</td>
<td style="text-align: center; background-color: #e2e2e2;">N</td>
</tr>
</tbody>
</table>
<p>Out of the top ten malware, only one exploits a vulnerability to infect the target machine. The rest require the user to have local admin rights.</p>
<p>From the attacker&#8217;s perspective this makes sense. Why bother with tricky exploits when the majority of Windows users already have local admin rights? When the malware executes, it inherits those rights and thus has all it needs to insert code, change the Windows registry, and modify the kernel.</p>
<p>As the Grimes article points out, removing admin rights also prevents users from installing their own software, codecs, and drivers. That&#8217;s directly in line with the policy of most organizations, though it does force the organization to get better at responding to user requests for new software and otherwise managing the desktops.</p>
<p>Since writing the article in 2006 I&#8217;ve audited or reviewed safeguards at nearly a hundred organizations&#8230; private sector, government, military, huge financial and accounting firms, and the majority still run their user desktops with local admin rights.</p>
<p>One large global firm went through the contortions of rolling out Windows Vista to all desktops. But they chose to keep all users as local admins, and also disabled the limited additional protection of Vista&#8217;s UAC. Sigh.</p>
<p>Removing local admin rights is extremely unpopular with users. But so is every other security safeguard. Users tolerate firewalls, anti-virus, full disk encryption, network access control, attachment filtering, web site blocklists. Though local admin rights for Windows users has been the norm since the days of DOS and Windows 3.1, is it is really impossible to remove this huge vulnerability without facing a user revolt?</p>
Copyright &copy; 2010 <a href="http://advosys.ca/">Advosys Consulting Inc.</a>

<p><em>Related posts:</em><ul><li><a href='http://advosys.ca/viewpoints/2006/11/free-host-intrusion-prevention/' rel='bookmark' title='Permanent Link: Free host intrusion prevention for Windows'>Free host intrusion prevention for Windows</a></li>
<li><a href='http://advosys.ca/viewpoints/2006/09/cwsandbox-malware-analysis-tool/' rel='bookmark' title='Permanent Link: CWSandbox: automating malware analysis'>CWSandbox: automating malware analysis</a></li>
<li><a href='http://advosys.ca/viewpoints/2006/04/windows-most-important-security/' rel='bookmark' title='Permanent Link: The most important Windows security tool'>The most important Windows security tool</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://advosys.ca/viewpoints/2009/07/most-effective-malware-prevention/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DNS security: The seven deadliest sins</title>
		<link>http://advosys.ca/viewpoints/2009/06/dns-security-seven-deadliest-sins/</link>
		<comments>http://advosys.ca/viewpoints/2009/06/dns-security-seven-deadliest-sins/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 13:05:02 +0000</pubDate>
		<dc:creator>D Webber</dc:creator>
				<category><![CDATA[Best practices]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[DNS]]></category>

		<guid isPermaLink="false">http://advosys.ca/viewpoints/?p=442</guid>
		<description><![CDATA[Soon it will be the one year anniversary of the release of Dan Kaminsky&#8217;s fun little DNS security flaw.
In honor (?) of that that, I gave a quick presentation last week to the Ottawa CitySec group on Domain Name System security. Since the Kaminsky issue has been pretty well covered, I focused on all the [...]]]></description>
			<content:encoded><![CDATA[<p>Soon it will be the one year anniversary of the release of <a href="http://www.doxpara.com/">Dan Kaminsky&#8217;s</a> fun little DNS security flaw.</p>
<p>In honor (?) of that that, I gave a quick presentation last week to the Ottawa CitySec group on Domain Name System security. Since the Kaminsky issue has been pretty well covered, I focused on all the <em>other</em> DNS security issues that are often overlooked.</p>
<p>I only had 30 minutes to present, so this is a cut-down version intended for a technical audience who already understand what DNS is and how it works.</p>
<p>The slide deck (with notes) is now online:</p>
<ul>
<li><a title="DNS Security: the seven deadliest sins" href="http://advosys.ca/presentations/dns-deadliest-sins.pdf">DNS Security: The seven deadliest sins</a> (PDF)</li>
</ul>
Copyright &copy; 2010 <a href="http://advosys.ca/">Advosys Consulting Inc.</a>

<p><em>Related posts:</em><ul><li><a href='http://advosys.ca/viewpoints/2010/03/dns-security-talk/' rel='bookmark' title='Permanent Link: DNS security talk'>DNS security talk</a></li>
<li><a href='http://advosys.ca/viewpoints/2007/08/unencrypted-site-security-confirmed/' rel='bookmark' title='Permanent Link: (Unencrypted) site security confirmed!'>(Unencrypted) site security confirmed!</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://advosys.ca/viewpoints/2009/06/dns-security-seven-deadliest-sins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing DNS with a validating resolver</title>
		<link>http://advosys.ca/viewpoints/2009/04/securing-dns-with-validating-resolver/</link>
		<comments>http://advosys.ca/viewpoints/2009/04/securing-dns-with-validating-resolver/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 18:00:11 +0000</pubDate>
		<dc:creator>D Webber</dc:creator>
				<category><![CDATA[Best practices]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[system hardening]]></category>

		<guid isPermaLink="false">http://advosys.ca/viewpoints/?p=304</guid>
		<description><![CDATA[Few ISPs and web hosting providers pay attention to their DNS servers. Most use the same servers both to serve the domains they host and to perform name resolution (translating DNS names to IP addresses and vice versa). Many also allow recursive queries from anyone on the Internet, making DNS spoofing much easier.
We&#8217;ve had DNS [...]]]></description>
			<content:encoded><![CDATA[<p>Few ISPs and web hosting providers pay attention to their DNS servers. Most use the same servers both to serve the domains they host and to perform name resolution (translating DNS names to IP addresses and vice versa). Many also allow recursive queries from anyone on the Internet, making DNS spoofing much easier.</p>
<p>We&#8217;ve had DNS security checks as part of our vulnerability assessments for years, and I&#8217;ve yet to encounter a provider&#8217;s DNS that is properly protected against attack. DNS tends to be yet another <a title="Security Blind spots" href="http://advosys.ca/viewpoints/category/security-blind-spots/">security blind spot</a>, though it did get attention for a while when Dan Kaminsky&#8217;s  <a title="Multiple DNS implementations vulnerable to cache poisoning" href="http://www.us-cert.gov/cas/techalerts/TA08-190B.html">cache poisoning exploit</a> exploit made headlines last summer.</p>
<p>On the client side you can bypass your ISPs DNS with <a title="OpenDNS" href="http://www.opendns.com/">OpenDNS</a>. It&#8217;s well maintained and offers a few other benefits like phishing filters.</p>
<p>However, OpenDNS is not meant for servers. For web servers or entire intranets, install a local resolver to go directly to the authoritative servers for each domain.</p>
<p>Using <a title="ISC BIND DNS name server" href="https://www.isc.org/products/BIND/">BIND</a> is the default choice for this&#8230; it comes with all versions of Linux, but it&#8217;s memory intensive and has a history of security issues. Another popular choice is <a title="dnscache" href="http://cr.yp.to/djbdns/dnscache.html">DNSCache</a>, but it&#8217;s unmaintained and has some annoying dependencies and requirements.</p>
<p>A better choice is <a title="Unbound validating, caching DNS resolver" href="http://www.unbound.net/">Unbound</a>, a newer DNS caching resolver specifically designed for performance and security.</p>
<p><span id="more-304"></span></p>
<p>Unbound is developed by a NLNet, a Netherlands applied research group and supported by big names Verisign and Nominet. Its purpose is to be validating, recursive, and caching DNS resolver with good support for DNSSEC.</p>
<p>To be clear: Unbound <em>is not</em> for providing authoritative DNS. If you need to host DNS records so Internet users can can find your web sites and mail servers use BIND or other authoritative DNS configured to act only as an authoritative server.</p>
<p>Several DNS forgery protections are built in such as filtering private IP addresses from external DNS replies.</p>
<p>Want to block access to certain sites or services? Unbound also has handy features administrative features likeÂ  redirecting specific DNS queries to your own IP addresses&#8230; whether an entire domain or just specific records.</p>
<p>All this in a package that can be compiled easily on nearly any Linux or Unix, uses as much or as little memory as you tell it to, and has an easy configuration syntax. In short, Unbound rocks.</p>
<h3>Compiling from source</h3>
<p>Packaged versions of Unbound are in the Ubuntu Linux Universe repository starting with Hardy. Redhat doesn&#8217;t offer it yet. Regardless, new releases with many improvements come often and it&#8217;s easy to compile, so you&#8217;re better off building it yourself:</p>
<p>Download <a title="Unbound downloads" href="http://www.unbound.net/download.html">the latest source</a>, extract the tarball then do the usual &#8220;./configure; make&#8221;. It depends on the <a title="libevent" href="http://www.monkey.org/~provos/libevent/">libevent </a>library, but the source includes an alternative if that is not installed.</p>
<p>Do &#8220;make install&#8221; to copy the libraries, executables and man pages to the right places (/usr/local/). A well-commented config file is installed in /usr/local/etc/unbound that has sensible defaults, but you should read through it. The daemon also runs chrooted from that directory.</p>
<h3>Installing</h3>
<p>Add a user and group to the OS named &#8220;unbound&#8221; and lock it from interactive access with &#8220;passwd -l&#8221;.</p>
<p>Download the latest root DNS hints file from ftp://FTP.INTERNIC.NET/domain/named.cache and place it in /usr/local/etc/unbound. Make sure user &#8220;unbound&#8221; has read permissions on the named.cache file. Edit the unbound.conf file to change the setting &#8220;root-hints&#8221; to point to /usr/local/etc/unbound/named.cache.</p>
<p>To test the installation, start the daemon from the command line by typing &#8220;unbound&#8221;. If it works, you will see a process named &#8220;unbound&#8221; running. If not, errors are written to syslog: check /var/log/daemon.log, /var/log/messages or whereever your system&#8217;s syslog writes daemon messages.</p>
<p>Once running, try a few lookups using dig, e.g.:</p>
<pre style="text-align: center;">dig @127.0.0.1 www.advosys.ca</pre>
<p>Configure the server to use Unbound for DNS lookups by editing file /etc/resolv.conf to add the following to the top:</p>
<pre style="text-align: center;">nameserver 127.0.0.1</pre>
<p>Now the part everyone hates: writing the startup script. For Unbound to start automatically when the server boots, a suitable script must be placed in /etc/init.d (for most Unix and Linux systems) then symlinked to appropriately named files in the /etc/rc.x directories.</p>
<p>To save you some work, we&#8217;ve written the following simple startup scripts for Unbound:</p>
<ul>
<li><a href="http://advosys.ca/examples/unbound-redhat.sh">Redhat / CentOS 5.x</a></li>
<li><a href="http://advosys.ca/examples/unbound-ubuntu.sh">Ubuntu / Debian</a></li>
</ul>
<p>Place the appropriate script in directory /etc/init.d, rename it to &#8220;unbound&#8221; then use the install method appropriate to your version of Linux:</p>
<p><strong>Redhat / CentOS: </strong></p>
<pre style="padding-left: 30px;">chkconfig --add unbound
chkconfig unbound on</pre>
<p><strong>Ubuntu / Debian: </strong></p>
<pre style="padding-left: 30px;">update-rc.d unbound defaults</pre>
<p>There are several options in the unbound.conf configuration file worth customizing, e.g. to disable IPv6 if you&#8217;re not using that, add sanity checks to weed out spoofed DNS replies, etc.Â  However, Unbound works well right out of the box in most situations.</p>
<p>With a good caching resolver like Unbound, your servers can directly query authoritative DNS servers, bypassing your provider&#8217;s probably polluted DNS. At the cost of slightly more network traffic and more memory usage, you can be reasonably confident that DNS answers legitimate and not pointing to malicious IP addresses.</p>
Copyright &copy; 2010 <a href="http://advosys.ca/">Advosys Consulting Inc.</a>

<p><em>Related posts:</em><ul><li><a href='http://advosys.ca/viewpoints/2006/08/secure-dns-template/' rel='bookmark' title='Permanent Link: Hardening DNS with the Cymru Secure BIND template'>Hardening DNS with the Cymru Secure BIND template</a></li>
<li><a href='http://advosys.ca/viewpoints/2007/07/dns-cache-poisoning-made-easy/' rel='bookmark' title='Permanent Link: DNS cache poisoning made easy'>DNS cache poisoning made easy</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://advosys.ca/viewpoints/2009/04/securing-dns-with-validating-resolver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The state of code signing in Open Source</title>
		<link>http://advosys.ca/viewpoints/2009/03/the-state-of-code-signing-in-open-source/</link>
		<comments>http://advosys.ca/viewpoints/2009/03/the-state-of-code-signing-in-open-source/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 11:05:06 +0000</pubDate>
		<dc:creator>D Webber</dc:creator>
				<category><![CDATA[Best practices]]></category>
		<category><![CDATA[application security]]></category>
		<category><![CDATA[code signing]]></category>
		<category><![CDATA[file signing]]></category>
		<category><![CDATA[gpg]]></category>
		<category><![CDATA[secure coding]]></category>
		<category><![CDATA[trojans]]></category>

		<guid isPermaLink="false">http://advosys.ca/viewpoints/?p=265</guid>
		<description><![CDATA[Time for an update.Â  A while ago I looked at which leading open source projects sign their releases with strong cryptographic signatures using GPG or PGP.
I revisted each project to see if anything had changed, and also surveyed a few more popular ones:This time there are twenty projects in the survey, including popular application software:



Apache [...]]]></description>
			<content:encoded><![CDATA[<p>Time for an update.Â  A while ago I looked at <a title="Dear developers: sign your code!" href="http://advosys.ca/viewpoints/2007/09/developers-sign-your-code/">which leading open source projects sign their releases</a> with strong cryptographic signatures using <a title="GNU Privacy Guard" href="http://gnupg.org/">GPG </a>or <a title="Pretty Good Privacy" href="http://www.pgp.com/">PGP</a>.</p>
<p>I revisted each project to see if anything had changed, and also surveyed a few more popular ones:<span id="more-265"></span>This time there are twenty projects in the survey, including popular application software:</p>
<table border="1" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top">Apache HTTPd</td>
<td valign="top">âœ” Individual GnuPG signatures</td>
</tr>
<tr>
<td valign="top">MySQL community edition</td>
<td valign="top">âœ” Individual GnuPG signatures</td>
</tr>
<tr>
<td valign="top">ISC BIND DNS server</td>
<td valign="top">âœ” Individual GnuPG signatures</td>
</tr>
<tr>
<td valign="top">Redhat Enterprise ISOs</td>
<td valign="top"><strong>âœ˜ unsigned MD5SUM only</strong></td>
</tr>
<tr>
<td valign="top">CentOS Linux ISOs</td>
<td valign="top">âœ” Signed MD5SUM and SHA1 files</td>
</tr>
<tr>
<td valign="top">Debian Linux ISOs</td>
<td valign="top">âœ” Signed MD5 and SHA1 files</td>
</tr>
<tr>
<td valign="top">Ubuntu Linux ISOs</td>
<td valign="top">âœ” Signed MD5SUM file</td>
</tr>
<tr>
<td valign="top">Fedora Linux ISOs</td>
<td valign="top">âœ” Signed SHA1 checksums</td>
</tr>
<tr>
<td valign="top">Novell OpenSUSE Linux ISOs</td>
<td valign="top">âœ” Individual GnuPG signatures (but you have to hunt for them&#8230; see below)</td>
</tr>
<tr>
<td valign="top">Perl source code</td>
<td valign="top"><strong>âœ˜ unsigned MD5SUMs only</strong></td>
</tr>
<tr>
<td valign="top">Python source code</td>
<td valign="top">âœ” Individual GnuPG signatures</td>
</tr>
<tr>
<td valign="top">PHP</td>
<td valign="top"><strong>âœ˜ </strong><strong>unsigned MD5SUMs only</strong></td>
</tr>
<tr>
<td valign="top">GNU CC (GCC) compilers</td>
<td valign="top">âœ” Individual GnuPG signatures (but not on all mirrors)</td>
</tr>
<tr>
<td valign="top">OpenSSH</td>
<td valign="top">âœ” Individual GnuPG signatures</td>
</tr>
<tr>
<td valign="top">Netfilter iptables packet filter</td>
<td valign="top">âœ” Individual GnuPG signatures</td>
</tr>
<tr>
<td valign="top">OpenOffice.org</td>
<td valign="top"><strong>âœ˜ unsigned MD5SUMs only</strong> (though the setup EXE for Windows is signed)</td>
</tr>
<tr>
<td valign="top">Drupal CMS</td>
<td valign="top"><strong>âœ˜ no validation of any kind</strong></td>
</tr>
<tr>
<td valign="top">Joomla CMS</td>
<td valign="top"><strong>âœ˜ No validation of any kind</strong></td>
</tr>
<tr>
<td valign="top">Wordpress CMS</td>
<td valign="top"><strong>âœ˜ No validation of any kind</strong></td>
</tr>
<tr>
<td valign="top">SugarCRM</td>
<td valign="top"><strong>âœ˜ No validation of any kind</strong></td>
</tr>
</tbody>
</table>
<p>I couldn&#8217;t find any mention of GPG signatures on the OpenSUSE web site, but they exist if you manually edit the URL of a  download site to get a directory listing (e.g. visit <a title="http://download.opensuse.org/distribution/11.1/iso/" href="http://">http://download.opensuse.org/distribution/11.1/iso/</a>).</p>
<p>Why does signing matter? Much of the world&#8217;s business is conducted using these and other Open Source software projects, including e-commerce sites, banks, government and the military. A back door or other compromise would have a far reaching impact. And it has happened:</p>
<ul>
<li>In 2003 someone tried to sneak a <a href="http://www.freedom-to-tinker.com/blog/felten/linux-backdoor-attempt-thwarted">backdoor into the Linux kernel</a> source code. The change was only uploaded to a public CVS server and was caught immediately, partially because of how well managed the Linux development process is. A similar attack</li>
<li>In August 2008 the main <a title="Update and Report on Fedora August 2008 Intrusion" href="https://www.redhat.com/archives/fedora-announce-list/2009-March/msg00010.html">Fedora servers were compromised</a> via an unprotected SSH key. Backdoors were inserted into some packages.</li>
</ul>
<p>Even when central project servers are protected, most projects use multiple download mirrors around the world, mostly provided by universities and volunteers and with varying levels of security. Without signed files there&#8217;s no assurance files on the the mirror have not been altered.</p>
<p>This happened to then Debian project <a href="http://www.linuxtoday.com/security/2003120202726SCDBSV">several</a> times. Fortunately, they sign their files so cleanup the efforts were straightforward. Can the same be said of PHP, Perl or the three most popular content management systems? Imagine the money you could make sneaking a backdoor into any of those.</p>
<p>Of course, secret source projects are not necessarily any better. Anyone remember when <a title="Microsoft humiliated as hackers crack Windows" href="http://www.telegraph.co.uk/news/worldnews/asia/1372226/Microsoft-humiliated-as-hackers-crack-Windows.html">Microsoft&#8217;s network was compromised</a>? Intruders rummaged around their network for three months and managed to leak (though, we&#8217;re told, not alter) source code of Windows and Office.</p>
<p>Commercial vendors benefit from the assumption that their development and release processes are better. Yet we see from the post-mortems of every card data and privacy breach that having a bottom line often results in worse security, not better. I&#8217;ve audited several commercial organizations who had appalling development practices. Even when good controls exist, those inconvenient security thingies are often the first to go when a release deadline approaches or costs rise.</p>
<p>Signing files isn&#8217;t a panacea. The whole development process needs to address integrity of the code. But signing files is <a href="http://wiki.openskills.org/OpenSkills/GPG+Signing+and+Encrypting">not hard</a>. At the very least it mitigates the weakness of using miscellaneous mirror sites to distribute files. It also kills one argument used by secret source proponents to spread fear, uncertainty and doubt.</p>
Copyright &copy; 2010 <a href="http://advosys.ca/">Advosys Consulting Inc.</a>

<p><em>Related posts:</em><ul><li><a href='http://advosys.ca/viewpoints/2007/09/developers-sign-your-code/' rel='bookmark' title='Permanent Link: Dear developers: sign your code!'>Dear developers: sign your code!</a></li>
<li><a href='http://advosys.ca/viewpoints/2007/03/nasty-bug-in-gpg/' rel='bookmark' title='Permanent Link: Nasty little bug in Gnu Privacy Guard (GPG)'>Nasty little bug in Gnu Privacy Guard (GPG)</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://advosys.ca/viewpoints/2009/03/the-state-of-code-signing-in-open-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dear developers: sign your code!</title>
		<link>http://advosys.ca/viewpoints/2007/09/developers-sign-your-code/</link>
		<comments>http://advosys.ca/viewpoints/2007/09/developers-sign-your-code/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 00:29:45 +0000</pubDate>
		<dc:creator>D Webber</dc:creator>
				<category><![CDATA[Best practices]]></category>
		<category><![CDATA[application security]]></category>
		<category><![CDATA[code signing]]></category>
		<category><![CDATA[file signing]]></category>
		<category><![CDATA[gpg]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[secure coding]]></category>
		<category><![CDATA[trojans]]></category>

		<guid isPermaLink="false">http://advosys.ca/viewpoints/2007/09/developers-sign-your-code/</guid>
		<description><![CDATA[Yesterday the domain belonging to the Bastille Linux server hardening project was taken over by a domain squatter who is demanding $10,000 to give it back.
So far the squatter hasn&#8217;t done anything malicious with the web site, but how much can you trust someone whose business model is extortion? The Bastille scripts are popular, especially [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday the domain belonging to the <a title="Bastille Unix" href="http://www.bastille-unix.org/">Bastille Linux</a> server hardening project was taken over by a domain squatter who is demanding $10,000 to give it back.</p>
<p>So far the squatter hasn&#8217;t done anything malicious with the web site, but how much can you trust someone whose business model is extortion? The Bastille scripts are popular, especially among less experienced sysadmins. Just the right audience to foist a &#8220;new and improved&#8221; hardening script onto&#8230; containing rootkits and botnet clients.</p>
<p>That scenario would be made a little less easy if the Bastille project cryptographically signed their files. Unfortunately, none of the <a href="http://sourceforge.net/project/showfiles.php?group_id=403">files produced</a> by the project are signed by <a href="http://www.gnupg.org/">Gnu Privacy Guard</a> (GPG) or <a href="http://www.pgp.com/">Pretty Good Privacy</a> (PGP). Without a strong way to verify that the files are unaltered, hosting malicious versions on the now hijacked web site would be trivial.<span id="more-166"></span></p>
<p>Nearly all of the larger open source projects now sign their code, with a few appalling omissions:</p>
<div>
<table border="1" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td width="199" valign="top">Apache HTTPd</td>
<td width="213" valign="top">Individual GnuPG signatures</td>
</tr>
<tr>
<td width="199" valign="top">MySQL community server</td>
<td width="213" valign="top">Individual GnuPG signatures</td>
</tr>
<tr>
<td width="199" valign="top">ISC BIND DNS server</td>
<td width="213" valign="top">Individual GnuPG signatures</td>
</tr>
<tr>
<td width="199" valign="top">CentOS Linux ISOs</td>
<td width="213" valign="top">Signed MD5SUM and SHA1 files</td>
</tr>
<tr>
<td width="199" valign="top">Ubuntu Linux ISOs</td>
<td width="213" valign="top">Signed MD5SUM file</td>
</tr>
<tr>
<td width="199" valign="top">Fedora Linux ISOs</td>
<td width="213" valign="top">Signed SHA1 checksums</td>
</tr>
<tr>
<td width="199" valign="top">Novell OpenSuSe Linux ISOs</td>
<td width="213" valign="top"><strong>unsigned MD5SUMs only</strong></td>
</tr>
<tr>
<td width="199" valign="top">Perl source code</td>
<td width="213" valign="top"><strong>unsigned MD5SUMs only</strong></td>
</tr>
<tr>
<td width="199" valign="top">Python source code</td>
<td width="213" valign="top">Individual GnuPG signatures</td>
</tr>
<tr>
<td width="199" valign="top">PHP</td>
<td width="213" valign="top"><strong>unsigned MD5SUMs only</strong></td>
</tr>
<tr>
<td width="199" valign="top">GNU CC (GCC) compilers</td>
<td width="213" valign="top">Individual GnuPG signatures (but not on all mirrors)</td>
</tr>
<tr>
<td width="199" valign="top">OpenSSH</td>
<td width="213" valign="top">Individual GnuPG signatures</td>
</tr>
<tr>
<td width="199" valign="top">Netfilter iptables packet filter</td>
<td width="213" valign="top">Individual GnuPG signatures</td>
</tr>
</tbody>
</table>
</div>
<p>So when building a typical LAMP server it&#8217;s possible to verify the authenticity of all components except the PHP and Perl interpreters&#8230; unless you&#8217;re building on OpenSUSE in which case the entire OS is unverifiable.</p>
<p>The situation is better than a few years ago. In 2002 there were separate incidents where backdoors were <a title="CERT Advisory CA-2002-28 Trojan Horse Sendmail Distribution" href="http://www.cert.org/advisories/CA-2002-28.html">inserted into Sendmail</a> and <a title="OpenSSH Security Advisory (adv.trojan)" href="http://www.openssh.org/txt/trojan.adv">into OpenSSH</a>. Those incidents woke up many developers to the importance of signing their code.</p>
<p>Most of the major open source projects got the message but smaller projects like Bastille rarely sign their files. Seems a little silly when the typical open source source code is mirrored on hundreds of servers around the world, many of which are either rooted or run by less than trustworthy individuals. It&#8217;s like a chef meticulously preparing a fine meal then giving it to a random passerby to deliver to the customer.</p>
<p>Of course, cryptographic signing of files is not foolproof: the &#8220;web of trust&#8221; model for verifying keys used by GPG is hardly robust, and GPG is clunky to use (though <a title="Gnu Privacy Guard front end software" href="http://www.gnupg.org/related_software/frontends.en.html">various front-ends</a> make it less of a chore).</p>
<p>So developers&#8230; please sign your code. Right now it&#8217;s the best open solution there is to prevent someone from doing evil things to your hard work, even if you forget to renew your domain registration.</p>
<p>Many tutorials exist on creating a GPG key and using it to sign files. The <a title="GNU Privacy Handbook" href="http://www.gnupg.org/gph/en/manual.html">GNU Privacy Handbook</a> itself is awful, but these are pretty good:</p>
<ul>
<li><a title="http://wiki.openskills.org/OpenSkills/GPG+Signing+and+Encrypting" href="http://wiki.openskills.org/OpenSkills/GPG+Signing+and+Encrypting">http://wiki.openskills.org/OpenSkills/GPG+Signing+and+Encrypting</a></li>
</ul>
<ul>
<li><a title="http://www.masuran.org/node/9" href="http://www.masuran.org/node/9">http://www.masuran.org/node/9</a></li>
</ul>
<ul>
<li><a title="http://www.dewinter.com/gnupg_howto/english/GPGMiniHowto.html" href="http://www.dewinter.com/gnupg_howto/english/GPGMiniHowto.html">http://www.dewinter.com/gnupg_howto/english/GPGMiniHowto.html</a></li>
</ul>
Copyright &copy; 2010 <a href="http://advosys.ca/">Advosys Consulting Inc.</a>

<p><em>Related posts:</em><ul><li><a href='http://advosys.ca/viewpoints/2009/03/the-state-of-code-signing-in-open-source/' rel='bookmark' title='Permanent Link: The state of code signing in Open Source'>The state of code signing in Open Source</a></li>
<li><a href='http://advosys.ca/viewpoints/2007/03/nasty-bug-in-gpg/' rel='bookmark' title='Permanent Link: Nasty little bug in Gnu Privacy Guard (GPG)'>Nasty little bug in Gnu Privacy Guard (GPG)</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://advosys.ca/viewpoints/2007/09/developers-sign-your-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
