<?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>Wed, 27 Jul 2011 13:23:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>SVN for website deployment &#8211; watch it</title>
		<link>http://olex.biz/blog/svn-website-deployment/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=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="bottomcontainerBox" style="">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Folex.biz%2Fblog%2Fsvn-website-deployment%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://olex.biz/blog/svn-website-deployment/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://olex.biz/blog/svn-website-deployment/"  data-text="SVN for website deployment &#8211; watch it" data-count="horizontal" data-via="olex">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></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>

