<?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>olex.biz &#187; security</title>
	<atom:link href="http://olex.biz/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://olex.biz</link>
	<description>Website of a computer science student and a generally good man</description>
	<lastBuildDate>Tue, 16 Mar 2010 18:35:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SVN for website deployment &#8211; watch it</title>
		<link>http://olex.biz/blog/svn-website-deployment/</link>
		<comments>http://olex.biz/blog/svn-website-deployment/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 03:28:25 +0000</pubDate>
		<dc:creator>Olexandr Savchuk</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://olex.biz/?p=161</guid>
		<description><![CDATA[Many webmasters use SVN not only as a version control system during website development, but also as a deployment tool for easily synchronising the development environment with the production server. A serious flaw has been uncovered in the system that many are unaware about, and that poses a significant security threat, allowing a potential attacker [...]]]></description>
			<content:encoded><![CDATA[<p>Many webmasters use SVN not only as a version control system during website development, but also as a deployment tool for easily synchronising the development environment with the production server. A serious flaw has been uncovered in the system that many are unaware about, and that poses a significant security threat, allowing a potential attacker to gain access to source codes and configuration files. To understand that flaw, we must understand a little about how the SVN system works.</p>
<p>In every folder that is managed with SVN, it creates a hidden <strong>.svn</strong> subdirectory. In it, a list of all files and subdirectories in that folder are stored, together with technical information about their history as well as every file itself. The file <strong>.svn/entries</strong> contains a list of all files and directories in the folder where <strong>.svn</strong> is located, and the directory <strong>.svn/text-base</strong> contains the recent revisions of all files, with <em>.svn-base</em> added as an additional extension.</p>
<pre>
project
  |- <em>index.php</em>
  |- <em>config.php</em>
  |- dir
  |    |- .svn
  |    |    |- <em>entries</em>
  |    |    '- text-base
  |    |         '- <em>file.ext</em>.svn-base
  |    '- <em>file.ext</em>
  |- .svn
  |    |- <em>entries</em>
  |    |- text-base
  |    |    |- <em>index.php</em>.svn-base
  |    |    '- <em>config.php</em>.svn-base
  |    '- ...
  '- ...
</pre>
<p>Now, normally the <strong>.svn</strong> is hidden, and doesn&#8217;t bother anyone much. However, with default settings, the webserver will treat the files inside it just like any other file &#8211; if requested directly, those files will be served. Using the <strong>entries </strong>file, a list of accessible files can be obtained &#8211; among which there might be configuration files or others containing confidential information. And since the files in the <strong>text-base</strong> directory have their extension changed they will not be processed by, for example, PHP &#8211; the sourcecode will be shown as it is.</p>
<p>This vulnerability was discovered some time ago by a group of Russian programmers. They did a scan of a large amount of websites, including some fairly big names in the .com, .de and .ru zones, and the results were staggering. Owners of hundreds of websites were notified of the vulnerability, and after it was closed, some details were disclosed on a large Russian IT blog <a href="http://habrahabr.ru/blogs/infosecurity/70330/">Habrahabr</a>.</p>
<p>There are multiple ways of securing against the vulnerability. Among the most simple and efficient are:
<ul>
<li>Blocking web access to the <strong>.svn</strong> directory altogether using, for example, the <strong>.htaccess</strong> file for Apache.</li>
<li>Using the <strong>svn export</strong> command instead of the usual <strong>svn checkout</strong> does not produce the <strong>.svn</strong> directory in the first place.</li>
</ul>
<p>While those solutions might seem obvious (and they really are), I was very surprised when I did a simple check among a few websites from my bookmarks list. So webmasters &#8211; if you haven&#8217;t yet known about this, beware.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Folex.biz%2Fblog%2Fsvn-website-deployment%2F&amp;title=%5Blang_en%5DSVN+for+website+deployment+-+watch+it%5B%2Flang_en%5D%5Blang_de%5DSVN+f%C3%BCr+Webseiten+-+aufpassen%5B%2Flang_de%5D%5Blang_ru%5DSVN+%D0%B4%D0%BB%D1%8F+%D0%B2%D0%B5%D0%B1-%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2+-+%D0%BE%D1%81%D1%82%D0%BE%D1%80%D0%BE%D0%B6%D0%BD%D0%BE%5B%2Flang_ru%5D" ><img class="lightsocial_img" src="http://olex.biz/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Folex.biz%2Fblog%2Fsvn-website-deployment%2F&amp;title=%5Blang_en%5DSVN+for+website+deployment+-+watch+it%5B%2Flang_en%5D%5Blang_de%5DSVN+f%C3%BCr+Webseiten+-+aufpassen%5B%2Flang_de%5D%5Blang_ru%5DSVN+%D0%B4%D0%BB%D1%8F+%D0%B2%D0%B5%D0%B1-%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2+-+%D0%BE%D1%81%D1%82%D0%BE%D1%80%D0%BE%D0%B6%D0%BD%D0%BE%5B%2Flang_ru%5D" ><img class="lightsocial_img" src="http://olex.biz/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Folex.biz%2Fblog%2Fsvn-website-deployment%2F&amp;title=%5Blang_en%5DSVN+for+website+deployment+-+watch+it%5B%2Flang_en%5D%5Blang_de%5DSVN+f%C3%BCr+Webseiten+-+aufpassen%5B%2Flang_de%5D%5Blang_ru%5DSVN+%D0%B4%D0%BB%D1%8F+%D0%B2%D0%B5%D0%B1-%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2+-+%D0%BE%D1%81%D1%82%D0%BE%D1%80%D0%BE%D0%B6%D0%BD%D0%BE%5B%2Flang_ru%5D" ><img class="lightsocial_img" src="http://olex.biz/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Folex.biz%2Fblog%2Fsvn-website-deployment%2F&amp;headline=%5Blang_en%5DSVN+for+website+deployment+-+watch+it%5B%2Flang_en%5D%5Blang_de%5DSVN+f%C3%BCr+Webseiten+-+aufpassen%5B%2Flang_de%5D%5Blang_ru%5DSVN+%D0%B4%D0%BB%D1%8F+%D0%B2%D0%B5%D0%B1-%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2+-+%D0%BE%D1%81%D1%82%D0%BE%D1%80%D0%BE%D0%B6%D0%BD%D0%BE%5B%2Flang_ru%5D" ><img class="lightsocial_img" src="http://olex.biz/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=%5Blang_en%5DSVN+for+website+deployment+-+watch+it%5B%2Flang_en%5D%5Blang_de%5DSVN+f%C3%BCr+Webseiten+-+aufpassen%5B%2Flang_de%5D%5Blang_ru%5DSVN+%D0%B4%D0%BB%D1%8F+%D0%B2%D0%B5%D0%B1-%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2+-+%D0%BE%D1%81%D1%82%D0%BE%D1%80%D0%BE%D0%B6%D0%BD%D0%BE%5B%2Flang_ru%5D&amp;url=http%3A%2F%2Folex.biz%2Fblog%2Fsvn-website-deployment%2F" ><img class="lightsocial_img" src="http://olex.biz/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=%5Blang_en%5DSVN+for+website+deployment+-+watch+it%5B%2Flang_en%5D%5Blang_de%5DSVN+f%C3%BCr+Webseiten+-+aufpassen%5B%2Flang_de%5D%5Blang_ru%5DSVN+%D0%B4%D0%BB%D1%8F+%D0%B2%D0%B5%D0%B1-%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2+-+%D0%BE%D1%81%D1%82%D0%BE%D1%80%D0%BE%D0%B6%D0%BD%D0%BE%5B%2Flang_ru%5D&amp;u=http%3A%2F%2Folex.biz%2Fblog%2Fsvn-website-deployment%2F" ><img class="lightsocial_img" src="http://olex.biz/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=%5Blang_en%5DSVN+for+website+deployment+-+watch+it%5B%2Flang_en%5D%5Blang_de%5DSVN+f%C3%BCr+Webseiten+-+aufpassen%5B%2Flang_de%5D%5Blang_ru%5DSVN+%D0%B4%D0%BB%D1%8F+%D0%B2%D0%B5%D0%B1-%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2+-+%D0%BE%D1%81%D1%82%D0%BE%D1%80%D0%BE%D0%B6%D0%BD%D0%BE%5B%2Flang_ru%5D&amp;url=http%3A%2F%2Folex.biz%2Fblog%2Fsvn-website-deployment%2F" ><img class="lightsocial_img" src="http://olex.biz/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=%5Blang_en%5DSVN+for+website+deployment+-+watch+it%5B%2Flang_en%5D%5Blang_de%5DSVN+f%C3%BCr+Webseiten+-+aufpassen%5B%2Flang_de%5D%5Blang_ru%5DSVN+%D0%B4%D0%BB%D1%8F+%D0%B2%D0%B5%D0%B1-%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2+-+%D0%BE%D1%81%D1%82%D0%BE%D1%80%D0%BE%D0%B6%D0%BD%D0%BE%5B%2Flang_ru%5D&amp;url=http%3A%2F%2Folex.biz%2Fblog%2Fsvn-website-deployment%2F" ><img class="lightsocial_img" src="http://olex.biz/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=%5Blang_en%5DSVN+for+website+deployment+-+watch+it%5B%2Flang_en%5D%5Blang_de%5DSVN+f%C3%BCr+Webseiten+-+aufpassen%5B%2Flang_de%5D%5Blang_ru%5DSVN+%D0%B4%D0%BB%D1%8F+%D0%B2%D0%B5%D0%B1-%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2+-+%D0%BE%D1%81%D1%82%D0%BE%D1%80%D0%BE%D0%B6%D0%BD%D0%BE%5B%2Flang_ru%5D&amp;url=http%3A%2F%2Folex.biz%2Fblog%2Fsvn-website-deployment%2F" ><img class="lightsocial_img" src="http://olex.biz/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Folex.biz%2Fblog%2Fsvn-website-deployment%2F&amp;title=%5Blang_en%5DSVN+for+website+deployment+-+watch+it%5B%2Flang_en%5D%5Blang_de%5DSVN+f%C3%BCr+Webseiten+-+aufpassen%5B%2Flang_de%5D%5Blang_ru%5DSVN+%D0%B4%D0%BB%D1%8F+%D0%B2%D0%B5%D0%B1-%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2+-+%D0%BE%D1%81%D1%82%D0%BE%D1%80%D0%BE%D0%B6%D0%BD%D0%BE%5B%2Flang_ru%5D&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://olex.biz/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Folex.biz%2Fblog%2Fsvn-website-deployment%2F" ><img class="lightsocial_img" src="http://olex.biz/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Folex.biz%2Fblog%2Fsvn-website-deployment%2F" ><img class="lightsocial_img" src="http://olex.biz/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Folex.biz%2Fblog%2Fsvn-website-deployment%2F" ><img class="lightsocial_img" src="http://olex.biz/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://olex.biz/blog/svn-website-deployment/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
